Nixify i3 config.

This commit is contained in:
Kevin Baensch 2023-08-26 08:52:11 +02:00
parent a619bea0fc
commit 4c79467426
Signed by: derped
GPG key ID: C0F1D326C7626543
2 changed files with 34 additions and 35 deletions

View file

@ -1,3 +1,6 @@
{ pkgs, ... }:
(pkgs.writeText "config" ''
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@ -14,9 +17,9 @@ hide_edge_borders both
exec setxkbmap de
#exec compton -f
exec feh --bg-scale $(xdg-user-dir PICTURES)/wallpaper.jpg
exec ${pkgs.feh}/bin/feh --bg-scale $(xdg-user-dir PICTURES)/wallpaper.jpg
#exec pulseaudio -D
#exec fcitx
exec fcitx5
#exec env=LC_CTYPE=zh_CN.UTF-8 emacs --daemon
#exec conky -c $HOME/.my_little_conky/.conkyrc
#exec xsnow -nosanta -norudolf -notrees
@ -30,16 +33,16 @@ exec feh --bg-scale $(xdg-user-dir PICTURES)/wallpaper.jpg
### START MEDIA BINDSYM ###
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioPlay exec ${pkgs.playerctl}/bin/playerctl play
bindsym XF86AudioPause exec ${pkgs.playerctl}/bin/playerctl pause
bindsym XF86AudioNext exec ${pkgs.playerctl}/bin/playerctl next
bindsym XF86AudioPrev exec ${pkgs.playerctl}/bin/playerctl previous
bindsym $mod+Mod1+space exec playerctl play-pause
bindsym $mod+Mod1+Left exec playerctl position 10-
bindsym $mod+Mod1+Right exec playerctl position 10+
bindsym $mod+Mod1+Down exec playerctl next
bindsym $mod+Mod1+Up exec playerctl previous
bindsym $mod+Mod1+space exec ${pkgs.playerctl}/bin/playerctl play-pause
bindsym $mod+Mod1+Left exec ${pkgs.playerctl}/bin/playerctl position 10-
bindsym $mod+Mod1+Right exec ${pkgs.playerctl}/bin/playerctl position 10+
bindsym $mod+Mod1+Down exec ${pkgs.playerctl}/bin/playerctl next
bindsym $mod+Mod1+Up exec ${pkgs.playerctl}/bin/playerctl previous
bindsym $mod+Shift+w sticky toggle
bindsym $mod+Shift+B floating enable; border none; resize set 900 600; move position 1020 19
@ -55,22 +58,23 @@ bindsym $mod+y move container to output left
bindsym $mod+x move container to output right
bindsym $mod+Shift+y move workspace to output left
bindsym $mod+Shift+x move workspace to output right
bindsym $mod+minus exec amixer -c 0 sset Master 1%-
bindsym $mod+plus exec amixer -c 0 sset Master 1%+
bindsym $mod+Mod1+minus exec amixer -D pulse sset Master 1%-
bindsym $mod+Mod1+plus exec amixer -D pulse sset Master 1%+
bindsym $mod+Shift+minus exec xbacklight -5
bindsym $mod+Shift+plus exec xbacklight +5
bindsym $mod+Ctrl+0 exec xbacklight -set 0
bindsym $mod+Ctrl+1 exec xbacklight -set 10
bindsym $mod+Ctrl+2 exec xbacklight -set 20
bindsym $mod+Ctrl+3 exec xbacklight -set 30
bindsym $mod+Ctrl+4 exec xbacklight -set 40
bindsym $mod+Ctrl+5 exec xbacklight -set 50
bindsym $mod+Ctrl+6 exec xbacklight -set 60
bindsym $mod+Ctrl+7 exec xbacklight -set 70
bindsym $mod+Ctrl+8 exec xbacklight -set 80
bindsym $mod+Ctrl+9 exec xbacklight -set 90
bindsym $mod+l exec ${pkgs.i3lock}/bin/i3lock -efc 000000
bindsym $mod+minus exec ${pkgs.alsa-utils}/bin/amixer -c 0 sset Master 1%-
bindsym $mod+plus exec ${pkgs.alsa-utils}/bin/amixer -c 0 sset Master 1%+
bindsym $mod+Mod1+minus exec ${pkgs.alsa-utils}/bin/amixer -D pulse sset Master 1%-
bindsym $mod+Mod1+plus exec ${pkgs.alsa-utils}/bin/amixer -D pulse sset Master 1%+
bindsym $mod+Shift+minus exec ${pkgs.acpilight}/bin/xbacklight -5
bindsym $mod+Shift+plus exec ${pkgs.acpilight}/bin/xbacklight +5
bindsym $mod+Ctrl+0 exec ${pkgs.acpilight}/bin/xbacklight -set 0
bindsym $mod+Ctrl+1 exec ${pkgs.acpilight}/bin/xbacklight -set 10
bindsym $mod+Ctrl+2 exec ${pkgs.acpilight}/bin/xbacklight -set 20
bindsym $mod+Ctrl+3 exec ${pkgs.acpilight}/bin/xbacklight -set 30
bindsym $mod+Ctrl+4 exec ${pkgs.acpilight}/bin/xbacklight -set 40
bindsym $mod+Ctrl+5 exec ${pkgs.acpilight}/bin/xbacklight -set 50
bindsym $mod+Ctrl+6 exec ${pkgs.acpilight}/bin/xbacklight -set 60
bindsym $mod+Ctrl+7 exec ${pkgs.acpilight}/bin/xbacklight -set 70
bindsym $mod+Ctrl+8 exec ${pkgs.acpilight}/bin/xbacklight -set 80
bindsym $mod+Ctrl+9 exec ${pkgs.acpilight}/bin/xbacklight -set 90
bindsym $mod+p move scratchpad
bindsym $mod+Shift+p scratchpad show
bindsym --release $mod+Ctrl+s exec scrot
@ -152,13 +156,6 @@ bindsym $mod+d exec dmenu_run -fn 'Droid Sans Mono-8'
# installed.
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+odiaeresis focus right
#bindsym $mod+semicolon focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
@ -266,6 +263,7 @@ bindsym $mod+r mode "resize"
bar {
position top
status_command py3status -c /etc/i3/py3status
tray_output primary
# status_command i3status
colors {
separator #586e75
@ -286,3 +284,4 @@ client.urgent #aa0000 y#990000 #ffffff
#client.focused_inactive #073642 #073642 #93a1a1 #002b36
#client.unfocused #002b36 #002b36 #586e75 #002b36
#client.urgent #dc322f #dc322f #fdf6e3 #dc322f
'')

View file

@ -6,7 +6,7 @@
# i3 =
{
enable = true;
configFile = ../../config/etc/i3/config;
configFile = (import ../../config/etc/i3/config.nix { inherit pkgs; });
extraPackages = with pkgs; [
dmenu
file