From 0f62af47159afc4ae83503df37ca7d0d5080a94d Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 1 Feb 2019 14:29:52 -0500 Subject: [PATCH] Made dunst a user systemd service --- .config/i3/config | 2 -- .config/systemd/user/dunst.service | 10 ++++++++++ .scripts/i3cmds/displayselect | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 .config/systemd/user/dunst.service diff --git a/.config/i3/config b/.config/i3/config index e0486cec..063fee8e 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -46,8 +46,6 @@ for_window [instance="dropdown_*"] move position center # #---Starting External Scripts---# # # Setting the background: exec --no-startup-id setbg -# Starts dunst for notifications: -exec --no-startup-id dunst # Composite manager: exec --no-startup-id xcompmgr # Runs the key remapping scripts diff --git a/.config/systemd/user/dunst.service b/.config/systemd/user/dunst.service new file mode 100644 index 00000000..54b13da7 --- /dev/null +++ b/.config/systemd/user/dunst.service @@ -0,0 +1,10 @@ +[Unit] +Description=dunst notifications + +[Service] +Type=simple +Environment=DISPLAY=:0 +ExecStart=dunst + +[Install] +WantedBy=default.target diff --git a/.scripts/i3cmds/displayselect b/.scripts/i3cmds/displayselect index e5260142..ffa12078 100755 --- a/.scripts/i3cmds/displayselect +++ b/.scripts/i3cmds/displayselect @@ -70,4 +70,4 @@ esac setbg # Fix background if screen size/arangement has changed. remaps # Re-remap keys if keyboard added (for laptop bases) -pgrep -x dunst >/dev/null && killall dunst && setsid dunst & # Restart dunst to ensure proper location on screen +systemctl --user restart dunst # Restart dunst to ensure proper location on screen