bunch of stuff with hyprland config, still not great

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-08-23 12:36:38 -05:00
parent 1d051e2b38
commit e51fb08bfc
11 changed files with 632 additions and 217 deletions

View file

@ -3,11 +3,10 @@
imports = [
./theme.nix
./hyprland.nix
./hyprpanel.nix
./waybar.nix
./hyprpolkitagent.nix
# ./quickshell.nix # TODO replace hyprpanel with custom quickshell...
./wofi.nix
# ./swaync.nix # notifications, hyprpanel has notifications but I want to replace hyprpanel sometime so keeping this here as reference
./swaync.nix
./swaylock.nix
];
}

View file

@ -32,10 +32,10 @@ in
# Default monitor configuration
monitor = "monitor = , preferred, auto, 1";
# Add window rules for hyprpanel stability
windowrulev2 = [
"stayfocused, class:^(hyprpanel)$"
"pin, class:^(hyprpanel)$"
"float, class:.*blueman-manager.*"
"size 700 500, class:.*blueman-manager.*"
"center, class:.*blueman-manager.*"
];
# Input configuration
@ -105,10 +105,15 @@ in
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, n, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, m, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, comma, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, period, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, slash, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
@ -120,8 +125,21 @@ in
"$mainMod SHIFT, l, movewindow, r"
"$mainMod SHIFT, k, movewindow, u"
"$mainMod SHIFT, j, movewindow, d"
"$mainMod SHIFT, n, movetoworkspace, m+1"
"$mainMod SHIFT, p, movetoworkspace, m-1"
"$mainMod SHIFT, 1, movetoworkspacesilent, 1"
"$mainMod SHIFT, n, movetoworkspacesilent, 1"
"$mainMod SHIFT, 2, movetoworkspacesilent, 2"
"$mainMod SHIFT, m, movetoworkspacesilent, 2"
"$mainMod SHIFT, 3, movetoworkspacesilent, 3"
"$mainMod SHIFT, comma, movetoworkspacesilent, 3"
"$mainMod SHIFT, 4, movetoworkspacesilent, 4"
"$mainMod SHIFT, period, movetoworkspacesilent, 4"
"$mainMod SHIFT, 5, movetoworkspacesilent, 5"
"$mainMod SHIFT, slash, movetoworkspacesilent, 5"
"$mainMod SHIFT, 6, movetoworkspacesilent, 6"
"$mainMod SHIFT, 7, movetoworkspacesilent, 7"
"$mainMod SHIFT, 8, movetoworkspacesilent, 8"
"$mainMod SHIFT, 9, movetoworkspacesilent, 9"
"$mainMod SHIFT, 0, movetoworkspacesilent, 10"
# Screenshots
", Print, exec, grimblast copy area"
@ -135,8 +153,8 @@ in
binde = [
# Move between workspaces
"$mainMod, n, workspace, r+1"
"$mainMod, p, workspace, r-1"
# "$mainMod, n, workspace, r+1"
# "$mainMod, p, workspace, r-1"
# Resize windows
"$mainMod CTRL, h, resizeactive, -40 0"
@ -150,6 +168,7 @@ in
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
} cfg.extraOptions;
};
}

View file

@ -1,159 +0,0 @@
{
pkgs,
lib,
...
}:
{
home.packages = with pkgs; [
# aylurs-gtk-shell-git
wireplumber
libgtop
bluez
bluez-tools
networkmanager
dart-sass
wl-clipboard
upower
gvfs
gtksourceview3
libchamplain_libsoup3 # libsoup3
## Used for Tracking GPU Usage in your Dashboard (NVidia only)
# python
# python-gpustat
## To control screen/keyboard brightness
brightnessctl
## Only if a pywal hook from wallpaper changes applied through settings is desired
# pywal
## To check for pacman updates in the default script used in the updates module
# pacman-contrib
## To switch between power profiles in the battery module
power-profiles-daemon
## To take snapshots with the default snapshot shortcut in the dashboard
grimblast
## To record screen through the dashboard record shortcut
wf-recorder
## To enable the eyedropper color picker with the default snapshot shortcut in the dashboard
hyprpicker
## To enable hyprland's very own blue light filter
hyprsunset
## To click resource/stat bars in the dashboard and open btop
btop
## To enable matugen based color theming
# matugen
## To enable matugen based color theming and setting wallpapers
# swww
];
# uncomment this to make it possible to use the normal config agent using
# > hyprpanel toggleWindow settings-dialog
# xdg.configFile.hyprpanel.target = lib.mkForce "hyprpanel/config.generated.json";
programs.hyprpanel = {
enable = true;
settings = {
bar.layouts = {
"DP-1" = {
left = [
# "dashboard"
"workspaces"
"media"
"volume"
];
middle = [
"notifications"
"clock"
"cputemp"
"cpu"
"ram"
"storage"
];
right = [
"netstat"
"network"
"bluetooth"
# "battery"
# "updates"
"kbinput"
"power"
];
};
"*" = {
left = [
"workspaces"
];
middle = [
"clock"
];
right = [
"systray"
"cava"
];
};
};
bar.workspaces = {
# workspaces = 10;
show_icons = false;
show_numbered = false;
showWsIcons = true;
showApplicationIcons = false;
workspaceMask = true;
numbered_active_indicator = "highlight";
workspaceIconMap = {
"1" = ""; # "1" いち | ひとつ
"2" = ""; # "2" に | ふたつ
"3" = ""; # "3" さん | みっつ
"4" = ""; # "4" し | よん
"5" = ""; # "5" ご | いつつ
"6" = ""; # "6" ろく | むっつ
"7" = ""; # "7" しち | ななつ
"8" = ""; # "8" はち | やっつ
"9" = ""; # "9" きゅう | ここのつ
"10" = ""; # "10" じゅう | とお
"11" = ""; # "11" じゅういち | じゅうひとつ
"12" = ""; # "12" じゅうに | じゅうふたつ
"13" = ""; # "13" じゅうさん | じゅうみっつ
"14" = ""; # "14" じゅうし | じゅうよん
"15" = ""; # "15" じゅうご | じゅういつつ
"16" = ""; # "16" じゅうろく | じゅうむっつ
"17" = ""; # "17" じゅうしち | じゅうななつ
"18" = ""; # "18" じゅうはち | じゅうやっつ
"19" = ""; # "19" じゅうきゅう | じゅうここのつ
"20" = ""; # "20" にじゅう | にじっつ
};
};
notifications.ignore = [ "spotify" ];
customModules = {
cava = {
showActiveOnly = true;
showIcon = false;
icon = "";
};
};
theme = {
matugen = false;
name = "tokyo-night-vivid";
font = {
name = "JetBrainsMonoNL Nerd Font Regular";
size = "12px";
};
bar = {
transparent = true;
floating = true;
outer_spacing = "0px";
margin_bottom = "0px";
margin_top = "0px";
margin_sides = "0px";
};
};
wallpaper = {
enable = false;
image = "";
};
};
};
}

View file

@ -4,5 +4,263 @@
{
services.swaync = {
enable = true;
settings = {
ignore = [
"com.spotify.Client"
];
positionX = "center";
positionY = "top";
layer = "overlay";
control-center-layer = "top";
layer-shell = true;
cssPriority = "application";
control-center-margin-top = 0;
control-center-margin-bottom = 0;
control-center-margin-right = 0;
control-center-margin-left = 0;
notification-2fa-action = true;
notification-inline-replies = false;
notification-icon-size = 64;
notification-body-image-height = 100;
notification-body-image-width = 200;
timeout = 10;
timeout-low = 5;
timeout-critical = 0;
control-center-width = 500;
control-center-height = 600;
notification-window-width = 500;
keyboard-shortcuts = true;
image-visibility = "when-available";
transition-time = 200;
hide-on-clear = false;
hide-on-action = true;
script-fail-notify = true;
widgets = [
"inhibitors"
"title"
"dnd"
"volume"
"backlight"
"mpris"
"buttons-grid#quick"
"notifications"
];
# Widget configurations
widget-config = {
inhibitors = {
text = "Inhibitors";
button-text = "Clear All";
clear-all-button = true;
};
title = {
text = "Notifications";
clear-all-button = true;
button-text = "Clear All";
};
dnd.text = "Do Not Disturb";
mpris = {
image-size = 96;
image-radius = 12;
};
volume = {
label = "󰕾";
show-per-app = true;
};
backlight = {
label = "󰃟";
device = "intel_backlight";
};
"buttons-grid#quick" = {
columns = 4; # adjust: 3/4/5
icon-size = 20; # tweak to taste
actions = [
# Power
{
label = "󰐥";
tooltip = "Shutdown";
command = "systemctl poweroff";
}
{
label = "󰜉";
tooltip = "Reboot";
command = "systemctl reboot";
}
{
label = "󰍃";
tooltip = "Logout";
command = "hyprctl dispatch exit";
}
{
label = "󰤄";
tooltip = "Suspend";
command = "systemctl suspend";
}
# Network (requires NetworkManager/nmcli)
{
label = "󰖪";
tooltip = "Toggle WiFi";
command = "nmcli radio wifi toggle";
}
{
label = "󰖩";
tooltip = "WiFi Settings";
command = "nm-connection-editor";
}
# Bluetooth (requires bluez/bluetoothctl, blueman optional)
{
label = "󰂲";
tooltip = "Toggle Bluetooth";
command = "bluetoothctl power toggle";
}
{
label = "󰂯";
tooltip = "Bluetooth Settings";
command = "blueman-manager";
}
];
};
};
};
# Custom CSS for the control center
style = ''
.control-center {
background: #1a1b26;
border: 2px solid #7dcae4;
border-radius: 12px;
}
.control-center-list {
background: transparent;
}
.control-center .notification-row:focus,
.control-center .notification-row:hover {
opacity: 1;
background: #24283b;
}
.notification {
border-radius: 8px;
margin: 6px 12px;
box-shadow: 0 0 0 1px rgba(125, 196, 228, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
padding: 0;
}
/* Widget styling */
.widget-title {
margin: 8px;
font-size: 1.5rem;
color: #c0caf5;
}
.widget-dnd {
margin: 8px;
font-size: 1.1rem;
color: #c0caf5;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #414868;
border: 1px solid #7dcae4;
}
.widget-dnd > switch:checked {
background: #7dcae4;
}
.widget-mpris {
color: #c0caf5;
background: #24283b;
padding: 8px;
margin: 8px;
border-radius: 8px;
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
color: #9ece6a;
}
.widget-volume {
background: #24283b;
padding: 8px;
margin: 8px;
border-radius: 8px;
color: #c0caf5;
}
.widget-backlight {
background: #24283b;
padding: 8px;
margin: 8px;
border-radius: 8px;
color: #c0caf5;
}
.widget-menubar {
background: #24283b;
padding: 8px;
margin: 8px;
border-radius: 8px;
color: #c0caf5;
}
.widget-menubar .menu-item button {
background: #1f2335;
color: #c0caf5;
border-radius: 8px;
padding: 6px 10px;
margin: 4px;
border: 1px solid #2e3440;
font-family: "JetBrainsMonoNL Nerd Font";
}
.widget-menubar .menu-item button:hover {
background: #414868;
border-color: #7dcae4;
}
.topbar-buttons button {
border: none;
background: transparent;
color: #c0caf5;
font-size: 1.1rem;
border-radius: 8px;
margin: 0 4px;
padding: 8px;
}
.topbar-buttons button:hover {
background: #414868;
}
.topbar-buttons button:active {
background: #7dcae4;
color: #1a1b26;
}
'';
};
}

View file

@ -0,0 +1,264 @@
{
...
}:
{
programs.waybar = {
enable = true;
systemd.enable = true;
settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
spacing = 6;
margin-top = 0;
margin-bottom = 0;
margin-left = 10;
margin-right = 10;
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"clock"
"temperature"
"custom/notifications"
"cpu"
"memory"
"disk"
];
modules-right = [
"pulseaudio"
"network"
"bluetooth"
"hyprland/language"
"custom/power"
];
# Workspaces configuration
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
"1" = "";
"2" = "";
"3" = "";
"4" = "";
"5" = "";
"6" = "";
"7" = "";
"8" = "";
"9" = "";
"10" = "";
"11" = "";
"12" = "";
"13" = "";
"14" = "";
"15" = "";
"16" = "";
"17" = "";
"18" = "";
"19" = "";
"20" = "";
};
show-special = false;
};
pulseaudio = {
format = "{icon} {volume}%";
format-bluetooth = "󰂰 {volume}%";
format-bluetooth-muted = "󰂲 ";
format-muted = "󰖁 ";
format-source = "󰍬 {volume}%";
format-source-muted = "󰍭 ";
format-icons = {
headphone = "󰋋";
hands-free = "󰂑";
headset = "󰂑";
phone = "󰏲";
portable = "󰦧";
car = "󰄋";
default = [
"󰕿"
"󰖀"
"󰕾"
];
};
};
"custom/notifications" = {
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 = "swaync-client -t -sw";
on-click-right = "swaync-client -d -sw";
escape = true;
tooltip = false;
};
# Clock
clock.format = "{:%Y-%m-%d} {:%H:%M}";
temperature = {
thermal-zone = 2;
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
format-critical = "󰔏 {temperatureC}°C";
format = "󰔏 {temperatureC}°C";
};
cpu = {
format = "󰻠 {usage}%";
tooltip = false;
on-click = "btop";
};
memory = {
format = "󰍛 {}%";
on-click = "btop";
};
disk = {
interval = 30;
format = "󰋊 {percentage_used}%";
path = "/";
on-click = "btop";
};
network = {
format-wifi = "󰤨 {essid} ({signalStrength}%)";
format-ethernet = "󰈀 {ipaddr}/{cidr}";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "󰈀 {ifname} (No IP)";
format-disconnected = "󰖪 Disconnected";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
bluetooth = {
format = "󰂯 {status}";
format-connected = "󰂱 {device_alias}";
format-connected-battery = "󰂱 {device_alias} {device_battery_percentage}%";
tooltip-format = "{controller_alias}\t{controller_address}\n\n{num_connections} connected";
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}";
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
tooltip-format-enumerate-connected-battery = "{device_alias}\t{device_address}\t{device_battery_percentage}%";
on-click = "blueman-manager";
};
# Keyboard input (language)
"hyprland/language" = {
format = "{}";
format-en = "EN";
format-ja = "JP";
};
"custom/power" = {
format = "";
tooltip = false;
on-click = "wlogout";
};
};
};
style = ''
* {
font-family: "JetBrainsMonoNL Nerd Font";
font-size: 12px;
border: none;
border-radius: 0;
min-height: 0;
}
window#waybar {
background: transparent;
border-radius: 10px;
margin: 0px;
}
.modules-left,
.modules-center,
.modules-right {
background: rgba(26, 27, 38, 0.8);
border-radius: 10px;
margin: 4px;
padding: 0 10px;
}
#workspaces {
padding: 0 5px;
}
#workspaces button {
padding: 0 8px;
background: transparent;
color: #c0caf5;
border-radius: 5px;
margin: 2px;
}
#workspaces button:hover {
background: rgba(125, 196, 228, 0.2);
color: #7dcae4;
}
#workspaces button.active {
background: #7dcae4;
color: #1a1b26;
}
#pulseaudio,
#custom-notifications,
#clock,
#temperature,
#cpu,
#memory,
#disk,
#network,
#bluetooth,
#language,
#custom-power {
padding: 0 8px;
color: #c0caf5;
margin: 2px;
}
#temperature.critical {
color: #f7768e;
}
#custom-power {
color: #f7768e;
padding: 0 10px;
}
#custom-power:hover {
background: rgba(247, 118, 142, 0.2);
border-radius: 5px;
}
#network.disconnected {
color: #f7768e;
}
#bluetooth.disabled {
color: #565f89;
}
#pulseaudio.muted {
color: #565f89;
}
'';
};
}