]> Freerunner's - dotfiles.git/commitdiff
hypr: improve startup
authorAndre Ramnitz <tux.rising@gmail.com>
Sun, 25 Aug 2024 13:35:33 +0000 (15:35 +0200)
committerAndre Ramnitz <tux.rising@gmail.com>
Mon, 26 Aug 2024 13:52:01 +0000 (15:52 +0200)
config/hypr/hyprland.conf
config/hypr/scripts/startup.sh

index 0936f1fba78fb06809dc040d9f86f320894ab3bc..6a793ae0f0354a16a5a79cea79f5225a95664fa5 100644 (file)
@@ -18,37 +18,36 @@ xwayland {
 # See https://wiki.hyprland.org/Configuring/Keywords/ for more
 env = VK_ICD_FILENAMES,/usr/share/vulkan/icd.d/radeon_icd.x86_64.json
 env = WLR_RENDERER,vulkan
-env = XDG_CURRENT_DESKTOP, Hyprland
-env = XDG_SESSION_TYPE, wayland
-env = XDG_SESSION_DESKTOP, Hyprland
+env = XDG_CURRENT_DESKTOP,Hyprland
+env = XDG_SESSION_TYPE,wayland
+env = XDG_SESSION_DESKTOP,Hyprland
 
 # Some default env vars.
 env = QT_QPA_PLATFORM,wayland;xcb
 #env = QT_AUTO_SCREEN_SCALE_FACTOR,1
 #env = QT_QPA_PLATFORMTHEME,qt5ct
 
-env = GDK_BACKEND,wayland,x11
+env = GDK_BACKEND,wayland,x11,*
 #env = GDK_SCALE=1 # scaling XWayland clients
 env = GTK_USE_PORTAL,1
 
 env = MOZ_ENABLE_WAYLAND,1
+env = SDL_VIDEODRIVER,wayland # remove or set to x11 for games providing older versions of SDL
 
 # use older kernel DRM API (allow-tearing), not necessary above Linux 6.8
 # env = WLR_DRM_NO_ATOMIC,0
 
 # set cursor
 env = XCURSOR_THEME,breeze
-env = XCURSOR_SIZE,24
-env = HYPRCURSOR_THEME,breeze
-env = HYPRCURSOR_SIZE,24
+env = XCURSOR_SIZE,30
+env = HYPRCURSOR_THEME,Bibata-Modern-Amber
+env = HYPRCURSOR_SIZE,30
 
 # Execute your favorite apps at launch
 exec-once = hyprpm enable hyprbars
 exec-once = ~/.config/hypr/scripts/startup.sh
 exec-once = hypridle
 exec-once = foot -s
-# exec-once = sleep 1 && openrgb --startminimized
-# exec-once = sleep 1 && corectrl --minimize-systray
 
 # Source a file (multi-file configs)
 # source = ~/.config/hypr/myColors.conf
@@ -104,9 +103,7 @@ master {
 
 decoration {
     # See https://wiki.hyprland.org/Configuring/Variables/ for more
-
-    rounding = 3
-
+    rounding = 8
     blur {
         enabled = true
         size = 3
@@ -157,6 +154,7 @@ misc {
     force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers
        key_press_enables_dpms = true
        vrr = 2
+       vfr = false #enable for battery savings
 }
 
 # Example per-device config
@@ -216,6 +214,9 @@ windowrulev2 = float,title:^(Steam)$
 windowrulev2 = float,title:^(Freundesliste)$
 windowrulev2 = stayfocused, title:^()$, class:^(steam)$
 windowrulev2 = minsize 1 1, title:^()$, class:^(steam)$
+windowrulev2 = plugin:hyprbars:nobar,class:^(steam)$
+windowrulev2 = plugin:hyprbars:nobar,title:^(Steam)$
+windowrulev2 = plugin:hyprbars:nobar,title:^(Freundesliste)$
 
 # handle wine/proton games
 windowrulev2 = noanim, class:^(.*exe)$
index 5e3cdf8f4cbe2f5637cd8cc083352ddc4109797e..761d12886b045b1b1f024e8a7e108966dfaef2bb 100755 (executable)
@@ -1,13 +1,27 @@
 #!/usr/bin/env bash
 
 logger '============================'
-logger 'HYPERLAND MAIN STARTUP BEGIN'
+logger 'HYPRLAND MAIN STARTUP BEGIN'
 # shellcheck disable=SC2155
 # shellcheck disable=SC2046
 test ! -d "$XDG_RUNTIME_DIR" && export XDG_RUNTIME_DIR=$(mktemp -d /tmp/$(id -u)-runtime-dir.XXX) && logger 'xdg-runtime dir set NOW'
 test ! "$DBUS_SESSION_BUS_ADDRESS" && dbus-daemon --session --address=unix:path="$XDG_RUNTIME_DIR"/bus && logger 'dbus session daemon started'
+dbus-update-activation-environment WAYLAND_DISPLAY XDG_CURRENCT_DESKTOP
 
+#------------------------------------------------------ xdg-desktop-portal
+killall -e xdg-desktop-portal-hyprland
+killall -e xdg-desktop-portal-kde
+killall -e xdg-desktop-portal-gtk
+killall -e xdg-desktop-portal-gnome
+killall -e xdg-desktop-portal-wlr
+killall xdg-desktop-portal
+logger 'killed all xdg-desktop'
 
+# sleep 1 && test -f /usr/libexec/xdg-desktop-portal-kde && sleep 1 && /usr/libexec/xdg-desktop-portal-kde &
+sleep 1 && test -f /usr/libexec/xdg-desktop-portal-hyprland && sleep 1 && /usr/libexec/xdg-desktop-portal-hyprland &
+sleep 1 && test -f /usr/libexec/xdg-desktop-portal && sleep 1 && /usr/libexec/xdg-desktop-portal &
+
+#------------------------------------------------------ polkit-kde
 if [[ ! $(pidof /usr/libexec/polkit-kde-authentication-agent-1) ]]; then
     if ! command -v /usr/libexec/polkit-kde-authentication-agent-1 &> /dev/null
     then
@@ -20,35 +34,6 @@ else
     logger 'polkit-kde already running'
 fi
 
-#------------------------------------------------------ xdg-desktop-portal
-killall xdg-desktop-portal-hyprland
-killall xdg-desktop-portal-kde
-killall xdg-desktop-portal-gtk
-killall xdg-desktop-portal-gnome
-killall xdg-desktop-portal-wlr
-killall xdg-desktop-portal
-logger 'killed all xdg-desktop'
-
-sleep 0.5
-/usr/libexec/xdg-desktop-portal-kde &
-if [[ ! $(pidof xdg-desktop-portal-kde) ]]; then
-    logger 'problem: xdg-desktop-portal-kde not running'
-fi
-
-sleep 0.5
-/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 not running'
-fi
-
-sleep 1
-/usr/libexec/xdg-desktop-portal &
-if [[ ! $(pidof xdg-desktop-portal) ]]; then
-    logger 'problem: xdg-desktop-portal not running'
-fi
-
-
 #------------------------------------------------------ waybar and tray apps
 if [[ ! $(pidof pipewire) ]]; then
     gentoo-pipewire-launcher &
@@ -62,10 +47,10 @@ until [[ $(pidof pipewire) ]]; do
     sleep 0.5
 done
 
-! pidof mpd && mpd # does fork
-! pidof mpd-mpris && mpd-mpris &
+! pidof mpd && mpd # does fork unless called with --no-daemon
+! pidof mpd-mpris && mpd-mpris > /dev/null 2>&1 &
 
-! pidof waybar && waybar &
+! pidof waybar && waybar > /dev/null 2>&1 &
 logger 'waybar started'
 
 until [[ $(pidof waybar) ]]; do
@@ -74,29 +59,19 @@ done
 corectrl --minimize-systray &
 openrgb -p default --startminimized &
 
-# MAKOCONFIG="$HOME/.config/mako/config"
-# ! pidof mako && mako --config "${MAKOCONFIG}" &
-! pidof swaync && swaync
-
+! pidof swaync && swaync > /dev/null 2>&1 &
 ! pidof kwalletmanager5 && /usr/libexec/pam_kwallet_init &
-! pidof swww-daemon && swww-daemon > /dev/null 2>&1 & # swww-init is now deprecated
-until [[ $(pidof swww-daemon) ]];do
-    sleep 0.5
-done
-swww img ~/Bilder/Wallpapers/default.jpg # does fork
 
-! pidof wl-gammarelay-rs && "$HOME"/.cargo/bin/wl-gammarelay-rs > /dev/null 2>&1 &
+! pidof swww-daemon && /usr/bin/swww-daemon > /dev/null 2>&1 &
+sleep 0.5 && /usr/bin/swww img ~/Bilder/Wallpapers/default.jpg
 
-# test -f "/tmp/autotemp.pid" && kill "$(cat /tmp/autotemp.pid)"
-# ~/.config/hypr/scripts/gammarelay-autotemp.py > /dev/null 2>&1 &
+pkill -f 'python /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py'
+sleep 1 && "/home/andy/.config/hypr/scripts/gammarelay-auto-temp.py" > /dev/null 2>&1 &
 
 pidof wl-paste && killall wl-paste
 wl-paste --type text --watch cliphist store &
 wl-paste --type image --watch cliphist store &
-hypridle &
-foot -s &
 
-sleep 0.5
-logger 'HYPERLAND MAIN STARTUP END'
+logger 'HYPRLAND MAIN STARTUP END'
 logger '============================'