polybar: redesigned top bar but its buggy
This commit is contained in:
parent
64cc966d0f
commit
09e8f7c3b0
|
@ -1,19 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
nix.buildMachines =
|
|
||||||
[{
|
|
||||||
hostName = "pink";
|
|
||||||
system = "x86_64-linux";
|
|
||||||
protocol = "ssh-ng";
|
|
||||||
maxJobs = 3;
|
|
||||||
speedFactor = 2;
|
|
||||||
supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
|
||||||
mandatoryFeatures = [ ];
|
|
||||||
}];
|
|
||||||
# required, otherwise remote buildMachines above aren't used
|
|
||||||
nix.distributedBuilds = true;
|
|
||||||
# optional, useful when the builder has a faster internet connection than yours
|
|
||||||
nix.extraOptions = ''
|
|
||||||
builders-use-substitutes = true
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -15,7 +15,7 @@ in
|
||||||
# Starting compositor and adding background to xroot via nitrogen
|
# Starting compositor and adding background to xroot via nitrogen
|
||||||
startup = [
|
startup = [
|
||||||
{
|
{
|
||||||
command = "nitrogen --set-zoom-fill /home/grape/Pictures/bg.jpg";
|
command = "nitrogen --set-zoom-fill /home/grape/dotfiles/bg.jpg";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = "picom -b --experimental-backends";
|
command = "picom -b --experimental-backends";
|
||||||
|
@ -101,6 +101,7 @@ in
|
||||||
# Volume adjustment for current player
|
# Volume adjustment for current player
|
||||||
"shift+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl volume 0.1+";
|
"shift+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl volume 0.1+";
|
||||||
"shift+XF86AudioLowerVolume" = "exec --no-startup-id playerctl volume 0.1-";
|
"shift+XF86AudioLowerVolume" = "exec --no-startup-id playerctl volume 0.1-";
|
||||||
|
|
||||||
# seeking for current player
|
# seeking for current player
|
||||||
"Control+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl position 10+";
|
"Control+XF86AudioRaiseVolume" = "exec --no-startup-id playerctl position 10+";
|
||||||
"Control+XF86AudioLowerVolume" = "exec --no-startup-id playerctl position 10-";
|
"Control+XF86AudioLowerVolume" = "exec --no-startup-id playerctl position 10-";
|
||||||
|
|
133
nix/configs/polybar.nix
Executable file → Normal file
133
nix/configs/polybar.nix
Executable file → Normal file
|
@ -1,7 +1,9 @@
|
||||||
let
|
let
|
||||||
colors = {
|
colors = {
|
||||||
fg = "#FFFFFF";
|
fg = "#FFFFFF";
|
||||||
|
foreground = "#FFFFFF";
|
||||||
bg = "#191830";
|
bg = "#191830";
|
||||||
|
background = "#191830";
|
||||||
border = "#F72585";
|
border = "#F72585";
|
||||||
warn = "#f00";
|
warn = "#f00";
|
||||||
altfg = "#F72585";
|
altfg = "#F72585";
|
||||||
|
@ -11,7 +13,7 @@ let
|
||||||
currentWorkspace = "#FAD000";
|
currentWorkspace = "#FAD000";
|
||||||
seperatorColor = "#FAD000";
|
seperatorColor = "#FAD000";
|
||||||
};
|
};
|
||||||
script = "~/.config/scripts";
|
script = "~/dotifles/scripts";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -24,77 +26,69 @@ in
|
||||||
script = "${script}/polybar.sh";
|
script = "${script}/polybar.sh";
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
||||||
|
|
||||||
"module/date" = {
|
"module/date" = {
|
||||||
type = "internal/date";
|
type = "internal/date";
|
||||||
font-1 = "Jetbrains Mono Nerd font";
|
font-1 = "Jetbrains Mono Nerd font";
|
||||||
interval = 1;
|
interval = 1;
|
||||||
time = "%I:%M:%S";
|
time = "%I:%M:%S";
|
||||||
date = "%Y-%m-%d%";
|
date = "%Y-%m-%d %A";
|
||||||
format = "<label>";
|
format = "%{T2}%{F#191830}%{F-}%{T-}<label>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
|
label-background = "${colors.bg}";
|
||||||
label = "%time% %date%";
|
label = "%time% %date%";
|
||||||
label-foreground = "${colors.fg}";
|
label-foreground = "${colors.fg}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO include labels right into format for each module instea dof having a different module
|
|
||||||
|
|
||||||
"module/s" = {
|
|
||||||
type = "custom/text";
|
|
||||||
label = " | ";
|
|
||||||
label-foreground = "${colors.seperatorColor}";
|
|
||||||
};
|
|
||||||
"module/gpu-label" = {
|
|
||||||
type = "custom/text";
|
|
||||||
label = "GPU ";
|
|
||||||
label-foreground = "${colors.seperatorColor}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"module/replay-label" = {
|
|
||||||
type = "custom/text";
|
|
||||||
label = "REPLAY ";
|
|
||||||
label-foreground = "${colors.seperatorColor}";
|
|
||||||
};
|
|
||||||
"module/battery-label" = {
|
|
||||||
type = "custom/text";
|
|
||||||
label = "BAT ";
|
|
||||||
label-foreground = "${colors.seperatorColor}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"module/fs-label-system" = {
|
"module/fs-label-system" = {
|
||||||
type = "custom/text";
|
type = "custom/text";
|
||||||
label = "SYS ";
|
label = "SYS ";
|
||||||
label-foreground = "${colors.seperatorColor}";
|
label-foreground = "${colors.seperatorColor}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/fs-label-data" = {
|
"module/fs-label-data" = {
|
||||||
type = "custom/text";
|
type = "custom/text";
|
||||||
label = "DAT ";
|
label = "DAT ";
|
||||||
label-foreground = "${ colors. seperatorColor}";
|
label-foreground = "${ colors. seperatorColor}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"module/s" = {
|
||||||
|
type = "custom/text";
|
||||||
|
label = " ";
|
||||||
|
};
|
||||||
|
|
||||||
"module/ewmh" = {
|
"module/ewmh" = {
|
||||||
type = "internal/xworkspaces";
|
type = "internal/xworkspaces";
|
||||||
pin-workspaces = false;
|
pin-workspaces = false;
|
||||||
label-active-foreground = "${colors.currentWorkspace}";
|
label-active-foreground = "${colors.currentWorkspace}";
|
||||||
|
label-active-background = "${colors.background}";
|
||||||
|
label-inactive-background = "${colors.background}";
|
||||||
|
label-urgent-foreground = colors.warn;
|
||||||
|
label-empty-background = "${colors.background}";
|
||||||
|
label-occupied-background = "${colors.background}";
|
||||||
|
format = "%{T2}%{F#191830}%{F-}%{T-}<label-state>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/cpu-temp" = {
|
"module/cpu-temp" = {
|
||||||
type = "internal/temperature";
|
type = "internal/temperature";
|
||||||
format = "%{F${colors.seperatorColor}}CPU%{F-} <label> ";
|
|
||||||
format-warn = "%{F${colors.seperatorColor}}CPU%{F-} <label-warn> ";
|
|
||||||
base-temperature = 20;
|
base-temperature = 20;
|
||||||
warn-temperature = 85;
|
warn-temperature = 85;
|
||||||
label-warn-foreground = "${colors.warn}";
|
label-warn-foreground = "${colors.warn}";
|
||||||
label-foreground = "${colors.fg}";
|
|
||||||
thermal-zone = 0;
|
thermal-zone = 0;
|
||||||
zone-type = "x86_pkg_temp";
|
zone-type = "x86_pkg_temp";
|
||||||
|
label-background = "${colors.foreground}";
|
||||||
|
label-foreground = "${colors.fg}";
|
||||||
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input";
|
hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input";
|
||||||
|
format = "%{T2}%{F#${colors.background}}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}CPU %{F-}%{B-}<label>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
|
format-warn = "%{F${colors.seperatorColor}}CPU%{F-} <label-warn> ";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
"module/cpu-usage" = {
|
"module/cpu-usage" = {
|
||||||
type = "internal/cpu";
|
type = "internal/cpu";
|
||||||
interval = "1.5";
|
interval = "1.5";
|
||||||
format = "<label>";
|
format = "<label>";
|
||||||
label = "CPU %percentage%%";
|
label = "CPU %percentage%%";
|
||||||
|
label-background = "${colors.foreground}";
|
||||||
format-foreground = "${colors.fg}";
|
format-foreground = "${colors.fg}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,77 +96,77 @@ in
|
||||||
type = "custom/script";
|
type = "custom/script";
|
||||||
interval = "1.5";
|
interval = "1.5";
|
||||||
exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits";
|
exec = "nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader,nounits";
|
||||||
format = "<label>";
|
format = "%{B${colors.bg}}%{F${colors.seperatorColor}}GPU %{F-}%{B-}<label>°C";
|
||||||
format-suffix = "°C ";
|
label-background = "${colors.foreground}";
|
||||||
|
label-foreground = "${colors.foreground}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/gpu-usage" = {
|
"module/gpu-usage" = {
|
||||||
type = "custom/script";
|
type = "custom/script";
|
||||||
interval = "1.5";
|
interval = "1.5";
|
||||||
|
label-background = "${colors.background}";
|
||||||
|
label-foreground = "${colors.foreground}";
|
||||||
exec = "nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits";
|
exec = "nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits";
|
||||||
format-suffix = "mb ";
|
format = "<label> mb";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/memory" = {
|
"module/memory" = {
|
||||||
type = "internal/memory";
|
type = "internal/memory";
|
||||||
interval = 1;
|
interval = 1;
|
||||||
format = "%{F${colors.seperatorColor}}RAM%{F-} <label>";
|
label-background = "${colors.background}";
|
||||||
|
format = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}RAM %{F-}%{B-}<label>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
label = "%used%";
|
label = "%used%";
|
||||||
label-warn = "%used%";
|
label-warn = "%used%";
|
||||||
warn-percentage = 60;
|
warn-percentage = 60;
|
||||||
label-warn-foreground = "${colors.warn}";
|
label-warn-foreground = "${colors.warn}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
"module/fs-system" = {
|
||||||
"module/audio" = {
|
|
||||||
type = "internal/alsa";
|
|
||||||
use-ui-max = false;
|
|
||||||
label-volume = "%percentage%%";
|
|
||||||
label-muted = "muted";
|
|
||||||
label-muted-foreground = "${colors.altfg}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"module/music" = {
|
|
||||||
type = "custom/script";
|
|
||||||
interval = ".5";
|
|
||||||
exec = "~/.config/scripts/music.sh";
|
|
||||||
format = "<label>";
|
|
||||||
};
|
|
||||||
|
|
||||||
"fs-base" = {
|
|
||||||
type = "internal/fs";
|
type = "internal/fs";
|
||||||
label-unmounted = "?";
|
label-unmounted = "?";
|
||||||
format-prefix-foreground = "${colors.fg}";
|
format-prefix-foreground = "${colors.fg}";
|
||||||
warn-precentage = "80%";
|
warn-precentage = "80%";
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
"module/fs-system" = {
|
|
||||||
"inherit" = "fs-base";
|
|
||||||
mount-0 = "/";
|
mount-0 = "/";
|
||||||
interval = 30;
|
interval = 30;
|
||||||
|
label-mounted-background = "${colors.background}";
|
||||||
|
format-mounted = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}SYS %{F-}%{B-}<label-mounted>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
label-mounted = "%free%(%total%)";
|
label-mounted = "%free%(%total%)";
|
||||||
|
# FIXME doesn't work
|
||||||
|
label-warn = "%{F${colors.warn}} !%free%!%{F-}(%total%)";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/fs-data" = {
|
"module/fs-data" = {
|
||||||
"inherit" = "fs-base";
|
type = "internal/fs";
|
||||||
|
label-unmounted = "?";
|
||||||
|
format-prefix-foreground = "${colors.fg}";
|
||||||
|
warn-precentage = "80%";
|
||||||
|
label-mounted-background = "${colors.background}";
|
||||||
mount-0 = "/media/terra";
|
mount-0 = "/media/terra";
|
||||||
interval = 30;
|
interval = 30;
|
||||||
|
format-mounted = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}DAT %{F-}%{B-}<label-mounted>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
label-mounted = "%free%(%total%)";
|
label-mounted = "%free%(%total%)";
|
||||||
|
# FIXME doesn't work
|
||||||
|
label-warn = "%{F${colors.warn}} !%free%!%{F-}(%total%)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
"module/battery" = {
|
"module/battery" = {
|
||||||
type = "internal/battery";
|
type = "internal/battery";
|
||||||
full-at = 95;
|
full-at = 95;
|
||||||
low-at = 20;
|
low-at = 20;
|
||||||
battery = "BAT0";
|
battery = "BAT0";
|
||||||
adapter = "AC0";
|
adapter = "AC0";
|
||||||
|
label-background = colors.background;
|
||||||
|
label-foreground = colors.foreground;
|
||||||
|
format = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.bg}}%{F${colors.seperatorColor}}BAT %{F-}%{B-}<label-mounted>%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
poll-interval = 4;
|
poll-interval = 4;
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/keyboard" = {
|
"module/keyboard" = {
|
||||||
type = "internal/xkeyboard";
|
type = "internal/xkeyboard";
|
||||||
format = "<label-layout> <label-indicator>";
|
label-layout-background = colors.background;
|
||||||
|
label-layout-foreground = colors.foreground;
|
||||||
|
format = "%{T2}%{F#191830}%{F-}%{T-}%{B${colors.background}}<label-layout> <label-indicator>%{B-}%{T2}%{F#191830}%{F-}%{T-}";
|
||||||
};
|
};
|
||||||
|
|
||||||
"global/wm" = {
|
"global/wm" = {
|
||||||
|
@ -181,33 +175,32 @@ in
|
||||||
|
|
||||||
"bar/default" = {
|
"bar/default" = {
|
||||||
font-0 = "Jetbrains Mono Nerd font:size=11;3";
|
font-0 = "Jetbrains Mono Nerd font:size=11;3";
|
||||||
font-1 = "Jetbrains Mono Nerd font:size=11;1";
|
font-1 = "Jetbrains Mono Nerd font:size=22;5";
|
||||||
bottom = false;
|
bottom = false;
|
||||||
|
|
||||||
# dimensons
|
# Dimensions
|
||||||
width = "100%";
|
width = "100%";
|
||||||
height = 40;
|
height = 34;
|
||||||
radius = 15;
|
radius = 15;
|
||||||
|
|
||||||
# Padding for modules
|
# Padding for modules
|
||||||
padding-left = 5;
|
padding-left = 2;
|
||||||
padding-right = 5;
|
padding-right = 2;
|
||||||
|
|
||||||
|
|
||||||
# setting colors
|
# setting colors
|
||||||
background = "${colors.bg}";
|
#background = "${colors.bg}";
|
||||||
|
background = "#00191830";
|
||||||
foreground = "${colors.fg}";
|
foreground = "${colors.fg}";
|
||||||
|
|
||||||
# border for bar
|
# border for bar
|
||||||
border-size = "10px";
|
border-size = "10px";
|
||||||
# border-color = ${colors.border}
|
|
||||||
border-color = "${colors.invisible}";
|
border-color = "${colors.invisible}";
|
||||||
|
|
||||||
# Displayed modules
|
# Displayed modules
|
||||||
modules-left = "date s keyboard s ewmh";
|
modules-left = "date s keyboard";
|
||||||
#modules-center = "cava";
|
modules-center = "ewmh";
|
||||||
|
modules-right = "battery-label battery s fs-data s fs-system s memory s start gpu-temp gpu-usage end s cpu-temp cpu-usage";
|
||||||
modules-right = "battery-label battery s fs-label-data fs-data s fs-label-system fs-system s memory s gpu-label gpu-usage gpu-temp s cpu-temp cpu-usage";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue