first commit

This commit is contained in:
hdvt
2025-11-13 23:48:27 +03:00
commit 981b16aa8d
28 changed files with 1844 additions and 0 deletions

93
waybar/config.jsonc Normal file
View File

@@ -0,0 +1,93 @@
{
"position": "bottom",
"modules-left": ["custom/arch", "hyprland/workspaces", "hyprland/window"],
"modules-center": ["clock"],
"modules-right": ["hyprland/language", "battery", "temperature"],
"hyprland/language": {
"tooltip": false,
"format-ru": " RU",
"format-en": " US",
},
"custom/music": {
"format": "{icon} {text}",
"return-type": "json",
"max-length": 40,
"exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{title}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(artist)}} - {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
"on-click": "~/.config/eww/music/toggle_music.sh",
"format-icons": {
"Playing": "",
"Paused": ""
}
},
"cava": {
"framerate": 60,
"sleep_timer": 1,
"format_silent" : "",
"autosens": 0,
"sensitivity": 1000,
"bars": 12,
"lower_cutoff_freq": 50,
"higher_cutoff_freq": 10000,
// "hide_on_silence": true,
"method": "pulse",
"source": "auto",
"stereo": true,
"reverse": false,
"bar_delimiter": 0,
"monstercat": false,
"noise_reduction": 0.37,
"input_delay": 0,
"format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"],
"actions": {
"on-click-right": "mode",
},
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-icons": ["", "", "", "", ""],
},
"temperature": {
"interval": 1,
"critical-threshold": 80,
"warning-threshold": 65,
"format": "{icon} {temperatureC}°C",
"format-warning": " {temperatureC}°C",
"format-critical": " {temperatureC}°C",
"format-icons": ["", "", ""],
},
"clock": {
"interval": 1,
"format": "{:%H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
},
"hyprland/workspaces": {
"format": "{id}",
"on-click": "activate",
"all-outputs": false,
"persistent_workspaces": {
"*": 5,
},
},
"custom/arch": {
"format": "",
"tooltip": "Arch Linux",
"on-click": "hyprctl dispatch exec \"[float; center] missioncenter\"",
},
}

30
waybar/scripts/cava.sh Executable file
View File

@@ -0,0 +1,30 @@
#! /bin/bash
bar="▁▂▃▄▅▆▇█"
dict="s/;//g;"
# creating "dictionary" to replace char with bar
i=0
while [ $i -lt ${#bar} ]
do
dict="${dict}s/$i/${bar:$i:1}/g;"
i=$((i=i+1))
done
# write cava config
config_file="/tmp/polybar_cava_config"
echo "
[general]
bars = 18
[output]
method = raw
raw_target = /dev/stdout
data_format = ascii
ascii_max_range = 7
" > $config_file
# read stdout from cava
cava -p $config_file | while read -r line; do
echo $line | sed $dict
done

88
waybar/style.css Normal file
View File

@@ -0,0 +1,88 @@
* {
background-color: transparent;
}
#clock {
background-color: #0e0e0e;
font-weight: bold;
color: #f5f5f5;
padding: 0 10px;
margin: 4px 6px;
border-radius: 99px;
}
#workspaces {
margin: 4px 6px;
border-radius: 99px;
padding: 0 4px;
}
#cava {
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding: 2px 6px;
transition: all 0.3s ease-out;
}
#workspaces button {
color: #f5f5f5;
background: transparent;
transition: all 0.3s ease;
padding: 0;
min-width: 25px;
border-radius: 99px;
margin: 4px;
font-weight: bold;
}
#workspaces button.active {
background: #f5f5f5;
color: #0e0e0e;
}
#window {
color: #f5f5f5;
font-weight: bold;
padding: 0 10px;
}
#custom-arch {
font-family: "JetBrainsMono Nerd Font", "FiraCode Nerd Font", monospace;
font-size: 20px;
padding-left: 20px;
color: #f5f5f5;
margin-right: 10px;
}
#language, #battery, #temperature {
background-color: #0e0e0e;
color: #f5f5f5;
margin-top: 4px;
margin-bottom: 4px;
padding: 2px 6px;
}
#language {
border-top-left-radius: 99px;
border-bottom-left-radius: 99px;
padding-left: 14px;
}
#temperature {
border-top-right-radius: 99px;
border-bottom-right-radius: 99px;
padding-right: 14px;
margin-right: 6px;
}