Commit f6958966 authored by epsi sayidina's avatar epsi sayidina

herbstluftwm: dzen2 themes

parent 8d962026
#!/usr/bin/env bash
~/.config/herbstluftwm/bash/autostart.dzen2.sh
~/.config/herbstluftwm/bash/autostart.sh
# ~/.config/herbstluftwm/dotshare736/autostart.sh
#!/usr/bin/env bash
# this is a simple config for herbstluftwm
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
hc() {
# http://www.thegeekstuff.com/2010/05/bash-shell-special-parameters/
herbstclient "$@"
}
# I don't know what it means. It might be reset or something
# emit_hook ARGS ...
# Emits a custom hook to all idling herbstclients.
hc emit_hook reload
# gap counter
echo 35 > /tmp/herbstluftwm-gap
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# google material colors
. ~/.config/herbstluftwm/bash/assets/gmc.sh
xsetroot -solid "$colBlue500"
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# helpers
. ~/.config/herbstluftwm/bash/helper.sh
hlc_keybindings
hlc_tags
hlc_theme
hlc_rules
# deprecated, use nitrogen instead
# hlc_feh_wallpaper
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# unlock, just to be sure
hc unlock
#hc set tree_style '╾│ ├└╼─┐'
hc set tree_style '⊙│ ├╰»─╮'
# do multi monitor setup here, e.g.:
# hc set_monitors 1280x1024+0+0 1280x1024+1280+0
# or simply:
# hc detect_monitors
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# find the panel
panel=~/.config/herbstluftwm/bash/lemonbar/panel.sh
[ -x "$panel" ] || panel=/etc/xdg/herbstluftwm/panel.sh
for monitor in $(herbstclient list_monitors | cut -d: -f1) ; do
# start it on each monitor
"$panel" $monitor &
done
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# $ man herbstluftwm
hc lock
# tag number 5
hc floating 5 on
hc unlock
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# load on startup
if hc silent new_attr bool my_not_first_autostart ; then
. ~/.config/herbstluftwm/bash/startup.sh
fi
......@@ -50,9 +50,9 @@
# to do
# bright and dark
# restructure by theme
# bg fg terbalik (standarisasi penulisan)
# slow process
# lemonbar: powerline arrow, clickable, system tray
......
......@@ -34,6 +34,27 @@ event_generator_bottom() {
# player (mpd)
mpc idleloop player &
local mpc_pid=$!
# host
while true ; do
evHost
sleep 1h || break
done &
local host_pid=$!
# cpu
while true ; do
evCPU
sleep 3 || break
done &
local cpu_pid=$!
# net
while true ; do
evNet
sleep 7 || break
done &
local net_pid=$!
# batch
while true ; do
......@@ -44,8 +65,7 @@ event_generator_bottom() {
evSSID
evNet
evUptime
evHost
sleep 1 || break
sleep 1m || break
done &
local batch_pid=$!
......@@ -60,7 +80,7 @@ event_generator_bottom() {
hc --idle
# exiting; kill stray event-emitting processes
kill $mpc_pid $batch_pid
kill $mpc_pid $host_id $cpu_id $net_id $batch_pid
# kill $updates_pid
}
......@@ -122,6 +142,7 @@ handle_cmd_event() {
# find out event origin
case "${cmd[0]}" in
reload)
pkill dzen2
exit
;;
quit_panel)
......
#!/usr/bin/env bash
init_theme() {
case $theme in
'bright-arrow')
. ~/.config/herbstluftwm/bash/dzen2/themes/bright-arrow.sh
;;
'dark-arrow')
. ~/.config/herbstluftwm/bash/dzen2/themes/dark-arrow.sh
;;
'bright-colorful')
. ~/.config/herbstluftwm/bash/dzen2/themes/bright-colorful.sh
;;
*) # 'dark-colorful'
. ~/.config/herbstluftwm/bash/dzen2/themes/dark-colorful.sh
;;
esac
init_theme() {
theme_config_default=~/.config/herbstluftwm/bash/dzen2/themes/dark-colorful.sh
theme_config=~/.config/herbstluftwm/bash/dzen2/themes/${theme}.sh
[ -x "$theme_config" ] || theme_config=$theme_config_default
. $theme_config
}
......
......@@ -2,6 +2,14 @@
hc() { "${herbstclient_command[@]:-herbstclient}" "$@" ;}
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# theme
# Four themes: [ 'dark-colorful', 'bright-colorful', 'dark-arrow', 'bright-arrow' ]
theme='bright-arrow'
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
# geometry calculation
monitor=${1:-0}
......@@ -55,7 +63,7 @@ dzen2_bottom_parameters+=" -title-name dzenbottom"
# 2> /dev/null
event_generator_top 2> /dev/null | generated_output_top 2> /dev/null | dzen2 $dzen2_top_parameters \
-e 'button3=;button4=exec:herbstclient use_index -1;button5=exec:herbstclient use_index +1' &
-e 'button3=;button4=exec:herbstclient use_index -1;button5=exec:herbstclient use_index +1' &
event_generator_bottom 2> /dev/null | generated_output_bottom 2> /dev/null | dzen2 $dzen2_bottom_parameters &
......
......@@ -54,8 +54,10 @@ setWindowtitle() {
case $theme in
'bright-arrow')
segmentWindowtitle=" $icon ^bg()^fg($colGrey700) $1"
;;
'dark-arrow')
segmentWindowtitle=" $icon ^bg()^fg($colGrey500) $1"
;;
'bright-colorful')
segmentWindowtitle=" $icon ^bg()^fg($colGrey700) $1"
......@@ -69,7 +71,7 @@ setWindowtitle() {
setMPD() {
case $theme in
'bright-arrow')
local format="^fg(#$colGrey900)[%artist% ^fg()- ]^fg(#$colYellow500)[%title%]"
local format="^fg(#$colGrey900)[%artist% ^fg()- ]^fg(#$colGrey300)[%title%]"
;;
'dark-arrow')
local format="^fg(#$colGrey100)[%artist% ^fg()- ]^fg(#$colYellow500)[%title%]"
......
......@@ -54,23 +54,23 @@ theme_tagmark_post() {
theme_leftside_bottom() {
local left=""
left+=" ^fg($colRed900)^bg($colRed800)$right_hard_arrow"
left+=" $segmentHost "
left+=" ^fg($colRed800)^bg($colRed700)$right_hard_arrow"
left+=" $segmentVolume "
left+=" ^fg($colRed700)^bg($colRed600)$right_hard_arrow"
left+=" $segmentMemory "
left+=" ^fg($colRed600)^bg($colRed500)$right_hard_arrow"
left+=" $segmentDisk "
left+=" ^fg($colRed500)^bg($colRed400)$right_hard_arrow"
left+=" $segmentCPU "
left+=" ^fg($colRed400)^bg($colRed300)$right_hard_arrow"
left+=" $segmentSSID "
left+=" ^fg($colRed300)^bg($colRed200)$right_hard_arrow"
left+=" $segmentNet "
left+=" ^fg($colRed200)^bg($colRed100)$right_hard_arrow"
# left+=" $segmentUpdates "
left+=" ^fg($colRed100)^bg($colWhite)$right_hard_arrow"
left+=" ^bg($colRed800)^fg($colRed900)$right_hard_arrow"
left+=" $segmentHost $right_soft_arrow"
left+=" ^bg($colRed700)^fg($colRed800)$right_hard_arrow"
left+=" $segmentVolume $right_soft_arrow"
left+=" ^bg($colRed600)^fg($colRed700)$right_hard_arrow"
left+=" $segmentMemory $right_soft_arrow"
left+=" ^bg($colRed500)^fg($colRed600)$right_hard_arrow"
left+=" $segmentDisk $right_soft_arrow"
left+=" ^bg($colRed400)^fg($colRed500)$right_hard_arrow"
left+=" $segmentCPU $right_soft_arrow"
left+=" ^bg($colRed300)^fg($colRed400)$right_hard_arrow"
left+=" $segmentSSID $right_soft_arrow"
left+=" ^bg($colRed200)^fg($colRed300)$right_hard_arrow"
left+=" $segmentNet $right_soft_arrow"
left+=" ^bg($colRed100)^fg($colRed200)$right_hard_arrow"
# left+=" $segmentUpdates $right_soft_arrow"
left+=" ^bg($colWhite)^fg($colRed100)$right_hard_arrow"
echo -n $left
}
......@@ -78,23 +78,23 @@ theme_leftside_bottom() {
theme_rightside_top() {
# do not local $right
right=""
right+="^fg($colRed100)^bg($colWhite)$left_hard_arrow"
right+="^bg($colRed100) "
right+="^fg($colRed200)^bg($colRed100)$left_hard_arrow"
right+="^bg($colRed200) "
right+="^fg($colRed300)^bg($colRed200)$left_hard_arrow"
right+="^bg($colRed300) "
right+="^fg($colRed400)^bg($colRed300)$left_hard_arrow"
right+="^bg($colRed400) "
right+="^fg($colRed500)^bg($colRed400)$left_hard_arrow"
right+="^bg($colRed500) "
right+="^fg($colRed600)^bg($colRed500)$left_hard_arrow"
right+="^bg($colRed600) "
right+="^fg($colRed700)^bg($colRed600)$left_hard_arrow"
right+="^bg($colRed700) "
right+="^fg($colRed800)^bg($colRed700)$left_hard_arrow"
right+="^bg($colRed800)$segmentDate "
right+="^fg($colRed900)^bg($colRed800)$left_hard_arrow"
right+="^bg($colWhite)^fg($colRed100)$left_hard_arrow"
right+="^bg($colRed100) $left_soft_arrow"
right+="^bg($colRed100)^fg($colRed200)$left_hard_arrow"
right+="^bg($colRed200) $left_soft_arrow"
right+="^bg($colRed200)^fg($colRed300)$left_hard_arrow"
right+="^bg($colRed300) $left_soft_arrow"
right+="^bg($colRed300)^fg($colRed400)$left_hard_arrow"
right+="^bg($colRed400) $left_soft_arrow"
right+="^bg($colRed400)^fg($colRed500)$left_hard_arrow"
right+="^bg($colRed500) $left_soft_arrow"
right+="^bg($colRed500)^fg($colRed600)$left_hard_arrow"
right+="^bg($colRed600) $left_soft_arrow"
right+="^bg($colRed600)^fg($colRed700)$left_hard_arrow"
right+="^bg($colRed700) $left_soft_arrow"
right+="^bg($colRed700)^fg($colRed800)$left_hard_arrow"
right+="^bg($colRed800)$segmentDate $left_soft_arrow"
right+="^bg($colRed800)^fg($colRed900)$left_hard_arrow"
right+="^bg($colRed900) ."
rightside_space 0
......@@ -105,23 +105,23 @@ theme_rightside_top() {
theme_rightside_bottom() {
# do not local $right
right=""
right+="^fg($colRed100)^bg($colWhite)$left_hard_arrow"
right+="^bg($colWhite)^fg($colRed100)$left_hard_arrow"
right+="^bg($colRed100) "
right+="^fg($colRed200)^bg($colRed100)$left_hard_arrow"
right+="^bg($colRed100)^fg($colRed200)$left_hard_arrow"
right+="^bg($colRed200) "
right+="^fg($colRed300)^bg($colRed200)$left_hard_arrow"
right+="^bg($colRed200)^fg($colRed300)$left_hard_arrow"
right+="^bg($colRed300) "
right+="^fg($colRed400)^bg($colRed300)$left_hard_arrow"
right+="^bg($colRed300)^fg($colRed400)$left_hard_arrow"
right+="^bg($colRed400) "
right+="^fg($colRed500)^bg($colRed400)$left_hard_arrow"
right+="^bg($colRed400)^fg($colRed500)$left_hard_arrow"
right+="^bg($colRed500) "
right+="^fg($colRed600)^bg($colRed500)$left_hard_arrow"
right+="^bg($colRed500)^fg($colRed600)$left_hard_arrow"
right+="^bg($colRed600) "
right+="^fg($colRed700)^bg($colRed600)$left_hard_arrow"
right+="^bg($colRed600)^fg($colRed700)$left_hard_arrow"
right+="^bg($colRed700)$segmentUptime "
right+="^fg($colRed800)^bg($colRed700)$left_hard_arrow"
right+="^bg($colRed700)^fg($colRed800)$left_hard_arrow"
right+="^bg($colRed800)$segmentMPD "
right+="^fg($colRed900)^bg($colRed800)$left_hard_arrow"
right+="^bg($colRed800)^fg($colRed900)$left_hard_arrow"
right+="^bg($colRed900) ."
rightside_space 0
......
File mode changed from 100644 to 100755
......@@ -54,23 +54,23 @@ theme_tagmark_post() {
theme_leftside_bottom() {
local left=""
left+=" ^fg($colBlue100)^bg($colBlue200)$right_hard_arrow"
left+=" ^bg($colBlue200)^fg($colBlue100)$right_hard_arrow"
left+=" $segmentHost "
left+=" ^fg($colBlue200)^bg($colBlue300)$right_hard_arrow"
left+=" ^bg($colBlue300)^fg($colBlue200)$right_hard_arrow"
left+=" $segmentVolume "
left+=" ^fg($colBlue300)^bg($colBlue400)$right_hard_arrow"
left+=" ^bg($colBlue400)^fg($colBlue300)$right_hard_arrow"
left+=" $segmentMemory "
left+=" ^fg($colBlue400)^bg($colBlue500)$right_hard_arrow"
left+=" ^bg($colBlue500)^fg($colBlue400)$right_hard_arrow"
left+=" $segmentDisk "
left+=" ^fg($colBlue500)^bg($colBlue600)$right_hard_arrow"
left+=" ^bg($colBlue600)^fg($colBlue500)$right_hard_arrow"
left+=" $segmentCPU "
left+=" ^fg($colBlue600)^bg($colBlue700)$right_hard_arrow"
left+=" ^bg($colBlue700)^fg($colBlue600)$right_hard_arrow"
left+=" $segmentSSID "
left+=" ^fg($colBlue700)^bg($colBlue800)$right_hard_arrow"
left+=" ^bg($colBlue800)^fg($colBlue700)$right_hard_arrow"
left+=" $segmentNet "
left+=" ^fg($colBlue800)^bg($colBlue900)$right_hard_arrow"
left+=" ^bg($colBlue900)^fg($colBlue800)$right_hard_arrow"
# left+=" $segmentUpdates "
left+=" ^fg($colBlue900)^bg($colBlack)$right_hard_arrow"
left+=" ^bg($colBlack)^fg($colBlue900)$right_hard_arrow"
echo -n $left
}
......@@ -78,11 +78,11 @@ theme_leftside_bottom() {
theme_rightside_top() {
# do not local $right
right=""
right+="^fg($colBlue600)^bg($colBlack) $left_hard_arrow"
right+="^bg($colBlack)^fg($colBlue600) $left_hard_arrow"
right+="^bg($colBlue600) "
right+="^fg($colBlack)^bg($colBlue600) $left_hard_arrow"
right+="^bg($colBlue600)^fg($colBlack) $left_hard_arrow"
right+="^bg($colBlack)$segmentDate "
right+="^fg($colBlue400)^bg($colBlack) $left_hard_arrow"
right+="^bg($colBlack)^fg($colBlue400) $left_hard_arrow"
right+="^bg($colBlue400) ."
rightside_space -10
......@@ -93,23 +93,23 @@ theme_rightside_top() {
theme_rightside_bottom() {
# do not local $right
right=""
right+="^fg($colBlue900)^bg($colBlack)$left_hard_arrow"
right+="^bg($colBlack)^fg($colBlue900)$left_hard_arrow"
right+="^bg($colBlue900)$segmentUptime "
right+="^fg($colBlue800)^bg($colBlue900)$left_hard_arrow"
right+="^bg($colBlue900)^fg($colBlue800)$left_hard_arrow"
right+="^bg($colBlue800) "
right+="^fg($colBlue700)^bg($colBlue800)$left_hard_arrow"
right+="^bg($colBlue800)^fg($colBlue700)$left_hard_arrow"
right+="^bg($colBlue700) "
right+="^fg($colBlue600)^bg($colBlue700)$left_hard_arrow"
right+="^bg($colBlue700)^fg($colBlue600)$left_hard_arrow"
right+="^bg($colBlue600) "
right+="^fg($colBlue500)^bg($colBlue600)$left_hard_arrow"
right+="^bg($colBlue600)^fg($colBlue500)$left_hard_arrow"
right+="^bg($colBlue500) "
right+="^fg($colBlue400)^bg($colBlue500)$left_hard_arrow"
right+="^bg($colBlue500)^fg($colBlue400)$left_hard_arrow"
right+="^bg($colBlue400) "
right+="^fg($colBlue300)^bg($colBlue400)$left_hard_arrow"
right+="^bg($colBlue400)^fg($colBlue300)$left_hard_arrow"
right+="^bg($colBlue300) "
right+="^fg($colBlack)^bg($colBlue300)$left_hard_arrow"
right+="^bg($colBlue300)^fg($colBlack)$left_hard_arrow"
right+="^bg($colBlack)$segmentMPD "
right+="^fg($colBlue100)^bg($colBlack)$left_hard_arrow"
right+="^bg($colBlack)^fg($colBlue100)$left_hard_arrow"
right+="^bg($colBlue100) ."
rightside_space 0
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -5,8 +5,6 @@ tag_shows=( "一 ichi" "二 ni" "三 san" "四 shi"
# Four themes: [ 'dark-colorful', 'bright-colorful', 'dark-arrow', 'bright-arrow' ]
theme='bright-arrow'
# initial
if [ -z $theme ]
then
......@@ -15,14 +13,6 @@ then
# dzen panel color
bgcolor=$colBlack
fgcolor=$colWhite
# default theme
separator="^bg()^fg($colWhite)|^bg()^fg()"
preIcon="^fg($colYellow500)$FontAwesome"
postIcon="^fn()^fg()"
labelColor="^fg($colGrey700)"
valueColor="^fg($colBlue300)"
fi
# ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----
......
......@@ -150,13 +150,13 @@ hlc_theme() {
hca theme.tiling.reset 1
hca theme.floating.reset 1
hcs frame_border_active_color $colGrey800
hcs frame_border_active_color $colGrey200
# hcs frame_bg_active_color '#345F0C'
hcs frame_bg_active_color $colYellow900
hcs frame_border_normal_color $colGrey900
hcs frame_border_normal_color $colGrey50
# hcs frame_bg_normal_color '#565656'
hcs frame_bg_normal_color $colBlue500
hcs frame_bg_normal_color $colRed500
# hcs frame_border_width 1
hcs frame_border_width 0
......@@ -166,23 +166,23 @@ hlc_theme() {
hcs frame_bg_transparent 1
# hcs frame_transparent_width 5
hcs frame_transparent_width 1
hcs frame_transparent_width 2
# hcs frame_gap 4
hcs frame_gap 10
# hca theme.active.color '#9fbc00'
# hca theme.normal.color '#454545'
hca theme.active.color $colBlue500
hca theme.normal.color $colGrey800
hca theme.urgent.color orange
hca theme.active.color $colRed500
hca theme.normal.color $colGrey200
hca theme.urgent.color $colPink500
#hca theme.inner_width 1
hca theme.inner_width 0
hca theme.inner_color black
# hca theme.border_width 3
hca theme.border_width 1
hca theme.border_width 2
hca theme.floating.border_width 4
hca theme.floating.outer_width 1
hca theme.floating.outer_color black
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment