Compare commits
No commits in common. "e33d2e37c938144e82df7c7195468239531c3a2b" and "7546b13d58f914e2276324e2a417178120d556a1" have entirely different histories.
e33d2e37c9
...
7546b13d58
@ -11,8 +11,8 @@ background = "#000000"
|
|||||||
|
|
||||||
[colors.normal]
|
[colors.normal]
|
||||||
black = "#000000"
|
black = "#000000"
|
||||||
red = "#afaaaa"
|
red = "#949494"
|
||||||
green = "#505559"
|
green = "#505050"
|
||||||
yellow = "#a7a7a7"
|
yellow = "#a7a7a7"
|
||||||
blue = "#56698a"
|
blue = "#56698a"
|
||||||
magenta = "#d5d5d5"
|
magenta = "#d5d5d5"
|
||||||
|
@ -18,7 +18,7 @@ if status --is-interactive
|
|||||||
|
|
||||||
set fish_color_param normal
|
set fish_color_param normal
|
||||||
set fish_color_cwd grey
|
set fish_color_cwd grey
|
||||||
set fish_color_command blue
|
set fish_color_command brgrey
|
||||||
|
|
||||||
if test $SYSTEM_PROFILE = "DEFAULT"
|
if test $SYSTEM_PROFILE = "DEFAULT"
|
||||||
source ~/.config/fish/functions/extra_prompt.fish
|
source ~/.config/fish/functions/extra_prompt.fish
|
||||||
|
@ -7,7 +7,7 @@ function fish_prompt
|
|||||||
set letter '>'
|
set letter '>'
|
||||||
end
|
end
|
||||||
|
|
||||||
set -l usercolor (set_color brblack)
|
set -l usercolor (set_color brgrey)
|
||||||
|
|
||||||
set -l stat_code ""
|
set -l stat_code ""
|
||||||
if test $cmd_status -ne 0
|
if test $cmd_status -ne 0
|
||||||
@ -43,7 +43,7 @@ function fish_mode_prompt
|
|||||||
set uniquecol (set_color --bold $col)
|
set uniquecol (set_color --bold $col)
|
||||||
end
|
end
|
||||||
|
|
||||||
set_color --bold brblack
|
set_color --bold brgrey
|
||||||
echo '['
|
echo '['
|
||||||
echo $uniquecol
|
echo $uniquecol
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ function fish_mode_prompt
|
|||||||
echo '?'
|
echo '?'
|
||||||
end
|
end
|
||||||
|
|
||||||
set_color --bold brblack
|
set_color --bold brgrey
|
||||||
echo '] '
|
echo '] '
|
||||||
set_color normal
|
set_color normal
|
||||||
end
|
end
|
||||||
|
1
suckless/dwm/.gitignore
vendored
1
suckless/dwm/.gitignore
vendored
@ -4,4 +4,5 @@
|
|||||||
*.tar.gz
|
*.tar.gz
|
||||||
*.diff
|
*.diff
|
||||||
dwm
|
dwm
|
||||||
|
dwmswallow
|
||||||
config.h
|
config.h
|
||||||
|
@ -144,8 +144,8 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY, XK_h, focusmon, {.i = -1 } },
|
{ MODKEY, XK_h, focusmon, {.i = +1 } },
|
||||||
{ MODKEY, XK_l, focusmon, {.i = +1 } },
|
{ MODKEY, XK_l, focusmon, {.i = -1 } },
|
||||||
{ MODKEY, XK_Return, zoom, {0} },
|
{ MODKEY, XK_Return, zoom, {0} },
|
||||||
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
|
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
|
||||||
{ MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
|
{ MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
|
||||||
@ -172,8 +172,8 @@ static const Key keys[] = {
|
|||||||
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
{ MODKEY|ShiftMask, XK_space, togglefloating, {0} },
|
||||||
{ MODKEY, XK_comma, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_comma, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY, XK_period, setmfact, {.f = +0.05} },
|
{ MODKEY, XK_period, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY|ShiftMask, XK_h, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_h, tagmon, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_l, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_l, tagmon, {.i = -1 } },
|
||||||
{ MODKEY, XK_u, swalstopsel, {0} },
|
{ MODKEY, XK_u, swalstopsel, {0} },
|
||||||
TAGKEYS( XK_1, 0)
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
|
@ -1,120 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
# Separator and command prefix, as defined in dwm.c:fakesignal()
|
|
||||||
SEP='###'
|
|
||||||
PREFIX='#!'
|
|
||||||
|
|
||||||
# Asserts that all arguments are valid X11 window IDs, i.e. positive integers.
|
|
||||||
# For the purpose of this script 0 is declared invalid.
|
|
||||||
is_winid() {
|
|
||||||
while :; do
|
|
||||||
# Given input incompatible to %d, some implementations of printf return
|
|
||||||
# an error while others silently evaluate the expression to 0.
|
|
||||||
if ! wid=$(printf '%d' "$1" 2>/dev/null) || [ "$wid" -le 0 ]; then
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -n "$2" ] && shift || break
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
# Prints usage help. If "$1" is provided, function exits script after
|
|
||||||
# execution.
|
|
||||||
usage() {
|
|
||||||
[ -t 1 ] && myprintf=printf || myprintf=true
|
|
||||||
msg="$(cat <<-EOF
|
|
||||||
dwm window swallowing command-line interface. Usage:
|
|
||||||
|
|
||||||
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER [-c CLASS] [-i INSTANCE] [-t TITLE]$($myprintf "\033[0m")
|
|
||||||
Register window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m") to swallow the next future window whose attributes
|
|
||||||
match the $($myprintf "\033[3m")CLASS$($myprintf "\033[0m") name, $($myprintf "\033[3m")INSTANCE$($myprintf "\033[0m") name and window $($myprintf "\033[3m")TITLE$($myprintf "\033[0m") filters using basic
|
|
||||||
string-matching. An omitted filter will match anything.
|
|
||||||
|
|
||||||
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER -d$($myprintf "\033[0m")
|
|
||||||
Deregister queued swallow for window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m"). Inverse of above signature.
|
|
||||||
|
|
||||||
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWER SWALLOWEE$($myprintf "\033[0m")
|
|
||||||
Perform immediate swallow of window $($myprintf "\033[3m")SWALLOWEE$($myprintf "\033[0m") by window $($myprintf "\033[3m")SWALLOWER$($myprintf "\033[0m").
|
|
||||||
|
|
||||||
$($myprintf "\033[1m")dwmswallow $($myprintf "\033[3m")SWALLOWEE -s$($myprintf "\033[0m")
|
|
||||||
Stop swallow of window $($myprintf "\033[3m")SWALLOWEE$($myprintf "\033[0m"). Inverse of the above signature. Visible
|
|
||||||
windows only.
|
|
||||||
|
|
||||||
$($myprintf "\033[1m")dwmswallow -h$($myprintf "\033[0m")
|
|
||||||
Show this usage information.
|
|
||||||
EOF
|
|
||||||
)"
|
|
||||||
|
|
||||||
if [ -n "$1" ]; then
|
|
||||||
echo "$msg" >&2
|
|
||||||
exit "$1"
|
|
||||||
else
|
|
||||||
echo "$msg"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Determine number of leading positional arguments
|
|
||||||
arg1="$1" # save for later
|
|
||||||
arg2="$2" # save for later
|
|
||||||
num_pargs=0
|
|
||||||
while :; do
|
|
||||||
case "$1" in
|
|
||||||
-*|"") break ;;
|
|
||||||
*) num_pargs=$((num_pargs + 1)); shift ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
case "$num_pargs" in
|
|
||||||
1)
|
|
||||||
! is_winid "$arg1" && usage 1
|
|
||||||
|
|
||||||
widswer="$arg1"
|
|
||||||
if [ "$1" = "-d" ] && [ "$#" -eq 1 ]; then
|
|
||||||
if name="$(printf "${PREFIX}swalunreg${SEP}%u" "$widswer" 2>/dev/null)"; then
|
|
||||||
xsetroot -name "$name"
|
|
||||||
else
|
|
||||||
usage 1
|
|
||||||
fi
|
|
||||||
elif [ "$1" = "-s" ] && [ "$#" -eq 1 ]; then
|
|
||||||
widswee="$arg1"
|
|
||||||
if name="$(printf "${PREFIX}swalstop${SEP}%u" "$widswee" 2>/dev/null)"; then
|
|
||||||
xsetroot -name "$name"
|
|
||||||
else
|
|
||||||
usage 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
while :; do
|
|
||||||
case "$1" in
|
|
||||||
-c) [ -n "$2" ] && { class="$2"; shift 2; } || usage 1 ;;
|
|
||||||
-i) [ -n "$2" ] && { instance="$2"; shift 2; } || usage 1 ;;
|
|
||||||
-t) [ -n "$2" ] && { title="$2"; shift 2; } || usage 1 ;;
|
|
||||||
"") break ;;
|
|
||||||
*) usage 1 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
widswer="$arg1"
|
|
||||||
if name="$(printf "${PREFIX}swalreg${SEP}%u${SEP}%s${SEP}%s${SEP}%s" "$widswer" "$class" "$instance" "$title" 2>/dev/null)"; then
|
|
||||||
xsetroot -name "$name"
|
|
||||||
else
|
|
||||||
usage 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
2)
|
|
||||||
! is_winid "$arg1" "$arg2" || [ -n "$1" ] && usage 1
|
|
||||||
|
|
||||||
widswer="$arg1"
|
|
||||||
widswee="$arg2"
|
|
||||||
if name="$(printf "${PREFIX}swal${SEP}%u${SEP}%u" "$widswer" "$widswee" 2>/dev/null)"; then
|
|
||||||
xsetroot -name "$name"
|
|
||||||
else
|
|
||||||
usage 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if [ "$arg1" = "-h" ] && [ $# -eq 1 ]; then
|
|
||||||
usage
|
|
||||||
else
|
|
||||||
usage 1
|
|
||||||
fi
|
|
||||||
esac
|
|
Loading…
Reference in New Issue
Block a user