new waybar skeleton done, beginning work on CSS theme

This commit is contained in:
pagedmov
2024-10-21 05:05:43 -04:00
parent 0cfcd2e414
commit 4f39e0f7c5
5 changed files with 148 additions and 433 deletions

View File

@@ -41,8 +41,8 @@
} @ inputs: let } @ inputs: let
system = "x86_64-linux"; system = "x86_64-linux";
username = "pagedmov"; username = "pagedmov";
wallpaper = "${self}/media/wallpapers/cabin-2.jpg"; wallpaper = "${self}/media/wallpapers/nord-balloons.png";
base16scheme = "chalk"; # can be easily changed with the chscheme script base16scheme = "nord"; # can be easily changed with the chscheme script
# Map colors from yaml to attribute set # Map colors from yaml to attribute set
# Extracting colors into a set here allows them to be propagated across the entire config # Extracting colors into a set here allows them to be propagated across the entire config

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 KiB

View File

@@ -1,136 +1,87 @@
{...}: {
pkgs,
...
}:
# Grocery list:
# Clock
# CPU/MEM meters
# Home folder and Nix store storage tracking?
# Workspaces (per monitor would be nice)
# A separate bar for both monitors
# secondary monitor will have a vertical bar on the left side
# Can contain more info with two bars
let
workspaces = {
format = "{icon}";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"6" = "";
};
persistent-workspaces = {
"HDMI-A-1" = [ 1 2 3 ];
"DP-1" = [ 4 5 6 ];
};
};
in
{ {
programs.waybar.settings.mainBar = { programs.waybar.settings.mainBar = {
layer = "top"; layer = "bottom";
position = "left"; output = "DP-1";
mod = "dock"; position = "top";
margin-left = 4; name = "mainBar";
margin-right = 0; mode = "dock";
margin-top = 4;
margin-bottom = 4;
exclusive = true;
passthrough = false;
"gtk-layer-shell" = true;
reload_style_on_change = true;
modules-left = [ modules-left = [
"custom/spacer"
"hyprland/workspaces" "hyprland/workspaces"
"custom/spacer" "cava"
]; ];
modules-center = [
modules-right = [
"group/expand"
"group/expand-3"
"network"
"clock" "clock"
"upower" ];
"custom/notification" modules-right = [
"custom/disk-icon"
"memory"
"cpu"
"group/powerbtns"
]; ];
"custom/led" = { "hyprland/workspaces" = workspaces;
format = "<span color='#AFAFAF'>󰍿</span><span color='#AFAFAF'> </span>";
format-alt = "󰍿<span color='#83A1F6'> </span>"; cava = {
on-click = "~/mouse.sh"; framerate = 30;
rotate = 90; autosens = 1;
tooltip = false; sensitivity = 1;
bars = 14;
lower_cutoff_freq = 50;
higher_cutoff_freq = 10000;
method = "pulse";
source = "auto";
stereo = true;
reverse = true;
bar_delimiter = 0;
monstercat = false;
waves = false;
noise_reduction = 0.77;
input_delay = 2;
format-icons = ["" "" "" "" "" "" "" "" ];
}; };
"group/expand-3" = { "custom/disk-icon" = {
orientation = "vertical"; exec = ''
drawer = { df /dev/disk/by-partlabel/disk-main-home | awk '$6 == "/home" {printf "{\"class\": \"disk-icon\", \"tooltip\": \"/home: %.1fGB / %.1fTB\", \"percentage\": \"%.0f\"}\n", $3 / 1024 / 1024, $2 / 1024 / 1024 / 1024, $5}' | jq --unbuffered --compact-output
"transition-duration" = 600;
"children-class" = "not-power";
"transition-to-left" = false;
"click-to-reveal" = false;
};
modules = [
"pulseaudio"
"pulseaudio/slider"
];
};
clock = {
format = "{:%I\n%M}";
interval = 1;
rotate = 0;
on-click = "/usr/local/bin/ags -t ActivityCenter";
tooltip-format = "<tt>{calendar}</tt>";
calendar = {
mode = "month";
"mode-mon-col" = 3;
"on-scroll" = 1;
"on-click-right" = "mode";
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b>{}</b></span>";
};
};
actions = {
"on-click-right" = "mode";
"on-click-forward" = "tz_up";
"on-click-backward" = "tz_down";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
upower = {
icon-size = 20;
format = "";
on-click = "/home/anik/battery.sh";
tooltip = true;
rotate = 0;
tooltip-spacing = 20;
on-click-right = "pkill waybar & hyprctl dispatch exec waybar";
};
"upower#headset" = {
format = " {percentage}";
"native-path" = "/org/freedesktop/UPower/devices/headset_dev_A6_98_9A_0D_D3_49";
"show-icon" = false;
tooltip = false;
};
"group/expand-4" = {
orientation = "horizontal";
drawer = {
"transition-duration" = 600;
"children-class" = "not-power";
"transition-to-left" = true;
"click-to-reveal" = true;
};
modules = ["upower" "upower/headset"];
};
network = {
tooltip = true;
format-wifi = "{icon}";
format-icons = ["󰤟" "󰤢" "󰤥"];
rotate = 0;
format-ethernet = "󰈀 ";
tooltip-format = ''
Network: <big><b>{essid}</b></big>\n
Signal strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\n
Frequency: <b>{frequency}MHz</b>\n
Interface: <b>{ifname}</b>\n
IP: <b>{ipaddr}/{cidr}</b>\n
Gateway: <b>{gwaddr}</b>\n
Netmask: <b>{netmask}</b>
''; '';
format-linked = "󰈀 {ifname} (No IP)"; interval = 300;
format-disconnected = ""; return-type = "json";
tooltip-format-disconnected = "Disconnected"; rotate = 270;
on-click = "/usr/local/bin/ags -t ControlPanel"; format = "{icon}";
interval = 2; format-icons = [
}; "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥"
];
"custom/smallspacer" = {
format = "";
rotate = 0;
}; };
memory = { memory = {
@@ -145,157 +96,97 @@
cpu = { cpu = {
interval = 1; interval = 1;
format = "{icon}";
rotate = 270; rotate = 270;
format = "{icon}";
format-icons = [ format-icons = [
"󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥"
]; ];
}; };
"mpris" = {
format = "󰝚 {player_icon}";
rotate = 90;
"format-paused" = "<span color='#2d2d2e'>󰝚 {status_icon}</span>";
"max-length" = 6;
"player-icons" = {
default = "󰏤";
mpv = "󰝚";
};
"status-icons" = {
paused = "󰐊";
};
};
tray = {
"icon-size" = 16;
rotate = 0;
spacing = 3;
};
"group/expand" = {
orientation = "vertical";
drawer = {
"transition-duration" = 600;
"children-class" = "not-power";
"transition-to-left" = true;
};
modules = ["custom/menu" "custom/spacer" "tray"];
};
"custom/menu" = {
format = "󰅃";
rotate = 0;
};
"custom/notification" = {
tooltip = false;
rotate = 0;
format = "{icon}";
format-icons = {
notification = "󱅫";
none = "󰂚";
"dnd-notification" = "󱅫";
"dnd-none" = "󰂚";
"inhibited-notification" = "󱅫";
"inhibited-none" = "󰂚";
"dnd-inhibited-notification" = "󱅫";
"dnd-inhibited-none" = "󰂚";
};
"return-type" = "json";
"exec-if" = "which swaync-client";
exec = "swaync-client -swb";
"on-click-right" = "swaync-client -d -sw";
"on-click" = "swaync-client -t -sw";
escape = true;
};
"hyprland/window" = {
format = "<span weight='bold' >{class}</span>";
"on-click-right" = "pkill waybar & hyprctl dispatch exec waybar";
rotate = 90;
"max-length" = 120;
icon = false;
"icon-size" = 13;
};
"custom/power" = { "custom/power" = {
format = "@{}"; on-click = "shutdown now";
rotate = 0; tooltip = false;
"on-click" = "ags -t ControlPanel"; format = " ";
"on-click-right" = "pkill ags";
tooltip = true;
}; };
"custom/spacer" = { "custom/logout" = {
format = "|"; on-click = "hyprctl dispatch exit";
rotate = 90; tooltip = false;
format = "󰗽 ";
}; };
"hyprland/workspaces" = { "custom/reboot" = {
format = "{icon}"; on-click = "reboot";
"format-icons" = { tooltip = false;
default = ""; format = " ";
active = "";
};
}; };
"wlr/workspaces" = { "group/powerbtns" = {
"persistent-workspaces" = { orientation = "horizontal";
"1" = ["HDMI-A-1"]; drawer = {
"2" = ["HDMI-A-1"]; transition-duration = 500;
"3" = ["HDMI-A-1"]; children-class = "power-drawer";
"4" = ["DP-1"]; transition-left-to-right = false;
"5" = ["DP-1"];
"6" = ["DP-1"];
}; };
modules = [
"custom/power"
"custom/logout"
"custom/reboot"
];
}; };
};
# ------------------------------------------
programs.waybar.settings.sideBar = {
layer = "bottom";
output = "HDMI-A-1";
position = "right";
name = "sideBar";
mode = "dock";
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"tray"
];
modules-right = [
"pulseaudio/slider"
"pulseaudio"
"network"
];
"hyprland/workspaces" = workspaces;
"pulseaudio/slider" = {
orientation = "vertical";
};
pulseaudio = { pulseaudio = {
format = "{icon}"; format = "{icon}";
rotate = 0; format-muted = " ";
format-muted = "";
tooltip-format = "{icon} {desc} // {volume}%";
scroll-step = 5;
format-icons = { format-icons = {
headphone = " "; default = [
"hands-free" = " "; " "
headset = " "; " "
phone = " "; ];
portable = " ";
car = " ";
default = ["" " " " "];
}; };
}; on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
"pulseaudio/slider" = { on-click-right = "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'";
min = 5;
max = 100;
rotate = 0;
device = "pulseaudio";
scroll-step = 1;
orientation = "vertical";
}; };
cava = { network = {
"cava_config" = "~/.config/cava/config"; interval = 30;
framerate = 60; format-wifi = "󰖩 ";
autosens = 1; tooltip-format-wifi = "{essid} ({signalStrength}%)";
bars = 14; format-ethernet = " ";
"lower_cutoff_freq" = 50; tooltip-format-ethernet = "{ifname}";
"higher_cutoff_freq" = 10000; format-disconnected = "󰖪 ";
method = "pulse"; tooltip-format-disconnected = "Disconnected";
source = "auto"; on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'";
stereo = true;
reverse = false;
"bar_delimiter" = 0;
monstercat = false;
waves = false;
"noise_reduction" = 0.77;
"input_delay" = 2;
"format-icons" = ["" "" "" "" "" "" "" ""];
actions = {
"on-click-right" = "mode";
};
}; };
}; };
} }

View File

@@ -29,181 +29,5 @@ let
in in
{ {
programs.waybar.style = '' programs.waybar.style = ''
* {
font-family: "JetBrains Mono Nerd Font";
font-weight: bold;
font-size: 14;
}
#battery {
font-weight: normal;
font-size: 22px;
color: #a6d189;
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#tray menu * {
font-weight: bold;
font-size: 13px;
color: #FBF1C7;
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#taskbar button {
box-shadow: none;
font-size: 4px;
border-radius: 9px;
color: #A1BDCE;
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
tooltip {
background: #${bg.darkester};
color: #${fg.lighter};
font-size: 13px;
border-radius: 7px;
border: 2px solid #${bg.dark};
background: #${bg.darkest};
}
window#waybar {
opacity: 0.85;
background: #${bg.darkester};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#workspaces {
font-weight: normal;
color: transparent;
margin-left: -5px;
margin-top: 0px;
border: 0px;
border-radius: 6px;
}
#backlight-slider slider,
#pulseaudio-slider slider {
background: #${colors.color3};
background-color: transparent;
box-shadow: none;
}
#backlight-slider trough,
#pulseaudio-slider trough {
min-width: 9px;
min-height: 90px;
border-radius: 8px;
background: #343434;
}
#backlight-slider highlight,
#pulseaudio-slider highlight {
border-radius: 8px;
background-color: #2096C0;
}
#pulseaudio {
font-weight: normal;
font-size: 18px;
color: #${colors.color3};
background: #${bg.darkest};
border: 2px solid #${bg.dark};
margin: 4px;
margin-bottom: 0px;
border: 2px solid @unfocused_borders;
border-bottom: 2px solid #151515;
border-radius: 6px;
border-bottom-left-radius: 0px;
border-bottom-right-radius: 0px;
}
#network {
font-size: 19px;
color: #${colors.color4};
background: #${bg.darkest};
margin: 4px;
margin-top: 0;
border: 2px solid @unfocused_borders;
border-top: 2px solid #151515;
border-radius: 6px;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
}
#clock {
color: #${colors.color6};
font-size: 15px;
font-weight: 900;
font-family: "CaskaydiaCove Nerd Font Mono";
background: #${bg.darkest};
margin: 4px;
border-radius: 6px;
border: 2px solid @unfocused_borders;
border-radius: 6px;
}
#custom-notification {
font-family: "JetBrains Mono Nerd Font";
font-size: 21px;
color: #${colors.color7};
background: #${bg.darkest};
margin: 4px;
border: 2px solid @unfocused_borders;
border-radius: 6px;
}
#custom-power {
font-size: 15px;
color: #FFFFFF;
background: rgba(22, 19, 32, 0.9);
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#backlight {
color: #${fg.lighter};
font-weight: normal;
font-size: 19px;
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#custom-spacer {
opacity: 0.0;
}
#tray menu separator {
min-height: 10px;
}
#cpu {
font-weight: normal;
font-size: 22px;
color: #${fg.lighter};
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
#memory {
font-weight: normal;
font-size: 22px;
color: #${fg.lighter};
background: #${bg.darkest};
border: 2px solid #${bg.dark};
border-radius: 6px;
}
''; '';
} }

View File

@@ -26,7 +26,7 @@
desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)"; desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)";
} }
{ {
command = "setlocal textwidth = 135"; command = "setlocal textwidth=135";
event = ["BufWinEnter" "BufEnter"]; event = ["BufWinEnter" "BufEnter"];
pattern = ["*.md" "*.wiki" "*.txt"]; pattern = ["*.md" "*.wiki" "*.txt"];
desc = "Set automatic linebreaks in plain text file formats"; desc = "Set automatic linebreaks in plain text file formats";