| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280 |
- # i3 config — adapted for NixOS
- # Dotfiles managed via Stow; packages provided by myOptions.i3 module
- ###############################################################################
- # General
- ###############################################################################
- set $mod Mod4
- font pango:monospace 12
- floating_modifier $mod
- # Border style (Rose Pine inspired)
- client.focused #191724 #191724 #e0def4 #191724 #e0def4
- client.focused_inactive #191724 #191724 #908caa #191724 #908caa
- client.unfocused #191724 #191724 #6e6a86 #191724 #6e6a86
- client.urgent #191724 #eb6f92 #191724 #eb6f92 #eb6f92
- ###############################################################################
- # Workspaces
- ###############################################################################
- 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 "0: "
- ###############################################################################
- # Appearance
- ###############################################################################
- new_window pixel 1
- new_float pixel 1
- gaps inner 10
- gaps outer 5
- popup_during_fullscreen smart
- ###############################################################################
- # Keybindings — Window management
- ###############################################################################
- bindsym $mod+Return exec alacritty
- bindsym $mod+Shift+q kill
- bindsym $mod+c kill
- # Focus (vim keys)
- bindsym $mod+h focus left
- bindsym $mod+j focus down
- bindsym $mod+k focus up
- bindsym $mod+l focus right
- # Focus (arrow keys)
- bindsym $mod+Left focus left
- bindsym $mod+Down focus down
- bindsym $mod+Up focus up
- bindsym $mod+Right focus right
- # Move window (vim keys)
- bindsym $mod+Shift+h move left
- bindsym $mod+Shift+j move down
- bindsym $mod+Shift+k move up
- bindsym $mod+Shift+l move right
- # Move window (arrow keys)
- bindsym $mod+Shift+Left move left
- bindsym $mod+Shift+Down move down
- bindsym $mod+Shift+Up move up
- bindsym $mod+Shift+Right move right
- # Move workspace between outputs
- bindsym $mod+bracketright move workspace to output right
- bindsym $mod+bracketleft move workspace to output left
- # Split orientation
- bindsym $mod+semicolon split h
- # Fullscreen
- bindsym $mod+f fullscreen toggle
- # Layout
- bindsym $mod+s layout stacking
- bindsym $mod+w layout toggle tabbed split
- bindsym $mod+Ctrl+e layout toggle split
- # Floating
- bindsym $mod+Shift+space floating toggle
- bindsym $mod+space focus mode_toggle
- # Parent container
- bindsym $mod+a focus parent
- # Switch 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 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
- # i3 management
- bindsym $mod+Shift+c reload
- bindsym $mod+Shift+r restart
- bindsym $mod+Shift+e exec --no-startup-id "i3-nagbar -t warning -m 'Exit i3?' -b 'Yes' 'i3-msg exit'"
- ###############################################################################
- # Resize mode
- ###############################################################################
- bindsym $mod+r mode "resize"
- mode "resize" {
- bindsym h resize shrink width 10 px or 10 ppt
- bindsym j resize grow height 10 px or 10 ppt
- bindsym k resize shrink height 10 px or 10 ppt
- bindsym l resize grow width 10 px or 10 ppt
- bindsym Left resize shrink width 10 px or 10 ppt
- bindsym Down resize grow height 10 px or 10 ppt
- bindsym Up resize shrink height 10 px or 10 ppt
- bindsym Right resize grow width 10 px or 10 ppt
- bindsym Return mode "default"
- bindsym Escape mode "default"
- bindsym $mod+r mode "default"
- }
- ###############################################################################
- # Keybindings — Launchers & utilities
- ###############################################################################
- # rofi
- bindsym $mod+d exec --no-startup-id rofi -show drun -dpi 1
- bindsym $mod+y exec --no-startup-id clipmenu -i -fn 'monospace:size=12' -nb '#191724' -nf '#e0def4' -sb '#c4a7e7' -sf '#191724'
- # Project launcher
- bindsym $mod+t exec ~/.local/bin/dev-launcher ~/Dev
- # File manager (match niri)
- bindsym $mod+e exec --no-startup-id ~/.local/bin/i3-launch-or-focus thunar
- # StrongDM UI
- bindsym $ood+n exec ~/.local/bin/i3-launch-or-focus --class sdm-connect alacritty -e ~/.local/bin/sdm-ui.sh
- # Power menu
- bindsym XF86PowerOff exec --no-startup-id echo -e "lock\nsuspend\nreboot\nshutdown\nlogout" | $dmenu -p "Power" | xargs -I{} sh -c 'case {} in lock) betterlockscreen -l;; suspend) systemctl suspend;; reboot) systemctl reboot;; shutdown) systemctl poweroff;; logout) i3-msg exit;; esac'
- bindsym $mod+x exec --no-startup-id $HOME/.config/rofi/kill.sh | $dmenu -p "Kill" | xargs -I{} kill {}
- # Screenshot
- bindsym $mod+p exec --no-startup-id flameshot gui
- # Pause notifications
- bindsym $mod+F5 exec --no-startup-id ~/.bin/pause-notifications
- ###############################################################################
- # Mouse bindings
- ###############################################################################
- bindsym --release button2 kill
- bindsym --whole-window $mod+button2 kill
- bindsym button3 floating toggle
- bindsym $mod+button3 floating toggle
- ###############################################################################
- # Scratchpad
- ###############################################################################
- bindsym $mod+u [instance="dropdown"] scratchpad show; [instance="dropdown"] move position center
- bindsym $mod+Shift+u exec --no-startup-id alacritty --class dropdown
- bindsym $mod+Shift+minus move scratchpad
- bindsym $mod+minus scratchpad show
- ###############################################################################
- # Window rules
- ###############################################################################
- for_window [class=".*"] border pixel 0
- for_window [instance="dropdown"] floating enable
- for_window [instance="dropdown"] resize set 2366 1568
- for_window [instance="dropdown"] move scratchpad
- for_window [instance="dropdown"] border pixel 1
- for_window [instance="sdm-connect"] floating enable, resize set 2366 1568, border pixel 1, move position center
- # Workspace assignments
- for_window [workspace=$ws1] layout tabbed
- assign [class="^Slack"] $ws1
- assign [instance="crx__cifhbcnohmdccbgoicgdjpfamggdegmo"] $ws1
- assign [instance="crx__faolnafnngnfdaknnbpnkhgohbobgegn"] $ws1
- assign [class="^zen"] $ws2
- assign [class="^thunderbird"] $ws4
- assign [class="^vesktop$"] $ws4
- ###############################################################################
- # Media & hardware keys
- ###############################################################################
- # Volume (PipeWire/PulseAudio via pactl)
- bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2%
- bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -2%
- bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
- # Brightness (brightnessctl)
- bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
- bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
- # Media playback (playerctl)
- 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
- ###############################################################################
- # Bar — i3status-rust
- ###############################################################################
- bar {
- status_command i3status-rs ~/.config/i3status-rust/config.toml
- position top
- font pango:JetBrainsMono Nerd Font 9
- strip_workspace_numbers false
- colors {
- background #191724
- statusline #e0def4
- separator #6e6a86
- # border bg text
- focused_workspace #c4a7e7 #c4a7e7 #191724
- active_workspace #26233a #26233a #e0def4
- inactive_workspace #191724 #191724 #908caa
- urgent_workspace #eb6f92 #eb6f92 #191724
- }
- }
- ###############################################################################
- # Autostart
- ###############################################################################
- # X11
- exec --no-startup-id setxkbmap us -variant altgr-intl -option caps:escape
- exec --no-startup-id numlockx on
- exec --no-startup-id xrdb -merge ~/.Xresources
- exec --no-startup-id picom
- exec --no-startup-id dunst
- exec --no-startup-id xidlehook \
- --detect-sleep \
- --not-when-audio \
- --not-when-fullscreen \
- --timer 300 'betterlockscreen -l' '' \
- --timer 120 'xset dpms force off' '' \
- --timer 300 'systemctl suspend' ''
- exec --no-startup-id lxqt-policykit-agent
- exec --no-startup-id clipmenud
- exec --no-startup-id autorandr --change
- exec_always --no-startup-id feh --randomize --bg-fill ~/Pictures/* --no-fehbg
- exec --no-startup-id betterlockscreen -u ~/Pictures/*
- # Scratchpad
- exec --no-startup-id alacritty --class dropdown
- # Apps
- exec --no-startup-id easyeffects --gapplication-service
- exec --no-startup-id nm-applet
- # exec --no-startup-id zen-twilight
- # exec --no-startup-id thunderbird
- # exec --no-startup-id discord
- # exec --no-startup-id slack
- # exec --no-startup-id gtk-launch msedge-cifhbcnohmdccbgoicgdjpfamggdegmo-Default
- # exec --no-startup-id gtk-launch msedge-pkooggnaalmfkidjmlhoelhdllpphaga-Default
- # exec --no-startup-id fusuma
|