dotfiles/herbstluftwm/fish_functions/restart_svcs.fish

17 lines
314 B
Fish
Executable File

#!/usr/bin/env fish
import log
alias hc=herbstclient
function restart_svcs
for cmd in $argv
if not command -sq "$cmd";
log -c yellow "command [$cmd] not found, skipping..."
continue
end
log -c red "killing [$cmd]"
pkill -9 $cmd
log -c magenta "starting [$cmd]"
hc silent spawn "$cmd"
end
end