polybar pipewire
This commit is contained in:
parent
049aa645ab
commit
832c3f4e52
3 changed files with 30 additions and 2 deletions
226
programm_configs/polybar.nix
Normal file
226
programm_configs/polybar.nix
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
colors = {
|
||||
background = "#222";
|
||||
background-alt = "#444";
|
||||
foreground = "#dfdfdf";
|
||||
foreground-alt = "#555";
|
||||
primary = "#ffb52a";
|
||||
secondary = "#e60053";
|
||||
alert = "#bd2c40";
|
||||
accent = "#ffbb00";
|
||||
};
|
||||
in
|
||||
{
|
||||
services.polybar = {
|
||||
|
||||
enable = true;
|
||||
script = "polybar main &";
|
||||
config = {
|
||||
"bar/main" = {
|
||||
dpi = 100;
|
||||
width = "100%";
|
||||
height = 30;
|
||||
offset-x = "1%";
|
||||
offset-y = "1%";
|
||||
radius = "10.0";
|
||||
fixed-center = false;
|
||||
background = colors.background;
|
||||
foreground = colors.foreground;
|
||||
underline-size = 3;
|
||||
underline-color = "#f00";
|
||||
border-size = 4;
|
||||
padding-left = 0;
|
||||
padding-right = 2;
|
||||
module-margin-left = 1;
|
||||
module-margin-right = 2;
|
||||
border-top-size = 4;
|
||||
|
||||
font-0 = "DejaVu Sans Mono:style=Book:size=12";
|
||||
font-1 = "Siji:style=Regular";
|
||||
|
||||
modules-left = "i3";
|
||||
modules-right = "filesystem pulseaudio cpu wlan eth battery temperature date tray";
|
||||
wm-restack = "i3";
|
||||
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
|
||||
};
|
||||
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = 2;
|
||||
format-prefix = "CPU ";
|
||||
format-prefix-foreground = colors.foreground-alt;
|
||||
format-underline = "#f90000";
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
|
||||
"module/filesystem" = {
|
||||
type = "internal/fs";
|
||||
interval = 25;
|
||||
|
||||
mount-0 = "/";
|
||||
|
||||
label-mounted = "%{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%";
|
||||
label-unmounted = "%mountpoint% not mounted";
|
||||
format-mounted-background = colors.background;
|
||||
};
|
||||
|
||||
"module/eth" = {
|
||||
type = "internal/network";
|
||||
interface = "enp12s0";
|
||||
interval = "3.0";
|
||||
interface-type = "wired";
|
||||
|
||||
format-connected-underline = "#55aa55";
|
||||
format-connected-prefix-foreground = colors.foreground-alt;
|
||||
label-connected = "%local_ip%";
|
||||
|
||||
format-disconnected = "<label-disconnected>";
|
||||
label-disconnected = "%ifname% disconnected";
|
||||
format-disconnected-underline = "#2f5e2f";
|
||||
|
||||
};
|
||||
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
interval = "5";
|
||||
|
||||
date = "";
|
||||
date-alt = "%d.%m.%Y";
|
||||
|
||||
time = "%H:%M";
|
||||
time-alt = "%H:%M:%S";
|
||||
|
||||
format-prefix-foreground = colors.foreground-alt;
|
||||
format-underline = "#0a6cf5";
|
||||
|
||||
label = "%date% %time%";
|
||||
};
|
||||
|
||||
|
||||
"module/i3" = {
|
||||
type = "internal/i3";
|
||||
format = "<label-state> <label-mode>";
|
||||
index-sort = true;
|
||||
wrapping-scroll = false;
|
||||
|
||||
label-mode-padding = 2;
|
||||
label-mode-foreground = "#000";
|
||||
label-mode-background = colors.primary;
|
||||
|
||||
#focused = Active workspace on focused monitor
|
||||
label-focused = "%index%";
|
||||
label-focused-background = colors.background-alt;
|
||||
label-focused-underline = colors.primary;
|
||||
label-focused-padding = 2;
|
||||
|
||||
#unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = "%index%";
|
||||
label-unfocused-padding = 2;
|
||||
|
||||
#visible = Active workspace on unfocused monitor
|
||||
label-visible = "%index%";
|
||||
label-visible-background = colors.background-alt;
|
||||
label-visible-underline = colors.primary;
|
||||
label-visible-padding = 2;
|
||||
|
||||
#urgent = Workspace with urgency hint set
|
||||
label-urgent = "%index%";
|
||||
label-urgent-background = colors.alert;
|
||||
label-urgent-padding = 2;
|
||||
};
|
||||
|
||||
"module/tray" = {
|
||||
type = "internal/tray";
|
||||
tray-spacing = 6;
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BAT0";
|
||||
adapter = "AC";
|
||||
full-at = 94;
|
||||
|
||||
format-charging = "<animation-charging> <label-charging>";
|
||||
format-charging-underline = "#ffb52a";
|
||||
|
||||
format-discharging = "<animation-discharging> <label-discharging>";
|
||||
format-discharging-underline = "#ffb52a";
|
||||
|
||||
|
||||
animation-charging-0 = "|– |";
|
||||
animation-charging-1 = "|–– |";
|
||||
animation-charging-2 = "|–––|";
|
||||
animation-charging-foreground = colors.foreground-alt;
|
||||
animation-charging-framerate = 750;
|
||||
|
||||
animation-discharging-0 = "|–––|";
|
||||
animation-discharging-1 = "|–– |";
|
||||
animation-discharging-2 = "|– |";
|
||||
animation-discharging-foreground = colors.foreground-alt;
|
||||
animation-discharging-framerate = 750;
|
||||
};
|
||||
|
||||
"module/temperature" = {
|
||||
type = "internal/temperature";
|
||||
thermal-zone = 0;
|
||||
warn-temperature = 70;
|
||||
|
||||
format = "<label>";
|
||||
format-underline = "#f50a4d";
|
||||
format-warn = "<label-warn>";
|
||||
format-warn-underline = "#f50a4d";
|
||||
|
||||
label = "%temperature-c%";
|
||||
label-warn = "%temperature-c%";
|
||||
label-warn-foreground = colors.secondary;
|
||||
ramp-foreground = colors.foreground-alt;
|
||||
|
||||
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp1_input";
|
||||
};
|
||||
"module/wlan" = {
|
||||
type = "internal/network";
|
||||
interface = "wlp82s0";
|
||||
interval = "3.0";
|
||||
|
||||
format-connected = "<label-connected>";
|
||||
format-connected-underline = "#9f78e1";
|
||||
label-connected = "%essid%";
|
||||
|
||||
format-disconnected = "<label-disconnected>";
|
||||
format-disconnected-underline = "#473666";
|
||||
label-disconnected = "%ifname% disconnected";
|
||||
label-disconnected-foreground = colors.foreground-alt;
|
||||
};
|
||||
"module/pulseaudio" = {
|
||||
type = "internal/pulseaudio";
|
||||
|
||||
format-volume = "<label-volume> <bar-volume>";
|
||||
label-volume = "VOL %percentage%%";
|
||||
label-volume-foreground = colors.foreground;
|
||||
|
||||
label-muted = "🔇 muted";
|
||||
label-muted-foreground = "#666";
|
||||
|
||||
bar-volume-width = "10";
|
||||
bar-volume-foreground-0 = "#55aa55";
|
||||
bar-volume-foreground-1 = "#55aa55";
|
||||
bar-volume-foreground-2 = "#55aa55";
|
||||
bar-volume-foreground-3 = "#55aa55";
|
||||
bar-volume-foreground-4 = "#55aa55";
|
||||
bar-volume-foreground-5 = "#f5a70a";
|
||||
bar-volume-foreground-6 = "#ff5555";
|
||||
bar-volume-gradient = false;
|
||||
bar-volume-indicator = "|";
|
||||
bar-volume-indicator-font = 1;
|
||||
bar-volume-fill = "–";
|
||||
bar-volume-fill-font = 1;
|
||||
bar-volume-empty = "–";
|
||||
bar-volume-empty-font = 1;
|
||||
bar-volume-empty-foreground = colors.foreground-alt;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue