summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen@syndamia.com>2022-07-19 11:51:30 +0300
committerSyndamia <kamen@syndamia.com>2022-07-19 11:51:30 +0300
commit64d438f07fd46bf0972aca66bf29045a2ce6e5b9 (patch)
treef96590be13a8c9bb0a64f3e737b6daa2e64d77be
parent68429f7bd64fbb01c18984aaf51e081c6da9422b (diff)
downloaddotfiles-64d438f07fd46bf0972aca66bf29045a2ce6e5b9.tar
dotfiles-64d438f07fd46bf0972aca66bf29045a2ce6e5b9.tar.gz
dotfiles-64d438f07fd46bf0972aca66bf29045a2ce6e5b9.zip
Moved i3lock to scripts/system folder
-rw-r--r--.gitignore7
-rwxr-xr-xscripts/system/lock.sh (renamed from .i3lock/lock.sh)0
-rwxr-xr-xscripts/system/on-wm-logout.sh8
-rwxr-xr-xscripts/system/on-wm-session.sh4
4 files changed, 12 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 348988a..c82b46b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,8 @@ bin/*
!bin/ramwolf
!scripts
+scripts/system/lockscreen.png
+scripts/system/suspend-history
!.local/
.local/*
@@ -62,11 +64,6 @@ bin/*
.config/trminator/*
!.config/terminator/config
-
-!.i3lock/
-.i3lock/*
-!.i3lock/lock.sh
-
!.moc/
.moc/*
!.moc/config
diff --git a/.i3lock/lock.sh b/scripts/system/lock.sh
index e226b20..e226b20 100755
--- a/.i3lock/lock.sh
+++ b/scripts/system/lock.sh
diff --git a/scripts/system/on-wm-logout.sh b/scripts/system/on-wm-logout.sh
new file mode 100755
index 0000000..90ebab2
--- /dev/null
+++ b/scripts/system/on-wm-logout.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Gracefully close certain programs
+grace=(brave)
+
+for $app in $grace; do
+ timeout 5 pkill -TERM $app
+done
diff --git a/scripts/system/on-wm-session.sh b/scripts/system/on-wm-session.sh
index 85b7999..e35f4a5 100755
--- a/scripts/system/on-wm-session.sh
+++ b/scripts/system/on-wm-session.sh
@@ -10,7 +10,7 @@ sleep 1 && /usr/libexec/polkit-gnome-authentication-agent-1 &
dunst & # notification daemon
lxpolkit & # polkit
-xautolock -detectsleep -secure -time 15 -locker ~/.i3lock/lock.sh & # auto lock screen
+xautolock -detectsleep -secure -time 15 -locker ~/scripts/system/lock.sh & # auto lock screen
tint2 & # taskbar
picom & # compositor
setxkbmap -layout "us,bg" -variant ",phonetic" -option "grp:alt_shift_toggle" & # keyboard switching
@@ -20,7 +20,7 @@ if [[ $device == "desktop" ]]; then
fi
if [[ $device == "laptop" ]]; then
- while :; do if grep -Fq "closed" /proc/acpi/button/lid/LID0/state; then ~/.i3lock/lock.sh suspend && sleep 3; fi; sleep 0.5; done & # lock screen on lid closing; you'll also need to uncomment the HandleLidSwitch variable and assign to it "lock" (HandleLidSwitch=lock) inside /etc/systemd/logind.conf
+ while :; do if grep -Fq "closed" /proc/acpi/button/lid/LID0/state; then ~/scripts/system/lock.sh suspend && sleep 3; fi; sleep 0.5; done & # lock screen on lid closing; you'll also need to uncomment the HandleLidSwitch variable and assign to it "lock" (HandleLidSwitch=lock) inside /etc/systemd/logind.conf
libinput-gestures-setup start & # start gestures
blueberry & # bluetooth app
fi