This commit is contained in:
2025-02-04 14:27:15 -05:00
parent 6815ec12ce
commit 42cd641f30
20 changed files with 362 additions and 488 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env zsh
if wl-paste | iconv -f UTF8 > /dev/null; then
case $1 in
head)
wl-paste 2> /dev/null |
head -1 |
awk 'length > 20{$0 = substr($0, 1, 17) "..."} {printf "%s", $0}' |
sed 's/^[[:space:]]*//g'
echo "";;
all)
wl-paste 2> /dev/null
true;;
esac
fi

View File

@@ -0,0 +1,2 @@
#!/usr/bin/env fish
niri msg focused-window | rg Title | sed -E "s/[[:space:]]+Title\: //g" | sed "s/\"//g"

View File

@@ -0,0 +1,3 @@
#!/usr/bin/env fish
niri msg workspaces | rg "^ \*" | sed -E 's/[[:space:]]+\* //g'

View File

@@ -0,0 +1,2 @@
#!/usr/bin/env fish
date +'{"long":"%a %b %e %H:%M:%S %Z %Y","hour":"%H","minute":"%M"}'

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env zsh
export CHARSET=ASCII
case $1 in
name)
nmcli -f IN-USE,SSID d w | grep '*' | sed 's/[\* ]//g' | cat
exit 0;;
strength)
str=$(nmcli -f ACTIVE,BARS d w | grep 'yes' | tr -d ' yesno')
case ${str: 0:-1} in
'****')
icon="󰤨"; colour="green";;
'***')
icon="󰤥"; colour="yellow";;
'**')
icon="󰤢"; colour="peach";;
'*')
icon="󰤟"; colour="maroon";;
*)
icon="󰤯"; colour="red";;
esac
echo "{\"icon\":\"$icon\",\"colour\":\"$colour\"}"
exit 0;;
esac