hyprpanel is basically how I want it, keeps breaking with screenshots though
This commit is contained in:
parent
5bd860e89d
commit
00f4882111
20 changed files with 758 additions and 158 deletions
87
common/desktop_environment/hyprland/default.nix
Normal file
87
common/desktop_environment/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"desktopEnvironment"
|
||||
"hyprland"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path config;
|
||||
in
|
||||
with lib;
|
||||
{
|
||||
options =
|
||||
{ }
|
||||
// lib.attrsets.setAttrByPath cfg_path {
|
||||
enable = lib.mkEnableOption "hyprland desktop environment";
|
||||
terminalCommand = mkOption {
|
||||
type = lib.types.str;
|
||||
default = "kitty";
|
||||
description = "The terminal command to use.";
|
||||
};
|
||||
extraOptions = mkOption {
|
||||
type = lib.types.attrs;
|
||||
default = { };
|
||||
description = "Extra options for Hyprland configuration.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable for all users
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
./home_manager
|
||||
];
|
||||
};
|
||||
|
||||
# Display Manager
|
||||
services = {
|
||||
displayManager = {
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Caps Lock as Escape for console/tty
|
||||
console.useXkbConfig = true;
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
options = "caps:escape";
|
||||
};
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wl-clipboard
|
||||
wl-clip-persist
|
||||
wofi
|
||||
nemo
|
||||
feh
|
||||
];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
|
||||
# Environment variables
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GTK_THEME = "Adwaita:dark";
|
||||
};
|
||||
|
||||
# Qt theming
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk2";
|
||||
style = "adwaita-dark";
|
||||
};
|
||||
};
|
||||
}
|
||||
13
common/desktop_environment/hyprland/home_manager/default.nix
Normal file
13
common/desktop_environment/hyprland/home_manager/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./theme.nix
|
||||
./hyprland.nix
|
||||
./hyprlock.nix
|
||||
./hyprpanel.nix
|
||||
./hyprpolkitagent.nix
|
||||
# ./quickshell.nix
|
||||
./wofi.nix
|
||||
# ./swaync.nix
|
||||
];
|
||||
}
|
||||
154
common/desktop_environment/hyprland/home_manager/hyprland.nix
Normal file
154
common/desktop_environment/hyprland/home_manager/hyprland.nix
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../../../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"desktopEnvironment"
|
||||
"hyprland"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
# set the Hyprland and XDPH packages to null to use the ones from the NixOS module
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
hyprspace
|
||||
];
|
||||
|
||||
settings = lib.attrsets.recursiveUpdate {
|
||||
# exec-once = [
|
||||
# "waybar"
|
||||
# ];
|
||||
|
||||
# Default monitor configuration
|
||||
monitor = "monitor = , preferred, auto, 1";
|
||||
|
||||
# Add window rules for hyprpanel stability
|
||||
windowrulev2 = [
|
||||
"stayfocused, class:^(hyprpanel)$"
|
||||
"pin, class:^(hyprpanel)$"
|
||||
];
|
||||
|
||||
# Input configuration
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
kb_options = "caps:escape";
|
||||
|
||||
follow_mouse = 2;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
};
|
||||
};
|
||||
|
||||
# General settings
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 4;
|
||||
border_size = 1;
|
||||
"col.active_border" = "rgba(797979aa)";
|
||||
"col.inactive_border" = "rgba(393939aa)";
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
# Decoration
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
blur.enabled = false;
|
||||
};
|
||||
|
||||
# Animations
|
||||
animations = {
|
||||
enabled = false;
|
||||
};
|
||||
|
||||
# Layout
|
||||
dwindle = {
|
||||
pseudotile = true;
|
||||
preserve_split = true;
|
||||
};
|
||||
|
||||
# Misc
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
};
|
||||
|
||||
# Key bindings
|
||||
"$mainMod" = "SUPER";
|
||||
|
||||
bind = [
|
||||
# Applications
|
||||
"$mainMod, Return, exec, ${cfg.terminalCommand}"
|
||||
"$mainMod, Space, exec, pkill wofi || wofi --show drun"
|
||||
"$mainMod, q, killactive"
|
||||
"$mainMod SHIFT, q, exec, hyprlock"
|
||||
"$mainMod, f, togglefloating"
|
||||
"$mainMod, g, pseudo"
|
||||
"$mainMod, t, togglesplit"
|
||||
|
||||
# Move focus with mainMod + hjkl
|
||||
"$mainMod, h, movefocus, l"
|
||||
"$mainMod, l, movefocus, r"
|
||||
"$mainMod, k, movefocus, u"
|
||||
"$mainMod, j, movefocus, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Window management (similar to your GNOME setup)
|
||||
"$mainMod SHIFT, h, movewindow, l"
|
||||
"$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"
|
||||
|
||||
# Screenshots
|
||||
", Print, exec, grimblast copy area"
|
||||
];
|
||||
|
||||
bindr = [
|
||||
# overview
|
||||
"$mainMod, SUPER_L, overview:toggle, all"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# Move between workspaces
|
||||
"$mainMod, n, workspace, r+1"
|
||||
"$mainMod, p, workspace, r-1"
|
||||
|
||||
# Resize windows
|
||||
"$mainMod CTRL, h, resizeactive, -40 0"
|
||||
"$mainMod CTRL, l, resizeactive, 40 0"
|
||||
"$mainMod CTRL, k, resizeactive, 0 -20"
|
||||
"$mainMod CTRL, j, resizeactive, 0 20"
|
||||
];
|
||||
|
||||
# Mouse bindings
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
} cfg.extraOptions;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
hide_cursor = true;
|
||||
# no_fade_in = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
143
common/desktop_environment/hyprland/home_manager/hyprpanel.nix
Normal file
143
common/desktop_environment/hyprland/home_manager/hyprpanel.nix
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
{
|
||||
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
|
||||
];
|
||||
# xdg.configFile.hyprpanel.target = lib.mkForce "hyprpanel/config.generated.json";
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
settings = {
|
||||
bar.layouts = {
|
||||
"DP-1" = {
|
||||
left = [
|
||||
# "dashboard"
|
||||
"workspaces"
|
||||
"media"
|
||||
"volume"
|
||||
"systray"
|
||||
"cava"
|
||||
];
|
||||
|
||||
middle = [
|
||||
"notifications"
|
||||
"clock"
|
||||
"cputemp"
|
||||
"cpu"
|
||||
"ram"
|
||||
"storage"
|
||||
];
|
||||
|
||||
right = [
|
||||
"netstat"
|
||||
"network"
|
||||
"bluetooth"
|
||||
# "battery"
|
||||
# "updates"
|
||||
"kbinput"
|
||||
"power"
|
||||
];
|
||||
};
|
||||
"*" = {
|
||||
left = [
|
||||
"workspaces"
|
||||
];
|
||||
middle = [
|
||||
"clock"
|
||||
];
|
||||
right = [ ];
|
||||
};
|
||||
};
|
||||
bar.workspaces = {
|
||||
# workspaces = 10;
|
||||
show_icons = false;
|
||||
show_numbered = false;
|
||||
showWsIcons = true;
|
||||
showApplicationIcons = false;
|
||||
workspaceMask = true;
|
||||
workspaceIconMap = {
|
||||
"1" = "一"; # "1" いち | ひとつ
|
||||
"2" = "二"; # "2" に | ふたつ
|
||||
"3" = "三"; # "3" さん | みっつ
|
||||
"4" = "四"; # "4" し | よん
|
||||
"5" = "五"; # "5" ご | いつつ
|
||||
"6" = "六"; # "6" ろく | むっつ
|
||||
"7" = "七"; # "7" しち | ななつ
|
||||
"8" = "八"; # "8" はち | やっつ
|
||||
"9" = "九"; # "9" きゅう | ここのつ
|
||||
"10" = "十"; # "10" じゅう | とお
|
||||
};
|
||||
};
|
||||
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 = "";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.hyprpolkitagent = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../../../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"desktopEnvironment"
|
||||
"hyprland"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
quickshell
|
||||
|
||||
pulseaudio
|
||||
brightnessctl
|
||||
networkmanager
|
||||
bluez
|
||||
bluez-tools
|
||||
power-profiles-daemon
|
||||
upower
|
||||
systemd
|
||||
hyprlock
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
ccfg = import ../../../config.nix;
|
||||
cfg_path = [
|
||||
ccfg.custom_config_key
|
||||
"desktopEnvironment"
|
||||
"hyprland"
|
||||
];
|
||||
cfg = lib.attrsets.getAttrFromPath cfg_path osConfig;
|
||||
in
|
||||
{
|
||||
|
||||
}
|
||||
32
common/desktop_environment/hyprland/home_manager/theme.nix
Normal file
32
common/desktop_environment/hyprland/home_manager/theme.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
# x11.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
# GTK theming
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Grey-Darkest";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 11;
|
||||
};
|
||||
};
|
||||
}
|
||||
26
common/desktop_environment/hyprland/home_manager/wofi.nix
Normal file
26
common/desktop_environment/hyprland/home_manager/wofi.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
settings = {
|
||||
width = 500;
|
||||
height = 600;
|
||||
location = "bottom";
|
||||
show = "drun";
|
||||
prompt = "...";
|
||||
filter_rate = 100;
|
||||
allow_markup = true;
|
||||
no_actions = true;
|
||||
halign = "fill";
|
||||
orientation = "vertical";
|
||||
content_halign = "fill";
|
||||
insensitive = true;
|
||||
allow_images = true;
|
||||
image_size = 40;
|
||||
gtk_dark = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue