Everywhere: Add Hyprland Wayland config

This commit is contained in:
Riyyi
2025-02-09 22:46:46 +01:00
parent f0835c1a06
commit 6e50e217c3
35 changed files with 1151 additions and 94 deletions
+6 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh
file="/tmp/polybar-btc-module"
file="/tmp/panel-btc-module"
# Enable mathematics in POSIX shell
calc() { awk "BEGIN { printf(\"%.2f\", $*) }"; }
@@ -27,7 +27,12 @@ output() {
fi
# Result
# >>> session=xorg
echo "%{F$color}$symbol $difference%%{F$COLOR15}"
# <<<
# >>> session=wayland
# echo "<span color='$color'>$symbol $difference%</span>"
# <<<
}
if [ ! -f "$file" ]; then
+7
View File
@@ -0,0 +1,7 @@
#!/bin/sh
# Kill existing panel
pkill --exact --signal 9 waybar
# Start panel
setsid -f waybar
+13 -2
View File
@@ -1,12 +1,17 @@
#!/bin/sh
# Take a screenshot with the configured program
# Depends: scrot / maim, xdotool / magick, xdotool
# Depends: rofi and scrot / maim, xdotool / magick, xdotool / grim, slurp, jq
# User-config---------------------------
# scrot / maim / magick import
# scrot / maim / magick import / grim
# >>> session=xorg
screenshotter="maim"
# <<<
# >>> session=wayland
# screenshotter="grim"
# <<<
# --------------------------------------
@@ -25,6 +30,12 @@ elif [ "$screenshotter" = "magick import" ] || [ "$screenshotter" = "import" ];
selection=""
activeWindow="-window \$(xdotool getactivewindow)"
filename="$CAPTURE/$(date '+%Y-%m-%d-%H%M%S')_import.png"
elif [ "$screenshotter" = "grim" ]; then
screenshotter="" # start of command needs to be overwritten
fullscreen="grim"
selection="slurp | grim -g -"
activeWindow="hyprctl -j activewindow | jq -r '\"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])\"' | grim -g -"
filename="$CAPTURE/$(date '+%Y-%m-%d-%H%M%S')_grim.png"
else
echo "Printscreen configuration is invalid"
exit 1
+21 -2
View File
@@ -1,7 +1,26 @@
#!/bin/sh
WALLPAPER="$HOME/pictures/wallpaper.jpg"
# Overwrite wallpaper with new image if provided
[ -n "$1" ] && cp "$1" "$HOME/pictures/wallpaper.jpg"
[ -n "$1" ] && cp "$1" "$WALLPAPER"
# Set wallpaper
feh --no-fehbg --bg-fill "$HOME/pictures/wallpaper.jpg"
if [ "$WAYLAND" = true ]; then
pkill hyprpaper
setsid -f hyprpaper
# Wait until hyprpaper is available
while true; do
output=$(hyprctl hyprpaper)
if ! echo "$output" | grep -q ".sock"; then
break
fi
sleep 0.1
done
hyprctl hyprpaper preload "$WALLPAPER"
hyprctl hyprpaper wallpaper ",$WALLPAPER"
else
feh --no-fehbg --bg-fill "$WALLPAPER"
fi