Joystickwake + background
This commit is contained in:
parent
e080d5b9b8
commit
8acab53e36
10 changed files with 135 additions and 35 deletions
32
modules/bspwm.nix
Normal file
32
modules/bspwm.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
|
||||
strPalette = pkgs.extra.palette.toRGBHex pkgs.extra.colorPalette;
|
||||
in
|
||||
{
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
border_width = 2;
|
||||
border_radius = 8;
|
||||
window_gap = 4;
|
||||
split_ratio = 0.5;
|
||||
top_padding = 0;
|
||||
borderless_monocle = true;
|
||||
gapless_monocle = false;
|
||||
normal_border_color = strPalette.normal.blue;
|
||||
focused_border_color = strPalette.bright.blue;
|
||||
};
|
||||
monitors = {
|
||||
"eDP1-1" = monitorPages;
|
||||
"eDP1" = monitorPages;
|
||||
"HDMI-0" = monitorPages;
|
||||
};
|
||||
extraConfig = ''
|
||||
sleep 2
|
||||
polybar-msg cmd restart
|
||||
'';
|
||||
startupPrograms = [];
|
||||
};
|
||||
}
|
||||
|
|
@ -3,6 +3,6 @@
|
|||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableNixDirenvIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
20
modules/joystickwake.nix
Normal file
20
modules/joystickwake.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
|
||||
in
|
||||
{
|
||||
systemd.user.services."joystickwake" = {
|
||||
Unit = {
|
||||
Description = "Keep lockscreen from activating";
|
||||
After = [ "graphical-session.pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = joystickwakeCmd;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -238,7 +238,7 @@ in
|
|||
};
|
||||
volume = colors.normal // {
|
||||
padding = 1;
|
||||
text = "VOL <bar-volume> <label-volume> <ramp-volume>";
|
||||
text = "VOL <label-volume> <ramp-volume>";
|
||||
};
|
||||
};
|
||||
label.muted = {
|
||||
|
|
@ -294,18 +294,22 @@ in
|
|||
};
|
||||
menu = [
|
||||
[
|
||||
({ text = "Reboot"; exec = "#powermenu.open.1"; })
|
||||
({ text = "Hibernate"; exec = "#powermenu.open.2"; })
|
||||
({ text = "Power off"; exec = "#powermenu.open.3"; })
|
||||
({ text = "Logout"; exec = "#powermenu.open.1"; })
|
||||
({ text = "Reboot"; exec = "#powermenu.open.2"; })
|
||||
({ text = "Hibernate"; exec = "#powermenu.open.3"; })
|
||||
({ text = "Power off"; exec = "#powermenu.open.4"; })
|
||||
]
|
||||
[
|
||||
({ text = "Reboot"; exec = "reboot"; })
|
||||
({ text = "Logout"; exec = "${pkgs.systemd}/bin/loginctl terminate-session self"; })
|
||||
]
|
||||
[
|
||||
({ text = "Hibernate"; exec = "systemctl hibernate"; })
|
||||
({ text = "Reboot"; exec = "${pkgs.systemd}/bin/systemctl reboot"; })
|
||||
]
|
||||
[
|
||||
({ text = "Power off"; exec = "shutdown now"; })
|
||||
({ text = "Hibernate"; exec = "${pkgs.systemd}/bin/systemctl hibernate"; })
|
||||
]
|
||||
[
|
||||
({ text = "Power off"; exec = "${pkgs.systemd}/bin/shutdown now"; })
|
||||
]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,10 +9,12 @@
|
|||
rofi = "${pkgs.rofi}/bin/rofi";
|
||||
terminator = "${pkgs.terminator}/bin/terminator";
|
||||
nautilus = "${pkgs.gnome.nautilus}/bin/nautilus";
|
||||
update-backgroundCmd = "${pkgs.update-background}";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
keybindings = {
|
||||
"super + b" = update-backgroundCmd;
|
||||
"super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
||||
"super + alt + {q,r}" = "${bspc} {quit,wm -r}";
|
||||
"super + alt + shift + {h,j,k,l}" = "${bspc} node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||
|
|
@ -34,10 +36,8 @@
|
|||
"super + {_,shift + } Return" = "{${alacritty} , ${terminator}}";
|
||||
"super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||
"super + {_,shift + }c" = "${bspc} node -f {next,prev}.local";
|
||||
# "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}";
|
||||
"super + {h,j,k,l}" = "${bspc} node -f {west,south,north,east}";
|
||||
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
|
||||
|
||||
"super + {_,shift + }w" = "${bspc} node -{c,k}";
|
||||
"super + @space" = "rofi -show drun";
|
||||
"super + {t,shift + t,s,f}" = "${bspc} node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||
|
|
|
|||
|
|
@ -5,16 +5,6 @@ let
|
|||
update_time = "10m";
|
||||
in
|
||||
{
|
||||
home.file.".local/bin/update_background.sh" = {
|
||||
text = ''
|
||||
#!${pkgs.bash}/bin/bash
|
||||
image=`find ${backgrounds_directory} -type f | grep -v "/\." | shuf -n 1`
|
||||
${fehCmd} --bg-fill --no-fehbg "$image"
|
||||
'';
|
||||
target = ".local/bin/update_background.sh";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
systemd.user.services."update-background" = {
|
||||
Unit = {
|
||||
Description = "Set random desktop background using feh";
|
||||
|
|
@ -28,7 +18,7 @@ in
|
|||
Service = {
|
||||
Type = "oneshot";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${config.home.homeDirectory}/${config.home.file.".local/bin/update_background.sh".target}";
|
||||
ExecStart = "${pkgs.update-background}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue