refactore directory structure

This commit is contained in:
Chris Cochrun 2023-06-09 06:06:37 -05:00
parent 3830eef1f4
commit e87bfb7c39
485 changed files with 66 additions and 1696 deletions

View file

@ -0,0 +1,27 @@
#!/usr/bin/env fish
function man --description "wrap the 'man' manual page opener to use color in formatting"
# based on this group of settings and explanation for them:
# http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized
# converted to Fish shell syntax thanks to this page:
# http://askubuntu.com/questions/522599/how-to-get-color-man-pages-under-fish-shell/650192
# start of bold:
set -x LESS_TERMCAP_md (set_color --bold blue)
# end of all formatting:
set -x LESS_TERMCAP_me (set_color normal)
# start of standout (inverted colors):
set -x LESS_TERMCAP_so (set_color --bold green)
# end of standout (inverted colors):
set -x LESS_TERMCAP_se (set_color normal)
# (no change I like the default)
# start of underline:
set -x LESS_TERMCAP_us (set_color --underline)
# end of underline:
set -x LESS_TERMCAP_ue (set_color normal)
# (no change I like the default)
command man $argv
end

View file

@ -0,0 +1,17 @@
function sway-getwindowinfo
slurp -p -f "%x %y" | read x_sel y_sel
or return 1
# TODO: this returns everything when there is only one container open in the workspace
# need to fix the logic
for rect in (swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x) \(.width) \(.y) \(.height)"')
echo $rect | read x1 w y1 h
set x2 (math $x1 + $w)
set y2 (math $y1 + $h)
if test \( $x_sel -ge $x1 \) -a \( $x_sel -le $x2 \)
and test \( $y_sel -ge $y1 \) -a \( $y_sel -le $y2 \)
#swaymsg --type get_tree | jq ".. | objects | select(.rect.x == $x1 and .rect.y == $y1 and .rect.width == $w and .rect.height == $h) | .id, .name, .pid, .title, .app_id, .marks, .type"
swaymsg --type get_tree | jq ".. | objects | select(.rect.x == $x1 and .rect.y == $y1 and .rect.width == $w and .rect.height == $h)"
end
end
end