tmp
This commit is contained in:
@@ -1,2 +1,10 @@
|
||||
#!/usr/bin/env fish
|
||||
niri msg focused-window | rg Title | sed -E "s/[[:space:]]+Title\: //g" | sed "s/\"//g" | head -c 55
|
||||
name=$(niri msg focused-window | rg Title | sed -E "s/[[:space:]]+Title\: //g" | sed "s/\"//g")
|
||||
proc_name=$(echo "$name" | head -c 55)
|
||||
|
||||
# TODO! fix this logic, add a '...' at the end
|
||||
if ["$name" != "$proc_name"]
|
||||
proc_name="$proc_name..."
|
||||
end
|
||||
|
||||
echo "$proc_name"
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
count=$(wpctl get-volume @DEFAULT_SINK@ | cut -d' ' -f2- | sed -E 's/\.//g' | sed 's/^0*//g')
|
||||
output=$(wpctl get-volume @DEFAULT_SINK@ | cut -d' ' -f2- | sed -E 's/\.//g' | sed 's/^0*//g')
|
||||
count=$(echo "$output" | cut -d' ' -f1)
|
||||
muted=$(echo "$output" | cut -d'[' -f2 | cut -d ']' -f1)
|
||||
|
||||
# if not muted, set to empty string
|
||||
if [ "$muted" == "$count" ]; then
|
||||
muted=""
|
||||
fi
|
||||
|
||||
# fix removal of zero padding if volume is zero
|
||||
if [ "$count" == "" ]; then
|
||||
count="0"
|
||||
fi
|
||||
|
||||
color="green"
|
||||
if ((count > 75)); then color="yellow"; fi
|
||||
if ((count > 90)); then color="peach"; fi
|
||||
if ((count > 100)); then color="maroon"; fi
|
||||
if ((count > 110)); then color="red"; fi
|
||||
echo "{\"count\":\"${count}\", \"color\":\"${color}\"}"
|
||||
|
||||
output="${count}%"
|
||||
if [ "$muted" != "" ]; then
|
||||
output="${output} [${muted}]"
|
||||
fi
|
||||
|
||||
echo "{\"count\":\"${output}\", \"color\":\"${color}\"}"
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
settings = {
|
||||
prefer-no-csd = true;
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
scroll-factor = 0.4;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
@@ -39,8 +45,6 @@
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
# waybar (status bar)
|
||||
# { command = [ "${pkgs.waybar}/bin/waybar" ]; }
|
||||
{
|
||||
command = [
|
||||
"${config.programs.eww.package}/bin/eww"
|
||||
|
||||
Reference in New Issue
Block a user