diff --git a/Scripts/accuweather.sh b/Scripts/accuweather.sh index 42ad554..2c81136 100755 --- a/Scripts/accuweather.sh +++ b/Scripts/accuweather.sh @@ -1,4 +1,6 @@ #!/bin/bash URL='https://www.accuweather.com/en/us/buffalo-ny/14202/weather-forecast/349726' -TEMP="$(wget -q -O- "$URL" | awk -F\' '/acm_RecentLocationsCarousel\.push/{print $12"°F" }'| head -1)" -echo " $TEMP" \ No newline at end of file +#TEMP="$(wget -q -O- "$URL" | awk -F\' '/acm_RecentLocationsCarousel\.push/{print $12"°F" }'| head -1)" +TEMP="$(wget -q -O- "$URL" | grep temp_f | awk '{print $3}' | cut -d "'" -f 2)" + +echo "  $TEMP°F" diff --git a/Scripts/battery.sh b/Scripts/battery.sh index d3169dc..4df74fb 100755 --- a/Scripts/battery.sh +++ b/Scripts/battery.sh @@ -8,20 +8,28 @@ STATE="$(echo $INFO | grep "state" | awk '{print $2}')" # Note: I cut off the percentage sign so i can later compare POWER as an int POWER="$(echo $INFO | grep "percentage" | awk '{print $2}' | head -c -2)" -# TODO! +# With icons +# if [[ "$STATE" = "discharging" ]]; then +# if [ "$POWER" -ge "85" ]; then +# echo " $POWER%" +# elif [ "$POWER" -ge "60" ]; then +# echo " $POWER%" +# elif [ "$POWER" -ge "35" ]; then +# echo " $POWER%" +# elif [ "$POWER" -ge "10" ]; then +# echo " $POWER%" +# else +# echo " $POWER%" +# fi +# else +# # State = fully charged or charging +# echo " $POWER%" +# fi + +# Without icons if [[ "$STATE" = "discharging" ]]; then - if [ "$POWER" -ge "85" ]; then - echo " $POWER%" - elif [ "$POWER" -ge "60" ]; then - echo " $POWER%" - elif [ "$POWER" -ge "35" ]; then - echo " $POWER%" - elif [ "$POWER" -ge "10" ]; then - echo " $POWER%" - else - echo " $POWER%" - fi + echo "bat* $POWER%" else # State = fully charged or charging - echo " $POWER%" + echo "bat $POWER%" fi \ No newline at end of file diff --git a/Scripts/cpu.sh b/Scripts/cpu.sh index ccbe4d1..0095dd8 100755 --- a/Scripts/cpu.sh +++ b/Scripts/cpu.sh @@ -11,8 +11,17 @@ CPU="$[100-$(vmstat 1 2|tail -1|awk '{printf "%d", $15}')]" # fi # Lazy whitespace padding +# With icon +# if [ "$CPU" -ge "10" ]; then +# echo " $CPU%" +# else +# echo " $CPU%" +# fi + +# Just text if [ "$CPU" -ge "10" ]; then - echo " $CPU%" + echo "cpu $CPU%" else - echo " $CPU%" -fi \ No newline at end of file + echo "cpu $CPU%" +fi + diff --git a/Scripts/disk.sh b/Scripts/disk.sh index 49bfcca..5d7a27d 100755 --- a/Scripts/disk.sh +++ b/Scripts/disk.sh @@ -1,4 +1,6 @@ #df -h | awk '$NF=="/"{printf "Disk Usage: %d/%dGB (%s)\n", $3,$2,$5}' # show only free space -df -h | awk '$NF=="/"{printf " %dGB\n", ($2-$3)}' \ No newline at end of file +#df -k -h . | awk '$NF=="/"{printf " %dGB\n", ($2-$3)}' + +df -k -h /dev/sda1 | tail -1 | awk '{printf " %sB\n", $4}' diff --git a/Scripts/fetch b/Scripts/fetch index 3aeb5b2..7c91d9d 100755 --- a/Scripts/fetch +++ b/Scripts/fetch @@ -1 +1 @@ -neofetch --disable gpu memory terminal icons theme shell packages model kernel cpu wm --source ~/Themes/ascii_heart_small +neofetch --backend w3m --source "$(cat ~/.wally/cat .wally/path_to_wallpaper)" --crop_offset northeast --crop_mode fill --disable gpu cpu memory icons theme wm model --block_range 1 7 --color_blocks on --size 190px diff --git a/Scripts/flux b/Scripts/flux deleted file mode 100755 index 4d8536a..0000000 --- a/Scripts/flux +++ /dev/null @@ -1 +0,0 @@ -redshift -O 3000 diff --git a/Scripts/flux-toggle b/Scripts/flux-toggle deleted file mode 100755 index d99ef0c..0000000 --- a/Scripts/flux-toggle +++ /dev/null @@ -1,9 +0,0 @@ -#NEEDS WORK! - -redshift -p > /home/elena/redtemp -CURRENT="$(cat /home/elena/redtemp | grep "temp" | awk '{print $3;}')" -DAY = "5500K" -if [ "$CURRENT" == "$DAY" ] -then echo "REDSHIFT OFF" -else echo "REDSHIFT ON" -fi diff --git a/Scripts/flux_indicator.sh b/Scripts/flux_indicator.sh new file mode 100755 index 0000000..1df03f5 --- /dev/null +++ b/Scripts/flux_indicator.sh @@ -0,0 +1,9 @@ +#!/bin/bash +REDSHIFT="$(ps cax | grep redshift)" +if [ ${#REDSHIFT} -eq "0" ]; then + #echo "redshift is not running." + # run redshift + echo "  " +else + echo "  " +fi diff --git a/Scripts/focus.sh b/Scripts/focus.sh index 85f8ed8..1cf3a09 100755 --- a/Scripts/focus.sh +++ b/Scripts/focus.sh @@ -1,4 +1,35 @@ -# Focuses the first window with some string in its title +#!/bin/bash +# Focus specific window +# Default (no options): focus window that has a specific string in its title +# Focus by pid (-i): focus window that has a specific pid +# Focus by priority (-p): focuses the window with the highest priority, if it exists, else it focuses the next one etc. # Use: focus.sh mystring -WINDOWID="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 "$1" | awk '{print $1}')" -wmctrl -i -a $WINDOWID +# focus.sh -i pid +# focus.sh -p str1 str2 str3 + +if [[ "$1" = "-i" ]]; then + # focus by pid + PID="$(echo $2)" + wmctrl -i -a $(wmctrl -lp | grep -v "$0" | grep $PID | awk '{print $1}') +elif [[ "$1" = "-p" ]]; then + for var in "${@:2}" + do + WINDOWID="$(wmctrl -l | grep -v "$0" | grep -m 1 "$var" | awk '{print $1}')" + if [ ${#WINDOWID} -ne "0" ]; then + wmctrl -i -a $WINDOWID + break + fi + done +else + # focus by string in window title + WINDOWID="$(wmctrl -l | grep -v "$0" | grep -m 1 "$1" | awk '{print $1}')" + wmctrl -i -a $WINDOWID +fi + + + +# if [[ $(ls -A) ]]; then +# echo "there are files" +# else +# echo "no files found" +# fi \ No newline at end of file diff --git a/Scripts/fullrofi b/Scripts/fullrofi index 04b66fa..d3a9413 100755 --- a/Scripts/fullrofi +++ b/Scripts/fullrofi @@ -1 +1,3 @@ -rofi -show combi -combi-modi "window,run" -lines 12 -width 100 -padding 80 -fullscreen -font "Hurmit Nerd Font 30" -separator-style "none" +# rofi -show combi -combi-modi "window,run" -lines 8 -width 100 -padding 150 -font "mononoki Nerd Font Regular 35" -separator-style "none" + +rofi -show combi -combi-modi "window,run" -lines 10 -width 50 -padding 80 -font "proggycleanttce Nerd Font Regular 12" -separator-style "none" -no-show-match diff --git a/Scripts/hello_world.sh b/Scripts/hello_world.sh index f43580d..83b0439 100755 --- a/Scripts/hello_world.sh +++ b/Scripts/hello_world.sh @@ -1,3 +1,3 @@ #!/bin/bash -# For testing purposes + notify-send 'Hello world!' 'This is an example notification.' --icon=dialog-information diff --git a/Scripts/inet_noipaddr.sh b/Scripts/inet_noipaddr.sh new file mode 100755 index 0000000..5580697 --- /dev/null +++ b/Scripts/inet_noipaddr.sh @@ -0,0 +1,17 @@ +# needs work! not thoroughly tested... +# Replace with your own interface names here +WIRELESS_IF="wlp3s0" +WIRED_IF="enp2s0f0" + +WIFI="$(ifconfig | grep -A 1 $WIRELESS_IF | grep "inet" | awk '{print $2}')" +ETHER="$(ifconfig | grep -A 1 $WIRED_IF | grep "inet" | awk '{print $2}')" + +if [ ${#ETHER} -eq "0" ]; then + if [ ${#WIFI} -eq "0" ]; then + echo "" + else + echo "" + fi +else + echo "" +fi diff --git a/Scripts/keys.sh b/Scripts/keys.sh index 472fdc7..7757528 100755 --- a/Scripts/keys.sh +++ b/Scripts/keys.sh @@ -1,9 +1,28 @@ -KEYS="$(xset -q | grep Caps | awk '{print $4 " " $8;}')" -CAPS="$(echo $KEYS | awk '{if ($1 == "off") {print ""} else {print ""}}')" -NUM="$(echo $KEYS | awk '{if ($2 == "off") {print ""} else {print ""}}')" +#!/bin/bash +#XSET_OUTPUT="$(xset -q)" +#KEYS="$(echo $XSET_OUTPUT | grep Caps | awk '{print $4 " " $8;}')" +#CAPS="$(echo $KEYS | awk '{if ($1 == "off") {print ""} else {print ""}}')" +#NUM="$(echo $KEYS | awk '{if ($2 == "off") {print ""} else {print ""}}')" +#echo " "$CAPS $NUM $LANG -echo " "$CAPS $NUM +# if [ $LANG_CODE -gt "1000" ]; then +# # greek is around 1000-1003, and i only have gr and en so this is enough +# LANG="gr" +# else +# # english +# LANG="en" +# fi +#LANG_CODE="$(xset -q | grep LED | awk '{print $10}')" +LANG="$(xset -q | grep LED | awk '{if ($10 >= 1000) {print "gr"} else {print "en"}}')" + +echo " $LANG " + + + + + +#  # C N #    both off #    num on diff --git a/Scripts/mail b/Scripts/mail deleted file mode 100755 index 982c957..0000000 --- a/Scripts/mail +++ /dev/null @@ -1 +0,0 @@ -chromium-browser --new-window https://mail.google.com/mail/u/0/#inbox https://outlook.live.com/owa/ https://webmail.uth.gr/login.php https://mail.yahoo.com/ diff --git a/Scripts/music-notify.sh b/Scripts/music-notify.sh new file mode 100755 index 0000000..b7b4b8b --- /dev/null +++ b/Scripts/music-notify.sh @@ -0,0 +1,82 @@ +#!/bin/bash +# Prints media info from mpd, youtube + +# Priority: +# 1. Prints the title of the mpd song playing, while scrolling (WORK IN PROGRESS) +# 2. Prints the title of the first open YouTube window, while scrolling (sexy!) +# NOTE: It works if the tab is in focus, so seperate the youtube tab from +# the rest of the browser so you don't have to keep it in focus and the script will work. + +# Note: on tint2, set interval=0 and continuous output=2 or larger +# (in general continuous output should be larger than sleep time) + +while : +do + # Seach for mpd info, youtube and pandora windows + MPDSTATE="$(mpc | head -2 | tail -1 | awk '{print $1}')" + #NCMPCPP="$(ps cax | grep ncmpcpp)" + YOUTUBE="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 "YouTube")" + PANDORA="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 "Pandora Radio")" + + # Grab youtube window title + # Depending on your browser, uncomment the correct INPUT line (and comment the others) + + # Vivaldi + if [[ "$MPDSTATE" != "[playing]" ]]; then + # Grab youtube window title + # Depending on your browser, uncomment the correct INPUT line (and comment the others) + # Vivaldi + #INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=2 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" + + # Mozilla + INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=3 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" + + # Chromium/Mozilla + # INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=4 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" + else + INPUT="$(mpc | head -1)" + fi + + # If the song has changed, start from the beginning and send a notification + if [[ "$INPUT" != "$OLD_INPUT" ]]; then + i=1 + + # Uncomment this to enable notifying every time the song changes + # if [ ${#INPUT} -ne "0" ]; then + # notify-send " Now playing:" "$INPUT" + # fi + fi + + # Save old input for the next check + OLD_INPUT="$(echo $INPUT)" + + # Optional: remove multibyte characters + # (they dont show up properly while scrolling due to "cut -c" being identical to "cut -b") + INPUT="$(echo $INPUT | tr -dc '[:print:]')" + + INPUT_LENGTH="$(echo ${#INPUT})" + + # If no youtube window is found + #if [ ${#YOUTUBE} -eq "0" ] && [ ${#NCMPCPP} -eq "0" ]; then + if [ ${#YOUTUBE} -eq "0" ] && [[ "$MPDSTATE" != "[playing]" ]]; then + #echo "  " + echo "  " + #echo "  " + #echo "  " + #echo " " + else + if [[ "$MPDSTATE" != "[playing]" ]]; then + echo "  " + else + echo "  " + fi + fi + + # For fat bars/panels, I add this newline so the previous output is not visible + echo "" + + sleep 1 +done + +# general method to exlude fields +# awk -v skipstart=1 -v skipend=1 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS}; printf "\n"}' diff --git a/Scripts/music.sh b/Scripts/music.sh index 55bbe12..6cb3d05 100755 --- a/Scripts/music.sh +++ b/Scripts/music.sh @@ -18,7 +18,7 @@ # (where 12 is the offset (zero-based) and 5 is the length) # Limit for scrolling text -LIMIT=30 +LIMIT=26 #SEPERATOR=" --- " #SEPERATOR=" -- " #SEPERATOR=" ~~~ " @@ -51,17 +51,23 @@ do # Grab youtube window title # Depending on your browser, uncomment the correct INPUT line (and comment the others) # Vivaldi - INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=2 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" + #INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=2 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" - # Chromium + # Mozilla + INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=3 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" + + # Chromium/Mozilla # INPUT="$(echo $YOUTUBE | awk -v skipstart=3 -v skipend=4 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" else INPUT="$(mpc | head -1)" fi - # If the song has changed, start from the beginning + # If the song has changed, start from the beginning and send a notification if [[ "$INPUT" != "$OLD_INPUT" ]]; then i=1 + if [ ${#INPUT} -ne "0" ]; then + notify-send " Now playing:" "$INPUT" + fi fi # Save old input for the next check @@ -91,7 +97,7 @@ do #echo -e -n "$INPUT" #Justify - left - #SPACES=$(($LIMIT-$INPUT_LENGTH+1)) + #SPACES=$(($LIMIT-$INPUT_LENGTH+1+1)) #echo -n "$INPUT" | awk -v spaces=$SPACES '{printf "%s%*.s\n", $0, spaces, " "}' #Justify - center @@ -100,7 +106,7 @@ do else LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)" - FULLSTRING="$(echo "$INPUT$SEPERATOR$LOOPTAIL")" + FULLSTRING="$(echo "$INPUT""$SEPERATOR""$LOOPTAIL")" #FULLSTRING="$(echo $INPUT | sed "s/$/$SEPERATOR/" | sed "s/$/$LOOPTAIL/" )" diff --git a/Scripts/noflux b/Scripts/noflux deleted file mode 100755 index 7d84315..0000000 --- a/Scripts/noflux +++ /dev/null @@ -1 +0,0 @@ -redshift -O 6500 diff --git a/Scripts/pandora b/Scripts/pandora deleted file mode 100755 index a5ed9e8..0000000 --- a/Scripts/pandora +++ /dev/null @@ -1 +0,0 @@ -chromium-browser www.pandora.com diff --git a/Scripts/print_xcolors b/Scripts/print_xcolors deleted file mode 100755 index 0982782..0000000 --- a/Scripts/print_xcolors +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -declare -a color -declare -a XCOLOR_OLD -declare -a XCOLOR_NEW - -# Create array with old colors -for (( i = 0; i < 8; i++ )); do - color[$i]="$(echo color$i)" - XCOLOR_OLD[$i]="$(cat ~/.Xresources | grep -m 1 ${color[$i]} | awk '{print $2}')" - echo ${XCOLOR_OLD[$i]} -done \ No newline at end of file diff --git a/Scripts/pytyle_restart b/Scripts/pytyle_restart new file mode 100755 index 0000000..a300096 --- /dev/null +++ b/Scripts/pytyle_restart @@ -0,0 +1 @@ +killall pytyle && sleep 1 && pytyle & diff --git a/Scripts/scrolling_text.sh b/Scripts/scrolling_text.sh deleted file mode 100755 index 899e5ab..0000000 --- a/Scripts/scrolling_text.sh +++ /dev/null @@ -1,46 +0,0 @@ -# Scrolling text -LIMIT=12 -SEPERATOR=" ~~~ " -SEPERATOR_LENGTH="$(echo ${#SEPERATOR})" - -i=1 -while : -do - # Get input and create the full string that will be used - INPUT="$@" - INPUT_LENGTH="$(echo ${#INPUT})" - LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)" - FULLSTRING="$(echo "$INPUT$SEPERATOR$LOOPTAIL")" - - if [ $INPUT_LENGTH -le $LIMIT ]; then - # Song has a smaller title than the limit, so no need to scroll. - echo -n "  " - #echo -e -n "$INPUT" - - #Justify - left - #SPACES=$(($LIMIT-$INPUT_LENGTH+1)) - #echo -n "$INPUT" | awk -v spaces=$SPACES '{printf "%s%*.s\n", $0, spaces, " "}' - - #Justify - center - SPACES_AFTER=$(($LIMIT-$(((${#INPUT}+$LIMIT)/2)))) - printf "%*s\n" $(((${#INPUT}+$LIMIT)/2 + 1)) "$INPUT" | awk -v spaces=$SPACES_AFTER '{printf "%s%*.s\n", $0, spaces, " "}' - - else - LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)" - FULLSTRING="$(echo "$INPUT$SEPERATOR$LOOPTAIL")" - - echo -n "  " - # Show only LIMIT characters, from i to i+LIMIT. Output scrolls due to incrementing i - echo -n $FULLSTRING | cut -c $i-$(($LIMIT+$i)) - #echo -n $FULLSTRING | awk -v charlimit="$LIMIT" -v start="$i" '{print substr($0,start,charlimit)}' - - # If we have shown the full string, start over - if [ $i -eq $(($INPUT_LENGTH+$SEPERATOR_LENGTH)) ]; then - i=0 - fi - - i=$(($i+1)) - fi - - sleep 1 -done \ No newline at end of file diff --git a/Scripts/scrolling_title.sh b/Scripts/scrolling_title.sh deleted file mode 100755 index edd084c..0000000 --- a/Scripts/scrolling_title.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# Run as follows: ./scrolling_title.sh mystring -# It will look for "mystring" in all active windows and display the window title that includes this string. -# Case sensitive! - -# Limit for scrolling text -LIMIT=30 -#SEPERATOR=" --- " -#SEPERATOR=" -- " -#SEPERATOR=" ~~~ " -SEPERATOR=" ~~ " -#SEPERATOR=" <> " -SEPERATOR_LENGTH="$(echo ${#SEPERATOR})" - -i=1 -while : -do - # For debugging purposes - # printf "|%02d|" $i - - INPUT="$(wmctrl -l | grep -v "wmctrl" | grep -m 1 $1 | awk -v skipstart=3 -v skipend=0 '{delim = ""; for (i=skipstart+1;i<=NF-skipend;i++) {printf delim "%s", $i; delim = OFS};}')" - - # If the output has changed, start from the beginning - if [[ "$INPUT" != "$OLD_INPUT" ]]; then - i=1 - fi - - # Save old input for the next check - OLD_INPUT="$(echo $INPUT)" - - # Optional: remove multibyte characters - # (they dont show up properly while scrolling due to "cut -c" being identical to "cut -b") - INPUT="$(echo $INPUT | tr -dc '[:print:]')" - - INPUT_LENGTH="$(echo ${#INPUT})" - - if [ $INPUT_LENGTH -le $LIMIT ]; then - # Song has a smaller title than the limit, so no need to scroll. - echo -n "  " - #echo -e -n "$INPUT" - - #Justify - left - #SPACES=$(($LIMIT-$INPUT_LENGTH+1)) - #echo -n "$INPUT" | awk -v spaces=$SPACES '{printf "%s%*.s\n", $0, spaces, " "}' - - #Justify - center - SPACES_AFTER=$(($LIMIT-$(((${#INPUT}+$LIMIT)/2)))) - printf "%*s\n" $(((${#INPUT}+$LIMIT)/2 + 1)) "$INPUT" | awk -v spaces=$SPACES_AFTER '{printf "%s%*.s\n", $0, spaces, " "}' - - else - LOOPTAIL="$(echo $INPUT | cut -c -$LIMIT)" - FULLSTRING="$(echo "$INPUT$SEPERATOR$LOOPTAIL")" - - echo -n "  " - # Show only LIMIT characters, from i to i+LIMIT. Output scrolls due to incrementing i - echo -n $FULLSTRING | cut -c $i-$(($LIMIT+$i)) - #echo -n $FULLSTRING | awk -v charlimit="$LIMIT" -v start="$i" '{print substr($0,start,charlimit)}' - - # If we have shown the full string, start over - if [ $i -eq $(($INPUT_LENGTH+$SEPERATOR_LENGTH)) ]; then - i=0 - fi - - - i=$(($i+1)) - fi - - # For fat bars/panels, I add this newline so the previous output is not visible - echo "" - - sleep 1 -done \ No newline at end of file diff --git a/Scripts/skype b/Scripts/skype deleted file mode 100755 index 9c7004c..0000000 --- a/Scripts/skype +++ /dev/null @@ -1 +0,0 @@ -chromium-browser https://web.skype.com/en/ diff --git a/Scripts/temperature.sh b/Scripts/temperature.sh index 5a801a9..da95556 100755 --- a/Scripts/temperature.sh +++ b/Scripts/temperature.sh @@ -1,3 +1,8 @@ # TEMP="$(sensors | grep "Package" | awk '{print $4}' | cut -c 2-3,6-8)" -echo " $TEMP" \ No newline at end of file + +# With icon +# echo " $TEMP" + +# Just text +echo "temp $TEMP" diff --git a/Scripts/toggle_compositor.sh b/Scripts/toggle_compositor.sh new file mode 100755 index 0000000..b0c061b --- /dev/null +++ b/Scripts/toggle_compositor.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Run compton only if it is not already running. +COMPTON="$(ps cax | grep compton)" +if [ ${#COMPTON} -eq "0" ]; then + #echo "compton is not running." + # run compton + compton -f -c & +else + killall compton +fi diff --git a/Scripts/toggle_flux.sh b/Scripts/toggle_flux.sh new file mode 100755 index 0000000..c8193b9 --- /dev/null +++ b/Scripts/toggle_flux.sh @@ -0,0 +1,10 @@ +#!/bin/bash +TEMP=3000 +REDSHIFT="$(ps cax | grep redshift)" +if [ ${#REDSHIFT} -eq "0" ]; then + #echo "redshift is not running." + # run redshift + redshift -l 0:0 -t $TEMP:$TEMP -r & +else + killall redshift +fi diff --git a/Scripts/volume-notify.sh b/Scripts/volume-notify.sh new file mode 100755 index 0000000..693132d --- /dev/null +++ b/Scripts/volume-notify.sh @@ -0,0 +1,9 @@ +#!/bin/bash +VOL="$(pactl list sinks | grep "Volume: " | awk '{print $5}' | head -1)" +MUTE="$(pactl list sinks | grep -i "mute" | head -1 | awk '{print $2}')" + +if [[ "$MUTE" != "no" ]]; then + notify-send " Volume is muted" +else + notify-send " Volume is at $VOL" +fi \ No newline at end of file diff --git a/Scripts/volume.sh b/Scripts/volume.sh index eb7f36a..43c5e63 100755 --- a/Scripts/volume.sh +++ b/Scripts/volume.sh @@ -10,7 +10,25 @@ VOL="$(pactl list sinks | grep "Volume: " | awk '{print $5}' | head -1)" MUTE="$(pactl list sinks | grep -i "mute" | head -1 | awk '{print $2}')" if [[ "$MUTE" != "no" ]]; then - echo "  " + # Icon only + # echo "  " + + # Text only + echo "vol off" else - echo "$VOL " + # Text only + echo "vol $VOL" + + # Icon only (simple) + # echo "  " + + #Icon only (gradual) + # VOL="$(echo ${VOL%?})" + # if [ "$VOL" -ge "85" ]; then + # echo "  " + # elif [ "$VOL" -ge "20" ]; then + # echo "  " + # else + # echo "  " + # fi fi diff --git a/Scripts/wally-setlogintheme b/Scripts/wally-setlogintheme index 578782e..cf78f91 100755 --- a/Scripts/wally-setlogintheme +++ b/Scripts/wally-setlogintheme @@ -1,3 +1,7 @@ +# Opens oomox to let you create your gtk theme +echo "> Opening oomox-gui so you can create your gtk theme. " +echo "> Name of the theme should be 'wally'. Close oomox when you have exported the theme." +oomox-gui # Copies the gtk theme created by oomox to /usr/share/icons # so that it can be used by lightdm greeter echo -n "> Replacing gtk theme and icons... " @@ -6,6 +10,14 @@ rm -rf /usr/share/icons/wally cp -r ~/.themes/oomox-wally /usr/share/themes/wally cp -r ~/.icons/oomox-wally-flat /usr/share/icons/wally echo "Done!" -echo "> Starting lightdm-gtk-greeter-settings..." -lightdm-gtk-greeter-settings +# Requires that you have setup your lightdm to have ~/.wally/login as wallpaper +echo -n "> Setting login wallpaper... " +PAPE="$(cat ~/.wally/path_to_wallpaper)" +cp $PAPE ~/.wally/login +echo "Done!" +# echo "> Starting lightdm-gtk-greeter-settings..." +# lightdm-gtk-greeter-settings + +# Create firefox icon +# cp ~/.icons/oomox-wally-flat/apps/scalable/browser.svg ~/.icons/oomox-wally-flat/apps/scalable/firefox.svg echo "> All done :)" diff --git a/Scripts/weather.sh b/Scripts/weather.sh index ae1abd9..ce3efde 100755 --- a/Scripts/weather.sh +++ b/Scripts/weather.sh @@ -1,7 +1,7 @@ #!/bin/bash # needs work -CITY="Volos" +CITY="Moscow" # glyphs (TODO) #  day cloud @@ -54,10 +54,10 @@ TEMP="$(curl -s -A "Mozilla/5.0" wttr.in/$CITY | grep -m 1 '°C'| awk '{print $( # City+degrees -#echo " $CITY $TEMP°C" +echo " $CITY $TEMP°C" # Degrees only #echo "$TEMP°C" # Leaf + degrees -echo "  $TEMP°C" \ No newline at end of file +#echo "  $TEMP°C" \ No newline at end of file diff --git a/Scripts/weather_details.sh b/Scripts/weather_details.sh new file mode 100755 index 0000000..95c6478 --- /dev/null +++ b/Scripts/weather_details.sh @@ -0,0 +1,2 @@ +curl -s wttr.in/volos | head -7 +sleep 1d \ No newline at end of file diff --git a/Scripts/weather_forecast.sh b/Scripts/weather_forecast.sh new file mode 100755 index 0000000..4ab16e4 --- /dev/null +++ b/Scripts/weather_forecast.sh @@ -0,0 +1,2 @@ +curl -s wttr.in/volos | tail -33 | head -30 +sleep 1d