From 27d00e96da165522a307293e3df2c7d3b1b0f58a Mon Sep 17 00:00:00 2001 From: junikimm717 Date: Sat, 16 Apr 2022 17:36:20 -0400 Subject: [PATCH] bash changed + kill script --- dotfiles/bspwm/bspwmrc | 2 +- dotfiles/bspwm/kill.sh | 7 +++++++ dotfiles/bspwm/polybar/launch.sh | 2 +- dotfiles/bspwm/sxhkdrc | 5 +---- rices/bspwm.nix | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) create mode 100755 dotfiles/bspwm/kill.sh diff --git a/dotfiles/bspwm/bspwmrc b/dotfiles/bspwm/bspwmrc index 4b1a64d..700c172 100755 --- a/dotfiles/bspwm/bspwmrc +++ b/dotfiles/bspwm/bspwmrc @@ -1,6 +1,6 @@ #!/bin/sh -killall picom +pkill picom picom & nitrogen --restore & ~/.config/polybar/launch.sh diff --git a/dotfiles/bspwm/kill.sh b/dotfiles/bspwm/kill.sh new file mode 100755 index 0000000..f004494 --- /dev/null +++ b/dotfiles/bspwm/kill.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill $MANAGER?") + +if test "$QUIT" == "Yes" ; then + pkill bspwm +fi diff --git a/dotfiles/bspwm/polybar/launch.sh b/dotfiles/bspwm/polybar/launch.sh index e759b7d..95a34bf 100755 --- a/dotfiles/bspwm/polybar/launch.sh +++ b/dotfiles/bspwm/polybar/launch.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash # Terminate already running bar instances pkill polybar diff --git a/dotfiles/bspwm/sxhkdrc b/dotfiles/bspwm/sxhkdrc index 8b53257..eb9d584 100644 --- a/dotfiles/bspwm/sxhkdrc +++ b/dotfiles/bspwm/sxhkdrc @@ -29,10 +29,7 @@ super + shift + p ~/.config/polybar/launch.sh super + shift + e - QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill $MANAGER?") - if test "$QUIT" == "Yes" ; then - pkill bspwm - fi + ~/.config/bspwm/kill.sh # close and kill diff --git a/rices/bspwm.nix b/rices/bspwm.nix index b906db2..4af46c6 100644 --- a/rices/bspwm.nix +++ b/rices/bspwm.nix @@ -75,6 +75,7 @@ in ".config/picom/picom.conf".source = ../dotfiles/picom.conf; ".config/nixpkgs/config.nix".source = ../dotfiles/config.nix; ".config/bspwm/bspwmrc".source = ../dotfiles/bspwm/bspwmrc; + ".config/bspwm/kill.sh".source = ../dotfiles/bspwm/kill.sh; ".config/sxhkd/sxhkdrc".source = ../dotfiles/bspwm/sxhkdrc; ".xinitrc".source = ../dotfiles/bspwm/xinitrc; ".tmux.conf".source = ../dotfiles/tmux.conf;