minor changes and additions x

This commit is contained in:
Solomon Laing 2022-09-06 14:24:12 +09:30
parent d1d1c02ef1
commit fde1d71bf8
5 changed files with 32 additions and 19 deletions

View File

@ -3,7 +3,12 @@
if git status &>/dev/null; then
branch=$(git branch --show-current)
read -ra counts <<< $(git rev-list --left-right --count $branch...origin/$branch)
if [ -z "$branch" ]; then
echo "(detached)"
exit 0
fi
read -ra counts <<< "$(git rev-list --left-right --count "$branch"...origin/"$branch")"
to_push=${counts[0]}
to_pull=${counts[1]}

3
scripts/ganttproject Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
/opt/ganttproject/ganttproject

View File

@ -16,3 +16,5 @@ case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area
"current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
"full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;;
esac
notify-send "Screenshot captured and saved to your home folder."

View File

@ -1,24 +1,24 @@
#!/bin/sh
dev_wifi=$(cat $HOME/.config/xmobar/dev_wifi)
dev_eth=$(cat $HOME/.config/xmobar/dev_eth)
dev_vpn=$(cat $HOME/.config/xmobar/dev_vpn)
dev_wifi=$(cat "$HOME"/.config/xmobar/dev_wifi)
dev_eth=$(cat "$HOME"/.config/xmobar/dev_eth)
dev_vpn=$(cat "$HOME"/.config/xmobar/dev_vpn)
base03=#002b36
base02=#073642
base01=#586e75
base00=#657b83
base0=#839496
base1=#93a1a1
base2=#eee8d5
base3=#fdf6e3
# base03=#002b36
# base02=#073642
# base01=#586e75
# base00=#657b83
# base0=#839496
# base1=#93a1a1
# base2=#eee8d5
# base3=#fdf6e3
yellow=#b58900
orange=#cb4b16
# orange=#cb4b16
red=#dc322f
magenta=#d33682
violet=#6c71c4
blue=#268bd2
cyan=#2aa198
# violet=#6c71c4
# blue=#268bd2
# cyan=#2aa198
green=#859900
# connectivity status
@ -46,7 +46,7 @@ eth="$(ip -o address | grep -i "$dev_eth *inet ")"
if [ -n "$eth" ]
then
#eth="${eth##*inet }"
speed="$(cat /sys/class/net/$dev_eth/speed)"
speed="$(cat /sys/class/net/"$dev_eth"/speed)"
case $speed in
10) speed="10Base-T" ;;
100) speed="100Base-T" ;;
@ -57,10 +57,10 @@ then
eth_status=" <fn=1> </fn> $speed"
fi
ssid="$(iw dev $dev_wifi link | grep -i SSID)"
ssid="$(iw dev "$dev_wifi" link | grep -i SSID)"
if [ -n "$ssid" ]
then
signal="$(iw dev $dev_wifi station dump | egrep '[^ ]signal avg')"
signal="$(iw dev "$dev_wifi" station dump | grep -E '[^ ]signal avg')"
signal="${signal#*-}"
signal="${signal%% *}"
signal="$((2*(100-signal)))"

3
scripts/zotero Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
/opt/zotero/zotero