From 1109f11e2b4d4635a4f24cef73ab395a1887503f Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 19 Sep 2016 20:03:30 -0700 Subject: [PATCH] [Linux] Generalize taffybar restart --- dotfiles/lib/bin/restart.sh | 3 +++ dotfiles/lib/bin/restart_taffybar.sh | 3 --- dotfiles/xmonad/xmonad.hs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100755 dotfiles/lib/bin/restart.sh delete mode 100755 dotfiles/lib/bin/restart_taffybar.sh diff --git a/dotfiles/lib/bin/restart.sh b/dotfiles/lib/bin/restart.sh new file mode 100755 index 00000000..b9c1049b --- /dev/null +++ b/dotfiles/lib/bin/restart.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh +pkill "$1" +nohup "$@" & >"/tmp/$1.out" 2>"/tmp/$1.error" diff --git a/dotfiles/lib/bin/restart_taffybar.sh b/dotfiles/lib/bin/restart_taffybar.sh deleted file mode 100755 index c13fdea0..00000000 --- a/dotfiles/lib/bin/restart_taffybar.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh -pkill taffybar -taffybar $@ diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index 31cd9415..8820ea0a 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -32,7 +32,7 @@ addKeys conf@XConfig {modMask = modm} = [ ((modm, xK_p), spawn "rofi -show drun") , ((modm .|. shiftMask, xK_p), spawn "rofi -show run") , ((modm, xK_g), spawn "rofi -show window") - , ((modm .|. controlMask, xK_t), spawn "restart_taffybar.sh") + , ((modm .|. controlMask, xK_t), spawn "restart.sh taffybar") -- TODO: Change this to bringing the window to the current workspace , ((modm, xK_b), bringMenuArgs' "rofi" ["-dmenu"]) , ((modm .|. controlMask, xK_space), sendMessage $ JumpToLayout "Full")