Add lock command
This commit is contained in:
parent
7c8ff79a11
commit
5153b5581b
3 changed files with 12 additions and 2 deletions
4
i3.nix
4
i3.nix
|
@ -5,7 +5,7 @@ let
|
||||||
in {
|
in {
|
||||||
# Dependencies
|
# Dependencies
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
i3lock # lockscreen
|
(pkgs.callPackage ./lock { })
|
||||||
playerctl # pactl comes with PulseAudio
|
playerctl # pactl comes with PulseAudio
|
||||||
scrot # Screnshot keybindings
|
scrot # Screnshot keybindings
|
||||||
xclip # Copying screenshots to clipboard
|
xclip # Copying screenshots to clipboard
|
||||||
|
@ -23,7 +23,7 @@ in {
|
||||||
};
|
};
|
||||||
startup = [
|
startup = [
|
||||||
{
|
{
|
||||||
command = "(systemctl --user restart polybar &) && i3lock -i `readlink -f ~/.background-image`";
|
command = "(systemctl --user restart polybar &) && lock";
|
||||||
always = true;
|
always = true;
|
||||||
notification = false;
|
notification = false;
|
||||||
}
|
}
|
||||||
|
|
9
lock/default.nix
Normal file
9
lock/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ substituteAll, pkgs }:
|
||||||
|
|
||||||
|
substituteAll {
|
||||||
|
name = "lock";
|
||||||
|
src = ./lock.sh;
|
||||||
|
dir = "bin";
|
||||||
|
isExecutable = true;
|
||||||
|
inherit (pkgs) i3lock;
|
||||||
|
}
|
1
lock/lock.sh
Normal file
1
lock/lock.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
i3lock -i `readlink -f ~/.background-image`
|
Loading…
Add table
Reference in a new issue