...
 
Commits (3)
  • Gigadoc 2's avatar
    set XDG_CURRENT_DESTKOP to sway · 7521e200
    Gigadoc 2 authored
    Well, set it for dbus and systemd-activated applications at least. Sway
    both refuses to add this to their wayland session file as well as to
    allow you to set environment variables from sway itself, so that can't
    easily be done. At the same time, xdg-desktop-portal-wlr relies on this
    being set to be found by xdg-desktop portal, all while it's very own
    author claims that the variable should not be used. Sigh.
    
    Since xdg-desktop-portal is launched via systemd for me, this should
    work for now. Still, all systemd-run --scope launched apps inherit the
    environment from sway, so I should find some solution for that. Locally
    patching the wayland-session is probably the way to go, though I loathe
    having to carry around that patch for all eternity, as upstream is not
    going to add it...
    7521e200
  • Gigadoc 2's avatar
    remove the session-related envvars from systemd at logout · 122be389
    Gigadoc 2 authored
    This is not really robust, when sway exits any other way than this
    shortcut, unsetting is not going to happen. I could try to tie than in
    through a service getting activated when the session goes away, maybe?
    Tying the lifetime of environment variables in the activation
    environment to the lifetime of a unit would be nice, but not sure if
    that feature will be picked up upstream when a unit could also solve it.
    122be389
  • Gigadoc 2's avatar
    adding xdg-desktop-portal-wlr for screen capturing · 3802c5dc
    Gigadoc 2 authored
    Of course as a dbus-activated systemd service; for maximum comfort for
    me and maximum rage by it's author.
    3802c5dc
......@@ -191,7 +191,9 @@ font SF Pro Display 9
bindsym $mod+Shift+c reload
# exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'systemctl --user stop sway-session.target && swaymsg exit'
# Note that this only unsets variables for systemd, dbus does not support
# unsetting them. So I guess try to avoid launching stuff with dbus?
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'systemctl --user stop sway-session.target && systemctl --user unset-environment DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XCURSOR_SIZE XCURSOR_THEME XDG_CURRENT_DESKTOP && swaymsg exit'
#
# Moving around:
#
......@@ -350,6 +352,6 @@ bar {
include ~/.config/sway/rules
exec xrdb ~/.Xresources
include ~/.config/sway/autostart_early
exec dbus-update-activation-environment --systemd DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XCURSOR_SIZE XCURSOR_THEME
exec dbus-update-activation-environment --systemd DISPLAY I3SOCK SWAYSOCK WAYLAND_DISPLAY XCURSOR_SIZE XCURSOR_THEME XDG_CURRENT_DESKTOP=sway
exec systemctl --user start sway-session.target
include ~/.config/sway/autostart
[Unit]
Description=xdg-desktop-portal backend for wlroots compositors
Documentation=https://github.com/emersion/xdg-desktop-portal-wlr
PartOf=graphical-session-pre.target
[Service]
Type=dbus
BusName=org.freedesktop.impl.portal.desktop.wlr
ExecStart=/usr/bin/xdg-desktop-portal-wlr
[D-BUS Service]
Name=org.freedesktop.impl.portal.desktop.wlr
Exec=/usr/bin/false
SystemdService=xdg-desktop-portal-wlr.service