diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-07-02 11:13:12 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-07-02 11:13:12 -0400 |
commit | e6a83169943c909622a1e41439fb2ffb3a1bec31 (patch) | |
tree | d9adee1ad1b59c363abc006145c2c2ef846fc1f6 | |
parent | 0f0409e3ffef48bd20b3aa31d03cb1ac6e35f385 (diff) | |
download | scripts-e6a83169943c909622a1e41439fb2ffb3a1bec31.tar.xz scripts-e6a83169943c909622a1e41439fb2ffb3a1bec31.zip |
brought all locking, sleeping, etc. into autolocker
-rwxr-xr-x | autolocker.sh | 18 | ||||
-rwxr-xr-x | funia.sh | 20 | ||||
-rwxr-xr-x | locker.sh | 12 | ||||
-rwxr-xr-x | sleeper.sh | 3 | ||||
-rwxr-xr-x | toggle-docked.sh | 13 |
5 files changed, 39 insertions, 27 deletions
diff --git a/autolocker.sh b/autolocker.sh index 5c79e23..9f6a894 100755 --- a/autolocker.sh +++ b/autolocker.sh @@ -1,10 +1,18 @@ #!/bin/sh -notifier="notify-send -t=10000 '10 seconds to lock...'" -locker="xautolock -notify 10 -time 10 -locker locker.sh" - if [ "$1" = "-d" ]; then - $locker -notifier "$notifier" + xautolock \ + -notify 10 \ + -time 10 \ + -locker "i3lock -n -f -c 000000 -i ~/.local/share/wallpapers/lock.png; sleep 0.2" \ + -notifier "notify-send -t=10000 '10 seconds to lock...'" else - $locker -detectsleep -killtime 10 -killer "sleeper.sh" -notifier "$notifier" + xautolock \ + -detectsleep \ + -killtime 10 \ + -killer "acpiconf -s3" \ + -notify 10 \ + -time 10 \ + -locker "i3lock -n -f -c 000000 -i ~/.local/share/wallpapers/lock.png; sleep 0.2" \ + -notifier "notify-send -t=10000 '10 seconds to lock...'" fi diff --git a/funia.sh b/funia.sh new file mode 100755 index 0000000..c758f58 --- /dev/null +++ b/funia.sh @@ -0,0 +1,20 @@ +#!/bin/sh +base_url=https://basic.photofunia.com + +tmpfile=$(mktemp /tmp/funia.XXXXXX) + +category=$( +curl -s "$base_url/categories" \ + | sed -n -e 's/[[:blank:]]//g' -e '/all_effects/d' -e 's|^.*href="/categories/\(.*\)".*$|\1|p' \ + | sort \ + | dmenu +) + +page=1 +while curl -so "$tmpfile" "$base_url/categories/$category?page=$page" +do + echo ----- $page ----- + page="$(($page + 1))" +done + +cat "$tmpfile" diff --git a/locker.sh b/locker.sh deleted file mode 100755 index 6bd868b..0000000 --- a/locker.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -## Alternative, use the vignette wallpaper set by themer script. -i3lock -n -f -c 000000 -i $HOME/.local/share/wallpapers/lock.png; sleep 0.2 - - -# alacritty -e asciiquarium & -# sleep 0.2 -# -# i3-msg fullscreen -# -# i3lock -n -f -c 000000 ; i3-msg kill diff --git a/sleeper.sh b/sleeper.sh deleted file mode 100755 index c52ef27..0000000 --- a/sleeper.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -acpiconf -s3 - diff --git a/toggle-docked.sh b/toggle-docked.sh index beb0965..e062a31 100755 --- a/toggle-docked.sh +++ b/toggle-docked.sh @@ -2,12 +2,10 @@ hasVGA=$(xrandr | grep VGA-0 | cut -w -f2) if [ "$hasVGA" = "connected" ]; then - killall xautolock - autolocker.sh -d & xrandr \ --output VGA-0 \ --mode 1024x768 \ - --pos 1920x312 \ + --pos 0x0 \ --rotate normal \ --dpi 82 \ --output DP-0 \ @@ -19,14 +17,14 @@ if [ "$hasVGA" = "connected" ]; then --output DP-3 \ --primary \ --mode 1920x1080 \ - --pos 0x0 \ + --pos 1024x0 \ --rotate normal \ --dpi 96 \ --output DP-4 \ --off + killall xautolock + autolocker.sh -d & else - killall xautolock - autolocker.sh & xrandr \ --output VGA-0 \ --off \ @@ -44,5 +42,6 @@ else --dpi 96 \ --output DP-4 \ --off + killall xautolock + autolocker.sh & fi - |