summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/lf/lfrc2
-rw-r--r--.config/sxhkd/sxhkdrc3
-rwxr-xr-x.local/bin/quitapp11
3 files changed, 14 insertions, 2 deletions
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index c1353e0..bca6fc2 100755
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -21,7 +21,7 @@ set ifs "\n"
set scrolloff 10
set icons
set period 1
-set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
+set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml:tags"
set cleaner '~/.config/lf/cleaner'
set previewer '~/.config/lf/scope'
set autoquit true
diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc
index be0e7c0..e35821f 100644
--- a/.config/sxhkd/sxhkdrc
+++ b/.config/sxhkd/sxhkdrc
@@ -27,7 +27,8 @@ super + shift + q
dwmc quit
## Quit Current/focused App
super + q
- kill -15 `xdotool getwindowfocus getwindowpid`
+ quitapp
+ # kill -15 `xdotool getwindowfocus getwindowpid`
## Toggle the dwm bar
super + b
dwmc togglebar
diff --git a/.local/bin/quitapp b/.local/bin/quitapp
new file mode 100755
index 0000000..60a8644
--- /dev/null
+++ b/.local/bin/quitapp
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+active_window="$(xdotool getwindowfocus)"
+active_class=$(xprop -id "$active_window" WM_CLASS | awk '{print $4}')
+
+if [ "$active_class" = '"firefox"' ]; then
+ xdotool windowclose "$active_window"
+else
+ kill -15 "$(xdotool getwindowfocus getwindowpid)"
+fi
+