feat(i3): map workspaces to monitors

This commit is contained in:
TheK4n 2023-04-08 23:42:49 +03:00
parent ab5dd5c11a
commit 12900a00b5

View File

@ -13,6 +13,7 @@
# screen layout # screen layout
exec --no-startup-id ~/.screenlayout/default.sh exec --no-startup-id ~/.screenlayout/default.sh
set $SecMon "HDMI-0"
for_window [tiling] border pixel 3 for_window [tiling] border pixel 3
set $mod Mod4 set $mod Mod4
@ -65,7 +66,7 @@ bindsym $mod+Return exec alacritty --working-directory ~
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# start dmenu (a program launcher) # start dmenu (a program launcher)
bindsym $mod+d exec --no-startup-id dmenu_run -i -b -m 0 -p "Program to run: " -fn "FontAwesome:pixelsize=15" bindsym $mod+d exec --no-startup-id dmenu_run -i -b -p "Program to run: " -fn "FontAwesome:pixelsize=15"
# A more modern dmenu replacement is rofi: # A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun" # bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a # There also is i3-dmenu-desktop which only displays applications shipping a
@ -123,16 +124,16 @@ bindsym $mod+v split v
# Define names for default workspaces for which we configure key bindings later on. # Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places. # We use variables to avoid repeating the names in multiple places.
set $ws1 "1" set $ws1 "1: Work"
set $ws2 "2" set $ws2 "2: Code"
set $ws3 "3" set $ws3 "3"
set $ws4 "4" set $ws4 "4"
set $ws5 "5" set $ws5 "5"
set $ws6 "6" set $ws6 "6"
set $ws7 "7" set $ws7 "7"
set $ws8 "8" set $ws8 "8"
set $ws9 "9" set $ws9 "9: Music"
set $ws10 "10" set $ws10 "10: Media"
# switch to workspace # switch to workspace
bindsym $mod+1 workspace number $ws1 bindsym $mod+1 workspace number $ws1
@ -195,8 +196,10 @@ bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
bar { bar {
output primary
output nonprimary
tray_output primary
status_command exec ~/.local/bin/i3status_wrapper status_command exec ~/.local/bin/i3status_wrapper
tray_output DP-0
} }
# Screenshots # Screenshots
@ -211,5 +214,11 @@ bindsym Ctrl+Shift+Print exec --no-startup-id maim --select | xclip -selection c
exec --no-startup-id xrandr --dpi 80 exec --no-startup-id xrandr --dpi 80
exec --no-startup-id feh --randomize --no-fehbg --bg-scale $HOME/.wallpaper/* exec --no-startup-id feh --randomize --no-fehbg --bg-scale $HOME/.wallpaper/*
# default workspaces for monitors in setup
workspace $ws1 output primary
workspace $ws2 output primary
workspace $ws9 output $SecMon
workspace $ws10 output $SecMon
exec --no-startup-id i3-msg 'workspace $ws1; exec firefox'