From c68b9499b5a212f09b8bb445874bdd4befac6175 Mon Sep 17 00:00:00 2001 From: Massaki Archambault Date: Thu, 28 Mar 2019 23:12:46 -0400 Subject: [PATCH] systemd integration --- files/.config/sway/config | 3 +-- files/.config/systemd/user/compton.service | 11 ----------- .../systemd/user/multi-user.target.wants/tmux.service | 1 + files/.config/systemd/user/redshift.service | 8 ++++---- files/.config/systemd/user/sway-session.target | 6 ++++++ .../redshift.service | 0 .../.config/systemd/user/user-graphical-login.target | 4 ---- .../user-graphical-login.target.wants/compton.service | 1 - files/.config/systemd/user/wallpaper.service | 11 ----------- files/.config/zsh/custom/100-alias.zsh | 10 +++++----- files/.zshrc | 5 +++++ 11 files changed, 22 insertions(+), 38 deletions(-) delete mode 100644 files/.config/systemd/user/compton.service create mode 120000 files/.config/systemd/user/multi-user.target.wants/tmux.service create mode 100644 files/.config/systemd/user/sway-session.target rename files/.config/systemd/user/{user-graphical-login.target.wants => sway-session.target.wants}/redshift.service (100%) delete mode 100644 files/.config/systemd/user/user-graphical-login.target delete mode 120000 files/.config/systemd/user/user-graphical-login.target.wants/compton.service delete mode 100644 files/.config/systemd/user/wallpaper.service diff --git a/files/.config/sway/config b/files/.config/sway/config index f61abb3..b421780 100644 --- a/files/.config/sway/config +++ b/files/.config/sway/config @@ -256,9 +256,8 @@ bindsym $mod+r mode "resize" ### Startup # reach systemd target -#exec /bin/systemctl --user import-environment WAYLAND_DISPLAY exec /bin/systemctl --user import-environment -exec /bin/systemctl --user start user-graphical-login.target +exec /bin/systemctl --user start sway-session.target # autorun .desktop exec /bin/dex -a diff --git a/files/.config/systemd/user/compton.service b/files/.config/systemd/user/compton.service deleted file mode 100644 index db7bb5c..0000000 --- a/files/.config/systemd/user/compton.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=A compositor for X11 -Requires=user-graphical-login.target -After=user-graphical-login.target - -[Service] -ExecStart=/usr/bin/compton -Restart=always - -[Install] -WantedBy=user-graphical-login.target diff --git a/files/.config/systemd/user/multi-user.target.wants/tmux.service b/files/.config/systemd/user/multi-user.target.wants/tmux.service new file mode 120000 index 0000000..6ae3bc7 --- /dev/null +++ b/files/.config/systemd/user/multi-user.target.wants/tmux.service @@ -0,0 +1 @@ +/home/marchambault/.config/systemd/user/tmux.service \ No newline at end of file diff --git a/files/.config/systemd/user/redshift.service b/files/.config/systemd/user/redshift.service index 621040c..3fe439c 100644 --- a/files/.config/systemd/user/redshift.service +++ b/files/.config/systemd/user/redshift.service @@ -1,12 +1,12 @@ [Unit] Description=Redshift display colour temperature adjustment Documentation=http://jonls.dk/redshift/ -Requires=user-graphical-login.target -After=user-graphical-login.target +Requires=sway-session.target +After=sway-session.target [Service] -ExecStart=/usr/bin/redshift +ExecStart=/usr/bin/redshift -m wayland Restart=always [Install] -WantedBy=user-graphical-login.target +WantedBy=sway-session.target diff --git a/files/.config/systemd/user/sway-session.target b/files/.config/systemd/user/sway-session.target new file mode 100644 index 0000000..30151b3 --- /dev/null +++ b/files/.config/systemd/user/sway-session.target @@ -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 diff --git a/files/.config/systemd/user/user-graphical-login.target.wants/redshift.service b/files/.config/systemd/user/sway-session.target.wants/redshift.service similarity index 100% rename from files/.config/systemd/user/user-graphical-login.target.wants/redshift.service rename to files/.config/systemd/user/sway-session.target.wants/redshift.service diff --git a/files/.config/systemd/user/user-graphical-login.target b/files/.config/systemd/user/user-graphical-login.target deleted file mode 100644 index 8884b91..0000000 --- a/files/.config/systemd/user/user-graphical-login.target +++ /dev/null @@ -1,4 +0,0 @@ -[Unit] -Description=User Graphical Login -Requires=default.target -After=default.target diff --git a/files/.config/systemd/user/user-graphical-login.target.wants/compton.service b/files/.config/systemd/user/user-graphical-login.target.wants/compton.service deleted file mode 120000 index 1864562..0000000 --- a/files/.config/systemd/user/user-graphical-login.target.wants/compton.service +++ /dev/null @@ -1 +0,0 @@ -/home/marchambault/.config/systemd/user/compton.service \ No newline at end of file diff --git a/files/.config/systemd/user/wallpaper.service b/files/.config/systemd/user/wallpaper.service deleted file mode 100644 index d98e1cb..0000000 --- a/files/.config/systemd/user/wallpaper.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Animated wallpaper -Requires=user-graphical-login.target -After=user-graphical-login.target - -[Service] -ExecStart=/bin/bash -c '"$HOME/.local/bin/wallpaper"' -Restart=always - -[Install] -WantedBy=user-graphical-login.target diff --git a/files/.config/zsh/custom/100-alias.zsh b/files/.config/zsh/custom/100-alias.zsh index f92d374..d83e8a3 100644 --- a/files/.config/zsh/custom/100-alias.zsh +++ b/files/.config/zsh/custom/100-alias.zsh @@ -9,11 +9,11 @@ alias rename="perl-rename" alias userctl="systemctl --user" # ls -alias ls="lsd --group-dirs first" -alias l='lsd --group-dirs -l' -alias la='lsd --group-dirs -a' -alias lla='lsd --group-dirs -la' -alias lt='lsd --group-dirs --tree' +alias ls='lsd --group-dirs first ' +alias l='lsd --group-dirs first -l ' +alias la='lsd --group-dirs first -a ' +alias lla='lsd --group-dirs first -la ' +alias lt='lsd --group-dirs first --tree ' # powershell seems to have trouble with xterm-256color alias pwsh="TERM=xterm pwsh" diff --git a/files/.zshrc b/files/.zshrc index a909a08..5e4344f 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -9,6 +9,11 @@ if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then export ECORE_EVAS_ENGINE=wayland_egl export ELM_ENGINE=wayland_egl + # FIXME: This is a workaround + # see: https://github.com/swaywm/wlroots/pull/1344 + #export WLR_DRM_NO_ATOMIC=1 + #export WLR_DRM_NO_ATOMIC_GAMMA=1 + exec sway fi