Personal dotfiles
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Attach the bin folder

+49
+2
bin/sway-current
··· 1 + #!/usr/bin/env bash 2 + swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true)'
+46
bin/sway-screenshare
··· 1 + #!/usr/bin/env bash 2 + set -x 3 + if ! lsmod | grep v4l2loopback > /dev/null; then 4 + echo "Adding v42loopback module to kernel" 5 + sudo modprobe v4l2loopback 6 + fi 7 + 8 + geometry(){ 9 + windowGeometries=$( 10 + # `height - 1` is there because of: https://github.com/ammen99/wf-recorder/pull/56 (I could remove it if it's merged, maybe) 11 + swaymsg -t get_workspaces -r | jq -r '.[] | select(.focused) | .rect | "\(.x),\(.y) \(.width)x\(.height - 1)"'; \ 12 + swaymsg -t get_outputs -r | jq -r '.[] | select(.active) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' 13 + ) 14 + geometry=$(slurp -b "#45858820" -c "#45858880" -w 3 -d <<< "$windowGeometries") || exit $? 15 + echo $geometry 16 + } 17 + 18 + { 19 + if pgrep wf-recorder > /dev/null && pgrep ffplay > /dev/null 20 + then 21 + if pgrep ffplay > /dev/null; then 22 + pkill ffplay > /dev/null 23 + fi 24 + if pgrep wf-recorder > /dev/null; then 25 + pkill wf-recorder > /dev/null 26 + fi 27 + notify-send -t 2000 "Wayland recording has been stopped" 28 + else 29 + if ! pgrep wf-recorder > /dev/null; then 30 + geometry=$(geometry) || exit $? 31 + wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2 --geometry="$geometry" & 32 + fi 33 + if ! pgrep ffplay; then 34 + swaymsg assign [class=ffplay] workspace 11 35 + 36 + unset SDL_VIDEODRIVER 37 + ffplay /dev/video2 -fflags nobuffer & 38 + sleep 0.5 39 + # a hack so FPS is not dropping 40 + swaymsg [class=ffplay] floating enable 41 + # swaymsg [class=ffplay] move position 1900 1000 42 + # swaymsg focus tiling 43 + fi 44 + notify-send -t 2000 "Wayland recording has been started" 45 + fi 46 + } > ~/.wayland-share-screen.log 2>&1
+1
init
··· 26 26 check tmux && dot_config tmux 27 27 check waybar && dot_config waybar 28 28 check syncat && dot_config syncat 29 + ln -sfT "$(pwd)/bin" "$HOME/.bin" 29 30 ln -sf "$(pwd)/git/.gitconfig.current" "$HOME/.gitconfig"