eww power menu
This commit is contained in:
parent
5660ca8d1a
commit
c439ae2cd0
30 changed files with 208 additions and 229 deletions
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
status=$(nmcli n)
|
||||
if [[ "$status" == "enabled" ]]; then
|
||||
nmcli n off
|
||||
else
|
||||
nmcli n on
|
||||
fi
|
||||
7
modules/wm/hyprland/config/eww/scripts/confirm.sh
Executable file
7
modules/wm/hyprland/config/eww/scripts/confirm.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
read -t 10 -p "Are you sure? Doing it anyway in 10 seconds" input
|
||||
|
||||
if [ $(($?)) = 0 ]; then
|
||||
$1
|
||||
fi
|
||||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
eww update hostname="$(hostname)"
|
||||
|
||||
eww open-many --toggle quote quicksettings appbar fetch sys
|
||||
eww open-many --toggle quote quicksettings appbar fetch sys power
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "\"The futility of lighting birthday candles to immediately blow them out is one reason why I find children's birthday parties unpractical.\""
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
time=`date +%Y-%m-%d-%I-%M-%S`
|
||||
geometry=`xrandr | head -n1 | cut -d',' -f2 | tr -d '[:blank:],current'`
|
||||
dir="`xdg-user-dir PICTURES`/Screenshots"
|
||||
file="Screenshot_${time}_${geometry}.png"
|
||||
|
||||
# notify
|
||||
notify_user () {
|
||||
if [[ -e "$dir/$file" ]]; then
|
||||
dunstify -u low --replace=699 -i /usr/share/archcraft/icons/dunst/picture.png "Saved in $dir"
|
||||
else
|
||||
dunstify -u low --replace=699 -i /usr/share/archcraft/icons/dunst/picture.png "Screenshot Deleted."
|
||||
fi
|
||||
}
|
||||
|
||||
# take shots
|
||||
shotnow () {
|
||||
cd ${dir} && sleep 0.5 && maim -u -f png "$file" && viewnior ${dir}/"$file"
|
||||
notify_user
|
||||
}
|
||||
|
||||
shotarea () {
|
||||
cd ${dir} && maim -u -f png -s -b 2 -c 0.35,0.55,0.85,0.25 -l "$file" && viewnior ${dir}/"$file"
|
||||
notify_user
|
||||
}
|
||||
|
||||
if [[ ! -d "$dir" ]]; then
|
||||
mkdir -p "$dir"
|
||||
fi
|
||||
|
||||
chosen="$1"
|
||||
case $chosen in
|
||||
"SCREEN")
|
||||
shotnow
|
||||
;;
|
||||
"SELECT")
|
||||
shotarea
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
list=$(ls /usr/bin/ | grep -m 10 -i "$1")
|
||||
buf=""
|
||||
for l in $list ; do
|
||||
buf="$buf (button :class \"item\" :onclick \"$l &\" \"$l\")"
|
||||
done
|
||||
echo "(box :orientation \"v\" :spacing 5 :class \"apps\" :halign \"center\" :valign \"center\" $buf)" > ~/.config/eww/scripts/search_items.txt
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
uptime=$(($(date +%s) - $(date +%s -d "$(last reboot | head -n 1 | sed -e 's/reboot system boot ...... //; s/still running//')")));
|
||||
|
||||
echo $((uptime / 3600 % 60))h $((uptime / 60 % 60))m
|
||||
15
modules/wm/hyprland/config/eww/scripts/volume.sh
Executable file
15
modules/wm/hyprland/config/eww/scripts/volume.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
volume=$(($(wpctl get-volume @DEFAULT_SINK@ | sed -r 's/Volume: (0|1)\.(..)/\1\2/; s/^(0)//g')))
|
||||
|
||||
if (( $volume == 0 )); then
|
||||
echo 'images/sound-off.svg'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if (( $volume < 20 )); then
|
||||
echo 'images/sound-lo.svg'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo 'images/sound-hi.svg'
|
||||
Loading…
Add table
Add a link
Reference in a new issue