diff --git a/scripts/bash-status-git b/scripts/bash-status-git index a55f7cb..68350f3 100755 --- a/scripts/bash-status-git +++ b/scripts/bash-status-git @@ -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]} diff --git a/scripts/ganttproject b/scripts/ganttproject new file mode 100755 index 0000000..bbe16cc --- /dev/null +++ b/scripts/ganttproject @@ -0,0 +1,3 @@ +#!/bin/bash + +/opt/ganttproject/ganttproject diff --git a/scripts/maimpick b/scripts/maimpick index 8ea9f5e..1d99567 100755 --- a/scripts/maimpick +++ b/scripts/maimpick @@ -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." diff --git a/scripts/xmobar-status-net b/scripts/xmobar-status-net index a834069..fb52458 100755 --- a/scripts/xmobar-status-net +++ b/scripts/xmobar-status-net @@ -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="  $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)))" diff --git a/scripts/zotero b/scripts/zotero new file mode 100755 index 0000000..7f1edc7 --- /dev/null +++ b/scripts/zotero @@ -0,0 +1,3 @@ +#!/bin/sh + +/opt/zotero/zotero