dotfiles/herbstluftwm/fish_functions/remove_default.fish

20 lines
482 B
Fish
Executable File

#!/usr/bin/env fish
function remove_default
set -f default_tag ( \
hc get_attr tags.by-name.default.index \
&> /dev/null \
)
if test -z "$default_tag"
return 0
end
if test \
"$(hc get_attr tags.focus.index)" = \
"$default_tag"
# switch from default tag
hc use_index 1
end
hc merge_tag "default"
log "removed"
end