Cleanup Bar and i3 font

This commit is contained in:
Marco Thomas
2021-08-16 11:28:18 +02:00
parent b243f31473
commit 770186810c
8 changed files with 9 additions and 80 deletions

View File

@@ -1,5 +1,5 @@
set $mod Mod4 set $mod Mod4
font pango:SFMono Nerd Font Mono 11 font pango:Product Sans 11
# correct locking # correct locking
exec --no-startup-id xss-lock --transfer-sleep-lock -- lock.sh exec --no-startup-id xss-lock --transfer-sleep-lock -- lock.sh

View File

@@ -14,13 +14,13 @@ order += "tztime local"
order += "volume master" order += "volume master"
wireless _first_ { wireless _first_ {
format_up = "%essid" format_up = "📡 %essid"
format_down = "Disconnected" format_down = "📡 Disconnected"
} }
volume master { volume master {
format = "%volume | " format = "🔉 %volume"
format_muted = "Muted | " format_muted = "🔇 Muted"
device = "default" device = "default"
mixer = "Master" mixer = "Master"
mixer_idx = 0 mixer_idx = 0
@@ -28,7 +28,7 @@ volume master {
battery all { battery all {
last_full_capacity = true last_full_capacity = true
format = "%status %percentage" format = "🔋 %status %percentage"
format_down = "No Battery" format_down = "No Battery"
status_chr = "Charging" status_chr = "Charging"
status_bat = "Battery" status_bat = "Battery"
@@ -39,6 +39,6 @@ battery all {
} }
tztime local { tztime local {
format = "%time" format = "📅 %time"
format_time = "%a %-d %b %H:%M" format_time = "%a %-d %b %H:%M"
} }

View File

@@ -50,7 +50,7 @@ set scrolloff=5 " min lines above or below the cursor
set laststatus=0 " i dont need a statusline set laststatus=0 " i dont need a statusline
set showtabline=0 " i dont need tabs set showtabline=0 " i dont need tabs
"============================== Indents and Whitespaces " ============================== Indents and Whitespaces
set list set list
set listchars=tab:──\ ,extends:,precedes:,nbsp,trail set listchars=tab:──\ ,extends:,precedes:,nbsp,trail
set fillchars+=vert:\ "don't draw verticle split set fillchars+=vert:\ "don't draw verticle split

View File

@@ -1,7 +0,0 @@
#!/bin/sh
if [ -f "/sys/class/power_supply/BAT0/capacity" ];then
echo $(cat /sys/class/power_supply/BAT0/capacity)%
else
echo 100%
fi

View File

@@ -1,9 +0,0 @@
#!/bin/sh
if [ -f "/sys/class/net/enp24s0/carrier" ]; then
echo "LAN connected"
elif [ -f "/sys/class/net/wlo1/carrier" ]; then
echo "$(nmcli -t -f active,ssid, dev wifi | egrep '^yes' | cut -d\' -f2 | cut -d ':' -f2)"
else
echo "No network"
fi

View File

@@ -1,37 +0,0 @@
#!/bin/sh
function scroll () {
prefix="$1"
scrolling="$2"
temp="$(echo "$scrolling"| sed "s/^\(.\{20\}\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$//")"
suffix="$3"
if [ "$(echo -n $scrolling |wc -c)" -gt 30 ]; then
echo "${prefix}${temp}${suffix}"
sleep 0.5
zscroll -l 30 \
--delay 0.2 \
--before-text "$prefix" \
--after-text "$suffix" \
--scroll-padding " " \
--update-check true "echo '$(get_title)'" &
wait
else
echo "$prefix $temp $suffix"
fi
} #
function get_artist () {
echo "$(playerctl -p spotify metadata --format "{{ artist }}"| sed -e "s/[[(]....*[])]*//g" | sed "s/ *$//"| sed "s/^\(.\{20\}[^ ]*\)\(.*\)$/\1[\2]/"| sed "s/\[ *\]$//"| sed "s/\[.*\]$/.../")"
} #
function get_title () {
echo "$(playerctl -p spotify metadata --format "{{title}}" | sed 's/'\''/\\'\''/g')"
} #
[ ! -z "$(playerctl -p spotify status 2>/dev/null)" ] \
&& artist=$(get_artist) \
&& title=$(get_title) \
&& ([ -z "$artist$title" ] && scroll "" "Spotify is not connected on this pc" "" || scroll "$title - $artist" ) \
|| exit 1

View File

@@ -1,18 +0,0 @@
#!/bin/sh
SINK=$(pactl list short sinks | grep -n RUNNING | cut -d":" -f1)
if [ "$SINK" = "" ]; then
SINK=1
fi
NOW=$( pactl list sinks | grep '^[[:space:]]Volume:' | head -n $SINK | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' )
MUTE=$(pactl list sinks | grep '^[[:space:]]Mute:'| head -n $SINK | tail -n 1 | awk -F ":" '{print $2}'| xargs)
if [ "$MUTE" = "yes" ]; then
echo "Muted"
else
echo "$NOW%"
fi
case $BLOCK_BUTTON in
1) setsid -f st -c stpulse -n stpulse -e ncpamixer ;;
esac