feat: swayosd startup shell and new style

This commit is contained in:
hesam-init 2024-04-04 04:24:23 +03:30
parent 3a9f968e18
commit 552a8cbadf
10 changed files with 21 additions and 50 deletions

View file

@ -6,10 +6,10 @@ exec-once = dbus-update-activation-environment --all &
exec-once = ~/.config/hypr/scripts/startup/pipewire.sh &
exec-once = ~/.config/hypr/scripts/startup/keyring.sh &
exec-once = wl-paste --watch cliphist store &
exec-once = swayosd-server &
exec-once = ~/.config/hypr/scripts/startup/dunst.sh &
exec-once = ~/.config/hypr/scripts/wallpaper/wallpaper-daemon.sh &
exec-once = ~/.config/hypr/scripts/startup/swayosd.sh &
exec-once = ~/.config/hypr/scripts/startup/waybar.sh &
# exec-once = avizo-service &

View file

@ -13,6 +13,7 @@ decoration {
new_optimizations = on
ignore_opacity = true
xray = false
# blurls = swayosd
# blurls = waybar
}

View file

@ -0,0 +1,5 @@
#!/usr/bin/env bash
source ~/.config/scripts/env.sh
exec $WATCHER -a "$SWAYOSD_DAEMON" -d "$SWAYOSD_DIR" -p "swayosd-server"

View file

@ -1,41 +0,0 @@
#!/usr/bin/env bash
source ~/.config/scripts/env.sh
if [[ ! -d "$WAYBAR_DIR" ]]; then
echo "Error: Configuration directory or files missing!"
exit 1
fi
pkill waybar
sleep 1
while true; do
logger -i "$0: Starting waybar in the background..."
exec $WAYBAR_LAUNCHER &
waybar_pid=$!
logger -i "$0: Started waybar PID=$waybar_pid. Waiting for modifications..."
inotifywait $WAYBAR_INOTIFY_EVENTS "$WAYBAR_DIR" 2>&1 | logger -i
if [[ $? -ne 0 ]]; then
echo "Error: inotifywait failed!"
exit 1
fi
logger -i "$0: inotifywait returned $?. Killing all waybar processes..."
pkill waybar 2>&1 | logger -i
if [[ $? -ne 0 ]]; then
echo "Error: Killing waybar failed!"
exit 1
fi
wait $waybar_pid
if [[ $? -ne 0 ]]; then
echo "Warning: Waybar process exited unexpectedly!"
fi
logger -i "$0: killall waybar returned $?. Wait a sec..."
done

View file

@ -7,7 +7,7 @@ WAYBAR_PID=$(pgrep -x waybar)
if [ -n "$WAYBAR_PID" ]; then
pkill waybar
elif [ $WAYBAR_DEV_MODE = true ]; then
GTK_DEBUG=interactive exec $WAYBAR_LAUNCHER
GTK_DEBUG=interactive exec $WATCHER -a "$WAYBAR_LAUNCHER" -d "$WAYBAR_DIR" -p "waybar"
else
exec $WAYBAR_LAUNCHER
exec $WATCHER -a "$WAYBAR_LAUNCHER" -d "$WAYBAR_DIR" -p "waybar"
fi

View file

@ -6,7 +6,7 @@ export WATCHER="$HOME/.config/scripts/utils/watcher/main.sh"
# waybar env :
export WAYBAR_DEV_MODE=false
export WAYBAR_THEME="river"
export WAYBAR_DIR="$HOME/.config/waybar/$WAYBAR_THEME"
export WAYBAR_DIR="$HOME/.config/waybar"
export WAYBAR_LAUNCHER="waybar -c $WAYBAR_DIR/config.jsonc -s $WAYBAR_DIR/style.css"
# wallpaper configs - swaybg, swww, mpvpaper :
@ -16,6 +16,10 @@ export LIVE_WALLPAPERS_DIR="$HOME/Wallpapers/Live"
export SWWW_FPS=144
export SWWW_DURATION=2
# swayosd configs :
export SWAYOSD_DAEMON="swayosd-server"
export SWAYOSD_DIR="$HOME/.config/swayosd"
# rofi launcher :
export LAUNCHER_TYPE="2"
export CLIPBOARD_TYPE="1"

View file

@ -26,7 +26,6 @@ fi
start_application() {
echo "Starting $process_name..."
pkill $process_name
sleep 1
exec $app_name
}
@ -34,7 +33,6 @@ restart_application() {
if pgrep -x "$process_name" >/dev/null; then
echo "Restarting $process_name..."
pkill $process_name
sleep 1
$app_name &
else
echo "$app_name is not currently running."

View file

@ -1,8 +1,8 @@
window#osd {
padding: 12px 20px;
border-radius: 120px;
border-radius: 12px;
border: none;
background: alpha(@theme_bg_color, 0.8);
background: alpha(@theme_bg_color, 1);
}
window#osd #container {

View file

@ -6,7 +6,7 @@ window {
}
window>box {
min-height: 28px;
min-height: 30px;
padding: 6px;
padding-bottom: 2px;
}

View file

@ -21,6 +21,10 @@
background-color: #f53c3c;
}
#workspaces {
font-size: 10px;
}
#workspaces * {
font-size: 10px;
}