change look of i3 bar

This commit is contained in:
Mans Ziesel 2024-04-19 22:46:56 +02:00
parent b2b40a8196
commit bc1ad369e1
4 changed files with 62 additions and 42 deletions

View File

@ -414,7 +414,8 @@ exec --no-startup-id ~/.screenlayout/monitor.sh
# set wallpaper # set wallpaper
# exec --no-startup-id sleep 2 && nitrogen --restore # exec --no-startup-id sleep 2 && nitrogen --restore
exec --no-startup-id sleep 1 && feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png #exec --no-startup-id sleep 1 && feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png
#exec --no-startup-id sleep 1 && feh --bg-fill /usr/share/endeavouros/backgrounds/endeavouros-wallpaper.png
# set powersavings for display: # set powersavings for display:
exec --no-startup-id xset s 480 dpms 600 600 600 exec --no-startup-id xset s 480 dpms 600 600 600
@ -451,6 +452,7 @@ exec --no-startup-id /usr/bin/dunst
# exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md # exec --no-startup-id sleep 7 && firefox https://github.com/endeavouros-team/endeavouros-i3wm-setup/blob/main/force-knowledge.md
#exec --no-startup-id sleep 3 && thunar #exec --no-startup-id sleep 3 && thunar
exec --no-startup-id sleep 3 && spotify exec --no-startup-id sleep 3 && spotify
exec --no-startup-id sleep 3 && birdtray
# exec --no-startup-id sleep 3 && discord # exec --no-startup-id sleep 3 && discord
exec --no-startup-id sleep 3 && opensnitch-ui exec --no-startup-id sleep 3 && opensnitch-ui
exec --no-startup-id sleep 3 && obsidian exec --no-startup-id sleep 3 && obsidian
@ -468,7 +470,7 @@ exec --no-startup-id sleep 3 && obsidian
#exec --no-startup-id nm-applet #exec --no-startup-id nm-applet
# clipman-applet # clipman-applet
#exec --no-startup-id xfce4-clipman exec --no-startup-id xfce4-clipman
################## ##################
# floating rules # # floating rules #
@ -536,8 +538,8 @@ bar {
# it could be that you have no primary display set: set one (xrandr --output <output> --primary) # it could be that you have no primary display set: set one (xrandr --output <output> --primary)
# reference: https://i3wm.org/docs/userguide.html#_tray_output # reference: https://i3wm.org/docs/userguide.html#_tray_output
# tray_output primary tray_output primary
tray_padding 0 tray_padding 3
# When strip_workspace_numbers is set to yes, # When strip_workspace_numbers is set to yes,
# any workspace that has a name of the form # any workspace that has a name of the form

View File

@ -46,30 +46,30 @@ markup=pango
#command=~/.config/i3/scripts/openweather-city #command=~/.config/i3/scripts/openweather-city
#interval=1800 #interval=1800
#color=#7275b3 #color=#7275b3
#
# [terminal]
# full_text= 
# color=#807dfe
# command=i3-msg -q exec kitty
#
# [browser]
# full_text= 
# color=#ff7f81
# command=i3-msg -q exec librewolf
[terminal] # [files]
full_text=  # full_text= 
color=#807dfe # color=#7f3fbf
command=i3-msg -q exec xfce4-terminal # command=i3-msg -q exec thunar ~/
[browser]
full_text= 
color=#ff7f81
command=i3-msg -q exec firefox
[files]
full_text= 
color=#7f3fbf
command=i3-msg -q exec thunar ~/
#[mail] #[mail]
#full_text=  #full_text= 
#color=#dbcb75 #color=#dbcb75
#command=i3-msg -q exec thunderbird #command=i3-msg -q exec thunderbird
[simple-2] # [simple-2]
full_text=: : # full_text=::
color=#717171 # color=#717171
# Disk usage # Disk usage
# #
@ -77,7 +77,8 @@ color=#717171
# The script may be called with a optional argument to set the alert # The script may be called with a optional argument to set the alert
# (defaults to 10 for 10%). # (defaults to 10 for 10%).
[disk] [disk]
label= #label=
label=disk:
instance=/ instance=/
command=~/.config/i3/scripts/disk command=~/.config/i3/scripts/disk
interval=30 interval=30
@ -86,18 +87,20 @@ interval=30
# #
# The type defaults to "mem" if the instance is not specified. # The type defaults to "mem" if the instance is not specified.
[memory] [memory]
label= # label=
label=mem:
command=~/.config/i3/scripts/memory command=~/.config/i3/scripts/memory
interval=2 interval=2
[cpu_usage] [cpu_usage]
label= label=cpu:
# label=
command=~/.config/i3/scripts/cpu_usage command=~/.config/i3/scripts/cpu_usage
#min_width=CPU: 100.00% #min_width=CPU: 100.00%
interval=2 interval=2
[CPU-temperature] [CPU-temperature]
label= label=temp:
command=~/.config/i3/scripts/temperature command=~/.config/i3/scripts/temperature
interval=30 interval=30
#T_WARN=70 #T_WARN=70
@ -112,6 +115,9 @@ interval=30
#command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')" #command=echo "$(LANG=C nmcli d | grep connected | awk '{print $4}')"
#interval=30 #interval=30
[simple-2]
full_text=net:
[bandwidth] [bandwidth]
command=~/.config/i3/scripts/bandwidth2 command=~/.config/i3/scripts/bandwidth2
interval=persist interval=persist
@ -146,34 +152,42 @@ interval=1
#command=~/.config/i3/scripts/keyboard-layout #command=~/.config/i3/scripts/keyboard-layout
#interval=2 #interval=2
[keybindings] #[keybindings]
full_text= #full_text=
command=~/.config/i3/scripts/keyhint #command=~/.config/i3/scripts/keyhint
# power-profiles-daemon implementation: # power-profiles-daemon implementation:
# needs package power-profiles-daemon installed and the service running see here: # needs package power-profiles-daemon installed and the service running see here:
# https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon # https://wiki.archlinux.org/title/CPU_frequency_scaling#power-profiles-daemon
#set power-profile #set power-profile
[ppd_menu] #[ppd_menu]
full_text= #full_text=
command=~/.config/i3/scripts/power-profiles #command=~/.config/i3/scripts/power-profiles
color=#407437 #color=#407437
#Show the current power-profile #Show the current power-profile
[ppd-status] #[ppd-status]
command=~/.config/i3/scripts/ppd-status #command=~/.config/i3/scripts/ppd-status
interval=5 #interval=5
[simple-2]
full_text=::
color=#717171
[time] [time]
#label= #label=
command=date '+%a %d %b %H:%M:%S' command=date '+%a %d %b %H:%M:%S'
interval=1 interval=1
[simple-2]
full_text=::
color=#717171
[shutdown_menu] [shutdown_menu]
full_text= full_text=
command=~/.config/i3/scripts/powermenu command=~/.config/i3/scripts/powermenu
[simple-2] # [simple-2]
full_text=: : # full_text=::
color=#717171 # color=#717171

View File

@ -10,7 +10,8 @@ iface="${IFACE:-$iface}"
dt="${DT:-3}" dt="${DT:-3}"
unit="${UNIT:-MB}" unit="${UNIT:-MB}"
LABEL="${LABEL:-<span font='FontAwesome'> </span>}" # down arrow up arrow LABEL="${LABEL:-<span font='FontAwesome'> </span>}" # down arrow up arrow
printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}" printf_command="${PRINTF_COMMAND:-"printf \"%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}"
#printf_command="${PRINTF_COMMAND:-"printf \"${LABEL}%1.0f/%1.0f %s/s\\n\", rx, wx, unit;"}"
function default_interface { function default_interface {
ip route | awk '/^default via/ {print $5; exit}' ip route | awk '/^default via/ {print $5; exit}'

View File

@ -32,6 +32,7 @@ my $t_crit = $ENV{T_CRIT} || 90;
my $chip = $ENV{SENSOR_CHIP} || ""; my $chip = $ENV{SENSOR_CHIP} || "";
my $temperature = -9999; my $temperature = -9999;
my $label = "😀 "; my $label = "😀 ";
my $label = "😀 ";
sub help { sub help {
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n"; print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
@ -69,8 +70,10 @@ if ($temperature < 45) {
} else { } else {
$label = ''; $label = '';
} }
# Print short_text, full_text # Print short_text, full_text
print "${label}"; # print "${label}";
# print " $temperature°C\n";
print "$temperature°C\n"; print "$temperature°C\n";
print "${label}"; print "${label}";
print " $temperature°C\n"; print " $temperature°C\n";