2018-02-20 07:55:53 -06:00
# ArchLabs i3 config
2017-10-16 14:38:02 -05:00
2019-10-17 04:37:59 -05:00
# border & title
for_window [class="^.*"] border pixel 1, title_format "<b> %class >> %title </b>"
2017-10-16 14:38:02 -05:00
2017-10-23 18:35:35 -05:00
# gaps
2019-10-17 04:37:59 -05:00
gaps inner 8
gaps outer 0
2017-10-16 14:38:02 -05:00
2017-12-01 00:21:33 -06:00
# font
2018-12-02 22:19:37 -06:00
font pango:monospace 11
2017-12-01 00:21:33 -06:00
2019-10-17 04:37:59 -05:00
# mod key used for most binds
# Mod1 = Alt
# Mod4 = Super
2017-12-05 21:50:28 -06:00
set $Mod Mod4
2017-10-16 14:38:02 -05:00
2017-12-01 00:21:33 -06:00
# direction keys
2017-10-16 14:38:02 -05:00
set $up l
set $down k
set $left j
set $right semicolon
2019-09-15 01:20:26 -05:00
############### Bar ##################
bar {
status_command i3status
}
2017-10-16 14:38:02 -05:00
2018-02-09 22:35:27 -06:00
############### Autostart ##################
2017-12-01 00:21:33 -06:00
# run with reload
2017-12-05 21:50:28 -06:00
exec_always --no-startup-id xrdb -load ~/.Xresources
2017-12-26 17:03:54 -06:00
2017-12-01 00:21:33 -06:00
# run once
2018-02-09 22:35:27 -06:00
exec --no-startup-id xfsettingsd
2017-12-01 00:21:33 -06:00
2018-02-09 22:35:27 -06:00
############# Bindings ##################
2017-12-01 00:21:33 -06:00
2022-08-09 20:13:06 -05:00
# launchers
bindsym Mod1+p exec --no-startup-id rofi_run -r
bindsym Control+space exec --no-startup-id rofi_run -r
2017-12-01 00:21:33 -06:00
# kill focused window
2017-12-05 21:50:28 -06:00
bindsym $Mod+Shift+q kill
2017-12-01 00:21:33 -06:00
bindsym Mod1+q kill
2018-12-01 20:08:48 -06:00
bindsym Mod1+F4 kill
2017-12-01 00:21:33 -06:00
# core
2022-08-13 15:20:28 -05:00
bindsym $Mod+w exec --no-startup-id al-browser
bindsym $Mod+f exec --no-startup-id al-filemanager
bindsym $Mod+t exec --no-startup-id al-terminal
bindsym $Mod+Return exec --no-startup-id al-terminal
bindsym Mod1+Shift+Return exec --no-startup-id al-terminal
bindsym Control+Shift+t exec --no-startup-id al-terminal
2017-12-01 00:21:33 -06:00
2018-02-09 22:35:27 -06:00
# logout script
2018-08-26 20:11:10 -05:00
bindsym $Mod+x exec --no-startup-id rofi_run -l
2017-12-01 00:21:33 -06:00
2018-02-09 22:35:27 -06:00
# Screenshot
2018-08-26 20:11:10 -05:00
bindsym Print exec --no-startup-id "scrot '%S.png' -e 'mv $f $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png ; feh $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png'"
2017-12-01 00:21:33 -06:00
# audio
2018-10-29 03:36:27 -05:00
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym XF86AudioStop exec --no-startup-id playerctl stop
2019-10-17 04:37:59 -05:00
bindsym XF86AudioMute exec --no-startup-id pamixer -t
bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 2
bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 2
2018-02-09 22:35:27 -06:00
# backlight
2018-10-29 03:36:27 -05:00
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10
2017-12-01 00:21:33 -06:00
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10
2018-02-09 22:35:27 -06:00
########### Workspace Bindings ###############
2017-12-01 00:21:33 -06:00
2017-10-16 14:38:02 -05:00
# switch to workspace
2019-10-17 04:37:59 -05:00
bindsym $Mod+1 workspace 1
bindsym $Mod+2 workspace 2
bindsym $Mod+3 workspace 3
bindsym $Mod+4 workspace 4
bindsym $Mod+5 workspace 5
bindsym $Mod+6 workspace 6
bindsym $Mod+7 workspace 7
bindsym $Mod+8 workspace 8
2017-10-16 14:38:02 -05:00
2018-12-01 20:08:48 -06:00
# switch to workspace - numpad alternatives
2022-12-07 20:40:04 -06:00
bindsym $Mod+Mod2+KP_1 workspace 1
bindsym $Mod+Mod2+KP_2 workspace 2
bindsym $Mod+Mod2+KP_3 workspace 3
bindsym $Mod+Mod2+KP_4 workspace 4
bindsym $Mod+Mod2+KP_5 workspace 5
bindsym $Mod+Mod2+KP_6 workspace 6
bindsym $Mod+Mod2+KP_7 workspace 7
bindsym $Mod+Mod2+KP_8 workspace 8
2018-12-01 20:08:48 -06:00
# switch to next or previous workspace
2022-12-07 20:40:04 -06:00
bindsym Control+Mod1+Left workspace prev
bindsym Control+Mod1+Right workspace next
2018-12-01 20:08:48 -06:00
2017-10-16 14:38:02 -05:00
# move focused container to workspace
2019-10-17 04:37:59 -05:00
bindsym $Mod+Shift+1 move container to workspace 1; workspace 1
bindsym $Mod+Shift+2 move container to workspace 2; workspace 2
bindsym $Mod+Shift+3 move container to workspace 3; workspace 3
bindsym $Mod+Shift+4 move container to workspace 4; workspace 4
bindsym $Mod+Shift+5 move container to workspace 5; workspace 5
bindsym $Mod+Shift+6 move container to workspace 6; workspace 6
bindsym $Mod+Shift+7 move container to workspace 7; workspace 7
bindsym $Mod+Shift+8 move container to workspace 8; workspace 8
2017-10-16 14:38:02 -05:00
2018-12-01 20:08:48 -06:00
# move focused container to workspace - numpad alternatives
2019-10-17 04:37:59 -05:00
bindsym $Mod+Shift+Mod2+KP_End move container to workspace 1; workspace 1
bindsym $Mod+Shift+Mod2+KP_Down move container to workspace 2; workspace 2
bindsym $Mod+Shift+Mod2+KP_Next move container to workspace 3; workspace 3
bindsym $Mod+Shift+Mod2+KP_Left move container to workspace 4; workspace 4
bindsym $Mod+Shift+Mod2+KP_Begin move container to workspace 5; workspace 5
bindsym $Mod+Shift+Mod2+KP_Right move container to workspace 6; workspace 7
bindsym $Mod+Shift+Mod2+KP_Home move container to workspace 7; workspace 7
bindsym $Mod+Shift+Mod2+KP_Up move container to workspace 8; workspace 8
2018-12-01 20:08:48 -06:00
2018-02-09 22:35:27 -06:00
############## Reload configs ################
2017-10-16 14:38:02 -05:00
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
2017-12-05 21:50:28 -06:00
bindsym $Mod+Shift+r restart
2017-10-16 14:38:02 -05:00
# reload the configuration file
2017-12-05 21:50:28 -06:00
bindsym $Mod+Shift+c reload
2017-10-16 14:38:02 -05:00
2022-12-08 18:26:24 -06:00
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
2018-02-09 22:35:27 -06:00
############ Container/Window control ############
2017-10-16 14:38:02 -05:00
2017-12-01 00:21:33 -06:00
# Scratchpad, Floating
2018-12-01 20:08:48 -06:00
bindsym $Mod+space floating toggle
2018-02-05 21:31:56 -06:00
floating_modifier Mod1
2017-10-16 14:38:02 -05:00
2018-02-10 18:22:16 -06:00
bindsym $Mod+Shift+z move scratchpad
bindsym $Mod+z scratchpad show
2017-10-16 14:38:02 -05:00
# change focus
2017-12-05 21:50:28 -06:00
bindsym $Mod+$left focus left
bindsym $Mod+$down focus down
bindsym $Mod+$up focus up
bindsym $Mod+$right focus right
2017-10-16 14:38:02 -05:00
# alternatively, you can use the cursor keys:
2017-12-05 21:50:28 -06:00
bindsym $Mod+Left focus left
bindsym $Mod+Down focus down
bindsym $Mod+Up focus up
bindsym $Mod+Right focus right
2017-10-16 14:38:02 -05:00
2018-02-05 21:31:56 -06:00
bindsym $Mod+p focus parent
bindsym $Mod+c focus child
2017-10-16 14:38:02 -05:00
# move focused window
2017-12-05 21:50:28 -06:00
bindsym $Mod+Shift+$left move left 10px
bindsym $Mod+Shift+$down move down 10px
bindsym $Mod+Shift+$up move up 10px
bindsym $Mod+Shift+$right move right 10px
2017-10-16 14:38:02 -05:00
# alternatively, you can use the cursor keys:
2017-12-05 21:50:28 -06:00
bindsym $Mod+Shift+Up move up 10px
bindsym $Mod+Shift+Down move down 10px
bindsym $Mod+Shift+Left move left 10px
bindsym $Mod+Shift+Right move right 10px
2017-10-16 14:38:02 -05:00
2017-12-01 00:21:33 -06:00
# Size
2018-02-05 21:31:56 -06:00
bindsym Mod1+Up resize shrink height 10 px or 1 ppt
bindsym Mod1+Down resize grow height 10 px or 1 ppt
bindsym Mod1+Left resize shrink width 10 px or 1 ppt
bindsym Mod1+Right resize grow width 10 px or 1 ppt
2017-10-16 14:38:02 -05:00
2017-12-05 21:50:28 -06:00
# layout toggle, keycode 23 is Tab
bindcode Mod1+23 layout toggle tabbed split
bindcode $Mod+23 layout toggle splitv splith
2017-10-16 14:38:02 -05:00
# switch to workspace with urgent window
2017-12-05 21:50:28 -06:00
for_window [urgent="latest"] focus
focus_on_window_activation focus
2017-10-16 14:38:02 -05:00
# container layout
2017-12-05 21:50:28 -06:00
bindsym $Mod+h split h
bindsym $Mod+v split v
bindsym $Mod+Shift+t layout tabbed
bindsym $Mod+Shift+s layout stacking
bindsym $Mod+Shift+h layout toggle split
2018-10-29 03:36:27 -05:00
2017-12-01 00:21:33 -06:00
default_orientation horizontal
2017-10-16 14:38:02 -05:00
2018-02-09 22:35:27 -06:00
############### Border & Gaps ###############
2017-10-16 14:38:02 -05:00
2017-12-01 00:21:33 -06:00
new_window normal
2018-10-29 03:36:27 -05:00
new_float normal
2017-10-16 14:38:02 -05:00
hide_edge_borders both
2018-10-29 03:36:27 -05:00
2017-12-05 21:50:28 -06:00
bindsym $Mod+shift+b border toggle
2017-10-16 14:38:02 -05:00
2018-02-09 22:35:27 -06:00
# changing border style
2017-12-05 21:50:28 -06:00
bindsym $Mod+n border normal
bindsym $Mod+y border 1pixel
bindsym $Mod+u border none
# change gaps
2018-10-29 03:36:27 -05:00
bindsym $Mod+plus gaps inner current plus 5
bindsym $Mod+minus gaps inner current minus 5
bindsym $Mod+Shift+plus gaps outer current plus 5
bindsym $Mod+Shift+minus gaps outer current minus 5
bindsym $Mod+Control+plus gaps inner all plus 5
bindsym $Mod+Control+minus gaps inner all minus 5
bindsym $Mod+Control+Shift+plus gaps outer all plus 5
bindsym $Mod+Control+Shift+minus gaps outer all minus 5
2017-10-23 18:35:35 -05:00
2018-02-09 22:35:27 -06:00
############ application settings ############
2017-12-01 00:21:33 -06:00
2019-10-17 04:37:59 -05:00
# assign applications to specific workspace
assign [class="(?i)(?:firefox)"] → 1
assign [class="(?i)(?:geany)"] → 2
assign [class="(?i)(?:thunar)"] → 3
2017-12-05 21:50:28 -06:00
# focus, floating, & sticky
2022-12-07 20:40:04 -06:00
for_window [class="(?i)(?:firefox|geany|thunar)"] focus
2019-10-17 04:37:59 -05:00
for_window [class="(?i)(?:qt5ct|pinentry)"] floating enable, focus
2018-02-05 21:31:56 -06:00
for_window [title="(?i)(?:copying|deleting|moving)"] floating enable
2018-10-29 03:36:27 -05:00
for_window [window_role="(?i)(?:pop-up|setup)"] floating enable
popup_during_fullscreen smart
2018-08-15 00:40:55 -05:00