diff --git a/i3/i3/config b/i3/i3/config index 99aa04c..7d348ec 100644 --- a/i3/i3/config +++ b/i3/i3/config @@ -373,6 +373,6 @@ bar { } i3bar_command i3bar - status_command bash ~/.i3/scripts/i3bar_wrapper.bash ~/.i3/conky/statusbar.conkyrc + status_command bash ~/.i3/scripts/i3bar_wrapper.bash ~/.i3/scripts/statusbar.conkyrc } diff --git a/i3/i3/config.d/default.config b/i3/i3/config.d/default.config deleted file mode 100644 index b3c19a2..0000000 --- a/i3/i3/config.d/default.config +++ /dev/null @@ -1,3 +0,0 @@ -bar { - status_command i3status -} diff --git a/i3/i3/config.d/netbook.config b/i3/i3/config.d/netbook.config deleted file mode 100644 index 0cf2d1a..0000000 --- a/i3/i3/config.d/netbook.config +++ /dev/null @@ -1,51 +0,0 @@ -# bind some keys -bindsym XF86Sleep exec --no-startup-id $path_i3exit suspend -bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle -bindsym XF86AudioRaiseVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol +5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -bindsym XF86AudioLowerVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol -5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -# keys seemingly switched -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -dec 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -inc 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" - -bindsym XF86AudioPlay exec --no-startup-id mpc toggle - -bindsym XF86AudioPrev exec --no-startup-id mpc prev -bindsym XF86AudioNext exec --no-startup-id mpc next - -# font for window titles. ISO 10646 = Unicode -font pango:DejaVu Sans Mono 11 - -bindsym $mod+o exec --no-startup-id "bash -c '~/development/projects/xautorandr/xautorandr ; kill -SIGUSR2 $(cat $HOME/.var/run/wallchanger.pid)'" -bindsym $mod+p exec --no-startup-id "bash -c 'kill -SIGUSR1 $(cat $HOME/.var/run/wallchanger.pid)'" - - -# start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - # always show at the top of the screen - mode dock - position top - - tray_output primary - - # show workspace buttons - workspace_buttons yes - - id bar-0 - - font pango:DejaVu Sans, Icons 9 - - colors { - background #000000 - statusline #ffffff - separator #e16b40 - - focused_workspace #e16b40 #000000 #ffffff - active_workspace #000000 #5f676a #ffffff - inactive_workspace #000000 #000000 #dddddd - urgent_workspace #D00000 #D00000 #000000 - } - - i3bar_command i3bar - status_command bash ~/.i3/scripts/i3bar_wrapper.bash ~/.i3/conky/netbook.conkyrc -} diff --git a/i3/i3/config.d/notebook.config b/i3/i3/config.d/notebook.config deleted file mode 100644 index 318d005..0000000 --- a/i3/i3/config.d/notebook.config +++ /dev/null @@ -1,50 +0,0 @@ -# bind some keys -bindsym XF86Sleep exec --no-startup-id $path_i3exit suspend -bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle -bindsym XF86AudioRaiseVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol +5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -bindsym XF86AudioLowerVolume exec --no-startup-id bash $HOME/.i3/scripts/pa-volume.bash set-vol -5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -# keys seemingly switched -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -dec 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" -bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -inc 5 ; exec --no-startup-id "bash $HOME/.i3/scripts/update-status.bash" - -bindsym XF86AudioPlay exec --no-startup-id mpc toggle - -bindsym XF86AudioPrev exec --no-startup-id mpc prev -bindsym XF86AudioNext exec --no-startup-id mpc next - -# font for window titles. ISO 10646 = Unicode -font pango:DejaVu Sans Mono 11 - -bindsym $mod+o exec --no-startup-id "bash -c '~/development/projects/xautorandr/xautorandr ; kill -SIGUSR2 $(cat $HOME/.var/run/wallchanger.pid)'" -bindsym $mod+p exec --no-startup-id "bash -c 'kill -SIGUSR1 $(cat $HOME/.var/run/wallchanger.pid)'" - -# start i3bar to display a workspace bar (plus the system information i3status -# finds out, if available) -bar { - # always show at the top of the screen - mode dock - position top - - tray_output primary - - # show workspace buttons - workspace_buttons yes - - id bar-0 - - font pango:DejaVu Sans, Icons 11 - - colors { - background #000000 - statusline #ffffff - separator #e16b40 - - focused_workspace #e16b40 #000000 #ffffff - active_workspace #000000 #5f676a #ffffff - inactive_workspace #000000 #000000 #dddddd - urgent_workspace #D00000 #D00000 #000000 - } - - i3bar_command i3bar - status_command bash ~/.i3/scripts/i3bar_wrapper.bash ~/.i3/conky/notebook.conkyrc -} diff --git a/i3/i3/conky/notebook.conkyrc b/i3/i3/conky/notebook.conkyrc deleted file mode 100644 index ade57cf..0000000 --- a/i3/i3/conky/notebook.conkyrc +++ /dev/null @@ -1,73 +0,0 @@ -# vim:set filetype=conkyrc: -out_to_console yes -out_to_ncurses no -out_to_stderr no -out_to_x no - -short_units yes - -double_buffer yes - -update_interval 1.0 -update_interval_on_battery 1.0 - -mpd_host 10.11.11.190 -mpd_port 6600 - - -# pad_percents is useless without use_spacer, but the latter leads to some ugly gaps -#pad_percents 2 -#use_spacer left - -#${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ -TEXT -[\ -{ "full_text" : "\ -${if_mpd_playing}\ -${if_match "${mpd_status}" == "Paused"}\ - \ -${else}\ - \ -${endif}\ -${mpd_title} ${mpd_elapsed}/${mpd_length}\ -${else}\ - stopped\ -${endif}\ - " , "name" : "mpd_toggle" },\ -\ -\ -\ -{ "full_text" : "  \ -${texeci 5 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\ -\ -\ -\ -${if_existing /sys/class/power_supply/BAT1}\ -${texeci 10 bash $HOME/.i3/scripts/status.d/battery.bash conky}\ -${endif}\ -\ -\ -\ -{ "full_text" : "  ${kernel} " , "color" : "\#FFFFFF" , "name" : "sysinfo" },\ -\ -\ -\ -{ "full_text" : "  ${texeci 60 bash ~/.i3/scripts/status.d/conky_pacman.bash} " , "color" : "\#FFFFFF" , "name" : "pacman" },\ -\ -\ -\ -{ "full_text" : "  ${texeci 60 /usr/local/bin/backlight.sh get-current-perc}% " , "color" : "\#FFFFFF" , "name" : "backlight" },\ -\ -\ -\ -{ "full_text" : "  $uptime_short " , "color" : "\#FFFFFF" , "name" : "sysinfo" },\ -\ -\ -\ -{ "full_text" : "  ${time %a %F %T} " , "color" : "\#FFFFFF" , "name" : "time" },\ -\ -\ -\ -{ "full_text" : "" }\ -], - diff --git a/i3/i3/data/lockscreen/1024x600.png b/i3/i3/data/lockscreen/1024x600.png deleted file mode 100644 index 82c4f71..0000000 Binary files a/i3/i3/data/lockscreen/1024x600.png and /dev/null differ diff --git a/i3/i3/data/lockscreen/1920x1080.png b/i3/i3/data/lockscreen/1920x1080.png deleted file mode 100644 index 3effd26..0000000 Binary files a/i3/i3/data/lockscreen/1920x1080.png and /dev/null differ diff --git a/i3/i3/data/wallpaper b/i3/i3/data/wallpaper deleted file mode 120000 index 0c46340..0000000 --- a/i3/i3/data/wallpaper +++ /dev/null @@ -1 +0,0 @@ -lockscreen \ No newline at end of file diff --git a/i3/i3/scripts/battery.bash b/i3/i3/scripts/battery.bash new file mode 100644 index 0000000..701c3f6 --- /dev/null +++ b/i3/i3/scripts/battery.bash @@ -0,0 +1,120 @@ +#!/bin/bash + +# shitty. this is used for both creating a part of the status conkyrc AND for +# creating nice output if you click on the status bar +# what i done depends on the first paramter + +rundir="$RUNDIR/batwarn" +logfile="$LOGDIR/batwarn.log" + +[[ ! -d "$rundir" ]] && mkdir -p "$rundir" + +PATH_WARN_1="$rundir/batwarn1" +PATH_WARN_2="$rundir/batwarn2" + +THRESHOLD1=25 +THRESHOLD2=5 + +acpi_output=$(acpi -b) +if [[ -n "$acpi_output" ]] ; then + has_battery=1 + percent="$(echo "$acpi_output" | cut -d "," -f 2 | cut -d " " -f 2 | cut -d "%" -f 1)" + if [[ $percent == 100 ]] ; then + status="Full" + else + status="$(echo "$acpi_output" | cut -d "," -f 1 | cut -d " " -f 3)" + fi + time="$(echo "$acpi_output" | cut -d "," -f 3 | cut -d " " -f 2)" + shortstatus="$(echo $status | cut -c 1)" +else + has_battery=0 +fi + +log() { + echo [$(date +%FT%T)] "$*" >> $logfile +} + + +pretty() { + if (( has_battery )) ; then + ( + echo "Status:|$status" + echo "Charge:|${percent}%" + if [[ $percent != 100 ]] ; then + echo "Time left:|$time" + fi + ) | column -t --separator="|" + fi +} + +charging() { + [[ "$shortstatus" == "C" ]] +} + +discharging() { + [[ "$shortstatus" == "D" ]] +} + +threshold1() { + [[ $percent -le $THRESHOLD1 ]] +} + +threshold2() { + [[ $percent -le $THRESHOLD2 ]] +} + +conky() { + if (( has_battery )) ; then + if discharging ; then + if threshold2 ; then + if [[ ! -f "$PATH_WARN_2" ]] ; then + log "battery fell below $THRESHOLD2 percent. issuing warning." + echo > "$PATH_WARN_2" + notify-send --icon dialog-warning "Battery below ${THRESHOLD2}%" --expire-time 0 + fi + elif threshold1 ; then + if [[ ! -f "$PATH_WARN_1" ]] ; then + log "battery fell below $THRESHOLD1 percent. issuing warning." + echo > "$PATH_WARN_1" + notify-send --icon dialog-warning "Battery below ${THRESHOLD1}%" --expire-time 30000 + fi + fi + fi + + if charging ; then + if [[ -f "$PATH_WARN_1" ]] ; then + log "charging now. resetting warnings." + rm "$PATH_WARN_1" + fi + [[ -f "$PATH_WARN_2" ]] && rm "$PATH_WARN_2" + #if [[ $percent -gt 25 ]] ; then + # [[ -f "$PATH_WARN_1" ]] && rm "$PATH_WARN_1" + #elif [[ $percent -gt 5 ]] ; then + # [[ -f "$PATH_WARN_2" ]] && rm "$PATH_WARN_2" + #fi + + fi + + if threshold2 ; then + color="#FF0000" # red + elif threshold1 ; then + color="#FFFF00" # yellow + else + color="#FFFFFF" # white + fi + + + + echo "{ \"full_text\" : \"  ${shortstatus} ${percent}% \" , \"color\" : \"$color\" , \"name\" : \"battery\" }," + else + echo "{ \"full_text\" : \"  no battery \" , \"color\" : \"#FFFFFF\" , \"name\" : \"battery\" }," + fi +} + +if [[ "$1" == "conky" ]] ; then + conky +else + pretty +fi + + diff --git a/i3/i3/scripts/genconfig.bash b/i3/i3/scripts/genconfig.bash deleted file mode 100755 index 4e297a7..0000000 --- a/i3/i3/scripts/genconfig.bash +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -host="$(hostname --short)" - -# main configuration file that is always used -MAIN_CONF="$HOME/.i3/config" -# user-specific /var -VARDIR="$HOME/.var" -# user-specific /var/run -RUNDIR="$VARDIR/run" -# temporary configuration file used for this session -SESSION_CONF="$RUNDIR/i3/${host}.config" -# directory that contains host specific configuration -CONF_DIR="$HOME/.i3/config.d" -# file that should be used when no host specific configuration present -DEFAULT_CONF="$CONF_DIR/default.config" - -LOGFILE="$LOGDIR/i3/genconfig.log" - -host_specific_conf="$CONF_DIR/$host.config" - -log() { - echo "[$(date +%FT%T)] $*" >> "$LOGFILE" -} - -# if it's a symlink to $MAIN_CONF, cat will fail -[[ -f "$SESSION_CONF" ]] && rm "$SESSION_CONF" - -if [[ ! -f "$host_specific_conf" ]] && [[ ! -f "$DEFAULT_CONF" ]]; then - # if there is no host-specific configuration and no default one, just use - # the main config - log "neither config for host $host at $host_specific_conf nor default config at $DEFAULT_CONF found, using main only" - ln -sf "$MAIN_CONF" "$SESSION_CONF" -else - # either use the host specific config if present, or the default if not - if [[ -f "$host_specific_conf" ]]; then - log "found config for host $host at $host_specific_conf" - conf_to_use="$host_specific_conf" - else - log "no config for host $host found, using default one" - conf_to_use="$DEFAULT_CONF" - fi - cat "$MAIN_CONF" <(echo -e "\n###\n### host-specific configuration for host \"$host\"\n###\n") "$conf_to_use" > "$SESSION_CONF" - log "created session config at $SESSION_CONF" -fi - -echo "$SESSION_CONF" - -# if we got any parameters, tell i3 to reload the config -# so the script can be used both on startup without reload (as i3 is not even -# running yet) and later when reloading -if [[ -n "$1" ]] ; then - log "telling i3 to reload the config file" - i3-msg reload -fi diff --git a/i3/i3/scripts/i3bar_wrapper.bash b/i3/i3/scripts/i3bar_wrapper.bash old mode 100644 new mode 100755 diff --git a/i3/i3/scripts/status.d/battery.bash b/i3/i3/scripts/status.d/battery.bash deleted file mode 100755 index 6b1081b..0000000 --- a/i3/i3/scripts/status.d/battery.bash +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash - -# shitty. this is used for both creating a part of the status conkyrc AND for -# creating nice output if you click on the status bar -# what i done depends on the first paramter - -rundir="$RUNDIR/batwarn" -logfile="$LOGDIR/batwarn.log" - -[[ ! -d "$rundir" ]] && mkdir -p "$rundir" - -PATH_WARN_1="$rundir/batwarn1" -PATH_WARN_2="$rundir/batwarn2" - -THRESHOLD1=25 -THRESHOLD2=5 - -acpi_output=$(acpi -b) -percent="$(echo "$acpi_output" | cut -d "," -f 2 | cut -d " " -f 2 | cut -d "%" -f 1)" -if [[ $percent == 100 ]] ; then - status="Full" -else - status="$(echo "$acpi_output" | cut -d "," -f 1 | cut -d " " -f 3)" -fi -time="$(echo "$acpi_output" | cut -d "," -f 3 | cut -d " " -f 2)" -shortstatus="$(echo $status | cut -c 1)" - -log() { - echo [$(date +%FT%T)] "$*" >> $logfile -} - - -pretty() { - ( - echo "Status:|$status" - echo "Charge:|${percent}%" - if [[ $percent != 100 ]] ; then - echo "Time left:|$time" - fi - ) | column -t --separator="|" -} - -charging() { - [[ "$shortstatus" == "C" ]] -} - -discharging() { - [[ "$shortstatus" == "D" ]] -} - -threshold1() { - [[ $percent -le $THRESHOLD1 ]] -} - -threshold2() { - [[ $percent -le $THRESHOLD2 ]] -} - -conky() { - if discharging ; then - if threshold2 ; then - if [[ ! -f "$PATH_WARN_2" ]] ; then - log "battery fell below $THRESHOLD2 percent. issuing warning." - echo > "$PATH_WARN_2" - notify-send --icon dialog-warning "Battery below ${THRESHOLD2}%" --expire-time 0 - fi - elif threshold1 ; then - if [[ ! -f "$PATH_WARN_1" ]] ; then - log "battery fell below $THRESHOLD1 percent. issuing warning." - echo > "$PATH_WARN_1" - notify-send --icon dialog-warning "Battery below ${THRESHOLD1}%" --expire-time 30000 - fi - fi - fi - - if charging ; then - if [[ -f "$PATH_WARN_1" ]] ; then - log "charging now. resetting warnings." - rm "$PATH_WARN_1" - fi - [[ -f "$PATH_WARN_2" ]] && rm "$PATH_WARN_2" - #if [[ $percent -gt 25 ]] ; then - # [[ -f "$PATH_WARN_1" ]] && rm "$PATH_WARN_1" - #elif [[ $percent -gt 5 ]] ; then - # [[ -f "$PATH_WARN_2" ]] && rm "$PATH_WARN_2" - #fi - - fi - - if threshold2 ; then - color="#FF0000" # red - elif threshold1 ; then - color="#FFFF00" # yellow - else - color="#FFFFFF" # white - fi - - - - echo "{ \"full_text\" : \"  "${shortstatus} ${percent}% \" , \"color\" : \"$color\" , \"name\" : \"battery\" }, -} - -if [[ "$1" == "conky" ]] ; then - conky -else - pretty -fi - - diff --git a/i3/i3/scripts/status.d/conky_pacman.bash b/i3/i3/scripts/status.d/conky_pacman.bash deleted file mode 100755 index b1027c7..0000000 --- a/i3/i3/scripts/status.d/conky_pacman.bash +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -updates=$(pacman -Quq | wc -l) -if [[ $updates -eq 0 ]] ; then - echo "up to date" -elif [[ $updates -eq 1 ]] ; then - echo "1 update" -else - echo "$updates updates" -fi diff --git a/i3/i3/scripts/status.d/pacman.bash b/i3/i3/scripts/status.d/pacman.bash deleted file mode 100755 index 684fb03..0000000 --- a/i3/i3/scripts/status.d/pacman.bash +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -echo "Total packages: $(pacman -Qq | wc -l)" -echo -if ! pacman -Qu >/dev/null 2>&1; then - echo "Up to date." -else - echo "Available updates:" - echo "$(pacman -Qu | column -t)" -fi diff --git a/i3/i3/scripts/status.d/sysinfo.bash b/i3/i3/scripts/status.d/sysinfo.bash deleted file mode 100755 index b34dbeb..0000000 --- a/i3/i3/scripts/status.d/sysinfo.bash +++ /dev/null @@ -1,44 +0,0 @@ -columnate() { - column -t --separator="|" -} - -freeoutput="$(free -m)" -memtotal=$(echo "$freeoutput" | head -2 | tail -1 | tr -s " " | cut -d " " -f 2) -memused=$(echo "$freeoutput" | head -3 | tail -1 | tr -s " " | cut -d " " -f 3) - - -(echo "Current user:|$(whoami)" -echo "Hostname:|$(hostname)" -echo "Uptime:|$(uptime --pretty | cut -d " " -f 2-)" -echo "Kernel:|$(uname -r)" -echo "Packages:|$(pacman -Qq | wc -l)") | columnate -echo "" -echo "CPU:" -(echo "Name:|$(lscpu | grep "Model name:" | tr -s " " | cut -d " " -f 3-)" -echo "Architecture:|$(uname -m)" -echo "Load:|$(uptime | tr -s " " | cut -d " " -f 10 | tr -d ",")") | columnate -echo "" -echo "MEM:" -echo "${memused}MB / ${memtotal}MB ($(( $memused * 100 / $memtotal ))%) used" -echo "" -echo "PROCS:" -(echo "x x CPU% MEM% x x x x x x COMMAND" ; ps aux | grep -v '^USER' | sort -nrk 3 | tr -s " " | cut -d " " -f -11 | uniq -uf 10 | head -10) | cut -d " " -f 3,4,11 | column -t -echo "" -echo "STORAGE:" -df -hT --type=btrfs --type=ext4 --total -echo "" -echo "SWAP:" -if [[ -z "$(swapon)" ]] ; then - echo "none" -else - i=0 - swapon | (while read line; do - [[ $i == 0 ]] && { i=1 ; continue ; } - swappath=$(echo $line | cut -d ' ' -f 1) - swapused=$(echo $line | cut -d ' ' -f 4) - swaptotal=$(echo $line | cut -d ' ' -f 3) - - echo "${swappath}:|${swapused}/${swaptotal}" - done) | columnate -fi - diff --git a/i3/i3/scripts/status.d/wireless.bash b/i3/i3/scripts/status.d/wireless.bash deleted file mode 100755 index 1640f63..0000000 --- a/i3/i3/scripts/status.d/wireless.bash +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash -INTERFACE="wlp2s0" -TIMEFORMAT="+%F %R" - -iwconfig_output="$(iwconfig $INTERFACE)" - -columnize() { - column -t --separator="|" -} - -essid=$(echo "$iwconfig_output" | sed -n "1p" | awk -F '"' '{print $2}') -mode=$(echo "$iwconfig_output" | sed -n "1p" | awk -F " " '{print $3}') -freq=$(echo "$iwconfig_output" | sed -n "2p" | awk -F " " '{print $2}' | cut -d":" -f2) -mac=$(echo "$iwconfig_output" | sed -n "2p" | awk -F " " '{print $6}') -qual=$(echo "$iwconfig_output" | sed -n "6p" | awk -F " " '{print $2}' | cut -d"=" -f2) -lvl=$(echo "$iwconfig_output" | sed -n "6p" | awk -F " " '{print $4}' | cut -d"=" -f2) -rate=$(echo "$iwconfig_output" | sed -n "3p" | awk -F "=" '{print $2}' | cut -d" " -f1) - -ip=$(ip addr show $INTERFACE | grep "[[:space:]]*inet" | head -n 1 | tr -s " " | cut -d " " -f 3 | cut -d "/" -f 1) - -vnstat_output="$(vnstat --dumpdb)" -txhour=$(echo "$vnstat_output" | grep "^h;0;" | cut -d ";" -f 5) -rxhour=$(echo "$vnstat_output" | grep "^h;0;" | cut -d ";" -f 4) -txtoday=$(echo "$vnstat_output" | grep "^d;0;" | cut -d ";" -f 5) -rxtoday=$(echo "$vnstat_output" | grep "^d;0;" | cut -d ";" -f 4) -txtotal=$(echo "$vnstat_output" | grep "^totaltx;" | cut -d ";" -f 2) -rxtotal=$(echo "$vnstat_output" | grep "^totalrx;" | cut -d ";" -f 2) -vnstat_created="$(date --date=@$(echo "$vnstat_output" | grep "^created;" | cut -d ";" -f 2) "$TIMEFORMAT")" -vnstat_last_update="$(date --date=@$(echo "$vnstat_output" | grep "^updated;" | cut -d ";" -f 2) "$TIMEFORMAT")" - -txhour=$(( $txhour / 1024 )) -rxhour=$(( $rxhour / 1024 )) - -echo -e "Interface $INTERFACE:\n" -( -echo "IP:|$ip" -echo "ESSID:|$essid" -echo "Mode:|$mode" -echo "Frequency:|$freq" -echo "MAC address:|$mac" -echo "Quality:|$qual" -echo "Signal level:|$lvl dBm" -echo "Bitrate:|$rate Mb/s" -) | columnize -echo -e "\nUsage:\n" -( -echo "Hourly up:|${txhour}|MiB" -echo "Hourly down:|${rxhour}|MiB" -echo "Daily up:|${txtoday}|MiB" -echo "Daily down:|${rxtoday}|MiB" -echo "Total up:|${txtotal}|MiB" -echo "Total down:|${rxtotal}|MiB" -echo "" -) | columnize -echo -e "\nLast update at: $vnstat_last_update" diff --git a/i3/i3/conky/netbook.conkyrc b/i3/i3/scripts/statusbar.conkyrc similarity index 61% rename from i3/i3/conky/netbook.conkyrc rename to i3/i3/scripts/statusbar.conkyrc index 75305ef..3565970 100644 --- a/i3/i3/conky/netbook.conkyrc +++ b/i3/i3/scripts/statusbar.conkyrc @@ -11,10 +11,6 @@ double_buffer yes update_interval 1.0 update_interval_on_battery 1.0 -mpd_host 10.11.11.190 -mpd_port 6600 - - # pad_percents is useless without use_spacer, but the latter leads to some ugly gaps #pad_percents 2 #use_spacer left @@ -22,29 +18,12 @@ mpd_port 6600 #${mpd_artist} - ${mpd_title} ${mpd_elapsed}/${mpd_length}\ TEXT [\ -{ "full_text" : "\ -${if_mpd_playing}\ -${if_match "${mpd_status}" == "Paused"}\ - \ -${else}\ - \ -${endif}\ -${mpd_title} ${mpd_elapsed}/${mpd_length}\ -${else}\ - stopped\ -${endif}\ - " , "name" : "mpd_toggle" },\ -\ -\ -\ { "full_text" : "  \ ${texeci 5 bash $HOME/.i3/scripts/pa-volume.bash status} " , "color" : "\#FFFFFF" , "name" : "volume" },\ \ \ \ -${if_existing /sys/class/power_supply/BAT1}\ -${texeci 10 bash $HOME/.i3/scripts/status.d/battery.bash conky}\ -${endif}\ +${texeci 10 bash $HOME/.i3/scripts/battery.bash conky}\ \ \ \ @@ -52,10 +31,6 @@ ${endif}\ \ \ \ -{ "full_text" : "  ${texeci 60 bash ~/.i3/scripts/status.d/conky_pacman.bash} " , "color" : "\#FFFFFF" , "name" : "pacman" },\ -\ -\ -\ { "full_text" : "  $uptime_short " , "color" : "\#FFFFFF" , "name" : "sysinfo" },\ \ \ diff --git a/i3/i3/scripts/weather.sh b/i3/i3/scripts/weather.sh deleted file mode 100755 index 15882be..0000000 --- a/i3/i3/scripts/weather.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -#AccuWeather (r) RSS weather tool for conky -# -#USAGE: weather.sh -# -#(c) Michael Seiler 2007 - -METRIC=1 #Should be 0 or 1; 0 for F, 1 for C - -if [ -z $1 ]; then - echo - echo "USAGE: weather.sh " - echo - exit 0; -fi - -curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | grep "Currently" | head -1 | grep -o 'Currently:[^<]*' | cut -d ' ' -f 2- | tr ':' ',' -# | perl -ne 'if (/Currently/) {chomp;/\Currently: (.*)?\<\/title\>/; print "$1"; }' |sed s/\:// |tr [A-Z] [a-z] - -