better focus_workspace (handle multi-output), better bar color

This commit is contained in:
2020-09-23 16:26:02 +02:00
parent 973e95d9d3
commit 468caf4c9d
3 changed files with 11 additions and 4 deletions

2
.gitignore vendored
View File

@@ -1 +1 @@
run/previous run/previous_*

View File

@@ -10,8 +10,9 @@ fi
# Get current workspace # Get current workspace
CURRENT_WORKSPACE=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num') CURRENT_WORKSPACE=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).num')
PREVIOUS_WORKSPACE=$(cat ~/.config/i3/run/previous) CURRENT_OUTPUT=$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true).output')
echo -n ${CURRENT_WORKSPACE} > ~/.config/i3/run/previous PREVIOUS_WORKSPACE=$(cat ~/.config/i3/run/previous_${CURRENT_OUTPUT})
echo -n ${CURRENT_WORKSPACE} > ~/.config/i3/run/previous_${CURRENT_OUTPUT}
if [ $1 == "previous" ]; then if [ $1 == "previous" ]; then
i3-msg "workspace number ${PREVIOUS_WORKSPACE}" i3-msg "workspace number ${PREVIOUS_WORKSPACE}"

8
config
View File

@@ -21,7 +21,6 @@ exec --no-startup-id "nm-applet > /dev/null 2>&1"
exec --no-startup-id "pasystray > /dev/null 2>&1" exec --no-startup-id "pasystray > /dev/null 2>&1"
exec --no-startup-id "blueman-applet > /dev/null 2>&1" exec --no-startup-id "blueman-applet > /dev/null 2>&1"
exec --no-startup-id "compton > /dev/null 2>&1" exec --no-startup-id "compton > /dev/null 2>&1"
exec --no-startup-id "compton > /dev/null 2>&1"
exec --no-startup-id "xss-lock slock" exec --no-startup-id "xss-lock slock"
############ ############
@@ -42,6 +41,7 @@ bindsym $mod+F3 exec ~/.scripts/generate-rofi-ssh && rofi -lines
bindsym $mod+j exec ~/.config/i3/bin/menu_workspace_switch bindsym $mod+j exec ~/.config/i3/bin/menu_workspace_switch
# change container layout (tabbed, toggle split) # change container layout (tabbed, toggle split)
bindsym $mod+space layout toggle tabbed splith bindsym $mod+space layout toggle tabbed splith
bindsym $mod+f fullscreen toggle
# Change window focus # Change window focus
bindsym $mod+Tab focus next bindsym $mod+Tab focus next
bindsym $mod+Shift+Tab focus prev bindsym $mod+Shift+Tab focus prev
@@ -88,4 +88,10 @@ bar {
position top position top
separator_symbol " ⁞ " separator_symbol " ⁞ "
tray_output HDMI-1 tray_output HDMI-1
colors {
focused_workspace #ffffff #ffffff #000000
active_workspace #ffffff #ffffff #000000
inactive_workspace #000000 #000000 #ffffff
urgent_workspace #ff0000 #ff0000 #ffffff
}
} }