--- /dev/null
+#!/bin/bash
+#
+# See https://github.com/nextcloud/desktop/issues/1011
+#
+############################################
+# Adjust the following to suit your needs
+MAX_TRIES=3 # Max. number of tries to ask for password
+############################################
+i=0
+while [ $i -lt $MAX_TRIES ]; do
+ ((i++))
+ open="$(qdbus6 org.kde.kwalletd6 /modules/kwalletd6 isOpen kdewallet)"
+ if [ "$open" = "true" ]; then
+ break
+ fi
+ qdbus6 org.kde.kwalletd6 /modules/kwalletd6 open kdewallet 0 "nextcloud-client-starter" > /dev/null
+done
+exec nextcloud --background
+
#!/usr/bin/env bash
+# shellcheck disable=SC2015
logger '============================'
logger 'HYPRLAND MAIN STARTUP BEGIN'
-# shellcheck disable=SC2155
-# shellcheck disable=SC2046
+
+# shellcheck disable=SC2155,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_CURRENT_DESKTOP
-export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:$HOME/Applications:$PATH"
+# export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$HOME/go/bin:$HOME/Applications:$PATH"
#------------------------------------------------------ xdg-desktop-portal
killall -e xdg-desktop-portal-hyprland
test -f /usr/libexec/xdg-desktop-portal && /usr/libexec/xdg-desktop-portal &
#------------------------------------------------------ polkit-kde
-if [[ ! $(pidof /usr/libexec/polkit-kde-authentication-agent-1) ]]; then
+if ! pidof /usr/libexec/polkit-kde-authentication-agent-1; then
if ! command -v /usr/libexec/polkit-kde-authentication-agent-1 &> /dev/null
then
echo "polkit-kde not installed"
pidof openrgb && pkill openrgb || openrgb -p default --startminimized &
pidof udiskie && pkill udiskie || udiskie --no-automount --no-notify --tray &
pidof corectrl && pkill corectrl || corectrl --minimize-systray > /dev/null 2>&1 &
-! pidof keepassxc && keepassxc > /dev/null 2>&1 &
-# ! pidof kwalletmanager5 && /usr/libexec/pam_kwallet_init &
+if pidof kwalletd6; then
+ ~/.config/hypr/scripts/keepassxc.sh
+fi
! pidof swww-daemon && nohup /usr/bin/swww-daemon > /dev/null 2>&1
sleep 0.5 && ~/.local/bin/rndwallpaper swww