Added wait for system tray on start

- Close applications before shutdown/logout/reboot
- Fixed battery check script
- Always display hidden files in ranger
TODO: - Wait for logout/shutdown/reboot until all applications are closed (timeout)
This commit is contained in:
2023-11-06 19:04:56 +01:00
parent c30a2370ae
commit 464a9b7d86
10 changed files with 43 additions and 18 deletions

View File

@@ -3,8 +3,6 @@ eww open bar1
eww open bar2
eww open bar3
indicator-mic-cam & disown
## Waybar auto update (requires inotifytools)
# CONFIG_FILES="$HOME/.config/waybar/config $HOME/.config/waybar/style.css"
#

View File

@@ -8,10 +8,12 @@ if [ -z $bat ]; then
fi
while true; do
per=$(upower -i $bat | grep percentage | awk '{print $2}')
upower=$(upower -i $bat)
state=$(echo "$upower" | grep state | awk '{print $2}')
per=$(echo "$upower" | grep percentage | awk '{print $2}')
per="${per%\%}"
if "$per" -lt 15 #&& ! is_charging
if [ "$per" -lt 15 ] && [ "$state" != "charging" ]; then
eww open battery_warning
fi

View File

@@ -0,0 +1,5 @@
#!/bin/bash
HYPRCMDS=$(hyprctl -j clients | jq -j '.[] | "dispatch closewindow address:\(.address); "')
hyprctl --batch "$HYPRCMDS" >> /tmp/hypr/cexit.log 2>&1

View File

@@ -0,0 +1,13 @@
#!/bin/bash
program_name="eww"
check_program_running() {
pgrep -x "$program_name" > /dev/null
}
while ! check_program_running; do
sleep 1
done
sleep 1

View File

@@ -1,13 +1,16 @@
exec-once = ~/.config/hypr/scripts/bar.sh #Has to be first -> Systray
## Programms
exec-once = discord
exec-once = youtube-music
exec-once = ~/.config/hypr/scripts/wait_for_tray.sh && discord
exec-once = ~/.config/hypr/scripts/wait_for_tray.sh && nextcloud
exec-once = ~/.config/hypr/scripts/wait_for_tray.sh && youtube-music
exec-once = swaync
exec = hyprshade auto
exec-once = nm-applet
exec-once = blueman-applet
exec-once = hyprshade auto
exec-once = playerctld daemon
exec-once = ~/.config/hypr/scripts/bar.sh
exec-once = indicator-mic-cam
exec-once = ~/.config/hypr/scripts/idle.sh
exec-once = ~/.config/hypr/scripts/battery_check.sh