lemonbar: Restructure and prettify lemonbar config file

This commit is contained in:
kuben
2019-08-07 17:59:45 +02:00
parent 871d189f43
commit 77288d1ee9

View File

@@ -1,45 +1,49 @@
import subprocess import subprocess
import getpass import getpass
# File locations
pid_file = '/tmp/i3_lemonbar_launcher.pid' pid_file = '/tmp/i3_lemonbar_launcher.pid'
fifo_file_status = '/tmp/i3_lemonbar1_{}'.format(getpass.getuser()) fifo_file_status = '/tmp/i3_lemonbar1_{}'.format(getpass.getuser())
fifo_file_executor= '/tmp/i3_lemonbar2_{}'.format(getpass.getuser()) fifo_file_executor = '/tmp/i3_lemonbar2_{}'.format(getpass.getuser())
fifo_screen_log = '/tmp/i3_screen_{}'.format(getpass.getuser())
health_file = '/tmp/i3_lemonbar_health.info' health_file = '/tmp/i3_lemonbar_health.info'
path="/home/kuba/.i3/lemonbar/" path="/home/kuba/.i3/lemonbar/"
logpath="/home/kuba/lemonbar.log" # Write here on exceptions logpath="/home/kuba/lemonbar.log" # Write here on exceptions
# color definitions
color_back = "#FF1D1F21" # Default background
color_fore = "#FFC5C8C6" # Default foreground
color_poweropts = "#FF620A00"
color_head = "#FFB5BD68" # Background for first element
color_sec_b1 = "#FF282A2E" # Background for section 1
color_sec_b2 = "#FF454A4F" # Background for section 2
color_sec_b3 = "#FF60676E" # Background for section 3
color_vga = "#FF3F8C0F"
color_hdmi = "#FFDD5435"
color_icon = "#FF979997" # For icons
color_cpu = "#FF5F819D" # Background color for cpu alert
color_net = "#FF5E8D87" # Background color for net alert
color_disable = "#FF1D1F21" # Foreground for disable elements
color_wsp = "#FF8C9440" # Background for selected workspace
# Lemonbar settings
geometry="x24" geometry="x24"
#font="xos4 Terminess Powerline:pixelsize=12:style=Bold"
#iconfont="-misc-font awesome 5 free-medium-r-normal--0-0-0-0-p-0-iso10646-1"
fonts = ["Hack:pixelsize=12" #":style=Bold" fonts = ["Hack:pixelsize=12" #":style=Bold"
,"Font Awesome 5 Free Solid:pixelsize=16" ,"Font Awesome 5 Free Solid:pixelsize=16"
,"Font Awesome 5 Brands:pixelsize=16"] ,"Font Awesome 5 Brands:pixelsize=16"]
cpu_alert = 75
net_alert = 5
# color definitions
color_back="#FF1D1F21" # Default background
color_fore="#FFC5C8C6" # Default foreground
color_poweropts = "#FF620A00"
color_head="#FFB5BD68" # Background for first element
color_sec_b1="#FF282A2E" # Background for section 1
color_sec_b2="#FF454A4F" # Background for section 2
color_sec_b3="#FF60676E" # Background for section 3
color_vga="#FF3F8C0F"
color_hdmi="#FFDD5435"
color_icon="#FF979997" # For icons
color_cpu="#FF5F819D" # Background color for cpu alert
color_net="#FF5E8D87" # Background color for net alert
color_disable="#FF1D1F21" # Foreground for disable elements
color_wsp="#FF8C9440" # Background for selected workspace
lemonbar_args = ['lemonbar', '-p', '-g', geometry, '-B', color_back lemonbar_args = ['lemonbar', '-p', '-g', geometry, '-B', color_back
, '-F', color_fore, '-a' '20'] , '-F', color_fore, '-a' '20']
for font in fonts: for font in fonts:
lemonbar_args.append('-f') lemonbar_args.append('-f')
lemonbar_args.append(font) lemonbar_args.append(font)
# Misc. settings
cpu_alert = 75
net_alert = 5
#default space between sections #default space between sections
#if [ ${res_w} -gt 1024 ]; then #if [ ${res_w} -gt 1024 ]; then
# stab=' ' # stab=' '
@@ -47,40 +51,40 @@ for font in fonts:
# stab=' ' # stab=' '
#fi #fi
# Char glyps for powerline fonts # Icon definitions
sep_left="" # Powerline separator left alt.  sep_left = "" # Powerline separator left alt. 
sep_right="" # Powerline separator right sep_right = "" # Powerline separator right
sep_l_left="" # Powerline light separator left sep_l_left = "" # Powerline light separator left
sep_l_right="" # Powerline light sepatator right sep_l_right = "" # Powerline light sepatator right
# Icon glyphs from Terminusicons2 # Icon glyphs from Terminusicons2
icon_clock="" # Clock icon icon_clock = "" # Clock icon
icon_cpu=""# " # CPU icon alt.  icon_cpu = "" # CPU icon
icon_mem="" # MEM icon icon_mem = "" # MEM icon
icon_dl="" # Download icon icon_dl = "" # Download icon
icon_ul="" # Upload icon icon_ul = "" # Upload icon
icon_vol="" # Volume icon icon_vol = "" # Volume icon
icon_vol_low="" # Volume icon icon_vol_low = "" # Volume icon
icon_vol_mute="" # Volume icon icon_vol_mute = "" # Volume icon
icon_hd=" [/]" # HD / icon icon_hd = " [/]" # HD / icon
icon_home=" [/home]" # HD /home icon icon_home = " [/home]" # HD /home icon
icon_mail="" # Mail icon icon_mail = "" # Mail icon
icon_chat="Ò" # IRC/Chat icon icon_chat = "Ò" # IRC/Chat icon
icon_music="Î" # Music icon icon_music = "Î" # Music icon
icon_prog="" # Window icon alt.  icon_prog = "" # Window icon alt. 
icon_contact="Á" # Contact icon icon_contact = "Á" # Contact icon
icon_wsp="" # Workspace icon icon_wsp = "" # Workspace icon
icon_wlan="" icon_wlan = ""
icon_eth="" icon_eth = ""
icon_lang="" icon_lang = ""
icon_keyset="" icon_keyset = ""
icon_bright="" icon_bright = ""
icon_brightness='' icon_brightness = ''
icon_charged=" " #alt.  icon_charged = ""
icon_charging="" #alt.  icon_charging = ""
icon_batt_0="" icon_batt_0 = ""
icon_batt_1="" icon_batt_1 = ""
icon_batt_2="" icon_batt_2 = ""
icon_batt_3="" icon_batt_3 = ""
icon_batt_4="" icon_batt_4 = ""
icon_bluetooth="" icon_bluetooth = ""