mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-01-30 09:48:11 +01:00
Compare commits
4 Commits
88c1642f65
...
3e0724cba9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e0724cba9 | ||
|
|
475e4abb40 | ||
|
|
534348e0b6 | ||
|
|
3fb60852de |
@ -30,6 +30,11 @@ image/svg+xml)
|
||||
[ ! -f "$CACHE" ] && inkscape --convert-dpi-method=none -o "$CACHE.png" --export-overwrite -D --export-png-color-mode=RGBA_16 "$1"
|
||||
image "$CACHE.png" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
image/x-xcf)
|
||||
CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}')"
|
||||
[ ! -f "$CACHE.jpg" ] && convert "$1[0]" "$CACHE.jpg"
|
||||
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
|
||||
;;
|
||||
image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
|
||||
text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
|
||||
text/troff) man ./ "$1" | col -b ;;
|
||||
|
||||
@ -9,7 +9,7 @@ output="$(date '+%y%m%d-%H%M-%S').png"
|
||||
xclip_cmd="xclip -sel clip -t image/png"
|
||||
ocr_cmd="xclip -sel clip"
|
||||
|
||||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
|
||||
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)\\nOCR a selected area (copy)" | dmenu -l 7 -i -p "Screenshot which area?")" in
|
||||
"a selected area") maim -u -s pic-selected-"${output}" ;;
|
||||
"current window") maim -B -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
|
||||
"full screen") maim -q -d 0.2 pic-full-"${output}" ;;
|
||||
|
||||
23
.local/bin/statusbar/sb-bghitness
Normal file
23
.local/bin/statusbar/sb-bghitness
Normal file
@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
|
||||
# current brightness
|
||||
curr_brightness=$(cat /sys/class/backlight/*/brightness)
|
||||
|
||||
# max_brightness
|
||||
max_brightness=$(cat /sys/class/backlight/*/max_brightness)
|
||||
|
||||
# brightness percentage
|
||||
brightness_per=$((100 * curr_brightness / max_brightness))
|
||||
|
||||
case $BLOCK_BUTTON in
|
||||
1)
|
||||
;;
|
||||
3)
|
||||
notify-send "💡 Brightness module" "\- Shows current brightness level ☀️."
|
||||
;;
|
||||
6)
|
||||
setsid -f "$TERMINAL" -e "$EDITOR" "$0"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "💡 ${brightness_per}%"
|
||||
Loading…
x
Reference in New Issue
Block a user