dotfiles/.config/i3/config

185 lines
5.5 KiB
Plaintext

# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
# note: I have no idea what I'm doing.
set $mod Mod4
font pango:iosevka 12
floating_modifier $mod
focus_follows_mouse no
# start a terminal
bindsym $mod+Shift+Return exec --no-startup-id termite
bindsym $mod+Control+Return exec --no-startup-id urxvt
# kill focused window
bindsym $mod+Shift+c kill
# start rofi (a program launcher)
bindsym $mod+p exec --no-startup-id rofi -show run
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# move focused window
bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
# split in horizontal orientation
bindsym $mod+Control+h split h
# split in vertical orientation
bindsym $mod+Control+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+d focus child
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
workspace $ws1 output DP-2
workspace $ws2 output DP-2
workspace $ws3 output DP-2
workspace $ws4 output DP-2
workspace $ws5 output DP-2
workspace $ws6 output DP-2
workspace $ws7 output DP-2
workspace $ws8 output DP-2
workspace $ws9 output DP-2
workspace $ws10 output DP-2
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
# nagivate between workspaces
bindsym $mod+bracketleft workspace prev
bindsym $mod+bracketright workspace next
bindsym $mod+Shift+Tab workspace prev
bindsym $mod+Tab workspace next
bindsym $mod+q reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+q 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'"
mode "resize" {
bindsym $mod+h resize shrink width 5 px or 5 ppt
bindsym $mod+j resize grow height 5 px or 5 ppt
bindsym $mod+k resize shrink height 5 px or 5 ppt
bindsym $mod+l resize grow width 5 px or 5 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 +2%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -2%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 1.5%
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 1.5%
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
set $bg-color #2f343f
set $inactive-bg-color #2f343f
set $text-color #f3f4f5
set $inactive-text-color #676E7D
set $urgent-bg-color #E53935
# window colors
# border background text indicator
client.focused $bg-color $bg-color $text-color #00ff00
client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color #00ff00
client.urgent $urgent-bg-color $urgent-bg-color $text-color #00ff00
bar {
status_command i3blocks -c ~/.config/i3/i3blocks.conf
position top
colors {
background $bg-color
separator #757575
focused_workspace $bg-color $bg-color $text-color
inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
}
}
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="Preferences$"] floating enable
set $default_gaps_inner 12
set $default_gaps_outer 0
gaps inner $default_gaps_inner
gaps outer $default_gaps_outer
popup_during_fullscreen smart
new_window pixel 0
workspace_auto_back_and_forth yes