-
-
Save kolaente/4ba4297df8b3c62d97e1bc5f4192bd22 to your computer and use it in GitHub Desktop.
i3 config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
font pango:Font Awesome 5 Free 8, Hack 10 | |
floating_modifier Mod4 | |
new_window normal 2 | |
new_float normal 2 | |
hide_edge_borders none | |
force_focus_wrapping no | |
focus_follows_mouse yes | |
focus_on_window_activation smart | |
mouse_warping output | |
workspace_layout default | |
workspace_auto_back_and_forth no | |
client.focused #421304 #dd9815 #421304 #421304 #421304 | |
client.focused_inactive #02111b #283044 #ffffff #02111b #02111b | |
client.unfocused #333333 #283044 #888888 #292d2e #5f819d | |
client.urgent #d62246 #ef476f #d4f4dd #d62246 #d62246 | |
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c | |
client.background #1d1f21 | |
bindsym Mod4+0 workspace number 10 | |
bindsym Mod4+1 workspace number 1 | |
bindsym Mod4+2 workspace number 2 | |
bindsym Mod4+3 workspace number 3 | |
bindsym Mod4+4 workspace number 4 | |
bindsym Mod4+5 workspace number 5 | |
bindsym Mod4+6 workspace number 6 | |
bindsym Mod4+7 workspace number 7 | |
bindsym Mod4+8 workspace number 8 | |
bindsym Mod4+9 workspace number 9 | |
bindsym Mod4+Backspace scratchpad show | |
bindsym Mod4+Control+Shift+n exec --no-startup-id /var/nix/home-manager/scripts/i3-move-to-empty-workspace.sh switch | |
bindsym Mod4+Down focus down | |
bindsym Mod4+Left focus left | |
bindsym Mod4+Print exec spectacle --region | |
bindsym Mod4+Return exec i3-sensible-terminal | |
bindsym Mod4+Right focus right | |
bindsym Mod4+Shift+0 move container to workspace number 10 | |
bindsym Mod4+Shift+1 move container to workspace number 1 | |
bindsym Mod4+Shift+2 move container to workspace number 2 | |
bindsym Mod4+Shift+3 move container to workspace number 3 | |
bindsym Mod4+Shift+4 move container to workspace number 4 | |
bindsym Mod4+Shift+5 move container to workspace number 5 | |
bindsym Mod4+Shift+6 move container to workspace number 6 | |
bindsym Mod4+Shift+7 move container to workspace number 7 | |
bindsym Mod4+Shift+8 move container to workspace number 8 | |
bindsym Mod4+Shift+9 move container to workspace number 9 | |
bindsym Mod4+Shift+Backspace move scratchpad | |
bindsym Mod4+Shift+Down move down | |
bindsym Mod4+Shift+Left move left | |
bindsym Mod4+Shift+Print exec spectacle --region --clipboard --background | |
bindsym Mod4+Shift+Right move right | |
bindsym Mod4+Shift+Tab workspace prev | |
bindsym Mod4+Shift+Up move up | |
bindsym Mod4+Shift+c reload | |
bindsym Mod4+Shift+d exec rofi -show window | |
bindsym Mod4+Shift+e exec --no-startup-id systemctl suspend && sh -c '/nix/store/hgll996va2isl11znzi2s75h5bx6xxqs-i3lock-2.12/bin/i3lock -c 2e294e && sleep 5' | |
bindsym Mod4+Shift+h exec --no-startup-id systemctl hibernate && sh -c '/nix/store/hgll996va2isl11znzi2s75h5bx6xxqs-i3lock-2.12/bin/i3lock -c 2e294e && sleep 5' | |
bindsym Mod4+Shift+l exit | |
bindsym Mod4+Shift+minus move scratchpad | |
bindsym Mod4+Shift+n exec --no-startup-id /var/nix/home-manager/scripts/i3-move-to-empty-workspace.sh | |
bindsym Mod4+Shift+q kill | |
bindsym Mod4+Shift+r exec --no-startup-id systemctl reboot | |
bindsym Mod4+Shift+s exec --no-startup-id systemctl poweroff | |
bindsym Mod4+Shift+space floating toggle | |
bindsym Mod4+Tab workspace next | |
bindsym Mod4+Up focus up | |
bindsym Mod4+a focus parent | |
bindsym Mod4+d exec rofi -show drun | |
bindsym Mod4+e layout toggle split | |
bindsym Mod4+f fullscreen toggle | |
bindsym Mod4+h split h | |
bindsym Mod4+l exec sh -c '/nix/store/hgll996va2isl11znzi2s75h5bx6xxqs-i3lock-2.12/bin/i3lock -c 2e294e && sleep 5' | |
bindsym Mod4+minus scratchpad show | |
bindsym Mod4+n exec --no-startup-id /var/nix/home-manager/scripts/i3-empty-workspace.sh | |
bindsym Mod4+p exec systemctl --user restart polybar | |
bindsym Mod4+r mode resize | |
bindsym Mod4+s layout stacking | |
bindsym Mod4+space focus mode_toggle | |
bindsym Mod4+v split v | |
bindsym Mod4+w layout tabbed | |
bindsym XF86AudioLowerVolume exec amixer sset 'Master' 5%- | |
bindsym XF86AudioMute exec amixer sset 'Master' toggle | |
bindsym XF86AudioNext exec playerctl next | |
bindsym XF86AudioPause exec playerctl play-pause | |
bindsym XF86AudioPlay exec playerctl play-pause | |
bindsym XF86AudioPrev exec playerctl previous | |
bindsym XF86AudioRaiseVolume exec amixer sset 'Master' 5%+ | |
bindsym XF86MonBrightnessDown exec brightnessctl s 20%- | |
bindsym XF86MonBrightnessUp exec brightnessctl s +20% | |
mode "resize" { | |
bindsym Down resize grow height 10 px or 10 ppt | |
bindsym Escape mode default | |
bindsym Left resize shrink width 10 px or 10 ppt | |
bindsym Return mode default | |
bindsym Right resize grow width 10 px or 10 ppt | |
bindsym Up resize shrink height 10 px or 10 ppt | |
} | |
bar { | |
font pango:monospace 8 | |
mode dock | |
hidden_state hide | |
position top | |
status_command i3status-rs .config/i3status-rs/config.toml | |
i3bar_command /nix/store/25sgf9rkipkr9439zm4c3xmc0mddya0g-i3-4.18.3/bin/i3bar | |
workspace_buttons yes | |
strip_workspace_numbers no | |
tray_output primary | |
colors { | |
background #2b303b | |
statusline #dcdcdc | |
separator #666666 | |
focused_workspace #421304 #dd9815 #421304 | |
active_workspace #333333 #5f676a #ffffff | |
inactive_workspace #333333 #2b303b #888888 | |
urgent_workspace #d62246 #ef476f #d4f4dd | |
binding_mode #2f343a #900000 #ffffff | |
} | |
font pango:monospace 9 | |
} | |
for_window [title="Calculator"] floating enable | |
for_window [title="win0"] floating enable | |
for_window [title="NoiseTorch"] floating enable | |
exec autorandr --change | |
exec feh --bg-fill ~/Pictures/bg | |
exec_always --no-startup-id setxkbmap -model pc104 -layout de,us -variant ,, -option grp:alt_shift_toggle | |
exec_always --no-startup-id nm-applet | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
let | |
mod = "Mod4"; | |
i3Lock = "sh -c '${pkgs.i3lock}/bin/i3lock -c 2e294e && sleep 5'"; | |
extendedConfig = [ | |
./i3status-rs.nix | |
./rofi-config.nix | |
]; | |
in { | |
imports = extendedConfig; | |
xsession.windowManager.i3 = { | |
enable = true; | |
config = { | |
modifier = mod; | |
startup = [ | |
{ command = "autorandr --change"; } | |
{ command = "feh --bg-fill ~/Pictures/bg"; } | |
{ command = "setxkbmap -model pc104 -layout de,us -variant ,, -option grp:alt_shift_toggle"; always = true; notification = false; } | |
{ command = "nm-applet"; always = true; notification = false; } | |
]; | |
colors = { | |
background = "#1d1f21"; | |
focused = { border = "#421304"; background = "#dd9815"; text = "#421304"; indicator = "#421304"; childBorder = "#421304"; }; # Warm | |
focusedInactive = { border = "#02111b"; background = "#283044"; text = "#ffffff"; indicator = "#02111b"; childBorder = "#02111b"; }; | |
unfocused = { border = "#333333"; background = "#283044"; text = "#888888"; indicator = "#292d2e"; childBorder = "#5f819d"; }; | |
urgent = { border = "#d62246"; background = "#ef476f"; text = "#d4f4dd"; indicator = "#d62246"; childBorder = "#d62246"; }; | |
}; | |
fonts = ["Font Awesome 5 Free 8" "Hack 10"]; | |
keybindings = lib.mkOptionDefault { | |
# Lock | |
"${mod}+l" = "exec ${i3Lock}"; | |
# Shutdown | |
"${mod}+Shift+s" = "exec --no-startup-id systemctl poweroff"; | |
# Reboot | |
"${mod}+Shift+r" = "exec --no-startup-id systemctl reboot"; | |
# Hibernate | |
"${mod}+Shift+h" = "exec --no-startup-id systemctl hibernate && ${i3Lock}"; | |
# Logout | |
"${mod}+Shift+l" = "exit"; | |
# Suspend | |
"${mod}+Shift+e" = "exec --no-startup-id systemctl suspend && ${i3Lock}"; | |
# Cycle through workspaces | |
"${mod}+Tab" = "workspace next"; | |
"${mod}+Shift+Tab" = "workspace prev"; | |
# New Empty workspace | |
"${mod}+n" = "exec --no-startup-id /var/nix/home-manager/scripts/i3-empty-workspace.sh"; | |
# Move current container to new workspace | |
"${mod}+Shift+n" = "exec --no-startup-id /var/nix/home-manager/scripts/i3-move-to-empty-workspace.sh"; | |
# Move current container to new workspace and switch to it | |
"${mod}+Control+Shift+n" = "exec --no-startup-id /var/nix/home-manager/scripts/i3-move-to-empty-workspace.sh switch"; | |
# Scratchpad | |
"${mod}+Shift+Backspace" = "move scratchpad"; | |
"${mod}+Backspace" = "scratchpad show"; | |
# Screenshots | |
"${mod}+Print" = "exec spectacle --region"; | |
"${mod}+Shift+Print" = "exec spectacle --region --clipboard --background"; | |
# Restart Polybar | |
"${mod}+p" = "exec systemctl --user restart polybar"; | |
# rofi | |
"${mod}+d" = "exec rofi -show drun"; | |
"${mod}+Shift+d" = "exec rofi -show window"; | |
# Screen brightness controls | |
"XF86MonBrightnessUp" = "exec brightnessctl s +20%"; | |
"XF86MonBrightnessDown" = "exec brightnessctl s 20%-"; | |
# Media player controls | |
"XF86AudioPlay" = "exec playerctl play-pause"; | |
"XF86AudioPause" = "exec playerctl play-pause"; | |
"XF86AudioNext" = "exec playerctl next"; | |
"XF86AudioPrev" = "exec playerctl previous"; | |
# Media volume controls | |
"XF86AudioMute" = "exec amixer sset 'Master' toggle"; | |
"XF86AudioLowerVolume" = "exec amixer sset 'Master' 5%-"; | |
"XF86AudioRaiseVolume" = "exec amixer sset 'Master' 5%+"; | |
}; | |
bars = [ | |
{ | |
extraConfig = "font pango:monospace 9"; | |
position = "top"; | |
statusCommand = "i3status-rs .config/i3status-rs/config.toml"; | |
colors = { | |
separator = "#666666"; | |
background = "#2b303b"; | |
statusline = "#dcdcdc"; | |
urgentWorkspace = { border = "#d62246"; background = "#ef476f"; text = "#d4f4dd"; }; | |
focusedWorkspace = { border = "#421304"; background = "#dd9815"; text = "#421304"; }; | |
inactiveWorkspace = { border = "#333333"; background = "#2b303b"; text = "#888888"; }; | |
}; | |
} | |
]; | |
floating.criteria = [ | |
{ title = "Calculator"; } | |
{ title = "win0"; } | |
{ title = "NoiseTorch"; } | |
]; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment