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

View File

@@ -34,7 +34,7 @@ set column_ratios 1,3,4
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
set show_hidden true
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
@@ -71,7 +71,7 @@ set vcs_backend_svn disabled
set vcs_msg_length 50
# Use one of the supported image preview protocols
set preview_images false
set preview_images true
# Set the preview image method. Supported methods:
#
@@ -114,7 +114,7 @@ set preview_images false
# Preview images in full color with the external command "ueberzug".
# Images are shown by using a child window.
# Only for users who run X11 in GNU/Linux.
set preview_images_method w3m
set preview_images_method kitty
# Delay in seconds before displaying an image with the w3m method.
# Increase it in case of experiencing display corruption.

View File

@@ -6,19 +6,19 @@
}
{
"label" : "reboot",
"action" : "systemctl reboot",
"action" : "~/.config/hypr/scripts/close_apps.sh && systemctl reboot",
"text" : "Reboot",
"keybind" : "r"
}
{
"label" : "shutdown",
"action" : "systemctl poweroff",
"action" : "~/.config/hypr/scripts/close_apps.sh && systemctl poweroff",
"text" : "Shutdown",
"keybind" : "s"
}
{
"label" : "logout",
"action" : "hyprctl dispatch exit 0",
"action" : "~/.config/hypr/scripts/close_apps.sh && hyprctl dispatch exit ",
"text" : "Logout",
"keybind" : "e"
}

View File

@@ -1,12 +1,15 @@
libreoffice-fresh
obsidian
nextcloud-client
brave-bin
discord
youtube-music
mpv
waypaper-git
galculator
pavucontrol
vscodium
waypaper-git
yt-dlp
#thunar
#dolphin
#qt5-imageformats

View File

@@ -16,6 +16,7 @@ cliphist
wl-clipboard
polkit-kde-agent
xdg-desktop-portal-hyprland
gnome-keyring
# Pipewire
pipewire

View File

@@ -40,10 +40,10 @@ RebootCommand=/usr/bin/systemctl reboot
Current=catppuccin-macchiato
# Cursor size used in the greeter
CursorSize=
CursorSize=24
# Cursor theme used in the greeter
CursorTheme=
CursorTheme=Breeze
# Number of users to use as threshold
# above which avatars are disabled
@@ -58,7 +58,7 @@ EnableAvatars=true
FacesDir=/usr/share/sddm/faces
# Font used in the greeter
Font=
Font=FiraCode Nerd Font Regular 12
# Theme directory path
ThemeDir=/usr/share/sddm/themes