sway: start session with systemd

This commit is contained in:
Cedric Girard 2019-11-22 17:09:45 +01:00
parent 9e86fcecbc
commit c648d1a5d1
5 changed files with 31 additions and 9 deletions

View File

@ -87,11 +87,3 @@ source /usr/share/fzf/completion.bash
#the-fuck
eval $(thefuck --alias)
export MOZ_USE_OMTC=1
export MOZ_ENABLE_WAYLAND=1
export SPICE_NOGRAB=1
export QT_QPA_PLATFORM=wayland-egl
export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export _JAVA_AWT_WM_NONREPARENTING=1

View File

@ -257,8 +257,10 @@ smart_borders on
smart_gaps off
exec redshift-gtk
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
exec redshift-gtk
exec keepassxc
exec nextcloud
exec dropbox

8
sway/env Normal file
View File

@ -0,0 +1,8 @@
MOZ_USE_OMTC=1
MOZ_ENABLE_WAYLAND=0
SPICE_NOGRAB=1
QT_QPA_PLATFORM=wayland-egl
CLUTTER_BACKEND=wayland
SDL_VIDEODRIVER=wayland
QT_WAYLAND_DISABLE_WINDOWDECORATION=1
_JAVA_AWT_WM_NONREPARENTING=1

View File

@ -0,0 +1,6 @@
[Unit]
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

14
systemd/user/sway.service Normal file
View File

@ -0,0 +1,14 @@
[Unit]
Description=sway - SirCmpwn's Wayland window manager
Documentation=man:sway(5)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target
[Service]
Type=simple
EnvironmentFile=-%h/.config/sway/env
ExecStart=/usr/bin/sway
Restart=on-failure
RestartSec=1
TimeoutStopSec=10