make use of setsid(1)'s -f flag (#652)
Co-authored-by: Luke Smith <luke@lukesmith.xyz>
This commit is contained in:
@@ -32,7 +32,7 @@ bspc config focus_follows_pointer true
|
||||
bspc rule -a Zathura state=tiled
|
||||
|
||||
dropdownname="dropdown"
|
||||
bspc query -N -n .hidden >/dev/null || setsid $TERMINAL -n "$dropdownname" -e dropdown >/dev/null 2>&1 &
|
||||
bspc query -N -n .hidden >/dev/null || setsid -f $TERMINAL -n "$dropdownname" -e dropdown >/dev/null 2>&1
|
||||
bspc rule -a St:$dropdownname hidden=on
|
||||
bspc rule -a St:$dropdownname sticky=on
|
||||
bspc rule -a St:$dropdownname state=floating
|
||||
|
||||
@@ -26,7 +26,7 @@ bspc config top_padding 24 # top_padding I set equal to polybar's height
|
||||
bspc config focus_follows_pointer true
|
||||
|
||||
dropdownname="dropdown"
|
||||
bspc query -N -n .hidden >/dev/null || setsid $TERMINAL -n "$dropdownname" -e dropdown >/dev/null 2>&1 &
|
||||
bspc query -N -n .hidden >/dev/null || setsid -f $TERMINAL -n "$dropdownname" -e dropdown >/dev/null 2>&1
|
||||
bspc rule -a St:$dropdownname hidden=on
|
||||
bspc rule -a St:$dropdownname sticky=on
|
||||
bspc rule -a St:$dropdownname state=floating
|
||||
|
||||
@@ -15,17 +15,14 @@ $lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
|
||||
# cmds/functions
|
||||
cmd open ${{
|
||||
case $(file --mime-type $f -b) in
|
||||
image/vnd.djvu|application/pdf|application/octet-stream) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||
image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
text/*) $EDITOR $fx;;
|
||||
image/x-xcf|image/svg+xml) setsid gimp $f >/dev/null 2>&1 & ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\)\(_large\)*$" | setsid sxiv -aio 2>/dev/null | lf-select & ;;
|
||||
image/x-xcf|image/svg+xml) setsid -f gimp $f >/dev/null 2>&1 ;;
|
||||
image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\)\(_large\)*$" | setsid -f sxiv -aio 2>/dev/null | lf-select ;;
|
||||
audio/*) mpv --audio-display=no $f ;;
|
||||
video/*) setsid mpv $f -quiet >/dev/null 2>&1 & ;;
|
||||
application/pdf) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||
application/epub+zip) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||
application/vnd.comicbook+zip) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||
application/vnd.comicbook-rar) setsid zathura $fx >/dev/null 2>&1 & ;;
|
||||
*) for f in $fx; do setsid $OPENER $f >/dev/null 2>&1 & done;;
|
||||
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
|
||||
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
|
||||
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1 done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#
|
||||
# Flags are single characters which slightly transform the command:
|
||||
# f | Fork the program, make it run in the background.
|
||||
# | New command = setsid $command >& /dev/null &
|
||||
# | New command = setsid -f $command >& /dev/null
|
||||
# r | Execute the command with root permissions
|
||||
# | New command = sudo $command
|
||||
# t | Run the program in a new terminal. If $TERMCMD is not defined,
|
||||
|
||||
Reference in New Issue
Block a user