Fix for gnome-keyring in i3

This commit is contained in:
2025-06-29 15:25:36 -07:00
parent a7d521917a
commit 85c649acab
2 changed files with 19 additions and 0 deletions
+3
View File
@@ -24,6 +24,9 @@ exec --no-startup-id dex --autostart --environment i3
# set wallpaper
exec --no-startup-id sleep 1 && ~/dotfiles/bin/start-wallpaper.sh
# start keyring
exec --no-startup-id dbus-update-activation-environment --all
#exec_always --no-startup-id conky -c ~/.config/conky/conkyrc-stats
#exec --no-startup-id sleep 7 && firefox https://todo.bradina.haus/
+16
View File
@@ -341,6 +341,22 @@ function setup_system_configs() {
fi
fi
# If gnome-keyring is installed and i3, enable its XDG portal backend
if [[ -f /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal && $(program_installed i3) == 1 ]]; then
echo
echo "Enabling xdg-desktop-portal-gnome-keyring in i3"
original=`cat /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal` >> /dev/null
sudo sed --in-place=.backup 's/^UseIn=gnome$/UseIn=gnome;i3/g' /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal
edited=`cat /usr/share/xdg-desktop-portal/portals/gnome-keyring.portal` >> /dev/null
diff=`diff <(echo "$original") <(echo "$edited")`
if [[ "$diff" != '' ]]; then
echo "$diff"
restart_needed=1
else
echo "No changes were made"
fi
fi
if [[ ! $(program_installed vim) == 1 && $(program_installed nvim) == 1 ]]; then
echo
echo "Preventing missing vim issues"