nixos-config/home-manager/i3.nix

126 lines
4.7 KiB
Nix

{ extra, config, ... }:
{
home.file.".config/i3/config".text = ''
# i3 config file (v4)
gaps inner 10px
gaps outer 5px
default_border pixel 3
bindsym Mod4+r exec --no-startup-id rofi -show drun
bindsym Mod4+p exec --no-startup-id ${extra.cpypsk}
bindsym Mod4+Return exec --no-startup-id wezterm
bindsym Mod4+BackSpace exec --no-startup-id firefox
bindsym --release Mod4+s exec --no-startup-id slock
''
+
(if config.mcsr then ''
bindsym Mod1+Prior exec --no-startup-id ${extra.eyezoom} eye
bindsym Mod1+Next exec --no-startup-id ${extra.eyezoom} default
bindsym Mod1+Home exec --no-startup-id ${extra.eyezoom} wide
bindsym Mod1+End exec --no-startup-id ${extra.eyezoom} thin
'' else "")
+
''
# class border backgr. text indicator child_border
client.focused #d79921 #d79921 #d79921 #d79921 #d79921
client.focused_inactive #d79921 #d79921 #d79921 #d79921 #d79921
client.unfocused #b57614 #b57614 #b57614 #b57614 #b57614
client.urgent #cc241d #cc241d #cc241d #cc241d #cc241d
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
floating_modifier Mod4
tiling_drag modifier titlebar
bindsym Mod4+Shift+q kill
bindsym Mod4+Shift+r restart
bindsym Mod4+t split toggle
bindsym Mod4+f fullscreen toggle
bindsym Mod4+space floating toggle
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"
# switch to workspace
bindsym Mod4+1 workspace number $ws1
bindsym Mod4+2 workspace number $ws2
bindsym Mod4+3 workspace number $ws3
bindsym Mod4+4 workspace number $ws4
bindsym Mod4+5 workspace number $ws5
bindsym Mod4+6 workspace number $ws6
bindsym Mod4+7 workspace number $ws7
bindsym Mod4+8 workspace number $ws8
bindsym Mod4+9 workspace number $ws9
# move focused container to workspace
bindsym Mod4+Shift+1 move container to workspace number $ws1
bindsym Mod4+Shift+2 move container to workspace number $ws2
bindsym Mod4+Shift+3 move container to workspace number $ws3
bindsym Mod4+Shift+4 move container to workspace number $ws4
bindsym Mod4+Shift+5 move container to workspace number $ws5
bindsym Mod4+Shift+6 move container to workspace number $ws6
bindsym Mod4+Shift+7 move container to workspace number $ws7
bindsym Mod4+Shift+8 move container to workspace number $ws8
bindsym Mod4+Shift+9 move container to workspace number $ws9
bindsym Mod4+h focus left
bindsym Mod4+j focus down
bindsym Mod4+k focus up
bindsym Mod4+l focus right
bindsym Mod4+Shift+h move left
bindsym Mod4+Shift+j move down
bindsym Mod4+Shift+k move up
bindsym Mod4+Shift+l move right
bindsym Mod4+Control+h resize grow left
bindsym Mod4+Control+j resize grow down
bindsym Mod4+Control+k resize grow up
bindsym Mod4+Control+l resize grow right
# plasma stuff
exec --no-startup-id wmctrl -c Plasma
for_window [title="Desktop @*"] kill; floating enable; border none
exec --no-startup-id picom -b
for_window [class="plasmashell"] floating enable
for_window [class="Kmix"] floating enable; border none
for_window [class="systemsettings"] floating enable
for_window [class="spectacle"] floating enable
for_window [class="kruler"] floating enable; border none
for_window [class="Plasma"] floating enable; border none
for_window [class="Klipper"] floating enable; border none
for_window [class="krunner"] floating enable; border none
for_window [class="Plasmoidviewer"] floating enable; border none
for_window [title="plasma-desktop"] floating enable; border none
for_window [class="plasmashell" window_type="notification"] floating enable, border none
no_focus [class="plasmashell" window_type="notification"]
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_role="About"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [instance="__scratchpad"] floating enable
exec --no-startup-id xwallpaper --zoom ${extra.wall}
'';
}