Rice out waybar

This commit is contained in:
Nathan McCarty 2023-06-14 05:17:00 -04:00
parent f35832d52a
commit 6f7babf046
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
1 changed files with 215 additions and 113 deletions

View File

@ -6,6 +6,9 @@ in with lib; {
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects; inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.swaylock-effects;
swaylock-command = '' swaylock-command = ''
${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3''; ${swaylock-package}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
fuzzel-command = ''
fuzzel -f "Iosevka Sans Quasi" -b "103c48ff" -S "adbcbcff" -s "184956ff" -t "72898fff" -B 5 -r 5 -C "ed8649ff"
'';
wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob; wob-package = inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.wob;
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -74,16 +77,15 @@ in with lib; {
kb_options = kb_options =
kb_rules = kb_rules =
follow_mouse = 1 follow_mouse = 1
# sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
} }
general { general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5 gaps_in = 5
gaps_out = 20 gaps_out = 10
border_size = 2 border_size = 3
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border = rgba(3fc5b7ee) rgba(70b433ee) 45deg
col.inactive_border = rgba(595959aa) col.inactive_border = rgba(252525aa)
layout = dwindle layout = dwindle
} }
decoration { decoration {
@ -95,7 +97,7 @@ in with lib; {
drop_shadow = true drop_shadow = true
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(1a1a1aee) col.shadow = rgba(181818ee)
} }
animations { animations {
@ -245,7 +247,7 @@ in with lib; {
terminal = "alacritty"; terminal = "alacritty";
# Use krunner (from kde) as our launcher # Use krunner (from kde) as our launcher
menu = '' menu = ''
fuzzel -f "Iosevka Sans Quasi" -b "103c48ff" -S "adbcbcff" -s "184956ff" -t "72898fff" -B 5 -r 5 -C "ed8649ff" ${fuzzel-command}
''; '';
# Use waybar, but through systemd # Use waybar, but through systemd
bars = [ bars = [
@ -427,21 +429,87 @@ in with lib; {
######################### #########################
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar; package =
inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}".waybar.overrideAttrs
(old: { mesonFlags = old.mesonFlags ++ [ "-Dexperimental=true" ]; });
systemd = { enable = false; }; systemd = { enable = false; };
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";
position = "bottom"; position = "top";
height = 27; height = 30;
modules-left = [ "sway/workspaces" "sway/mode" ]; spacing = 4;
modules-center = [ "sway/window" ]; margin-top = 5;
modules-right = [ "mpd" "clock" "tray" ]; margin-bottom = 0;
"sway/workspaces" = { disable-scroll = true; }; # modules-left = [ "wlr/workspaces" "hyprland/submap" ];
"sway/window" = { icon = true; }; # modules-center = [ "hyprland/window" ];
# modules-right = [ "mpd" "clock" "tray" ];
modules-center = [
"custom/launcher"
"wlr/workspaces"
"mpd"
# "hyprland/window"
"idle_inhibitor"
"pulseaudio"
"network"
"cpu"
"memory"
# "temperature"
"tray"
"clock"
# "custom/power"
];
"custom/launcher" = {
format = " ";
on-click = fuzzel-command;
on-click-right = "killall fuzzel";
};
"idle_inhibitor" = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
pulseaudio = {
scroll-step = 1;
format = "{volume}% {icon}";
format-bluetooth = "{volume}% {icon}";
format-bluetooth-muted = "{icon} {format_source}";
format-muted = "{format_source}";
format-source = "";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [ "" "" "" ];
};
on-click = "pavucontrol";
};
network = {
# // "interface": "wlp2*", // (Optional) To force the use of this interface
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "Connected ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
on-click-right = "bash ~/.config/rofi/wifi_menu/rofi_wifi_menu";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = { format = "{}% ({used}GB/{total}GB) "; };
"tray" = {
icon-size = 20;
spacing = 10;
};
"clock" = { format = "{:%I:%M%p %Y-%m-%d}"; }; "clock" = { format = "{:%I:%M%p %Y-%m-%d}"; };
"window" = { icon = true; };
"tray" = { spacing = 5; };
"mpd" = { "mpd" = {
format = format =
"{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})"; "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
@ -460,15 +528,16 @@ in with lib; {
}; };
style = '' style = ''
* { * {
/* `otf-font-awesome` is required to be installed for icons */ border: none;
font-family: FontAwesome, Iosevka Sans Quasi; border-radius: 0px;
font-size: 14px; font-family: Roboto, Helvetica, Arial, sans-serif;
font-size: 12px;
min-height: 0;
} }
window#waybar { window#waybar {
background-color: #103c48; background-color: transparent;
border: 2px solid #2d5b69; color: #ffffff;
color: #adbcbc;
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
} }
@ -477,50 +546,35 @@ in with lib; {
opacity: 0.2; opacity: 0.2;
} }
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
#workspaces button { #workspaces button {
padding: 0 5px; background: #1f1f1f;
background-color: #184956; color: #ffffff;
color: #72898f; border-radius: 20px;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each workspace name */
border: none;
border-radius: 0;
} }
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover { #workspaces button:hover {
background: rgba(0, 0, 0, 0.2); background: lightblue;
box-shadow: inset 0 -3px #ffffff; color: black;
border-bottom: 3px solid #ffffff;
} }
#workspaces button.focused { #workspaces button.active {
background-color: #2d5b69; background: #3f3f3f;
color: #adbcbc; }
/* box-shadow: inset 0 -3px #ffffff; */
#workspaces button.active:hover {
background: lightblue;
color: black;
border-bottom: 3px solid #ffffff;
} }
#workspaces button.urgent { #workspaces button.urgent {
background-color: #2d5b69; background-color: #eb4d4b;
color: #fa5750;
} }
#mode { #mode {
@ -538,32 +592,45 @@ in with lib; {
#network, #network,
#pulseaudio, #pulseaudio,
#custom-media, #custom-media,
#custom-launcher,
#custom-power,
#tray, #tray,
#mode, #mode,
#idle_inhibitor, #idle_inhibitor,
#mpd { #mpd {
padding: 0 10px; padding: 0 10px;
color: black;
}
#mpd {
background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#window, #window,
#workspaces { #workspaces {
margin: 0 4px; margin: 0px 4px;
} }
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0; margin-left: 0px;
} }
/* If workspaces is the rightmost module, omit right margin */ /* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces { .modules-right > widget:last-child > #workspaces {
margin-right: 0; margin-right: 0px;
} }
#clock { #clock {
border: 2px solid #41c7b9; background-color: #FA8BFF;
background-color: #184956; background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: #41c7b9; color: black;
border-radius: 0px 20px 20px 0px;
margin-right: 4px;
} }
#battery { #battery {
@ -598,56 +665,104 @@ in with lib; {
} }
#cpu { #cpu {
background-color: #2ecc71; background-color: #FA8BFF;
color: #000000; background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#memory { #memory {
background-color: #9b59b6; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#disk { #disk {
background-color: #964B00; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#backlight { #backlight {
background-color: #90b1b1; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
} }
#network { #network {
background-color: #2980b9; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#network.disconnected { #network.disconnected {
background-color: #f53c3c; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: red;
} }
#pulseaudio { #pulseaudio {
background-color: #f1c40f; background-color: #FA8BFF;
color: #000000; background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#pulseaudio.muted { #pulseaudio.muted {
background-color: #90b1b1; background-color: #FA8BFF;
color: #2a5c45; background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: red;
} }
#custom-media { #custom-media {
background-color: #66cc99; background-color: #8EC5FC;
color: #2a5c45; background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
min-width: 100px; color: black;
border-radius: 20px;
margin-right: 5px;
} }
#custom-media.custom-spotify { #custom-media.custom-spotify {
background-color: #66cc99; background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#custom-media.custom-vlc { #custom-media.custom-vlc {
background-color: #ffa000; background-color: #8EC5FC;
background-image: linear-gradient(62deg, #8EC5FC 0%, #E0C3FC 100%);
color: black;
border-radius: 20px;
margin-right: 5px;
} }
#custom-power{
background-color: #FA8BFF;
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
font-size: 16px;
border-radius: 19px;
}
#custom-launcher{
background-color: #FA8BFF;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
font-size: 18px;
border-radius: 20px;
}
#custom-updater {
background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
}
#temperature { #temperature {
background-color: #f0932b; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#temperature.critical { #temperature.critical {
@ -655,68 +770,55 @@ in with lib; {
} }
#tray { #tray {
background-color: #4695f7; background-color: #FA8BFF;
border: 2px solid #58a3ff; background-image: linear-gradient(-45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#tray > .passive { #tray > .passive {
-gtk-icon-effect: dim; -gtk-icon-effect: dim;
background-color: #FA8BFF;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#tray > .needs-attention { #tray > .needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #eb4d4b; background-color: #FA8BFF;
background-image: linear-gradient(-45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
color: black;
} }
#idle_inhibitor { #idle_inhibitor {
background-color: #2d3436; background-color: #FA8BFF;
background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
border-radius: 20px 0px 0px 20px;
} }
#idle_inhibitor.activated { #idle_inhibitor.activated {
background-color: #ecf0f1; background-color: #FA8BFF;
color: #2d3436; background-image: linear-gradient(45deg, #FA8BFF 0%, #2BD2FF 52%, #2BD2FF 90%);
} color: black;
border-radius: 20px 0px 0px 20px;
#mpd {
color: #adbcbc;
border: 2px solid #75b938;
background-color: #184956;
}
#mpd.disconnected {
color: #dbb32d;
border: 2px solid #dbb32d;
}
#mpd.stopped {
color: #fa5750;
border: 2px solid #fa5750;
}
#mpd.paused {
color: #f275be;
border: 2px solid #f275be;
} }
#language { #language {
background: #00b093; background-color: #FA8BFF;
color: #740864; background-image: linear-gradient(45deg, #2BD2FF 0%, #2BD2FF 52%, #2BD2FF 90%);
padding: 0 5px; color: black;
margin: 0 5px;
min-width: 16px; min-width: 16px;
} }
#keyboard-state { #keyboard-state {
background: #97e1ad; background: #97e1ad;
color: #000000; color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px; min-width: 16px;
} }
#keyboard-state > label { #keyboard-state > label {
padding: 0 5px; padding: 0px 5px;
} }
#keyboard-state > label.locked { #keyboard-state > label.locked {