screenlock
This commit is contained in:
parent
78369ea502
commit
08c2e18396
5 changed files with 22 additions and 11 deletions
|
|
@ -150,6 +150,13 @@
|
||||||
GTK_THEME = "Adwaita:dark";
|
GTK_THEME = "Adwaita:dark";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# patch for swaylock https://github.com/swaywm/sway/issues/2773
|
||||||
|
security.pam.services.swaylock = {
|
||||||
|
text = ''
|
||||||
|
auth include login
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# Patch for IDEA PlugIn dev. Should be in dev flake!
|
# Patch for IDEA PlugIn dev. Should be in dev flake!
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
programs.nix-ld.libraries = with pkgs; [
|
||||||
|
|
|
||||||
9
home.nix
9
home.nix
|
|
@ -35,6 +35,7 @@ let username = "clemens"; in
|
||||||
./programm_configs/redshift.nix
|
./programm_configs/redshift.nix
|
||||||
] else [
|
] else [
|
||||||
./programm_configs/sway.nix
|
./programm_configs/sway.nix
|
||||||
|
./programm_configs/swaylock.nix
|
||||||
./programm_configs/waybar.nix
|
./programm_configs/waybar.nix
|
||||||
./programm_configs/gammastep.nix
|
./programm_configs/gammastep.nix
|
||||||
]);
|
]);
|
||||||
|
|
@ -43,8 +44,6 @@ let username = "clemens"; in
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
polybar
|
|
||||||
scrot
|
|
||||||
imagemagick
|
imagemagick
|
||||||
htop
|
htop
|
||||||
firefox
|
firefox
|
||||||
|
|
@ -81,6 +80,8 @@ let username = "clemens"; in
|
||||||
] ++ (if x11mode then [
|
] ++ (if x11mode then [
|
||||||
arandr
|
arandr
|
||||||
flameshot
|
flameshot
|
||||||
|
scrot
|
||||||
|
polybar
|
||||||
] else [
|
] else [
|
||||||
wdisplays
|
wdisplays
|
||||||
sway-contrib.grimshot
|
sway-contrib.grimshot
|
||||||
|
|
@ -94,9 +95,9 @@ let username = "clemens"; in
|
||||||
source = ./programm_configs/slate.rasi;
|
source = ./programm_configs/slate.rasi;
|
||||||
target = ".config/rofi/slate.rasi";
|
target = ".config/rofi/slate.rasi";
|
||||||
};
|
};
|
||||||
i3lock = {
|
swaylock = {
|
||||||
source = ./programm_configs/lock.sh;
|
source = ./programm_configs/lock.sh;
|
||||||
target = ".config/i3/lock.sh";
|
target = ".config/sway/lock.sh";
|
||||||
executable = true;
|
executable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
9
programm_configs/lock.sh
Normal file → Executable file
9
programm_configs/lock.sh
Normal file → Executable file
|
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
scrot /tmp/screenshot.png
|
grimshot save output /tmp/screenshot.png
|
||||||
convert /tmp/screenshot.png -blur 0x10 /tmp/screenshotblur.png
|
convert /tmp/screenshot.png -blur 0x10 /tmp/screenshotblur.png
|
||||||
set -e
|
rm /tmp/screenshot.png
|
||||||
xset s off dpms 0 10 0
|
swaylock -i /tmp/screenshotblur.png --ignore-empty-password --show-failed-attempts --daemonize
|
||||||
i3lock -i /tmp/screenshotblur.png --ignore-empty-password --show-failed-attempts --nofork
|
|
||||||
rm -f /tmp/screenshot.png
|
|
||||||
xset s off -dpms
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
keybindings = {
|
keybindings = {
|
||||||
# screenlock
|
# screenlock
|
||||||
"${mod}+shift+l" = "exec --no-startup-id ~/.config/i3/lock.sh";
|
"${mod}+shift+l" = "exec --no-startup-id ~/.config/sway/lock.sh";
|
||||||
|
|
||||||
# audio control fluff
|
# audio control fluff
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%+";
|
"XF86AudioRaiseVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%+";
|
||||||
|
|
|
||||||
6
programm_configs/swaylock.nix
Normal file
6
programm_configs/swaylock.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue