Use monospace alias for fonts, remove menu clutter

This commit is contained in:
natemaia
2018-12-02 20:19:37 -08:00
parent 26b202b69f
commit 25d560d149
60 changed files with 313 additions and 4428 deletions

View File

@ -1,16 +1,20 @@
#!/usr/bin/env bash
disconnected="/"
disconnected2="\\"
wireless_connected=""
ethernet_connected=""
disconnect1="/"
disconnect2="\\"
wconnected=""
econnected=""
ID="$(ip link | awk '/state UP/ {print $2}')"
id="$(ip link | awk '/state UP/ {print $2}')"
while true; do
if (ping -c 1 archlabslinux.com || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) >/dev/null 2>&1; then
[[ $ID == e* ]] && { echo "$ethernet_connected"; sleep 25; } || { echo "$wireless_connected"; sleep 25; }
if ping -c 1 archlabslinux.com >/dev/null 2>&1 || ping -c 1 archlinux.org >/dev/null 2>&1; then
[[ $id == e* ]] && echo "$econnected" || echo "$wconnected"
sleep 25
else
echo "$disconnected"; sleep 0.6; echo "$disconnected2"; sleep 0.6
echo "$disconnect1" # /
sleep 0.6
echo "$disconnect2" # \
sleep 0.6
fi
done

View File

@ -3,7 +3,8 @@
NAME=$(basename "$0")
VER="0.4"
usage() {
usage()
{
cat <<- EOF
USAGE: $NAME [OPTIONS]
@ -32,10 +33,16 @@ usage() {
EOF
}
for arg in $@; do
for arg in "$@"; do
case $arg in
-h|--help) usage; exit 0 ;;
-v|--version) echo -e "$NAME -- Version $VER"; exit 0 ;;
-h|--help)
usage
exit 0
;;
-v|--version)
echo -e "$NAME -- Version $VER"
exit 0
;;
-r|--run)
rofi -modi run,drun -show drun -line-padding 4 \
-columns 2 -padding 50 -hide-scrollbar \
@ -46,14 +53,12 @@ for arg in $@; do
;;
-q|--qalculate)
hash qalc &>/dev/null || { echo "Requires 'libqalculate' installed"; exit 1; }
rofi -modi "calc:qalc +u8 -nocurrencies" -padding 50 \
-show "calc:qalc +u8 -nocurrencies" -line-padding 4 \
-hide-scrollbar
;;
-c|--clipboard)
hash greenclip &>/dev/null || { echo "Requires 'greenclip' installed"; exit 1; }
rofi -modi "clipboard:greenclip print" -padding 50 \
-line-padding 4 -show "clipboard:greenclip print" \
-hide-scrollbar
@ -61,23 +66,30 @@ for arg in $@; do
-b|--browser)
hash surfraw &>/dev/null || { echo "Requires 'surfraw' installed"; exit 1; }
surfraw -browser="$BROWSER" $(sr -elvi | awk -F'-' '{print $1}' |
sed '/:/d' | awk '{$1=$1};1' |
rofi -hide-scrollbar -kb-row-select 'Tab' \
-kb-row-tab 'Control+space' -dmenu \
-mesg 'Tab for Autocomplete' -i -p 'Web Search' \
-padding 50 -line-padding 4) ;;
surfraw -browser="$BROWSER" "$(sr -elvi | awk -F'-' '{print $1}' |
sed '/:/d' | awk '{$1=$1};1' |
rofi -hide-scrollbar -kb-row-select 'Tab' \
-kb-row-tab 'Control+space' -dmenu \
-mesg 'Tab for Autocomplete' -i -p 'Web Search' \
-padding 50 -line-padding 4)"
;;
-l|--logout)
ANS="$(rofi -sep "|" -dmenu -i -p 'System' -width 20 \
-hide-scrollbar -line-padding 4 -padding 20 \
-lines 4 <<< " Lock| Logout| Reboot| Shutdown")"
case "$ANS" in
*Lock) i3lock-fancy ;;
*Logout) session-logout || pkill -15 -t tty"$XDG_VTNR" Xorg ;;
*Reboot) systemctl reboot ;;
*Shutdown) systemctl -i poweroff
esac ;;
*) echo; echo "Option does not exist: $arg"; echo; exit 2
esac
;;
*)
echo
echo "Option does not exist: $arg"
echo
exit 2
esac
done

View File

@ -3,7 +3,8 @@
NAME=$(basename "$0")
VER="0.4"
usage() {
usage()
{
cat <<- EOF
USAGE: $NAME [OPTIONS [ADDITIONAL]]
@ -29,7 +30,8 @@ usage() {
EOF
}
toggle_polybar() {
toggle_polybar()
{
if [[ $(pidof polybar) ]]; then
pkill polybar
else
@ -37,7 +39,8 @@ toggle_polybar() {
fi
}
toggle_compton() {
toggle_compton()
{
if (( opt == 1 )); then
if [[ $(pidof compton) ]]; then
al-compositor --stop
@ -58,7 +61,8 @@ toggle_compton() {
done
}
toggle_redshift() {
toggle_redshift()
{
if (( opt == 1 )); then
if [[ $(pidof redshift) ]]; then
pkill redshift
@ -85,8 +89,9 @@ toggle_redshift() {
done
}
toggle_caffeine() {
if (( $opt == 1 )); then
toggle_caffeine()
{
if (( opt == 1 )); then
if [[ $(pidof caffeine) ]]; then
killall caffeine
else
@ -97,11 +102,7 @@ toggle_caffeine() {
on=""
off=""
while true; do
if [[ $(pidof caffeine) ]]; then
echo "%{F#0000FF}$on"
else
echo "%{F#FF0000}$off"
fi
[[ $(pidof caffeine) ]] && echo "%{F#0000FF}$on" || echo "%{F#FF0000}$off"
sleep 2
done
}
@ -126,4 +127,3 @@ case $1 in
*) echo -e "Option does not exist: $1" && usage && exit 1
esac
exit 0

View File

@ -3,7 +3,10 @@
BAR_ICON=""
NOTIFY_ICON=/usr/share/icons/gnome/32x32/apps/system-software-update.png
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
get_total_updates()
{
UPDATES=$(checkupdates 2>/dev/null | wc -l)
}
while true; do
# print the icon first to avoid gibberish in polybar