-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
430 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#! /bin/sh | ||
##+ decoration | ||
bspc config border_width 0 | ||
bspc config window_gap 8 | ||
bspc config top_padding 50 | ||
bspc config left_padding 50 | ||
bspc config bottom_padding 50 | ||
bspc config right_padding 50 | ||
|
||
##+ colors | ||
bspc config focused_border_color "#202020" | ||
bspc config normal_border_color "#202020" | ||
bspc config active_border_color "#3C788C" | ||
bspc config focused_locked_border_color "#00C7D8" | ||
bspc config normal_locked_border_color "#708D8F" | ||
bspc config active_locked_border_color "#808C8D" | ||
bspc config urgent_border_color "#93F388" | ||
bspc config presel_border_color "#101010" | ||
|
||
##+ Configuration | ||
bspc config split_ratio 0.52 | ||
bspc config borderless_monocle true | ||
bspc config gapless_monocle true | ||
bspc config focus_by_distance true | ||
|
||
|
||
##+ Monitor Number | ||
bspc monitor -d I II III IV V | ||
|
||
##+ Per-apps setup | ||
bspc rule -a Gimp desktop=^8 follow=on floating=on | ||
bspc rule -a Screenkey manage=off | ||
bspc rule -a urxvt desktop=^2 follow=on | ||
bspc rule -a sublime_text desktop=^2 follow=on | ||
bspc rule -a firefox desktop=^1 follow=on floating=on | ||
bspc rule -a thunar desktop=^1 follow=on floating=on | ||
bspc rule -a pcmanfm desktop=^1 follow=on floating=on | ||
bspc rule -a steam desktop=^3 floating=on | ||
bspc rule -a vlc desktop=^3 | ||
|
||
feh --bg-fill ~/Pictures/wallhaven-13142.jpg & | ||
firefox & | ||
urxvt & | ||
bar_panel & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Fonts defined in xfontsel (xft not yet supported) | ||
FONT1="-*-stlarch-*-*-*-*-*-*-*-*-*-*-*" | ||
FONT2="-xos4-terminus-*-r-normal-*-12-120-72-72-c-60-iso8859-1" | ||
|
||
COLOR_BACKGROUND="#EE1b1b1b" | ||
COLOR_FOREGROUND="#ffc0b18b" | ||
#COLOR_ICON="#FF775759" | ||
COLOR_ICON="#ffaf865a" | ||
COLOR_ACTIVE="#FFaf865a" | ||
COLOR_OCCUPIED="#FF4A3637" | ||
COLOR_URGENT="#FFd17b49" | ||
GREEN=8c9440 | ||
GRAY=404040 | ||
|
||
function F { | ||
echo -n "%{F#ff$2}$1%{F-}" | ||
} | ||
|
||
DIV=$(F '|' $GRAY) | ||
|
||
# Height of underlines / overlines | ||
LINEHEIGHT="3" | ||
|
||
# Panel geometry | ||
PANEL_HEIGHT=22 | ||
PANEL_WIDTH=3430 | ||
PANEL_GEOMETRY="${PANEL_WIDTH}x${PANEL_HEIGHT}+5+5" | ||
|
||
# Notification geometry | ||
NOTIFY_HEIGHT=$PANEL_HEIGHT | ||
NOTIFY_WIDTH=135 | ||
NOTIFY_GEOMETRY="${NOTIFY_WIDTH}x${NOTIFY_HEIGHT}+0+0" | ||
|
||
# Duration of notifications | ||
DURATION=2 | ||
|
||
# Monitor to display panel on | ||
MONITOR="$(bspc query -M | tail -n1)" | ||
|
||
# Volume change clip | ||
CLIP="/usr/share/sounds/freedesktop/stereo/audio-volume-change.oga" | ||
# Length of volume bar | ||
BAR_LENGTH=20 | ||
BAR_CHAR='=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
top -bn1 | grep load | awk '{printf "%.2f\n", $(NF-2)}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
|
||
FOCUS_DESKTOP=1 | ||
MOVE_DESKTOP=2 | ||
|
||
err() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
usage() { | ||
echo "usage: execute_panel [command] [value]" | ||
echo | ||
echo "Options:" | ||
echo " -f, --focus-desktop - switch to desktop name" | ||
echo " -d, --move-desktop - move to desktop name" | ||
echo " -h, --help - display this" | ||
exit | ||
} | ||
|
||
case $1 in | ||
'-f'|'--focus-desktop') | ||
[ -z "$2" ] && err "No desktop name specified" | ||
COMMAND=$FOCUS_DESKTOP | ||
ARGN="${2}" | ||
;; | ||
'-d'|'--move-desktop') | ||
[ -z "$2" ] && err "No desktop name specified" | ||
COMMAND=$MOVE_DESKTOP | ||
ARGN="${2}" | ||
;; | ||
''|'-h'|'--help'|*) | ||
usage | ||
exit | ||
;; | ||
esac | ||
|
||
# Ensure the command is something we want to run | ||
case $COMMAND in | ||
$FOCUS_DESKTOP) | ||
bspc config auto_alternate false | ||
bspc desktop -f $ARGN | ||
bspc config auto_alternate true | ||
;; | ||
$MOVE_DESKTOP) | ||
bspc desktop -d $ARGN | ||
;; | ||
*) | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
source $(dirname $0)/config | ||
|
||
(echo " $@"; sleep $DURATION)\ | ||
| bar \ | ||
-f "$FONT1","$FONT2"\ | ||
-F "$COLOR_FOREGROUND"\ | ||
-B "$COLOR_BACKGROUND"\ | ||
-g "$NOTIFY_GEOMETRY"\ | ||
-u $LINEHEIGHT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
|
||
source $(dirname $0)/config | ||
|
||
# Only run if mpd is running | ||
if [ $(pgrep -cx mpd) -eq 0 ] ; then | ||
exit 1 | ||
fi | ||
|
||
err() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
usage() { | ||
echo "usage: notify_mpd [option]" | ||
echo | ||
echo "Options:" | ||
echo " -n, --next - next track" | ||
echo " -p, --prev - previous track" | ||
echo " -t, --toggle - toggle pause" | ||
echo " -d, --daemon - listen for track changes through mpd frontends" | ||
echo " -h, --help - display this" | ||
exit | ||
} | ||
|
||
|
||
notify() { | ||
$(dirname $0)/notify "$@" & | ||
} | ||
|
||
state() { | ||
mpc | sed -n 's/^.*\[\([^\[].*\)\] .*$/\1/p' | uniq | ||
} | ||
|
||
case $1 in | ||
'-p'|'--prev') | ||
mpc prev | ||
icon= | ||
;; | ||
'-n'|'--next') | ||
mpc next | ||
icon= | ||
;; | ||
'-t'|'--toggle') | ||
mpc toggle | ||
if [[ `state` == 'paused' ]]; then | ||
icon= | ||
elif [[ `state` == 'playing' ]]; then | ||
icon= | ||
fi | ||
;; | ||
'-d'|'--daemon') | ||
while true; do | ||
infos=$(mpc current --wait) | ||
notify $infos | ||
done | ||
;; | ||
''|'-h'|'--help') | ||
usage | ||
;; | ||
*) | ||
err "Unrecognized option \`$1', see notify_mpd --help" | ||
esac | ||
|
||
notify $icon $(mpc current) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/sh | ||
# | ||
# Inspired by : | ||
# z3bra - http://blog.z3bra.org/2014/04/pop-it-up.html | ||
# bruenig - https://bbs.archlinux.org/viewtopic.php?id=46608 | ||
|
||
source $(dirname $0)/config | ||
|
||
err() { | ||
echo "$1" | ||
exit 1 | ||
} | ||
|
||
usage() { | ||
echo "usage: notify_volume [option] [argument]" | ||
echo | ||
echo "Options:" | ||
echo " +, -i, --increase - increase volume by \`argument'" | ||
echo " -, -d, --decrease - decrease volume by \`argument'" | ||
echo " +, -i, --toggle - mute/unmute" | ||
echo " -h, --help - display this" | ||
exit | ||
} | ||
|
||
|
||
level() { | ||
amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq | ||
} | ||
|
||
state() { | ||
amixer get Master | sed -n 's/^.*\[\(o[nf]\+\)]$/\1/p' | uniq | ||
} | ||
|
||
case $1 in | ||
'+'|'-i'|'--increase') | ||
[ -z "$2" ] && err "No argument specified for increase" | ||
AMIXARG="${2}%+" | ||
;; | ||
'-'|'-d'|'--decrease') | ||
[ -z "$2" ] && err "No argument specified for decrease." | ||
AMIXARG="${2}%-" | ||
;; | ||
'!'|'-t'|'--toggle') | ||
AMIXARG="toggle" | ||
;; | ||
''|'-h'|'--help') | ||
usage | ||
;; | ||
*) | ||
err "Unrecognized option \`$1', see notify_volume --help" | ||
esac | ||
|
||
amixer set Master $AMIXARG >/dev/null | ||
|
||
if [[ `state` != "on" ]]; then | ||
icon="" | ||
elif [[ `level` -lt 30 ]]; then | ||
icon="" | ||
else | ||
icon="" | ||
fi | ||
|
||
steps=$(echo "100/$BAR_LENGTH" | bc) | ||
current=$(echo "`level`/$steps" | bc) | ||
for i in `seq 1 $BAR_LENGTH`; | ||
do | ||
if [[ `state` != "on" ]]; then | ||
bar+=" " | ||
elif [ $i -lt $current ]; then | ||
bar+="%{F$COLOR_ACTIVE}${BAR_CHAR}%{F-}" | ||
else | ||
bar+="%{F$COLOR_OCCUPIED}${BAR_CHAR}%{F-}" | ||
fi | ||
done | ||
|
||
$(dirname $0)/notify "%{F$COLOR_ICON}$icon%{F-} [$bar]"& | ||
mplayer "$CLIP" >/dev/null& |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /bin/sh | ||
|
||
cd $(dirname $0) | ||
source $(dirname $0)/config | ||
|
||
if [ $(pgrep -cx panel) -gt 1 ] ; then | ||
printf "%s\n" "The panel is already running." >&2 | ||
exit 1 | ||
fi | ||
|
||
trap 'trap - TERM; kill 0' INT TERM QUIT EXIT | ||
|
||
[ -e "$PANEL_FIFO" ] && rm "$PANEL_FIFO" | ||
mkfifo "$PANEL_FIFO" | ||
|
||
bspc control --subscribe > "$PANEL_FIFO" & | ||
echo "T" > "$PANEL_FIFO" & | ||
conky -c ./panel_conky > "$PANEL_FIFO" & | ||
./notify_mpd -d & | ||
|
||
cat "$PANEL_FIFO" \ | ||
| ./panel_bar \ | ||
| lemonbar \ | ||
-f "$FONT1"\ | ||
-f "$FONT2"\ | ||
-F "$COLOR_FOREGROUND"\ | ||
-B "$COLOR_BACKGROUND"\ | ||
-g "$PANEL_GEOMETRY"\ | ||
-u $LINEHEIGHT & | ||
wait |
Oops, something went wrong.