From 11c3e529369b0e8e797569b70ff6c6f971a61ead Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Thu, 18 Jul 2024 17:54:49 +0200 Subject: [PATCH] hypr: fix startup.sh --- config/hypr/hyprland.conf | 2 ++ config/hypr/scripts/startup.sh | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index a7247346..f3c6d245 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -42,6 +42,7 @@ env = HYPRCURSOR,24 # Execute your favorite apps at launch exec-once = hypridle +exec-once = ~/.config/hypr/scripts/startup.sh # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -219,6 +220,7 @@ bind = $mainmod, R, exec, killall fuzzel || fuzzel bind = $mainmod Shift, R, exec, killall rofi || rofi -show run # rofi installed for keepassxc-browser script bind = $mainmod, A, pseudo, # dwindle, A for Artificial bind = $mainmod, S, swapsplit, # dwindle +bind = $mainmod SHIFT, S, layoutmsg, preselect d # dwindle bind = $mainmod, G, togglegroup bind = $mainmod SHIFT, G, lockactivegroup, toggle bind = ALT, TAB, focuscurrentorlast diff --git a/config/hypr/scripts/startup.sh b/config/hypr/scripts/startup.sh index 308bb15a..28a2d4aa 100755 --- a/config/hypr/scripts/startup.sh +++ b/config/hypr/scripts/startup.sh @@ -22,13 +22,19 @@ else fi if [[ ! $(pidof /usr/lib64/libexec/polkit-kde-authentication-agent-1) ]]; then + if ! command -v /usr/lib64/libexec/polkit-kde-authentication-agent-1 &> /dev/null + then + echo "polkit-kde not installed" + else /usr/lib64/libexec/polkit-kde-authentication-agent-1 & logger 'polit-kde started' + fi else logger 'polkit-kde already running' fi -if [[ ! $(pidof mako) ]]; then +if [[ ! $(pidof mako) ]]; +then mako --config "${MAKOCONFIG}" & logger 'mako started' else @@ -44,22 +50,22 @@ killall xdg-desktop-portal logger 'killed all xdg-desktop' sleep 1 -/usr/lib64/libexec/xdg-desktop-portal-kde & +/usr/libexec/xdg-desktop-portal-kde & if [[ ! $(pidof xdg-desktop-portal-kde) ]]; then - logger 'problem: xdg-desktop-portal-kde' + logger 'problem: xdg-desktop-portal-kde not running' fi sleep 1 /usr/libexec/xdg-desktop-portal-hyprland & logger 'xdg-desktop-portal-hyprland started' if [[ ! $(pidof xdg-desktop-portal-hyprland) ]]; then - logger 'problem: xdg-desktop-portal-hyprland' + logger 'problem: xdg-desktop-portal-hyprland not running' fi sleep 2 /usr/libexec/xdg-desktop-portal & if [[ ! $(pidof xdg-desktop-portal) ]]; then - logger 'problem: xdg-desktop-portal' + logger 'problem: xdg-desktop-portal not running' fi if [[ ! $(pidof pipewire) ]]; then @@ -104,17 +110,14 @@ if [[ ! -f "/tmp/autotemp.pid" ]]; then "$HOME"/.config/hypr/scripts/gammarelay-autotemp.py > /dev/null 2>&1 & fi +killall wl-paste & +wl-paste --type text --watch cliphist store & +wl-paste --type image --watch cliphist store & +logger 'clipboard manager loaded' openrgb -p default & logger 'openrgb default theme loaded' kks new default & # kakoune default server -if [[ $(pidof swww-daemon) ]]; then - killall wl-paste - wl-paste --type text --watch cliphist store & - wl-paste --type image --watch cliphist store & - logger 'clipboard manager loaded' -fi - sleep 2 logger 'HYPERLAND MAIN STARTUP END' logger '============================' -- 2.51.2