From 1ec73cc2c14d2f62c32046d9585c3a745531d37a Mon Sep 17 00:00:00 2001 From: Alec Goncharow Date: Sun, 4 Dec 2022 18:23:46 -0600 Subject: Fresh start --- bin/clamshell-toggle | 6 ++++++ bin/idlechecker | 6 ++++++ bin/pretty-lock | 18 ++++++++++++++++++ bin/wallpaper-shuffle | 11 +++++++++++ 4 files changed, 41 insertions(+) create mode 100755 bin/clamshell-toggle create mode 100755 bin/idlechecker create mode 100755 bin/pretty-lock create mode 100755 bin/wallpaper-shuffle (limited to 'bin') diff --git a/bin/clamshell-toggle b/bin/clamshell-toggle new file mode 100755 index 0000000..12997e9 --- /dev/null +++ b/bin/clamshell-toggle @@ -0,0 +1,6 @@ +#!/usr/bin/bash +if grep -q open /proc/acpi/button/lid/LID0/state; then + swaymsg output eDP-1 enable +else + swaymsg output eDP-1 disable +fi diff --git a/bin/idlechecker b/bin/idlechecker new file mode 100755 index 0000000..36261e9 --- /dev/null +++ b/bin/idlechecker @@ -0,0 +1,6 @@ +#!/bin/sh + +# xss-lock -- ./pretty-lock & +swayidle -w \ + timeout 300 '~/bin/pretty-lock' \ + before-sleep '~/bin/pretty-lock' diff --git a/bin/pretty-lock b/bin/pretty-lock new file mode 100755 index 0000000..8ef40e0 --- /dev/null +++ b/bin/pretty-lock @@ -0,0 +1,18 @@ +#!/bin/sh + +swaylock \ + -f \ + --screenshots \ + --clock \ + --indicator \ + --indicator-radius 100 \ + --indicator-thickness 7 \ + --effect-blur 7x5 \ + --effect-vignette 0.5:0.5 \ + --ring-color bb00cc \ + --key-hl-color 880033 \ + --line-color 00000000 \ + --inside-color 00000088 \ + --separator-color 00000000 \ + --grace 2 \ + --fade-in 1 diff --git a/bin/wallpaper-shuffle b/bin/wallpaper-shuffle new file mode 100755 index 0000000..8108a10 --- /dev/null +++ b/bin/wallpaper-shuffle @@ -0,0 +1,11 @@ +#!/bin/nu +let wallpapers_path = "~/wallpapers/low-poly" +swaymsg -t get_outputs | + rg name | + split row "\n" | + split column ":" | + get column2 | + str trim | str trim -c "," | str trim -c '"' | + each {|output| + swaymsg $"output ($output) bg `find ($wallpapers_path) -type f | shuf -n 1` fill" + } -- cgit v1.2.3-70-g09d2