aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/lock97
-rwxr-xr-xbin/lockscr129
-rwxr-xr-xbin/lockscr229
-rwxr-xr-xbin/permafocus50
-rwxr-xr-xbspwmrc2
-rwxr-xr-xinstall.sh1
-rw-r--r--sxhkdrc2
7 files changed, 3 insertions, 207 deletions
diff --git a/bin/lock b/bin/lock
deleted file mode 100755
index c643ee4..0000000
--- a/bin/lock
+++ /dev/null
@@ -1,97 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2022 HimbeerserverDE
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-refocus_fullscreen_nodes() {
- while [ -z "$(pgrep -x permafocus)" ]; do sleep 1; done
-
- for NODE in ${FULLSCREEN_NODES}; do
- bspc node ${NODE} -t fullscreen
- done
-}
-
-mark_as_ready() {
- while [ -z "$(pgrep -x permafocus)" ]; do sleep 1; done
-
- sleep 2
- exec ${XSS_SLEEP_LOCK_FD}>&-
-}
-
-if [ $(pgrep -x lock | wc -l) -gt 2 ]; then
- # Starting multiple screen lock instances may cause unintended side effects
- exit 0
-fi
-
-#
-# Security
-#
-
-touch /tmp/lock-xkbfile-${UID}
-chmod 0600 /tmp/lock-xkbfile-${UID}
-xkbcomp $DISPLAY /tmp/lock-xkbfile-${UID} 2>/dev/null
-
-xkbcomp ~/.local/bspwm-setup/lockscreen.xkb $DISPLAY 2>/dev/null
-
-killall -qw sxhkd polybar
-dunstctl set-paused true
-
-#
-# UI
-#
-
-FOCUSED_MONITOR=$(bspc query -M -m)
-FULLSCREEN_NODES=$(bspc query -N -n any.fullscreen)
-
-bspc monitor -f 1
-WINIT_X11_SCALE_FACTOR=1.0 ~/.cargo/bin/alacritty -e ~/bin/lockscr1 &
-
-while [ -z "$(ps -C lockscr1 -o pid=)" ]; do sleep 1; done
-while [ -z "$(ps -s $(ps -C lockscr1 -o pid=) -o pid=)" ]; do sleep 1; done
-PRIMARY_WINDOW=$(bspc query -N -n)
-
-if [ -n "$(xrandr --listmonitors | grep 'DP-2')" ]; then
- bspc monitor -f 2
- WINIT_X11_SCALE_FACTOR=1.0 ~/.cargo/bin/alacritty -e ~/bin/lockscr2 &
-
- while [ -z "$(ps -C lockscr2 -o pid=)" ]; do sleep 1; done
- while [ -z "$(ps -s $(ps -C lockscr2 -o pid=) -o pid=)" ]; do sleep 1; done
- SECONDARY_WINDOW=$(bspc query -N -n)
-fi
-
-refocus_fullscreen_nodes &
-
-mark_as_ready &
-
-~/bin/permafocus ${PRIMARY_WINDOW} ${SECONDARY_WINDOW}
-
-#
-# Unlock
-#
-
-xkbcomp /tmp/lock-xkbfile-${UID} $DISPLAY 2>/dev/null
-dunstctl set-paused false
-
-bspc node ${PRIMARY_WINDOW} -k
-
-if [ -n "${SECONDARY_WINDOW}" ]; then
- bspc node ${SECONDARY_WINDOW} -k
-fi
-
-# Kill second tty-clock
-kill -9 $(ps -s $(ps -C lockscr2 -o pid=) -o pid=)
-
-bspc monitor -f ${FOCUSED_MONITOR}
-bspc wm -r
diff --git a/bin/lockscr1 b/bin/lockscr1
deleted file mode 100755
index 4620b5a..0000000
--- a/bin/lockscr1
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2022 HimbeerserverDE
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-main() {
- clear
-
- tty-clock -r -D -B -s -S
- su $USER sh -c '' || main
-}
-
-trap "" 1 2 3 15 20 SIGTSTP
-
-sleep 1
-
-main
diff --git a/bin/lockscr2 b/bin/lockscr2
deleted file mode 100755
index 09dcc8e..0000000
--- a/bin/lockscr2
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2022 HimbeerserverDE
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-main() {
- clear
-
- tty-clock -r -D -B -s -S
- pgrep -x lockscr1 && main
-}
-
-trap "" 1 2 3 15 20 SIGTSTP
-
-sleep 1
-
-main
diff --git a/bin/permafocus b/bin/permafocus
deleted file mode 100755
index cad7a9a..0000000
--- a/bin/permafocus
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /bin/bash
-
-# Copyright (C) 2022 HimbeerserverDE
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-# THIS SCRIPT MUST ONLY BE CALLED BY THE SCREENSAVER!
-# OTHER CALLERS WILL INTERFERE WITH SCREENSAVER OPERATION!
-
-bspc node -f $2
-bspc node $2 -t fullscreen
-bspc node $2 -l above
-
-bspc node -f $1
-bspc node $1 -t fullscreen
-bspc node $1 -l above
-
-sleep 1
-
-killall -q -9 su
-
-while [ -n "$(bspc query -N -n $1)" ]; do
- while [[ "$(bspc query -N -n focused)" == "$1" ]]; do sleep 1; done
- sleep 2
-
- if [ -n "$(bspc query -N -n $1)" ]; then
- bspc node -f $2
- bspc node $2 -t fullscreen
- bspc node $2 -l above
-
- bspc node -f $1
- bspc node $1 -t fullscreen
- bspc node $1 -l above
-
- sleep 1
-
- killall -q -9 su
- fi
-done
diff --git a/bspwmrc b/bspwmrc
index 70836b5..e4c05d5 100755
--- a/bspwmrc
+++ b/bspwmrc
@@ -19,7 +19,7 @@ setxkbmap -layout de
pgrep -x sxhkd > /dev/null || sxhkd &
-xss-lock --transfer-sleep-lock -- ~/bin/lock &
+xss-lock --transfer-sleep-lock -- i3lock-fancy-rapid 1 10 &
~/.fehbg
killall -qw picom; picom -b
diff --git a/install.sh b/install.sh
index 8dafa26..1ccc217 100755
--- a/install.sh
+++ b/install.sh
@@ -63,6 +63,7 @@ if command_exists pacman; then
pulseaudio
bin/aurinstall --noconfirm cava
+ bin/aurinstall --noconfirm i3lock-fancy-rapid-git
elif command_exists apt; then
wget -O- https://updates.signal.org/desktop/apt/keys.asc | ${SUDO} apt-key add -
echo "deb [arch=$(dpkg --print-architecture)] https://updates.signal.org/desktop/apt xenial main" | sudo tee -a /etc/apt/sources.list.d/signal-xenial.list
diff --git a/sxhkdrc b/sxhkdrc
index 955c38d..d2d0c3a 100644
--- a/sxhkdrc
+++ b/sxhkdrc
@@ -48,7 +48,7 @@ XF86MonBrightnessUp
# lock screen
super + l
- ~/bin/lock
+ i3lock-fancy-rapid 1 10
# power off/reboot/hibernate/suspend
super + alt + {s,a,y,m}