From 97fdacb78fbf8b880452090389e02cc5729d3463 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Mon, 18 Oct 2021 18:12:20 +0300 Subject: power.sh: use better lock script --- .local/bin/lock | 7 +++++++ .local/bin/power.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 .local/bin/lock diff --git a/.local/bin/lock b/.local/bin/lock new file mode 100755 index 0000000..d76f636 --- /dev/null +++ b/.local/bin/lock @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +pkill -u "$USER" -USR1 dunst + +i3lock -n + +pkill -u "$USER" -USR2 dunst diff --git a/.local/bin/power.sh b/.local/bin/power.sh index 4a5de69..f794211 100755 --- a/.local/bin/power.sh +++ b/.local/bin/power.sh @@ -16,7 +16,7 @@ chosen=$(echo -e "lock\nshutdown\nrestart" | rofi -dmenu -i) # https://www.freedesktop.org/software/systemd/man/systemd-sleep.conf.html#Description if [[ $chosen = "lock" ]]; then - i3lock + $HOME/.local/bin/lock elif [[ $chosen = "shutdown" ]]; then systemctl poweroff elif [[ $chosen = "restart" ]]; then -- cgit v1.2.3-70-g09d2