restructured all the scripts into one folder
parent
07a05bce70
commit
8731608f42
|
|
@ -21,7 +21,7 @@
|
|||
(defwidget winsworks [monitor]
|
||||
(box :orientation "h" :space-evenly false :halign "start"
|
||||
(workspaceWidget :monitor monitor)
|
||||
(button :onclick "scripts/drawer.sh" :class "music" {" ${activewindow}"})
|
||||
(button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music" {" ${activewindow}"})
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "scripts/playpause.sh"
|
||||
:onclick "~/Dotfiles/desktopenvs/hyprland/scripts/playpause.sh"
|
||||
{music != "" ? " ${music}" : " None"}))
|
||||
|
||||
|
||||
|
|
@ -72,23 +72,23 @@
|
|||
{i.name == "special:magic" ? "" : "${i.name}"})))))
|
||||
|
||||
|
||||
(deflisten workspace-old "scripts/workspace")
|
||||
(deflisten workspace-old "~/Dotfiles/desktopenvs/hyprland/scripts/workspace")
|
||||
(defwidget workspaces-old []
|
||||
(literal :content workspace-old))
|
||||
|
||||
(defpoll music :interval "0.5s"
|
||||
"scripts/playerget")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/playerget")
|
||||
|
||||
|
||||
(defpoll activewindow :interval "0.5s"
|
||||
"scripts/activewindow")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/activewindow")
|
||||
|
||||
|
||||
(defpoll IP :interval "5s"
|
||||
"scripts/ip")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/ip")
|
||||
|
||||
(defpoll volume :interval "0.5s"
|
||||
"scripts/getvol")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/getvol")
|
||||
|
||||
(defpoll time :interval "1s"
|
||||
"date '+%H:%M:%S|%d.%m.%Y'")
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
(bar :monitor_ monitor))
|
||||
|
||||
(defpoll battery :interval "2s"
|
||||
"scripts/batteryperc")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/batteryperc")
|
||||
|
||||
|
||||
|
||||
|
|
@ -26,7 +26,7 @@
|
|||
(box :orientation "h" :space-evenly false :halign "start"
|
||||
(box :class "music" {"${battery}"})
|
||||
(workspaceWidget :monitor monitor)
|
||||
(button :onclick "scripts/drawer.sh" :class "music" {" ${activewindow}"})
|
||||
(button :onclick "~/Dotfiles/desktopenvs/hyprland/scripts/drawer.sh" :class "music" {" ${activewindow}"})
|
||||
)
|
||||
)
|
||||
|
||||
|
|
@ -47,7 +47,7 @@
|
|||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "scripts/playpause.sh"
|
||||
:onclick "~/Dotfiles/desktopenvs/hyprland/scripts/playpause.sh"
|
||||
{music != "" ? " ${music}" : " None"}))
|
||||
|
||||
|
||||
|
|
@ -77,23 +77,23 @@
|
|||
{i.name == "special:magic" ? "" : "${i.name}"})))))
|
||||
|
||||
|
||||
(deflisten workspace-old "scripts/workspace")
|
||||
(deflisten workspace-old "~/Dotfiles/desktopenvs/hyprland/scripts/workspace")
|
||||
(defwidget workspaces-old []
|
||||
(literal :content workspace-old))
|
||||
|
||||
(defpoll music :interval "0.5s"
|
||||
"scripts/playerget")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/playerget")
|
||||
|
||||
|
||||
(defpoll activewindow :interval "0.5s"
|
||||
"scripts/activewindow")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/activewindow")
|
||||
|
||||
|
||||
(defpoll IP :interval "5s"
|
||||
"scripts/ip")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/ip")
|
||||
|
||||
(defpoll volume :interval "0.5s"
|
||||
"scripts/getvol")
|
||||
"~/Dotfiles/desktopenvs/hyprland/scripts/getvol")
|
||||
|
||||
(defpoll time :interval "1s"
|
||||
"date '+%H:%M:%S|%d.%m.%Y'")
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
#!/bin/bash
|
||||
trunc=16
|
||||
sample=$(hyprctl activewindow | grep title: | awk -F: '{print $2}')
|
||||
|
||||
#echo ${sample}
|
||||
|
||||
if [ ${#sample} -gt $trunc ]; then
|
||||
echo $sample | head -c $trunc | sed 's/$/…/'
|
||||
else
|
||||
if [ ${#sample} -ne 0 ]; then
|
||||
echo $sample
|
||||
else
|
||||
echo None
|
||||
fi
|
||||
fi
|
||||
|
||||
#hyprctl activewindow | grep title: | awk -F: '{print $2}' | head -c $trunc | sed 's/$/.../'
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Get percentage and remove the % sign cleanly
|
||||
perc=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | awk '/percentage/ {gsub("%",""); print $2}')
|
||||
state=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | awk '/state/ {print $2}')
|
||||
|
||||
# Check if values are not empty
|
||||
if [ -z "$perc" ] || [ -z "$state" ]; then
|
||||
echo "Battery info unavailable"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Convert to integer
|
||||
num=${perc%%.*} # In case perc is float
|
||||
|
||||
if [ "$state" == "charging" ]; then
|
||||
echo " ${perc}%"
|
||||
else
|
||||
if [ "$num" -gt 95 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 90 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 80 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 70 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 60 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 50 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 40 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 30 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 20 ]; then
|
||||
echo " ${perc}%"
|
||||
elif [ "$num" -gt 10 ]; then
|
||||
echo " ${perc}%"
|
||||
else
|
||||
notify-send --urgency=critical -t 2000 " low battery, please charge"
|
||||
echo " ${perc}%"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
perc=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep percentage | awk -F: '{print $2}' | xargs)
|
||||
state=$(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state | awk -F: '{print $2}' | xargs)
|
||||
|
||||
num=$(echo ${perc::-1})
|
||||
|
||||
if [ $state == "charging" ]; then
|
||||
echo " ${perc}"
|
||||
else
|
||||
#echo " ${perc}"
|
||||
|
||||
if [ $num -gt 95 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 90 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 80 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 70 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 60 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 50 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 40 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 30 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 20 ]; then
|
||||
echo " ${perc}"
|
||||
elif [ $num -gt 10 ]; then
|
||||
echo " ${perc}"
|
||||
else
|
||||
notify-send --urgency=critical -t 2000 " low battery, please charge"
|
||||
echo " ${perc}"
|
||||
fi
|
||||
fi
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
nwg-drawer -fm "kitty -e yazi" -term kitty -wm hyprland -mb 20 -ml 20 -mr 20 -mt 20 -pblock hyprlock -pbpoweroff poweroff -pbexit "hyprctl dispatch exit" -pbreboot reboot
|
||||
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
perc=$(pactl get-sink-volume @DEFAULT_SINK@ | awk -F/ '{print $2}' | xargs)
|
||||
num=$(echo ${perc::-1})
|
||||
echo $num
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
hostname -i | tr ' ' '\n' | head -n1 | tail -n1
|
||||
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
truncs=13
|
||||
trunca=10
|
||||
song=$(playerctl metadata --format '{{ title }}')
|
||||
artist=$(playerctl metadata --format '{{ artist }}')
|
||||
#echo ${sample}
|
||||
|
||||
if [ ${#song} -gt $truncs ]; then
|
||||
songt=$(echo $song | head -c $truncs | sed 's/$/…/')
|
||||
else
|
||||
if [ ${#song} -ne 0 ]; then
|
||||
songt=$(echo ${song})
|
||||
else
|
||||
songt=$(echo None)
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${#artist} -gt $trunca ]; then
|
||||
artistt=$(echo $artist | head -c $trunca | sed 's/$/…/')
|
||||
else
|
||||
if [ ${#artist} -ne 0 ]; then
|
||||
artistt=$(echo ${artist})
|
||||
else
|
||||
artistt=$(echo None)
|
||||
fi
|
||||
fi
|
||||
echo "${songt}|${artistt}"
|
||||
|
||||
|
||||
#hyprctl activewindow | grep title: | awk -F: '{print $2}' | head -c $trunc | sed 's/$/.../'
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
playerctl play-pause -p spotify, vlc, firefox
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
hyprctl dispatch focuswindow address:"$(hyprctl -j clients | jq 'map("\(.workspace.id) ∴ \(.workspace.name) ┇ \(.title) ┇ \(.address)")' | sed "s/,$//; s/^\[//; s/^\]//; s/^[[:blank:]]*//; s/^\"//; s/\"$//" | grep -v "^$" | wofi -dO alphabetical | grep -o "0x.*$")"
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#define icons for workspaces 1-9
|
||||
ic=("W0" "W1" "W2" "W3" "W4" "W5" "W6" "W7" "W8" "W9")
|
||||
|
||||
#initial check for occupied workspaces
|
||||
for num in $(hyprctl workspaces | grep ID | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
|
||||
export o"$num"="$num"
|
||||
done
|
||||
|
||||
#initial check for focused workspace
|
||||
for num in $(hyprctl monitors | grep active | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
done
|
||||
|
||||
workspaces() {
|
||||
if [[ ${1:0:9} == "workspace" ]]; then #set focused workspace
|
||||
unset -v "$fnum"
|
||||
num=${1:11}
|
||||
export f"$num"="$num"
|
||||
export fnum=f"$num"
|
||||
|
||||
elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
|
||||
num=${1:17}
|
||||
export o"$num"="$num"
|
||||
export f"$num"="$num"
|
||||
|
||||
elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
|
||||
num=${1:18}
|
||||
unset -v o"$num" f"$num"
|
||||
fi
|
||||
|
||||
#output eww widget
|
||||
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
|
||||
(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"true\" \
|
||||
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && /home/taylor/.config/hypr/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && /home/taylor/.config/hypr/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && /home/taylor/.config/hypr/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && /home/taylor/.config/hypr/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5 && /home/taylor/.config/hypr/default_app\" :class \"0$o5$f5\" \"${ic[5]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6 && /home/taylor/.config/hypr/default_app\" :class \"0$o6$f6\" \"${ic[6]}\") \
|
||||
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7 && /home/taylor/.config/hypr/default_app\" :class \"0$o7$f7\" \"${ic[7]}\") \
|
||||
)\
|
||||
)"
|
||||
}
|
||||
|
||||
workspaces
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||
workspaces "$event"
|
||||
done
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
monitor = , highres, auto, 2
|
||||
|
||||
#monitor handling
|
||||
exec-once = /usr/bin/hyprland-monitor-attached /home/themiro/Dotfiles/desktopenvs/hyprland/hypr/ [monitorhandler.sh]
|
||||
exec-once = ~/Dotfiles/desktopenvs/hyprland/scripts/monitorhandler.sh
|
||||
|
||||
# unscale XWayland
|
||||
xwayland {
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/bash
|
||||
nwg-drawer -fm "kitty -e yazi" -term kitty -wm hyprland -mb 20 -ml 20 -mr 20 -mt 20 -pblock hyprlock -pbpoweroff poweroff -pbexit "hyprctl dispatch exit" -pbreboot reboot
|
||||
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
swww restore
|
||||
|
||||
~/Dotfiles/desktopenvs/hyprland/scripts/ewwstart.sh
|
||||
Loading…
Reference in New Issue