home: init ironbar, remove waybar

This commit is contained in:
notohh 2023-06-06 05:09:22 -04:00
parent acc5090e20
commit 8de0a59742
Signed by: notohh
GPG key ID: BD47506D475EE86D
11 changed files with 254 additions and 242 deletions

View file

@ -58,6 +58,24 @@
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -122,6 +140,27 @@
"type": "github"
}
},
"ironbar": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1685985608,
"narHash": "sha256-SSJ8y34G/ygc0a7V/HouUzdbJsn+r++vtxpxuQknQsI=",
"owner": "JakeStanger",
"repo": "ironbar",
"rev": "b4f1c7ac2d101ba52237252fe87476b00ab21bd6",
"type": "github"
},
"original": {
"owner": "JakeStanger",
"repo": "ironbar",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1685931219,
@ -160,10 +199,33 @@
"disko": "disko",
"home-manager": "home-manager",
"hyprland": "hyprland",
"ironbar": "ironbar",
"nixpkgs": "nixpkgs",
"sops-nix": "sops-nix"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"ironbar",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685500416,
"narHash": "sha256-P6wLC+P8o9w4XNLZAbZy3BwKkp1xi/+H9dF+7SXDP70=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9651f0beee6e7a9783cc02eac722854851c65ae7",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
@ -185,6 +247,21 @@
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"locked": {
"lastModified": 1667395993,

View file

@ -25,6 +25,10 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
ironbar = {
url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,

View file

@ -10,6 +10,7 @@ name | description
`git` | version control system
`gtk` | themes
`helix` | modal text editor
`ironbar` | wayland specific bar, written in Rust
`lazygit` | terminal based git command system
`lf` | terminal based file manager
`librewolf` | a hardened firefox fork, and my browser of choice
@ -18,7 +19,6 @@ name | description
`nushell` | my shell of choice
`rofi` | application launcher
`starship` | shell prompt
`waybar` | wayland-specific bar
`wayland` | has my hyprland config, along with session variables for wayland
`wezterm` | my terminal of choice
`zathura` | pdf viewer

71
home/ironbar/default.nix Normal file
View file

@ -0,0 +1,71 @@
{
pkgs,
lib,
...
}: let
compileSCSS = name: source: "${pkgs.runCommandLocal name {} ''
mkdir -p $out
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
''}/${name}.css";
in {
programs.ironbar = {
enable = true;
systemd = true;
style = builtins.readFile (compileSCSS "style" ./style.scss);
config = let
nixlogo = {
type = "custom";
bar = [
{
type = "image";
src = "https://files.artturin.com/files/nixoscolorful.svg";
size = 24;
}
];
};
pfp = {
type = "custom";
bar = [
{
type = "image";
src = "https://img.notohh.dev/JoYRnUdM.png";
size = 24;
}
];
};
uptime = {
type = "sys_info";
format = ["{uptime}"];
};
focused = {
type = "focused";
show_icon = true;
icon_size = 24;
truncate = {
mode = "end";
length = 12;
};
};
sys-info = {
type = "sys_info";
format = [
"{cpu_percent}% 󰍛 "
"{memory_percent}% "
"{net_up:enp2s0} {net_down:enp2s0}"
];
};
tray = {type = "tray";};
clock = {type = "clock";};
in {
monitors = {
"DP-3" = {
position = "top";
anchor_to_edges = true;
start = [nixlogo];
center = [focused];
end = [sys-info clock];
};
};
};
};
}

98
home/ironbar/style.scss Normal file
View file

@ -0,0 +1,98 @@
$rosewater: #f5e0dc;
$flamingo: #f2cdcd;
$pink: #f5c2e7;
$mauve: #cba6f7;
$red: #f38ba8;
$maroon: #eba0ac;
$peach: #fab387;
$yellow: #f9e2af;
$green: #a6e3a1;
$teal: #94e2d5;
$sky: #89dceb;
$sapphire: #74c7ec;
$blue: #89b4fa;
$lavender: #b4befe;
$text: #cdd6f4;
$subtext1: #bac2de;
$subtext0: #a6adc8;
$overlay2: #9399b2;
$overlay1: #7f849c;
$overlay0: #6c7086;
$surface2: #585b70;
$surface1: #45475a;
$surface0: #313244;
$base: #1e1e2e;
$mantle: #181825;
$crust: #11111b;
* {
all: unset;
font-family: jost;
font-size: 13px;
font-weight: bold;
color: $text;
}
#bar {
/* padding-top: 0.6rem; */
padding-left: 1.4rem;
padding-right: 1.4rem;
}
#bar {
#start {
background-color: $base;
border-radius: 8px;
border: 3px solid $sky;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
}
#bar {
#center {
background-color: $base;
border-radius: 18px;
border: 3px solid $pink;
padding-left: 1rem;
padding-right: 1rem;
}
}
#bar {
#end {
background-color: $base;
border-radius: 8px;
border: 3px solid $sky;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
}
.sys-info {
padding: 0.8rem;
}
.clock {
padding-left: 0.8rem;
}
.popup-clock {
.calendar {
background-color: $base;
border-radius: 8px;
border: 3px solid $sky;
padding-left: 0.2rem;
padding-right: 0.2rem;
.header {
border: none;
}
}
.calendar:selected {
background-color: $overlay1;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

View file

@ -1,91 +0,0 @@
{
inputs,
pkgs,
lib,
...
}: let
compileSCSS = name: source: "${pkgs.runCommandLocal name {} ''
mkdir -p $out
${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css
''}/${name}.css";
in {
programs.waybar = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.waybar-hyprland;
settings = {
mainBar = {
output = "DP-3";
layer = "top";
position = "top";
height = 35;
width = 1880;
spacing = 10;
margin-top = 8;
modules-left = [
"image/nixos"
"user"
"wlr/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"cpu"
"memory"
"clock"
"tray"
"custom/wlogout"
];
"image/nixos" = {
path = "/home/notoh/snowflake/home/waybar/assets/nixos.png";
size = 24;
};
"user" = {
format = "{user} up {work_d} days | {work_H} hrs | {work_M} min ";
interval = 60;
icon = false;
};
"hyprland/window" = {
format = "{}";
seperate-outputs = true;
max-length = 35;
};
"wlr/workspaces" = {
format = "{icon}";
on-click = "activate";
all-outputs = true;
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
};
};
"cpu" = {
format = "{usage}% ";
tooltip = "false";
interval = "2";
};
"memory" = {
format = "{}% ";
interval = "15";
};
"clock" = {
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%Y-%m-%d}";
};
"tray" = {
spacing = 0;
};
"custom/wlogout" = {
format = "";
interval = "once";
on-click = "wlogout -c 5 -r 5";
tooltip = "false";
};
};
};
style = builtins.readFile (compileSCSS "waybar-style" ./style.scss);
};
}

View file

@ -1,146 +0,0 @@
/* catppuccin mocha variables */
$rosewater: #f5e0dc;
$flamingo: #f2cdcd;
$pink: #f5c2e7;
$mauve: #cba6f7;
$red: #f38ba8;
$maroon: #eba0ac;
$peach: #fab387;
$yellow: #f9e2af;
$green: #a6e3a1;
$teal: #94e2d5;
$sky: #89dceb;
$sapphire: #74c7ec;
$blue: #89b4fa;
$lavender: #b4befe;
$text: #cdd6f4;
$subtext1: #bac2de;
$subtext0: #a6adc8;
$overlay2: #9399b2;
$overlay1: #7f849c;
$overlay0: #6c7086;
$surface2: #585b70;
$surface1: #45475a;
$surface0: #313244;
$base: #1e1e2e;
$mantle: #181825;
$crust: #11111b;
/* init main bar config */
* {
all: unset;
font-family: FontAwesome, jost;
font-size: 13px;
font-weight: bold;
color: $text;
}
window#waybar {
background-color: transparent;
}
#user,
#workspaces,
#window,
#cpu,
#memory,
#clock,
#tray,
#custom-wlogout {
border-radius: 8px;
background: $base;
padding: 0.5rem;
}
tooltip {
background-color: transparent;
border: none;
}
tooltip label {
color: $text;
background-color: $base;
padding: 0.5rem;
border-radius: 8px;
border: 3px solid $overlay1;
}
image {
background: $base;
border-radius: 8px;
padding-left: 0.5rem;
padding-right: 0.5rem;
}
#user {
border: 3px solid $pink;
}
/* workspaces */
#workspaces {
button {
min-width: 28px;
}
button.active {
border-bottom: 1px solid $red;
}
border: 3px solid $red;
}
/* end workspaces */
#window {
border-radius: 16px;
border: 3px solid $peach;
}
#cpu {
border: 3px solid $red;
}
#memory {
border: 3px solid $mauve;
}
#clock {
border: 3px solid $maroon;
}
/* tray */
#tray {
border: 3px solid $overlay1;
menu {
background: $base;
border-radius: 8px;
border: 3px solid $overlay1;
padding: 1.0rem;
}
}
#tray.passive {
border-bottom: 2px solid $base;
}
#tray.active {
border-bottom: 2px solid $green;
}
#tray.needs-attention {
border-bottom: 2px solid $red;
}
/* end tray */
/* custom modules */
#custom-wlogout {
padding-left: 0.9rem;
padding-right: 0.9rem;
}

View file

@ -90,9 +90,6 @@
sensitivity = -0.5
}
exec-once = waybar & dunst
exec-once = swww init
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

View file

@ -9,7 +9,7 @@
../../home/lf
../../home/zellij
../../home/rofi
../../home/waybar
../../home/ironbar
../../home/wayland/hyprland
../../modules/swayidle.nix
];

View file

@ -26,10 +26,12 @@
substituters = [
"https://hyprland.cachix.org"
"https://cache.nixos.org"
"https://jakestanger.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"jakestanger.cachix.org-1:VWJE7AWNe5/KOEvCQRxoE8UsI2Xs2nHULJ7TEjYm7mM="
];
};
};