diff options
| author | 2015-03-30 10:25:12 +0200 | |
|---|---|---|
| committer | 2015-03-30 10:25:12 +0200 | |
| commit | 8eee1c45bef74aa6094f463f9888ac653958b3dc (patch) | |
| tree | 0e2a066fd4da4afcf08f0bef348511b5c9ac48f7 /config | |
| parent | c7ebce541a9914d4e5a3b52e838e2ac66dd139a0 (diff) | |
| download | dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.gz dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.tar.bz2 dotfiles-8eee1c45bef74aa6094f463f9888ac653958b3dc.zip | |
Moving back to stow for management
reasons: dotfiles.sh misbehaving on freebsd
Diffstat (limited to 'config')
| -rwxr-xr-x | config/herbstluftwm/autostart | 193 | ||||
| -rw-r--r-- | config/herbstluftwm/dependencylist | 15 | ||||
| -rwxr-xr-x | config/herbstluftwm/lock.sh | 7 | ||||
| -rwxr-xr-x | config/herbstluftwm/notify.sh | 19 | ||||
| -rwxr-xr-x | config/herbstluftwm/panel.sh | 160 | ||||
| -rw-r--r-- | config/herbstluftwm/panel_indicators.sh | 127 | ||||
| -rw-r--r-- | config/herbstluftwm/poligons.png | bin | 4592375 -> 0 bytes | |||
| -rwxr-xr-x | config/herbstluftwm/popup.sh | 46 | ||||
| -rwxr-xr-x | config/herbstluftwm/start.sh | 13 | ||||
| -rw-r--r-- | config/herbstluftwm/theme.sh | 33 | ||||
| -rw-r--r-- | config/redshift.conf | 46 |
11 files changed, 0 insertions, 659 deletions
diff --git a/config/herbstluftwm/autostart b/config/herbstluftwm/autostart deleted file mode 100755 index 683fbf1..0000000 --- a/config/herbstluftwm/autostart +++ /dev/null | |||
| @@ -1,193 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | # this is a simple config for herbstluftwm | ||
| 4 | |||
| 5 | hc() { | ||
| 6 | herbstclient "$@" | ||
| 7 | } | ||
| 8 | |||
| 9 | #Include the theming script | ||
| 10 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 11 | source "$dir/theme.sh" | ||
| 12 | |||
| 13 | #Detect monitors | ||
| 14 | hc set auto_detect_monitors 1 | ||
| 15 | hc detect_monitors | ||
| 16 | |||
| 17 | #Panel and window_p | ||
| 18 | monitor_w=($(hc list_monitors | sed 's/^[0-9]: \([0-9]*\)x.*$/\1/')) | ||
| 19 | panel_w=$(echo "$monitor_w - (2 * $window_p)" | bc) | ||
| 20 | dmenu_opts="-h $panel_h -w $panel_w -x $window_p -y $window_p -p Run: -nb $color_bg -nf $color_fg -sb $color_accent -sf $color_bg" | ||
| 21 | |||
| 22 | # remove all existing keybindings | ||
| 23 | hc keyunbind --all | ||
| 24 | |||
| 25 | # keybindings | ||
| 26 | Mod=Mod4 # Use the super key as the main modifier | ||
| 27 | |||
| 28 | hc keybind $Mod-Shift-q quit | ||
| 29 | hc keybind $Mod-Shift-r reload | ||
| 30 | hc keybind $Mod-Shift-c close | ||
| 31 | hc keybind $Mod-Return spawn xterm | ||
| 32 | hc keybind $Mod-grave spawn dmenu_run $dmenu_opts | ||
| 33 | hc keybind XF86AudioLowerVolume spawn amixer set Master 1%- | ||
| 34 | hc keybind XF86AudioRaiseVolume spawn amixer set Master 1%+ | ||
| 35 | |||
| 36 | # basic movement | ||
| 37 | # focusing clients | ||
| 38 | #hc keybind $Mod-Left focus left | ||
| 39 | #hc keybind $Mod-Down focus down | ||
| 40 | #hc keybind $Mod-Up focus up | ||
| 41 | #hc keybind $Mod-Right focus right | ||
| 42 | hc keybind $Mod-h focus left | ||
| 43 | hc keybind $Mod-j focus down | ||
| 44 | hc keybind $Mod-k focus up | ||
| 45 | hc keybind $Mod-l focus right | ||
| 46 | |||
| 47 | # moving clients | ||
| 48 | #hc keybind $Mod-Shift-Left shift left | ||
| 49 | #hc keybind $Mod-Shift-Down shift down | ||
| 50 | #hc keybind $Mod-Shift-Up shift up | ||
| 51 | #hc keybind $Mod-Shift-Right shift right | ||
| 52 | hc keybind $Mod-Shift-h shift left | ||
| 53 | hc keybind $Mod-Shift-j shift down | ||
| 54 | hc keybind $Mod-Shift-k shift up | ||
| 55 | hc keybind $Mod-Shift-l shift right | ||
| 56 | |||
| 57 | # splitting frames | ||
| 58 | # create an empty frame at the specified direction | ||
| 59 | hc keybind $Mod-u split bottom 0.5 | ||
| 60 | hc keybind $Mod-o split right 0.5 | ||
| 61 | # let the current frame explode into subframes | ||
| 62 | hc keybind $Mod-Control-space split explode | ||
| 63 | |||
| 64 | # resizing frames | ||
| 65 | resizestep=0.05 | ||
| 66 | hc keybind $Mod-Control-h resize left +$resizestep | ||
| 67 | hc keybind $Mod-Control-j resize down +$resizestep | ||
| 68 | hc keybind $Mod-Control-k resize up +$resizestep | ||
| 69 | hc keybind $Mod-Control-l resize right +$resizestep | ||
| 70 | #hc keybind $Mod-Control-Left resize left +$resizestep | ||
| 71 | #hc keybind $Mod-Control-Down resize down +$resizestep | ||
| 72 | #hc keybind $Mod-Control-Up resize up +$resizestep | ||
| 73 | #hc keybind $Mod-Control-Right resize right +$resizestep | ||
| 74 | |||
| 75 | # tags | ||
| 76 | tag_names=( I II III IV V VI VII VIII IX X ) | ||
| 77 | tag_keys=( {1..9} 0 ) | ||
| 78 | |||
| 79 | # Selecting workspaces | ||
| 80 | #hc keybind Alt-Control-Left use_index -1 | ||
| 81 | #hc keybind Alt-Control-Right use_index +1 | ||
| 82 | hc keybind Alt-Control-h use_index -1 | ||
| 83 | hc keybind Alt-Control-l use_index +1 | ||
| 84 | hc rename default "${tag_names[0]}" || true | ||
| 85 | for i in ${!tag_names[@]} ; do | ||
| 86 | hc add "${tag_names[$i]}" | ||
| 87 | key="${tag_keys[$i]}" | ||
| 88 | if ! [ -z "$key" ] ; then | ||
| 89 | hc keybind "$Mod-$key" use_index "$i" | ||
| 90 | hc keybind "$Mod-Shift-$key" move_index "$i" | ||
| 91 | fi | ||
| 92 | done | ||
| 93 | |||
| 94 | # cycle through tags | ||
| 95 | hc keybind $Mod-period use_index +1 --skip-visible | ||
| 96 | hc keybind $Mod-comma use_index -1 --skip-visible | ||
| 97 | |||
| 98 | # layouting | ||
| 99 | hc keybind $Mod-r remove | ||
| 100 | hc keybind $Mod-space cycle_layout 1 | ||
| 101 | hc keybind $Mod-s floating toggle | ||
| 102 | hc keybind $Mod-f fullscreen toggle | ||
| 103 | hc keybind $Mod-p pseudotile toggle | ||
| 104 | |||
| 105 | # mouse | ||
| 106 | hc mouseunbind --all | ||
| 107 | hc mousebind $Mod-Button1 move | ||
| 108 | hc mousebind $Mod-Button2 zoom | ||
| 109 | hc mousebind $Mod-Button3 resize | ||
| 110 | |||
| 111 | # focus | ||
| 112 | hc keybind $Mod-BackSpace cycle_monitor | ||
| 113 | hc keybind $Mod-Tab cycle_all +1 | ||
| 114 | hc keybind $Mod-Shift-Tab cycle_all -1 | ||
| 115 | hc keybind $Mod-c cycle | ||
| 116 | hc keybind $Mod-i jumpto urgent | ||
| 117 | hc set focus_follows_mouse 1 | ||
| 118 | |||
| 119 | # theme | ||
| 120 | hc attr theme.tiling.reset 1 | ||
| 121 | hc attr theme.floating.reset 1 | ||
| 122 | hc set frame_border_width 0 | ||
| 123 | hc set always_show_frame 0 | ||
| 124 | hc set frame_bg_transparent 1 | ||
| 125 | hc set frame_normal_opacity 0 | ||
| 126 | hc set frame_active_opacity 0 | ||
| 127 | hc set frame_transparent_width 0 | ||
| 128 | hc set frame_gap 0 | ||
| 129 | |||
| 130 | hc attr theme.active.color $color_accent | ||
| 131 | hc attr theme.normal.color $color_bg | ||
| 132 | hc attr theme.urgent.color orange | ||
| 133 | hc attr theme.inner_width 1 | ||
| 134 | hc attr theme.inner_color $color_bg | ||
| 135 | hc attr theme.border_width 3 | ||
| 136 | hc attr theme.floating.border_width 4 | ||
| 137 | hc attr theme.floating.outer_width 1 | ||
| 138 | hc attr theme.floating.outer_color $color_bg | ||
| 139 | hc attr theme.active.inner_color $color_bg | ||
| 140 | hc attr theme.active.outer_color $color_bg | ||
| 141 | hc attr theme.background_color $color_bg | ||
| 142 | |||
| 143 | hc set window_gap $window_p | ||
| 144 | hc set frame_padding 0 | ||
| 145 | hc set smart_window_surroundings 0 | ||
| 146 | hc set smart_frame_surroundings 1 | ||
| 147 | hc set mouse_recenter_gap 1 | ||
| 148 | |||
| 149 | # rules | ||
| 150 | hc unrule -F | ||
| 151 | hc rule focus=on # normally focus new clients | ||
| 152 | |||
| 153 | #hc rule windowtype~'_NET_WM_WINDOW_TYPE_(DIALOG|UTILITY|SPLASH)' pseudotile=on | ||
| 154 | hc rule windowtype='_NET_WM_WINDOW_TYPE_DIALOG' focus=on | ||
| 155 | hc rule windowtype~'_NET_WM_WINDOW_TYPE_(NOTIFICATION|DOCK|DESKTOP)' manage=off | ||
| 156 | |||
| 157 | hc rule --class~'(.*[Ss]team.*)' --tag=IX --focus=off | ||
| 158 | hc rule --class~'(.*[Hh]exchat.*)' --tag=X --focus=off | ||
| 159 | hc rule --class~'(.*[Ss]potify.*)' --tag=X --focus=off | ||
| 160 | hc rule --class~'(.*[Ss]kype.*)' --tag=VIII --focus=off | ||
| 161 | |||
| 162 | # unlock, just to be sure | ||
| 163 | hc unlock | ||
| 164 | |||
| 165 | herbstclient set tree_style '╾│ ├└╼─┐' | ||
| 166 | |||
| 167 | #Start panel in all monitors | ||
| 168 | start_panel() { | ||
| 169 | for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do | ||
| 170 | "$1" $monitor& | ||
| 171 | done | ||
| 172 | } | ||
| 173 | |||
| 174 | # find the panel | ||
| 175 | panel=$dir/panel.sh | ||
| 176 | [ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh | ||
| 177 | if pgrep panel.sh >> /dev/null | ||
| 178 | then | ||
| 179 | kill $(pgrep panel.sh) | ||
| 180 | start_panel $panel | ||
| 181 | else | ||
| 182 | start_panel $panel | ||
| 183 | fi | ||
| 184 | |||
| 185 | pulseaudio --start | ||
| 186 | |||
| 187 | $dir/start.sh "xautolock -time 5 -locker $dir/lock.sh" | ||
| 188 | $dir/start.sh "feh --bg-fill $wallpaper" | ||
| 189 | $dir/start.sh "compton --config $HOME/.compton" | ||
| 190 | $dir/start.sh "xrdb -load $HOME/.Xresources" | ||
| 191 | $dir/start.sh "xset +fp /usr/share/fonts/local" | ||
| 192 | $dir/start.sh "xset fp rehash" | ||
| 193 | #$dir/start.sh "$dir/notify.sh $dir/popup.sh" | ||
diff --git a/config/herbstluftwm/dependencylist b/config/herbstluftwm/dependencylist deleted file mode 100644 index 7d3babf..0000000 --- a/config/herbstluftwm/dependencylist +++ /dev/null | |||
| @@ -1,15 +0,0 @@ | |||
| 1 | alsa-utils | ||
| 2 | bar-aint-recursive | ||
| 3 | bc | ||
| 4 | compton | ||
| 5 | dmenu2 | ||
| 6 | feh | ||
| 7 | i3lock | ||
| 8 | playerctl | ||
| 9 | pulseaudio | ||
| 10 | pulseaudio-alsa | ||
| 11 | scrot | ||
| 12 | sed | ||
| 13 | stlarch_font | ||
| 14 | wireless_tools | ||
| 15 | xautolock | ||
diff --git a/config/herbstluftwm/lock.sh b/config/herbstluftwm/lock.sh deleted file mode 100755 index 04c4638..0000000 --- a/config/herbstluftwm/lock.sh +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | SCREENCAP="/tmp/lock.png" | ||
| 4 | scrot $SCREENCAP | ||
| 5 | convert -gaussian-blur "12x3" $SCREENCAP $SCREENCAP | ||
| 6 | i3lock -i $SCREENCAP | ||
| 7 | rm $SCREENCAP | ||
diff --git a/config/herbstluftwm/notify.sh b/config/herbstluftwm/notify.sh deleted file mode 100755 index 40c5330..0000000 --- a/config/herbstluftwm/notify.sh +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | while true; do | ||
| 4 | |||
| 5 | bat_lvl=$(cat /sys/class/power_supply/BAT1/capacity) | ||
| 6 | bat_stat=$(cat /sys/class/power_supply/BAT1/status) | ||
| 7 | |||
| 8 | if [[ $bat_lvl -le 5 && $bat_stat == "Discharging" ]]; then | ||
| 9 | $1 -m "Battery level critical: $bat_lvl%%" -u "high" | ||
| 10 | elif [[ $bat_lvl -eq 10 && $bat_stat == "Discharging" ]]; then | ||
| 11 | $1 -m "Battery level low: $bat_lvl%%" | ||
| 12 | elif [[ $bat_lvl -eq 50 && $bat_stat == "Discharging" ]]; then | ||
| 13 | $1 -m "Battery level at $bat_lvl%%" | ||
| 14 | elif [[ $bat_lvl -eq 100 && $bat_stat == "Charging" ]]; then | ||
| 15 | $1 -m "Battery fully charged" | ||
| 16 | fi | ||
| 17 | |||
| 18 | sleep 60; | ||
| 19 | done | ||
diff --git a/config/herbstluftwm/panel.sh b/config/herbstluftwm/panel.sh deleted file mode 100755 index 763c668..0000000 --- a/config/herbstluftwm/panel.sh +++ /dev/null | |||
| @@ -1,160 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | hc() { | ||
| 4 | "${herbstclient_command[@]:-herbstclient}" "$@" ; | ||
| 5 | } | ||
| 6 | |||
| 7 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 8 | source "$dir/theme.sh" | ||
| 9 | source "$dir/panel_indicators.sh" | ||
| 10 | |||
| 11 | monitor=${1:-0} | ||
| 12 | |||
| 13 | geometry=( $(herbstclient monitor_rect "$monitor") ) | ||
| 14 | if [ -z "$geometry" ] ;then | ||
| 15 | echo "Invalid monitor $monitor" | ||
| 16 | exit 1 | ||
| 17 | fi | ||
| 18 | # geometry has the format W H X Y | ||
| 19 | x=$(echo "${geometry[0]} + $window_p" | bc) | ||
| 20 | y=$(echo "${geometry[1]} + $window_p" | bc) | ||
| 21 | panel_width=$(echo "${geometry[2]} - (2 * $window_p)" | bc) | ||
| 22 | bar_opts="-g ${panel_width}x${panel_h}+${x}+${y} -f $font,$font_sec -u 2 -B $acolor_bg -F $acolor_fg" | ||
| 23 | |||
| 24 | hc pad $monitor $(echo "$panel_h + $window_p" | bc) | ||
| 25 | |||
| 26 | if awk -Wv 2>/dev/null | head -1 | grep -q '^mawk'; then | ||
| 27 | # mawk needs "-W interactive" to line-buffer stdout correctly | ||
| 28 | # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593504 | ||
| 29 | uniq_linebuffered() { | ||
| 30 | awk -W interactive '$0 != l { print ; l=$0 ; fflush(); }' "$@" | ||
| 31 | } | ||
| 32 | else | ||
| 33 | # other awk versions (e.g. gawk) issue a warning with "-W interactive", so | ||
| 34 | # we don't want to use it there. | ||
| 35 | uniq_linebuffered() { | ||
| 36 | awk '$0 != l { print ; l=$0 ; fflush(); }' "$@" | ||
| 37 | } | ||
| 38 | fi | ||
| 39 | |||
| 40 | { | ||
| 41 | ### Event generator ### | ||
| 42 | # <eventname>\t<data> [...] | ||
| 43 | # e.g. | ||
| 44 | # date ^fg(#efefef)18:33^fg(#909090), 2013-10-^fg(#efefef)29 | ||
| 45 | while true ; do | ||
| 46 | music | ||
| 47 | volume | ||
| 48 | network | ||
| 49 | battery | ||
| 50 | clock | ||
| 51 | sleep 1 || break | ||
| 52 | done > >(uniq_linebuffered) & | ||
| 53 | childpid=$! | ||
| 54 | hc --idle | ||
| 55 | kill $childpid | ||
| 56 | } 2> /dev/null | { | ||
| 57 | |||
| 58 | IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" | ||
| 59 | visible=true | ||
| 60 | date="" | ||
| 61 | volume="" | ||
| 62 | battery="" | ||
| 63 | net="" | ||
| 64 | windowtitle="" | ||
| 65 | while true ; do | ||
| 66 | separator="%{F$acolor_accent}|%{F-}" | ||
| 67 | # draw tags | ||
| 68 | for i in "${tags[@]}" ; do | ||
| 69 | case ${i:0:1} in | ||
| 70 | '#') | ||
| 71 | echo -n "%{U$acolor_accent+u}%{F$acolor_fg}" | ||
| 72 | ;; | ||
| 73 | '+') | ||
| 74 | echo -n "%{U$acolor_fg+u}%{F$acolor_fg}" | ||
| 75 | ;; | ||
| 76 | ':') | ||
| 77 | echo -n "%{F$acolor_fg}" | ||
| 78 | ;; | ||
| 79 | '!') | ||
| 80 | echo -n "%{B$acolor_accent}%{U$acolor_accent+u}%{F$acolor_bg}" | ||
| 81 | ;; | ||
| 82 | *) | ||
| 83 | echo -n "%{F$acolor_fg}" | ||
| 84 | ;; | ||
| 85 | esac | ||
| 86 | echo -n "%{A:tag,${i:1}:} ${i:1} %{A}%{F-}%{U-u}%{B-}" | ||
| 87 | done | ||
| 88 | echo -n "$separator%{F-}%{B-} " | ||
| 89 | echo -n "${windowtitle//^/^^}" | ||
| 90 | |||
| 91 | #Right part of panel | ||
| 92 | right="$music$volume$net$battery$date " | ||
| 93 | echo -n "%{r}$right" | ||
| 94 | |||
| 95 | #DO NOT REMOVE THIS ECHO | ||
| 96 | echo | ||
| 97 | |||
| 98 | # wait for next event | ||
| 99 | IFS=$'\t' read -ra cmd || break | ||
| 100 | case "${cmd[0]}" in | ||
| 101 | tag*) | ||
| 102 | #echo "resetting tags" >&2 | ||
| 103 | IFS=$'\t' read -ra tags <<< "$(hc tag_status $monitor)" | ||
| 104 | ;; | ||
| 105 | music) | ||
| 106 | music="${cmd[@]:1}" | ||
| 107 | if [ $music == "off" ] ; then | ||
| 108 | music="" | ||
| 109 | else | ||
| 110 | music="$music $separator%{B-} " | ||
| 111 | fi | ||
| 112 | ;; | ||
| 113 | volume) | ||
| 114 | volume="${cmd[@]:1}" | ||
| 115 | if [ $volume == "off" ] ; then | ||
| 116 | volume="" | ||
| 117 | else | ||
| 118 | volume="$volume $separator%{B-} " | ||
| 119 | fi | ||
| 120 | ;; | ||
| 121 | net) | ||
| 122 | net="${cmd[@]:1}" | ||
| 123 | if [ $net = "off" ] ; then | ||
| 124 | net="" | ||
| 125 | else | ||
| 126 | net="$net $separator%{B-} " | ||
| 127 | fi | ||
| 128 | ;; | ||
| 129 | battery) | ||
| 130 | battery="${cmd[@]:1}" | ||
| 131 | if [ $battery == "off" ] ; then | ||
| 132 | battery="" | ||
| 133 | else | ||
| 134 | battery="$battery $separator%{B-} " | ||
| 135 | fi | ||
| 136 | ;; | ||
| 137 | date) | ||
| 138 | #echo "resetting date" >&2 | ||
| 139 | date="${cmd[@]:1}" | ||
| 140 | ;; | ||
| 141 | focus_changed|window_title_changed) | ||
| 142 | windowtitle="${cmd[@]:2}" | ||
| 143 | ;; | ||
| 144 | esac | ||
| 145 | done | ||
| 146 | } 2> /dev/null | bar $bar_opts | { | ||
| 147 | #Handle clickable areas | ||
| 148 | while read line; do | ||
| 149 | IFS=',' read -a c <<< $(echo $line) | ||
| 150 | case "${c[0]}" in | ||
| 151 | tag) | ||
| 152 | herbstclient use "${c[1]}" | ||
| 153 | echo "herbstclient use \"${c[1]}\"" | ||
| 154 | ;; | ||
| 155 | *) | ||
| 156 | echo "${c[0]}: not valid command" | ||
| 157 | ;; | ||
| 158 | esac | ||
| 159 | done | ||
| 160 | } | ||
diff --git a/config/herbstluftwm/panel_indicators.sh b/config/herbstluftwm/panel_indicators.sh deleted file mode 100644 index e450337..0000000 --- a/config/herbstluftwm/panel_indicators.sh +++ /dev/null | |||
| @@ -1,127 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | battery_icon=("\ue113" "\ue114" "\ue115" "\ue116" "\ue042") | ||
| 3 | network_icon=("\ue0f1" "\ue0f2" "\ue0f3" "\ue0af") | ||
| 4 | music_icon="\ue05c" | ||
| 5 | |||
| 6 | music() | ||
| 7 | { | ||
| 8 | # Music | ||
| 9 | player_status=$(playerctl status) | ||
| 10 | if [ $player_status = "Playing" ]; then | ||
| 11 | player_artist=$(playerctl metadata artist) | ||
| 12 | player_title=$(playerctl metadata title) | ||
| 13 | playing="$player_title - $player_artist" | ||
| 14 | |||
| 15 | if [ "$current" != "$playing" ] ; then | ||
| 16 | current=$playing | ||
| 17 | scrolling=$current | ||
| 18 | elif [ ${#scrolling} -gt "24" ] ; then | ||
| 19 | scrolling=${scrolling:1} | ||
| 20 | else | ||
| 21 | scrolling=$current | ||
| 22 | fi | ||
| 23 | |||
| 24 | echo -e "music\t$music_icon ${scrolling:0:24}" | ||
| 25 | else | ||
| 26 | echo -e "music\toff" | ||
| 27 | fi | ||
| 28 | } | ||
| 29 | |||
| 30 | volume() | ||
| 31 | { | ||
| 32 | # Volume | ||
| 33 | if pgrep pulseaudio >> /dev/null ; then | ||
| 34 | volumes=$(\ | ||
| 35 | amixer get Master | \ | ||
| 36 | grep "Front Right: Playback"\ | ||
| 37 | ) | ||
| 38 | vol=$(\ | ||
| 39 | echo $volumes | \ | ||
| 40 | sed "s/.*\[\([0-9]*\)%\].*/\1/"\ | ||
| 41 | ) | ||
| 42 | if [ -z $vol ] ; then | ||
| 43 | echo -e "volume\toff" | ||
| 44 | else | ||
| 45 | echo -e "volume\t%{F$acolor_fg}\ue05d $vol%%%{F-}" | ||
| 46 | fi | ||
| 47 | else | ||
| 48 | echo -e "volume\toff" | ||
| 49 | fi | ||
| 50 | } | ||
| 51 | |||
| 52 | network() | ||
| 53 | { | ||
| 54 | # Network | ||
| 55 | read lo int1 int2 <<< `ip link | sed -n 's/^[0-9]: \(.*\):.*$/\1/p'` | ||
| 56 | if iwconfig $int1 >/dev/null 2>&1; then | ||
| 57 | wifi=$int1 | ||
| 58 | eth=$int2 | ||
| 59 | else | ||
| 60 | wifi=$int2 | ||
| 61 | eth=$int1 | ||
| 62 | fi | ||
| 63 | |||
| 64 | ip link show $eth | grep 'state UP' >/dev/null && int=$eth || int=$wifi | ||
| 65 | |||
| 66 | if [ $int == $wifi ] ; then | ||
| 67 | iwconfig=$(iwconfig $int) | ||
| 68 | ssid=$( | ||
| 69 | echo $iwconfig | \ | ||
| 70 | sed "s/.*ESSID:\(\".*\"\).*/\1/" | \ | ||
| 71 | sed "s/.*\(off\/any\).*/\"\1\"/" | \ | ||
| 72 | sed "s/.*\"\(.*\)\".*/\1/" | ||
| 73 | ) | ||
| 74 | |||
| 75 | quality=$( \ | ||
| 76 | echo $iwconfig | \ | ||
| 77 | sed "s/^.*Link Quality=\([0-9]*\)\/\([0-9]*\) .*$/(\1*100)\/\2/" | \ | ||
| 78 | bc | ||
| 79 | ) | ||
| 80 | |||
| 81 | if [ $ssid == "off/any" ] ; then | ||
| 82 | echo -e "net\toff" | ||
| 83 | elif [ $quality -lt 33 ] ; then | ||
| 84 | echo -e "net\t${network_icon[0]} $ssid" | ||
| 85 | elif [ $quality -lt 66 ] ; then | ||
| 86 | echo -e "net\t${network_icon[1]} $ssid" | ||
| 87 | else | ||
| 88 | echo -e "net\t${network_icon[2]} $ssid" | ||
| 89 | fi | ||
| 90 | |||
| 91 | elif [ $int == $eth ] ; then | ||
| 92 | echo -e "net\t${network_icon[3]} ethernet" | ||
| 93 | else | ||
| 94 | echo -e "net\toff" | ||
| 95 | fi | ||
| 96 | } | ||
| 97 | |||
| 98 | battery() | ||
| 99 | { | ||
| 100 | # Battery | ||
| 101 | if $(test -e /sys/class/power_supply/BAT1) ; then | ||
| 102 | |||
| 103 | bat_lvl=$(cat /sys/class/power_supply/BAT1/capacity) | ||
| 104 | bat_state=$(cat /sys/class/power_supply/BAT1/status) | ||
| 105 | |||
| 106 | if [ $bat_state == "Charging" ] ; then | ||
| 107 | bat_status="${battery_icon[4]}" | ||
| 108 | elif [ $bat_lvl -lt 10 ] ; then | ||
| 109 | bat_status="${F$acolor_accent}${battery_icon[0]}${F-}" | ||
| 110 | elif [ $bat_ -lt 33 ] ; then | ||
| 111 | bat_status="${battery_icon[1]}" | ||
| 112 | elif [ $bat_lvl -lt 66 ] ; then | ||
| 113 | bat_status="${battery_icon[2]}" | ||
| 114 | else | ||
| 115 | bat_status="${battery_icon[3]}" | ||
| 116 | fi | ||
| 117 | |||
| 118 | echo -e "battery\t$bat_status $bat_lvl%%%{F-}" | ||
| 119 | else | ||
| 120 | echo -e "battery\toff" | ||
| 121 | fi | ||
| 122 | } | ||
| 123 | |||
| 124 | clock() | ||
| 125 | { | ||
| 126 | echo -e $(date +$"date\t%{F$acolor_fg}%H:%M:%S %{F$acolor_fg}(%d-%m-%Y)%{F-}") | ||
| 127 | } | ||
diff --git a/config/herbstluftwm/poligons.png b/config/herbstluftwm/poligons.png deleted file mode 100644 index e5c7cda..0000000 --- a/config/herbstluftwm/poligons.png +++ /dev/null | |||
| Binary files differ | |||
diff --git a/config/herbstluftwm/popup.sh b/config/herbstluftwm/popup.sh deleted file mode 100755 index eda37f5..0000000 --- a/config/herbstluftwm/popup.sh +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | help () { | ||
| 4 | echo -e "Usage: popup.sh [OPTIONS]" | ||
| 5 | echo -e "Spawns a popup for a certain amount of time" | ||
| 6 | echo -e "" | ||
| 7 | echo -e "Options:" | ||
| 8 | echo -e " -m MESSAGE\t\tSpecifies message to be displayed" | ||
| 9 | echo -e " -t TIMEOUT\t\tAmount of time in seconds the popup is displayed" | ||
| 10 | echo -e " -u LEVEL\t\tUrgency level (info or high)" | ||
| 11 | } | ||
| 12 | |||
| 13 | dir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
| 14 | source "$dir/theme.sh" | ||
| 15 | |||
| 16 | timeout=10 | ||
| 17 | message="" | ||
| 18 | urgency="info" | ||
| 19 | |||
| 20 | while getopts ":m:t:x:y:w:h:u:" opt; do | ||
| 21 | case $opt in | ||
| 22 | m) message=$OPTARG ;; | ||
| 23 | t) timeout=$OPTARG ;; | ||
| 24 | u) urgency=$OPTARG ;; | ||
| 25 | esac | ||
| 26 | done | ||
| 27 | |||
| 28 | if test ! $message; then | ||
| 29 | help | ||
| 30 | else | ||
| 31 | |||
| 32 | bar_opts="-f $font,$font_sec -B $acolor_bg -F $acolor_fg -g ${popup_width}x${height}+${popup_x}+${popup_y} -u 2" | ||
| 33 | |||
| 34 | t=$(date +%T) | ||
| 35 | |||
| 36 | if [ $urgency == "info" ]; then | ||
| 37 | prefix="Info:" | ||
| 38 | elif [ $urgency == "high" ]; then | ||
| 39 | prefix="!!WARNING:" | ||
| 40 | fi | ||
| 41 | |||
| 42 | { | ||
| 43 | echo "%{F$acolor_accent} $prefix %{F$acolor_fg}$message %{F$acolor_fg}($t)%{F-}" | ||
| 44 | sleep $timeout | ||
| 45 | } | bar $bar_opts | ||
| 46 | fi | ||
diff --git a/config/herbstluftwm/start.sh b/config/herbstluftwm/start.sh deleted file mode 100755 index f10fca6..0000000 --- a/config/herbstluftwm/start.sh +++ /dev/null | |||
| @@ -1,13 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | opts=($@) | ||
| 4 | |||
| 5 | program=$(echo ${opts[0]} | sed 's/^.*\/\(.*\)/\1/') | ||
| 6 | |||
| 7 | if pgrep $program >> /dev/null | ||
| 8 | then | ||
| 9 | killall $program | ||
| 10 | ${opts[@]} & | ||
| 11 | else | ||
| 12 | ${opts[@]} & | ||
| 13 | fi | ||
diff --git a/config/herbstluftwm/theme.sh b/config/herbstluftwm/theme.sh deleted file mode 100644 index 34e22a7..0000000 --- a/config/herbstluftwm/theme.sh +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | # Get color from ~/.Xresources | ||
| 2 | get_x_color() { | ||
| 3 | xresources=$(cat ~/.Xresources) | ||
| 4 | color=$(echo $xresources | sed "s/.*\*color$1: \(#[0-9A-Fa-f]*\).*/\1/") | ||
| 5 | echo $color | ||
| 6 | } | ||
| 7 | |||
| 8 | # Add alpha channel to a hexadecimal color | ||
| 9 | add_alpha_channel(){ | ||
| 10 | echo "$1" | \ | ||
| 11 | sed "s/.*#\([0-9a-fA-F]*\).*/#ff\1/" | ||
| 12 | } | ||
| 13 | |||
| 14 | # Wallpaper | ||
| 15 | wallpaper="$HOME/.config/herbstluftwm/poligons.png" | ||
| 16 | |||
| 17 | # Padding | ||
| 18 | window_p=20 | ||
| 19 | |||
| 20 | # Panel | ||
| 21 | panel_h=24 | ||
| 22 | font="-*-fixed-medium-*-*-*-14-*-*-*-*-*-*-*" | ||
| 23 | font_sec="-*-stlarch-medium-*-*-*-10-*-*-*-*-*-*-*" | ||
| 24 | |||
| 25 | # Colors | ||
| 26 | color_fg=$(get_x_color 15) | ||
| 27 | color_accent=$(get_x_color 5) | ||
| 28 | color_bg=$(get_x_color 0) | ||
| 29 | |||
| 30 | # Alpha Colors for use with bar | ||
| 31 | acolor_fg=$(add_alpha_channel $color_fg) | ||
| 32 | acolor_accent=$(add_alpha_channel $color_accent) | ||
| 33 | acolor_bg=$(add_alpha_channel $color_bg) | ||
diff --git a/config/redshift.conf b/config/redshift.conf deleted file mode 100644 index 2b88434..0000000 --- a/config/redshift.conf +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | ; Global settings for redshift | ||
| 2 | [redshift] | ||
| 3 | ; Set the day and night screen temperatures | ||
| 4 | temp-day=6500 | ||
| 5 | temp-night=4200 | ||
| 6 | |||
| 7 | ; Enable/Disable a smooth transition between day and night | ||
| 8 | ; 0 will cause a direct change from day to night screen temperature. | ||
| 9 | ; 1 will gradually increase or decrease the screen temperature | ||
| 10 | transition=1 | ||
| 11 | |||
| 12 | ; Set the screen brightness. Default is 1.0 | ||
| 13 | ;brightness=0.9 | ||
| 14 | ; It is also possible to use different settings for day and night since version 1.8. | ||
| 15 | ;brightness-day=0.7 | ||
| 16 | ;brightness-night=0.4 | ||
| 17 | ; Set the screen gamma (for all colors, or each color channel individually) | ||
| 18 | gamma=0.8 | ||
| 19 | ;gamma=0.8:0.7:0.8 | ||
| 20 | |||
| 21 | ; Set the location-provider: 'geoclue', 'gnome-clock', 'manual' | ||
| 22 | ; type 'redshift -l list' to see possible values | ||
| 23 | ; The location provider settings are in a different section. | ||
| 24 | location-provider=manual | ||
| 25 | |||
| 26 | ; Set the adjustment-method: 'randr', 'vidmode' | ||
| 27 | ; type 'redshift -m list' to see all possible values | ||
| 28 | ; 'randr' is the preferred method, 'vidmode' is an older API | ||
| 29 | ; but works in some cases when 'randr' does not. | ||
| 30 | ; The adjustment method settings are in a different section. | ||
| 31 | adjustment-method=randr | ||
| 32 | |||
| 33 | ; Configuration of the location-provider: | ||
| 34 | ; type 'redshift -l PROVIDER:help' to see the settings | ||
| 35 | ; e.g. 'redshift -l manual:help' | ||
| 36 | [manual] | ||
| 37 | lat=52.6 | ||
| 38 | lon=5.1 | ||
| 39 | |||
| 40 | ; Configuration of the adjustment-method | ||
| 41 | ; type 'redshift -m METHOD:help' to see the settings | ||
| 42 | ; ex: 'redshift -m randr:help' | ||
| 43 | ; In this example, randr is configured to adjust screen 1. | ||
| 44 | ; Note that the numbering starts from 0, so this is actually the second screen. | ||
| 45 | [randr] | ||
| 46 | screen=0 | ||
