Skip to content

Instantly share code, notes, and snippets.

@nycksw
Last active March 12, 2025 19:56
Show Gist options
  • Select an option

  • Save nycksw/ad3d0f71f52f699826c3e8791d502a93 to your computer and use it in GitHub Desktop.

Select an option

Save nycksw/ad3d0f71f52f699826c3e8791d502a93 to your computer and use it in GitHub Desktop.
.config/i3/config
set $mod Mod4
set $alt Mod1
font pango:Ubuntu Regular 10
exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod (or drag the titlebar) to move windows.
floating_modifier $mod
tiling_drag modifier titlebar
# Start a terminal.
bindsym $mod+Return exec i3-sensible-terminal
# Kill focused container.
bindsym $mod+shift+q kill
# Start program launcher.
bindsym $mod+d exec --no-startup-id dmenu_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 container.
bindsym $mod+shift+h move left
bindsym $mod+shift+j move down
bindsym $mod+shift+k move up
bindsym $mod+shift+l move right
# Set vertical orientation for splits.
bindsym $mod+v split v
# Set horizontal orientation for splits; "b" for for (b)orizontal, o(b)viously.
bindsym $mod+b split h
# 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
# Floating scratchpad for quick notes.
bindsym $mod+shift+semicolon move scratchpad
bindsym $mod+semicolon scratchpad show
set $bg-color #47663B
set $inactive-bg-color #000000
set $text-color #e8ecd7
set $inactive-text-color #eed3b1
set $urgent-bg-color #e53935
# Variable 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 $urgent-text-color #00ff00
hide_edge_borders both
bar {
status_command i3blocks
colors {
background $inactive-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
}
}
bindsym $mod+a focus parent
bindsym $mod+shift+a focus child
# General Layout Structure.
# -----------------------------------
# Left Display | Right Display
# -----------------------------------
# 1 chrome | 6 misc.
# 2 obsidian | 7 term+firefox
# 3 burp/wireshark | 8 term
# 4 spotify | 9 misc.
# 5 irc | 0 settings
set $left eDP-1
set $right HDMI-1-0
exec_always xrandr --output $left --mode 1920x1080 --pos 0x0 --rotate normal \
--output $right --primary --right-of $left --mode 1920x1080 --pos 0x0 \
--rotate normal
workspace 1 output $left
workspace 2 output $left
workspace 3 output $left
workspace 4 output $left
workspace 5 output $left
workspace 6 output $right
workspace 7 output $right
workspace 8 output $right
workspace 9 output $right
workspace 10 output $right
# Pin certain applications to a specific workspace based on class attribute.
assign [class="Google-chrome"] 1
assign [class="obsidian"] 2
assign [class="Burp"] 3
assign [class="Wireshark"] 3
assign [class="bloodhound"] 3
assign [class="Spotify"] 4
assign [class="FirefoxMain"] 7
assign [class="Pavucontrol"] 10
assign [class="Blueman-manager"] 10
# Terminator uses window_role instead of class.
assign [window_role="TermMain"] 7
workspace_layout stacking
# Adjacent keys "uiop[" are aliases for workspaces 1-5.
bindsym $mod+u workspace number 1
bindsym $mod+i workspace number 2
bindsym $mod+o workspace number 3
bindsym $mod+p workspace number 4
bindsym $mod+bracketleft workspace number 5
bindsym $mod+shift+u move container to workspace number 1
bindsym $mod+shift+i move container to workspace number 2
bindsym $mod+shift+o move container to workspace number 3
bindsym $mod+shift+p move container to workspace number 4
bindsym $mod+shift+bracketleft move container to workspace number 5
# Adjacent keys "N,./" are aliases for 67890.
bindsym $mod+n workspace number 6
bindsym $mod+m workspace number 7
bindsym $mod+comma workspace number 8
bindsym $mod+period workspace number 9
bindsym $mod+slash workspace number 10
bindsym $mod+shift+m move container to workspace number 7
bindsym $mod+shift+comma move container to workspace number 8
bindsym $mod+shift+period move container to workspace number 9
bindsym $mod+shift+slash move container to workspace number 10
bindsym $mod+shift+c reload
bindsym $mod+shift+r restart
bindsym $mod+shift+e exec "i3-nagbar -t warning -m 'Exit i3?' -B 'Yes' 'i3-msg exit'"
# Window resizing.
bindsym $mod+r mode "resize"
# These bindings apply only to resize mode.
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym j resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
# Exit resize mode.
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
# Screenshots.
bindsym $mod+shift+s exec flameshot gui
# Screen locking.
set $lock_screen "sh -c 'i3lock -i ~/.bg_alien_photo.png --tiling -e -f; \
~/.config/i3/scripts/capsoff.sh; setxkbmap -option caps:super'"
exec --no-startup-id xss-lock --transfer-sleep-lock -- $lock_screen
bindsym $mod+shift+x exec --no-startup-id $lock_screen
exec_always ~/.config/i3/scripts/capsoff.sh
exec_always --no-startup-id setxkbmap -option caps:super
#exec_always --no-startup-id picom -f
exec_always --no-startup-id feh --bg-center ~/.bg_alien_photo.jpg
exec --no-startup-id firefox --class="FirefoxMain"
exec --no-startup-id google-chrome
exec --no-startup-id obsidian
exec --no-startup-id pavucontrol
exec --no-startup-id blueman-manager
exec --no-startup-id spotify
exec --no-startup-id terminator -r="TermMain"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment