Switch to a predefined eww config
This commit is contained in:
parent
92f52c0c42
commit
6703367fdf
9 changed files with 436 additions and 0 deletions
7
modules/wm/hyprland/config/eww/scripts/airplane_mode.sh
Normal file
7
modules/wm/hyprland/config/eww/scripts/airplane_mode.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
status=$(nmcli n)
|
||||
if [[ "$status" == "enabled" ]]; then
|
||||
nmcli n off
|
||||
else
|
||||
nmcli n on
|
||||
fi
|
||||
3
modules/wm/hyprland/config/eww/scripts/quote.sh
Executable file
3
modules/wm/hyprland/config/eww/scripts/quote.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/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.\""
|
||||
41
modules/wm/hyprland/config/eww/scripts/screenshot
Normal file
41
modules/wm/hyprland/config/eww/scripts/screenshot
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/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
|
||||
|
||||
8
modules/wm/hyprland/config/eww/scripts/search.sh
Normal file
8
modules/wm/hyprland/config/eww/scripts/search.sh
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/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
|
||||
|
||||
5
modules/wm/hyprland/config/eww/scripts/uptime.sh
Executable file
5
modules/wm/hyprland/config/eww/scripts/uptime.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue