local f mnts
cd /mnt;
mnts=$(for f in *; do if mountpoint -q $f; then e $f; fi; done)
- df -h $mnts | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr
+ df -h $mnts | tail -n+2 | awk '{printf "%8s %12s\n", $4,$NF}' | sort -hr
}
lazywrites() {
# todo: enable frodo specific backup timers here
# misc
-sgo hist-catcher
# console font size
if [[ $HOSTNAME == sf ]] && ! grep -q '^FONTFACE="TER"' /etc/default/console-setup; then
# for .prom.$PID files, they will naturally exist when
# scripts like system-status get killed on reboot.
# Just clean them up here.
-find /var/lib/prometheus/node-exporter -name '*[0-9]' -type f -mtime 9 -delete
+find /var/lib/prometheus/node-exporter -name '*[0-9]' -type f -mtime +9 -delete
# If there are more than one, just get the 1st one. There is probably
# some better behavior to do in that case, but atm I don't want to think
# about it.
-id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-iak ")).id'| sort -n| head -n1)
+id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-server ")).id'| sort -n| head -n1)
if [[ $id ]]; then
i3-msg "[con_id=\"$id\"] focus"
local args gdb=false server="$1"
shift
+ local new_frame_workspace create_frame=false
+
+ # special arg for some scripts. must come first.
+ if [[ $1 == --i3ws=[0-9]* ]]; then
+ new_frame_workspace=${1#--i3ws=}
+ shift
+ fi
if [[ $DISPLAY ]]; then
args=-n
fi
if (( $# == 0 )); then
+ create_frame=true
args+=" -c"
fi
if [[ $server == none ]]; then
server=
- else
- args+=" -s $server"
+ else
+ args+=" -s$server"
fi
- id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-'$server'iak ")).id'| sort -n| head -n1)
+ id=$(i3-msg -t get_tree | jq -e '.. | select(.name?) | select(.name | test("^e-'$server' ")).id'| sort -n| head -n1)
if [[ ! $id ]]; then
if (( $# == 0 )) && type -p gdb &>/dev/null; then
#gdb=true
:
else
- # duplicate arg, but oh well.
+ create_frame=true
args+=" -c"
fi
fi
# shellcheck disable=SC2103 # preference for simplicity.
cd -
else
+ if $create_frame && [[ $new_frame_workspace ]]; then
+ i3-msg "workspace $new_frame_workspace"
+ fi
emacsclient -a "" $args "$@"
fi
}
client.focused_inactive #333333 #5f676a #ffffff #484e50 #B8C8CD
client.unfocused #333333 #222222 #888888 #292d2e #B8C8CD
-assign [instance="mpv-i3-ws6"] 6
bhost_t=false
case $HOSTNAME in
$MAIL_HOST) : ;;
- kd|x2|x3|kw|sy|so|frodo)
+ kd|x2|x3|kw|sf|sy|so|frodo)
bhost_t=true
;;
esac
<Action name="edit-current-profile"/>
</Menu>
<ActionProperties>
- <Action name="edit_find_next" shortcut="Ctrl+Shift+R"/>
- <Action name="edit_find_prev" shortcut="Ctrl+Shift+E"/>
- <Action name="enlarge-font" shortcut="Ctrl++; "/>
- <Action name="open-browser" shortcut="Ctrl+@"/>
- <Action name="rename-session" shortcut=""/>
- <Action name="zmodem-upload" shortcut=""/>
+ <Action shortcut="Ctrl+Shift+R" name="edit_find_next"/>
+ <Action shortcut="Ctrl+Shift+E" name="edit_find_prev"/>
+ <Action shortcut="Ctrl++; " name="enlarge-font"/>
+ <Action shortcut="Ctrl+@" name="open-browser"/>
+ <Action shortcut="" name="rename-session"/>
+ <Action shortcut="" name="zmodem-upload"/>
</ActionProperties>
</gui>