nixos/home/hyprland/ironbar/reference/config.corn
Evie Litherland-Smith be1d5fa798 Switch to minimal ironbar implementation
Save reference for later
Enable upower daemon and add simple bar with the essentials for now,
TODO more later
2023-10-11 08:28:27 +01:00

137 lines
3.8 KiB
Plaintext

let {
$tray = { type = "tray" }
$clock = {
type = "clock"
format = "%H:%M"
format_popup = "%d/%m/%Y %H:%M:%S"
}
$custom_clock = {
type = "custom"
class = "time"
on_mouse_enter = "ironbar set clock_state true"
on_mouse_exit = "ironbar set clock_state false"
bar = [
{
type = "label"
label = "{{date '+%H:%M'}}"
}
{
type = "label"
transition_duration = 400
label = " {{date '+%b %d, %Y'}}"
class = "clock_date"
show_if = "#clock_state"
}
]
}
$window = {
type = "focused"
show_icon = true
show_title = true
icon_size = 24
icon_theme = "Delta"
truncate = "end"
}
$cpu_sys = "{cpu_percent}% 󰻠"
$memory_sys = "{memory_percent}% 󰍛"
$network_sys = "{net_down:wlp6s0} Mbps"
$SysInfo = {
type = "sys_info"
class = "ram"
format = [ $memory_sys ]
tooltip = "{{~/.config/ironbar/scripts/ram_info}} GiB"
}
$internet = {
type = "custom"
class = "internet"
on_mouse_enter = "ironbar set wifi_state true"
on_mouse_exit = "ironbar set wifi_state false"
on_click_left = "nm-connection-editor"
bar = [
{
type = "label"
transition_type = "slide_end"
transition_duration = 350
label = "{{~/.config/ironbar/scripts/wifi --ESSID}} "
show_if = "#wifi_state"
}
{
type = "label"
label = "{{~/.config/ironbar/scripts/wifi --ICON}} "
}
]
}
$expand_sound = {
type = "script"
mode = "poll"
interval = 100
cmd = "zsh -c 'if [ '$(ironbar get soundbar_state | tail -1)' = 'true' ]; then; echo '';else;echo '';fi'"
on_click_left = "zsh -c 'if [ '$(ironbar get soundbar_state | tail -1)' = 'true' ]; then; ironbar set soundbar_state false;else;ironbar set soundbar_state true;fi'"
}
$cava = {
transition_type = "slide_end"
transition_duration = 750
name = "cava"
type = "script"
mode = "watch"
cmd = "/home/xenia/.config/ironbar/scripts/cava"
show_if = "#soundbar_state"
}
$volume = {
transition_type = "slide_end"
transition_duration = 350
type = "custom"
bar = [
{
type = "slider"
class = "scale"
length = 100
max = 100
on_change = "!wpctl set-volume @DEFAULT_SINK@ $0%"
on_scroll_down = "wpctl set-volume @DEFAULT_SINK@ 2%-"
on_scroll_up = "wpctl set-volume @DEFAULT_SINK@ 2%+"
on_click_right = "pavucontrol"
value = "100:/home/xenia/.config/ironbar/scripts/volume"
show_if = "#soundbar_state"
tooltip = "{{/home/xenia/.config/ironbar/scripts/volume}}%"
}
]
}
$workspace = {
type = "workspaces"
sort = "alphanumeric"
on_scroll_up = "hyprctl dispatch workspace -1"
on_scroll_down = "hyprctl dispatch workspace +1"
name_map.1 = "󰟀"
name_map.2 = "󰳼"
name_map.3 = "󰖟"
name_map.4 = "󰃭"
name_map.5 = "󰝰"
name_map.6 = "󰲸"
name_map.7 = "󰭹"
name_map.8 = "󰢹"
name_map.9 = "󰊗"
}
$start = [ $workspace ]
$center = [ $window ]
$end = [ $cava $volume $expand_sound $internet $SysInfo $clock $tray ]
}
in {
position = "top"
start = $start
center = $center
end = $end
}