Update manpage to mention multi-user support

Also make some minor quoting changes and silence shellcheck errors.
break
noctuid 8 years ago
parent ada5ec6fb4
commit cf7b1a3a22

13
tdrop

@ -1,6 +1,7 @@
#!/usr/bin/env bash
MUTDROP_PATH=/tmp/tdrop_"$USER"
# shellcheck disable=SC2174
mkdir -p "$MUTDROP_PATH" -m 700
print_help() {
@ -556,7 +557,7 @@ program_start() {
fi
fi
wid=$(create_win_return_wid "$program_command")
echo "$wid" > "$MUTDROP_PATH"/"$program$num"
echo "$wid" > "$MUTDROP_PATH/$program$num"
# only will work if a pre-command has been run (e.g. bspwm)
xdotool windowmove "$wid" "$xoff" "$yoff" \
windowsize "$wid" "$width" "$height"
@ -583,7 +584,7 @@ wid_toggle() {
fi
# get saved window id if already created
local wid exists visibility
wid=$(< "$MUTDROP_PATH"/"$program$num") 2> /dev/null
wid=$(< "$MUTDROP_PATH/$program$num") 2> /dev/null
exists=true
if [[ -n $wid ]]; then
visibility=$(get_visibility "$wid")
@ -591,7 +592,7 @@ wid_toggle() {
if [[ -z $visibility ]] || [[ -z $(xprop -id "$wid" 2> /dev/null) ]]; then
# window no longer exists
exists=false
> "$MUTDROP_PATH"/"$program$num"
> "$MUTDROP_PATH/$program$num"
fi
else
exists=false
@ -603,7 +604,7 @@ wid_toggle() {
xdotool set_desktop_for_window "$wid" "$(xdotool get_desktop)"
if [[ $(get_visibility "$wid") == IsUnMapped ]]; then
if [[ $program == current ]]; then
map_pre_command "$(< \"$MUTDROP_PATH\"/current\"$num\"_type)"
map_pre_command "$(< "$MUTDROP_PATH"/current"$num"_type)"
else
map_pre_command "$program"
fi
@ -713,7 +714,7 @@ get_geometry() {
}
give_geometry() {
eval "$(< \"$MUTDROP_PATH\"/auto_hidden/geometry)"
eval "$(< "$MUTDROP_PATH"/auto_hidden/geometry)"
local x_fix y_fix X Y
if [[ -n $dec_fix ]]; then
x_fix=$(echo "$dec_fix" | awk -F "x" '{print $1}')
@ -807,7 +808,7 @@ if $auto_detect_wm; then
fi
fi
if $clearwid; then
> "$MUTDROP_PATH"/"$program$num"
> "$MUTDROP_PATH/$program$num"
elif [[ $program == toggle_auto_hide ]]; then
toggle_auto_hide
elif [[ $program == auto_hide ]]; then

@ -34,7 +34,7 @@ Specify the y position for a created window as a number or percentage. (default:
Specify a tmuxinator or tmux session name to start. An existing tmux session has highest precedence and will be connected to with '-d', detaching other attached clients. If a there is no tmuxinator session of the given name, a normal tmux session with the name will be created. If this option is not given, tmux will not be used. Note that this option requires that the program be a supported terminal. (default: none)
.TP
\fB\-n\fR, \fB \-\-number\fR
Specify a number to add when saving dropdown information. Only needed if multiple dropdowns of the same program are wanted. Can also be used for creating multiple different dropdowns on the fly. (default: none)
Specify a number to add when saving dropdown information. Only needed if multiple dropdowns of the same program are wanted. Can also be used for creating multiple different dropdowns on the fly. Note that it is not necessary to use this to deal with multi-user systems as tdrop stores dropdown information separately for each user. (default: none)
.TP
\fB\-p\fR, \fB \-\-pre-command\fR
Specify a command to execute before showing/mapping a dropdown. This may be useful when setting a rule to float all windows of a given type is undesirable. If 'bspwm' is given, the command will be a oneshot bspwm rule to float the specified program and will also work with 'current' and 'auto_show'. (default: none)

Loading…
Cancel
Save