mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
local.packages convenience option
This commit is contained in:
parent
4ecebe8210
commit
99f42f5841
5 changed files with 109 additions and 106 deletions
|
|
@ -9,6 +9,31 @@
|
|||
options.local.DE.dwm.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.local.DE.dwm.enable {
|
||||
local.packages = {
|
||||
inherit (suckless.packages) dmenu dwm st;
|
||||
inherit (pkgs)
|
||||
maim
|
||||
playerctl
|
||||
xclip
|
||||
feh
|
||||
numlockx
|
||||
picom
|
||||
sxhkd
|
||||
xscreensaver
|
||||
;
|
||||
|
||||
xsecurelock = pkgs.writeShellScriptBin "xsecurelock" ''
|
||||
export XSECURELOCK_BLANK_TIMEOUT="30"
|
||||
export XSECURELOCK_AUTH_TIMEOUT="30"
|
||||
export XSECURELOCK_BLANK_DPMS_STATE="off"
|
||||
export XSECURELOCK_BACKGROUND_COLOR="#000000"
|
||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808"
|
||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd"
|
||||
export XSECURELOCK_FONT="Overpass"
|
||||
export XSECURELOCK_SHOW_DATETIME="1"
|
||||
${lib.getExe pkgs.xsecurelock}
|
||||
'';
|
||||
};
|
||||
systemd.user.services = {
|
||||
sxhkd = {
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
|
|
@ -67,64 +92,36 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (suckless.packages) dmenu dwm st;
|
||||
inherit (pkgs)
|
||||
maim
|
||||
playerctl
|
||||
xclip
|
||||
feh
|
||||
numlockx
|
||||
picom
|
||||
sxhkd
|
||||
xscreensaver
|
||||
;
|
||||
|
||||
xsecurelock = pkgs.writeShellScriptBin "xsecurelock" ''
|
||||
export XSECURELOCK_BLANK_TIMEOUT="30"
|
||||
export XSECURELOCK_AUTH_TIMEOUT="30"
|
||||
export XSECURELOCK_BLANK_DPMS_STATE="off"
|
||||
export XSECURELOCK_BACKGROUND_COLOR="#000000"
|
||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808"
|
||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd"
|
||||
export XSECURELOCK_FONT="Overpass"
|
||||
export XSECURELOCK_SHOW_DATETIME="1"
|
||||
${lib.getExe pkgs.xsecurelock}
|
||||
'';
|
||||
};
|
||||
etc = {
|
||||
"sxhkd/sxhkdrc".text = ''
|
||||
XF86AudioPlay
|
||||
playerctl play-pause
|
||||
XF86AudioPause
|
||||
playerctl play-pause
|
||||
XF86AudioStop
|
||||
playerctl stop
|
||||
XF86AudioNext
|
||||
playerctl next
|
||||
XF86AudioPrev
|
||||
playerctl previous
|
||||
XF86AudioRaiseVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+
|
||||
XF86AudioLowerVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
|
||||
XF86AudioMute
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
Print
|
||||
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
Print + shift
|
||||
maim | xclip -selection clipboard -t image/png
|
||||
super + Print
|
||||
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
super + Print + shift
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
super + ctrl + r
|
||||
pkill -usr1 -x sxhkd
|
||||
super + ctrl + l
|
||||
xsecurelock
|
||||
'';
|
||||
};
|
||||
};
|
||||
environment.etc."sxhkd/sxhkdrc".text = ''
|
||||
XF86AudioPlay
|
||||
playerctl play-pause
|
||||
XF86AudioPause
|
||||
playerctl play-pause
|
||||
XF86AudioStop
|
||||
playerctl stop
|
||||
XF86AudioNext
|
||||
playerctl next
|
||||
XF86AudioPrev
|
||||
playerctl previous
|
||||
XF86AudioRaiseVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+
|
||||
XF86AudioLowerVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
|
||||
XF86AudioMute
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
Print
|
||||
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
Print + shift
|
||||
maim | xclip -selection clipboard -t image/png
|
||||
super + Print
|
||||
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
super + Print + shift
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
super + ctrl + r
|
||||
pkill -usr1 -x sxhkd
|
||||
super + ctrl + l
|
||||
xsecurelock
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue