Reformat + swap odin SSD
This commit is contained in:
parent
1bc27dde82
commit
2f3d05a802
83 changed files with 1448 additions and 931 deletions
|
|
@ -9,7 +9,8 @@ let
|
|||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
pkill = "${pkgs.procps}/bin/pkill";
|
||||
playerCtl = "${pkgs.playerctl}/bin/playerctl";
|
||||
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
|
||||
playerStatus =
|
||||
"${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
|
||||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||
shutdown = "${pkgs.systemd}/bin/shutdown";
|
||||
|
|
@ -17,39 +18,39 @@ let
|
|||
session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'`
|
||||
${loginctl} terminate-session $session
|
||||
'';
|
||||
colors = with pkgs.lib.rice; let
|
||||
alpha = 255 * opacity;
|
||||
in
|
||||
palette.toARGBHex rec {
|
||||
colors = with pkgs.lib.rice;
|
||||
let alpha = 255 * opacity;
|
||||
in palette.toARGBHex rec {
|
||||
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
underline = colorPalette.dark.blue;
|
||||
normal = {
|
||||
foreground = colorPalette.normal.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
underline = colorPalette.dark.blue;
|
||||
};
|
||||
|
||||
active = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
underline = colorPalette.bright.blue;
|
||||
};
|
||||
|
||||
selected = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha
|
||||
(color.brighten 10 colorPalette.bright.black);
|
||||
underline = colorPalette.bright.red;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
};
|
||||
|
||||
active = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||
underline = colorPalette.bright.blue;
|
||||
};
|
||||
|
||||
selected = {
|
||||
foreground = colorPalette.bright.white;
|
||||
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black);
|
||||
underline = colorPalette.bright.red;
|
||||
};
|
||||
|
||||
alert = colorPalette.bright.red;
|
||||
|
||||
green = colorPalette.normal.green;
|
||||
yellow = colorPalette.normal.yellow;
|
||||
orange = colorPalette.bright.red;
|
||||
red = colorPalette.normal.red;
|
||||
|
||||
transparent = color.transparent;
|
||||
};
|
||||
|
||||
commonBar = {
|
||||
locale = config.home.language.base;
|
||||
monitor = "\${env:MONITOR}";
|
||||
|
|
@ -61,8 +62,14 @@ let
|
|||
foreground = colors.normal.foreground;
|
||||
line-size = 2;
|
||||
line-color = colors.normal.underline;
|
||||
padding = { left = 0; right = 0; };
|
||||
module.margin = { left = 0; right = 0; };
|
||||
padding = {
|
||||
left = 0;
|
||||
right = 0;
|
||||
};
|
||||
module.margin = {
|
||||
left = 0;
|
||||
right = 0;
|
||||
};
|
||||
separator = " ";
|
||||
border = {
|
||||
color = colors.transparent;
|
||||
|
|
@ -72,7 +79,9 @@ let
|
|||
bottom.size = 0;
|
||||
};
|
||||
font = [
|
||||
"${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2"
|
||||
"${pkgs.rice.font.monospace.name}:size=${
|
||||
toString pkgs.rice.font.monospace.size
|
||||
};2"
|
||||
# "Font Awesome 6 Free:size=14;0"
|
||||
# "Noto Color Emoji:size=2;2"
|
||||
"Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2"
|
||||
|
|
@ -96,25 +105,23 @@ in
|
|||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybarFull;
|
||||
script =
|
||||
''
|
||||
monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1`
|
||||
MONITOR=$monitor polybar primary &
|
||||
monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`)
|
||||
for monitor in "''${monitors[@]}"; do
|
||||
MONITOR=$monitor polybar secondary &
|
||||
done
|
||||
'';
|
||||
script = ''
|
||||
monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1`
|
||||
MONITOR=$monitor polybar primary &
|
||||
monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`)
|
||||
for monitor in "''${monitors[@]}"; do
|
||||
MONITOR=$monitor polybar secondary &
|
||||
done
|
||||
'';
|
||||
|
||||
settings = {
|
||||
"settings" = {
|
||||
screenchange-reload = false;
|
||||
};
|
||||
"settings" = { screenchange-reload = false; };
|
||||
|
||||
"bar/primary" = recursiveUpdate commonBar {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
modules-right =
|
||||
"player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
tray = {
|
||||
position = "right";
|
||||
|
|
@ -125,7 +132,8 @@ in
|
|||
"bar/secondary" = recursiveUpdate commonBar {
|
||||
modules-left = "bspwm";
|
||||
# modules-center =
|
||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||
modules-right =
|
||||
"player pulseaudio temperature cpu memory battery date powermenu";
|
||||
enable-ipc = true;
|
||||
};
|
||||
|
||||
|
|
@ -148,8 +156,12 @@ in
|
|||
};
|
||||
|
||||
format = {
|
||||
charging = recursiveUpdate colors.selected { text = "<animation-charging> <label-charging>"; };
|
||||
discharging = recursiveUpdate colors.active { text = "<animation-discharging> <label-discharging>"; };
|
||||
charging = recursiveUpdate colors.selected {
|
||||
text = "<animation-charging> <label-charging>";
|
||||
};
|
||||
discharging = recursiveUpdate colors.active {
|
||||
text = "<animation-discharging> <label-discharging>";
|
||||
};
|
||||
full = recursiveUpdate colors.normal { text = " <label-full>"; };
|
||||
};
|
||||
|
||||
|
|
@ -176,8 +188,13 @@ in
|
|||
{
|
||||
focused = recursiveUpdate colors.selected common;
|
||||
occupied = recursiveUpdate colors.active common;
|
||||
urgent = recursiveUpdate (recursiveUpdate colors.active common) { background = colors.alert; };
|
||||
empty = recursiveUpdate (recursiveUpdate colors.normal common) { text = ""; padding = 0; };
|
||||
urgent = recursiveUpdate (recursiveUpdate colors.active common) {
|
||||
background = colors.alert;
|
||||
};
|
||||
empty = recursiveUpdate (recursiveUpdate colors.normal common) {
|
||||
text = "";
|
||||
padding = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -230,11 +247,14 @@ in
|
|||
colors.red
|
||||
];
|
||||
};
|
||||
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
||||
click.right =
|
||||
"${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
||||
format = {
|
||||
padding = 1;
|
||||
muted = colors.active;
|
||||
volume = recursiveUpdate colors.normal { text = "<ramp-volume> <label-volume>"; };
|
||||
volume = recursiveUpdate colors.normal {
|
||||
text = "<ramp-volume> <label-volume>";
|
||||
};
|
||||
};
|
||||
label.muted.text = "婢 muted";
|
||||
label.volume.text = "%percentage%%";
|
||||
|
|
@ -250,7 +270,8 @@ in
|
|||
underline = colors.alert;
|
||||
};
|
||||
};
|
||||
hwmon.path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
|
||||
hwmon.path =
|
||||
"/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
|
||||
label = {
|
||||
text = "%temperature-c%";
|
||||
warn = "%temperature-c%";
|
||||
|
|
@ -275,22 +296,46 @@ in
|
|||
};
|
||||
menu = [
|
||||
[
|
||||
({ text = "Logout"; exec = "#powermenu.open.1"; })
|
||||
({ text = "Reboot"; exec = "#powermenu.open.2"; })
|
||||
({ text = "Hibernate"; exec = "#powermenu.open.3"; })
|
||||
({ text = "Power off"; exec = "#powermenu.open.4"; })
|
||||
({
|
||||
text = "Logout";
|
||||
exec = "#powermenu.open.1";
|
||||
})
|
||||
({
|
||||
text = "Reboot";
|
||||
exec = "#powermenu.open.2";
|
||||
})
|
||||
({
|
||||
text = "Hibernate";
|
||||
exec = "#powermenu.open.3";
|
||||
})
|
||||
({
|
||||
text = "Power off";
|
||||
exec = "#powermenu.open.4";
|
||||
})
|
||||
]
|
||||
[
|
||||
({ text = "Logout"; exec = logout; })
|
||||
({
|
||||
text = "Logout";
|
||||
exec = logout;
|
||||
})
|
||||
]
|
||||
[
|
||||
({ text = "Reboot"; exec = "${systemctl} reboot"; })
|
||||
({
|
||||
text = "Reboot";
|
||||
exec = "${systemctl} reboot";
|
||||
})
|
||||
]
|
||||
[
|
||||
({ text = "Hibernate"; exec = "${systemctl} hibernate"; })
|
||||
({
|
||||
text = "Hibernate";
|
||||
exec = "${systemctl} hibernate";
|
||||
})
|
||||
]
|
||||
[
|
||||
({ text = "Power off"; exec = "${shutdown} now"; })
|
||||
({
|
||||
text = "Power off";
|
||||
exec = "${shutdown} now";
|
||||
})
|
||||
]
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue