diff --git a/.scripts/colorpicker b/.scripts/colorpicker new file mode 100755 index 0000000..466fc82 --- /dev/null +++ b/.scripts/colorpicker @@ -0,0 +1,3 @@ +#!/bin/sh +hyprpicker | tr -d '\n' | wl-copy && \ + dunstify -t 5000 'Copied color hex code to clipboard' diff --git a/.scripts/grimshot b/.scripts/grimshot new file mode 100755 index 0000000..b5fe7cd --- /dev/null +++ b/.scripts/grimshot @@ -0,0 +1,15 @@ +#!/bin/sh +filename=~/Pictures/Screenshots/Screenshot_"$(date +'%Y%m%d_%H%M%S').png" +grimblast copysave area "$filename" || exit 1 +action="$(dunstify \ + -i "$filename" \ + -A "open,OPEN" \ + -t 10000 \ + "Screenshot saved" \ + "$filename")" + +case "$action" in + 2) #click + xdg-open "$filename" + ;; +esac diff --git a/.scripts/system/random-wallpaper b/.scripts/system/random-wallpaper new file mode 100755 index 0000000..8b7839f --- /dev/null +++ b/.scripts/system/random-wallpaper @@ -0,0 +1,16 @@ +#!/bin/sh + +INTERVAL="$1" +WALLPAPER_DIR="$2" + +rm -rf ~/.cache/swww/ +swww kill + +swww init +interval_secs="$(echo "60 * ${INTERVAL}" | bc)" + +while true; do + wallpaper="$(fd '\.(png|jpe?g|gif)$' "$WALLPAPER_DIR" --type f | shuf | head -1)" + swww img "$wallpaper" + sleep "$interval_secs" +done diff --git a/.scripts/system/wofi-session b/.scripts/system/wofi-session new file mode 100755 index 0000000..a599c71 --- /dev/null +++ b/.scripts/system/wofi-session @@ -0,0 +1,28 @@ +#!/bin/sh + +option="$(printf "⏻ Shutdown\n Reboot\n Suspend\n Hibernate" | \ + wofi --dmenu -p "Session")" + +dialogue_box() { + yad --image=gtk-dialog-question \ + --text="$1" +} + +case $option in + *Shutdown) + dialogue_box "Are you sure you want to shutdown this computer?" && \ + systemctl poweroff -i + ;; + *Reboot) + dialogue_box "Are you sure you want to reboot this computer?" && \ + systemctl reboot -i + ;; + *Suspend) + dialogue_box "Are you sure you want to suspend this computer?" && \ + systemctl suspend -i + ;; + *Hibernate) + dialogue_box "Are you sure you want to hibernate this computer?" && \ + systemctl hibernate -i + ;; +esac