Update Hyprland

This commit is contained in:
albert 2024-08-18 14:06:00 +09:00
parent 18742093c7
commit 3208537433
Signed by: albert
GPG key ID: 3895DD267CA11BA9
13 changed files with 123 additions and 78 deletions

View file

@ -63,7 +63,7 @@
# User Machines
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; unfree = true; desktop = "plasma6"; };
nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; desktop = "plasma6"; };
nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; desktop = "hyprland"; theme = "gruvbox"; };
steamdeck = libx.mkDeck { hostname = "steamdeck"; desktop = "plasma6"; };
# Raspberry Pi's
@ -85,7 +85,7 @@
# User Machines
"albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "plasma6"; };
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "plasma6"; };
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "gruvbox"; };
"albert@steamdeck" = libx.mkHome { hostname = "steamdeck"; desktop = "plasma6"; };
# Raspberry Pi's

View file

@ -27,9 +27,9 @@
];
xwayland.force_zero_scaling = false;
general = {
gaps_in = "5";
gaps_out = "10";
border_size = "1";
gaps_in = "8";
gaps_out = "8";
border_size = "2";
resize_on_border = "true";
extend_border_grab_area = "15";
layout = "dwindle";
@ -50,7 +50,6 @@
gestures = {
workspace_swipe = true;
workspace_swipe_fingers = 3;
workspace_swipe_numbered = false;
};
misc = {
disable_hyprland_logo = true;
@ -58,7 +57,7 @@
key_press_enables_dpms = true;
};
decoration = {
rounding = 3;
rounding = 15;
active_opacity = 0.75;
inactive_opacity = 0.6;
fullscreen_opacity = 1.0;
@ -89,7 +88,6 @@
preserve_split = true;# you probably want this
no_gaps_when_only = 1; # If it's the only window int he layout, 1=don't show gaps
};
master.new_is_master = true;
windowrule = [
"noblur,^(firefox)$" # disables blur for firefox
"opacity 1.0 override,^(firefox)$" # Sets opacity to 1
@ -101,8 +99,12 @@
"opacity 0.9 override,^(codium)$" # Sets opacity to 1
"stayfocused, title:^()$,class:^(steam)$"
"minsize 1 1, title:^()$,class:^(steam)$"
];
windowrulev2 = [
''float, class:(rofi), title:(rofi)''
];
bind = [
''SUPER, Q, exec, kitty''
''SUPER, C, killactive,''

View file

@ -1,6 +1,5 @@
{ lib, ...}: {
programs.rofi = {
enable = true;
font = lib.mkForce "DejaVu Sans 16";
};
{ ...}: {
programs.rofi = {
enable = true;
};
}

View file

@ -39,7 +39,7 @@
"tooltip-format" = "Games running: {count}";
};
"custom/wlogout" = {
format = "";
format = " ";
on-click = "wlogout";
};
"custom/tailscale" = {
@ -49,15 +49,15 @@
return-type = "json";
interval = 5;
format-icons = {
Running = "󰌆";
Stopped = "󰌊 ";
Running = " 󰌆 ";
Stopped = " 󰌊";
};
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
activated = " ";
deactivated = " ";
};
};
mpris = {
@ -71,9 +71,16 @@
on-click = "activate";
};
clock = {
format = "󰥔 {:%H:%M}";
format-alt = "󰃭 {:%A, %d %b, %Y}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
format = "󰥔 {:%H:%M (%Z)}";
format-alt = "󰃭 {:%A, %d %b, %Y (%Z)}";
tooltip-format = "{tz_list}";
timezones = [
"Asia/Tokyo"
"Europe/Warsaw"
"America/Los_Angeles"
"America/Chicago"
"America/New_York"
];
calendar = {
mode = "month";
mode-mon-col = 3;
@ -101,7 +108,7 @@
format-bluetooth-muted = " ";
format-muted = "󰝟 {format_source}";
format-source = " ";
format-source-muted = " ";
format-source-muted = " ";
format-icons = {
headphone = " ";
headset = " ";
@ -112,11 +119,11 @@
};
network = {
format = "{ifname}";
format-wifi = "";
format-wifi = " ";
format-ethernet = " ";
format-disconnected = ""; # Hides the module
tooltip-format = "{ifname} via {gwaddr} ";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format = "{ifname} via {gwaddr} ";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} \n{ipaddr}";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
@ -129,10 +136,10 @@
warning = 35;
critical = 20;
};
format = "{icon} {capacity}%";
format = "{icon} {capacity}%";
format-charging = "󰂄 {capacity}%";
format-plugged = " {capacity}%";
format-icons = [ "" "" "" "" "" ];
format-plugged = " {capacity}%";
format-icons = [ " " " " " " " " " " ];
};
};
};
@ -149,7 +156,7 @@
#workspaces button.visible,
#workspaces button {
font-size: 15px;
font-size: 12px;
border-radius: 50px;
padding: 0px 5px;
margin: 5px;
@ -164,7 +171,7 @@
#workspaces button:hover,
#workspaces button.focused:hover,
#workspaces button.visible:hover {
background-color: #${config.lib.stylix.colors.base07};
background-color: #${config.lib.stylix.colors.base05};
color: #${config.lib.stylix.colors.base00};
}
@ -194,32 +201,33 @@
#custom-wlogout,
#window {
font-size: 16px;
/*padding: 0px 10px;*/
padding: 0px 5px;
margin: 5px;
border-radius: 3px;
font-weight: normal;
background-color: #${config.lib.stylix.colors.base02};
}
/*
* General background
*/
#privacy #button:hover,
#network button:hover,
#mpris button:hover,
#memory button:hover,
#backlight button:hover,
#cpu button:hover,
#pulseaudio button:hover,
#temperature button:hover,
#battery button:hover,
#tray button:hover,
#submap button:hover,
#clock button:hover,
#idle_inhibitor button:hover,
#custom-tailscale button:hover,
#custom-wlogout button:hover,
#window button:hover{
background-color: #${config.lib.stylix.colors.base00};
#network #button:hover,
#mpris #button:hover,
#memory #button:hover,
#backlight #button:hover,
#cpu #button:hover,
#pulseaudio #button:hover,
#temperature #button:hover,
#battery #button:hover,
#tray #button:hover,
#submap #button:hover,
#clock #button:hover,
#idle_inhibitor #button:hover,
#custom-tailscale #button:hover,
#custom-wlogout #button:hover,
#window #button:hover{
background-color: #${config.lib.stylix.colors.base01};
}
/*

View file

@ -1,9 +1,10 @@
{ pkgs, theme, lib, ... }: {
{ pkgs, ... }: {
imports = [
./components
./assets/waybar/scripts.nix
];
# TODO Update this when I move
services.gammastep = {
enable = true;
latitude = "35.62370";
@ -17,15 +18,16 @@
programs.fish.shellInit = ''set DISABLE_TMUX "true" '';
stylix = {
image = lib.mkForce /etc/nixos/git/wallpapers/${theme}/wallpaper1.png;
enable = true;
autoEnable = true;
opacity = {
desktop = 0.7;
popups = 0.7;
applications = 1.0;
terminal = 1.0;
};
autoEnable = true;
targets = {
mako.enable = true;
kitty = {
enable = true;
variant256Colors = true;
@ -37,6 +39,9 @@
enableRightBackColors = false;
};
};
cursor = {
size = 24;
};
fonts = {
sizes = {
desktop = 12;

View file

@ -1,4 +1,4 @@
{ lib, ... }: {
# Requires secrets not available in images
programs.atuin.enable = mkDefault false;
programs.atuin.enable = lib.mkDefault false;
}

View file

@ -1,5 +1,9 @@
{ ... }: {
programs.btop = {
enable = true;
settings = {
color_theme = "TTY";
theme_background = false;
};
};
}

View file

@ -1,18 +1,20 @@
{ theme, ... }: {
wayland.windowManager.hyprland = {
settings = {
monitor = ",highrr,auto,1.25";
monitor = ",highrr,auto,1.175";
bind = [
'', XF86AudioMute, exec, swayosd --output-volume=mute-toggle''
'', XF86AudioPrev, exec, playerctl previous''
'', XF86AudioNext, exec, playerctl next''
];
binde = [
'', XF86AudioPlay, exec, playerctl play-pause''
'', XF86AudioNext, exec, playerctl next''
'', XF86MonBrightnessDown, exec, light -U 5''
'', XF86MonBrightnessUp, exec, light -A 5''
'', XF86AudioLowerVolume, exec, swayosd --output-volume=lower''
'', XF86AudioRaiseVolume, exec, swayosd --output-volume=raise''
'', XF86MonBrightnessDown, exec, swayosd-client --brightness=lower''
'', XF86MonBrightnessUp, exec, swayosd-client --brightness=raise''
'', XF86AudioMute, exec, swayosd-client --output-volume=mute-toggle''
'', XF86AudioLowerVolume, exec, swayosd-client --output-volume=lower''
'', XF86AudioRaiseVolume, exec, swayosd-client --output-volume=raise''
];
bindl = [
'',switch:on:1241ec0,exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1"''

View file

@ -1,4 +1,4 @@
{inputs, pkgs, system, theme, ...}: {
{inputs, pkgs, theme, ...}: {
imports = [
inputs.stylix.nixosModules.stylix
@ -6,7 +6,8 @@
];
stylix = {
image = /etc/nixos/git/wallpapers/${theme}/wallpaper1.png;
enable = true;
autoEnable = true;
opacity = {
desktop = 0.7;
popups = 0.7;
@ -16,23 +17,28 @@
targets = {
plymouth.enable = false;
};
autoEnable = true;
cursor = {
size = 24;
};
fonts = {
sizes = {
desktop = 12;
popups = 12;
terminal = 12;
applications = 12;
};
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
package = pkgs.hack-font;
name = "Hack Nerd Font Regular";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
package = pkgs.hack-font;
name = "Hack Nerd Font Regular";
};
monospace = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans Mono";
package = pkgs.hack-font;
name = "Hack Nerd Font Mono Regular";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
@ -53,7 +59,7 @@
# Brightness and volume control
# https://haikarainen.github.io/light/
programs.light.enable = true;
# programs.light.enable = true;
# PolKit for the fingerprint reader
security.polkit.enable = true;
# https://github.com/NixOS/nixpkgs/issues/143365
@ -143,6 +149,6 @@
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
jack.enable = false;
};
}

View file

@ -1,5 +1,8 @@
{ lib, ... }: {
stylix.targets.tmux.enable = lib.mkForce false; # Custom theme in main config
stylix.targets.zellij.enable = lib.mkForce false; # Custom theme in main config
stylix.targets.fish.enable = lib.mkForce false; # Slow load times with tmux
stylix.targets = {
tmux.enable = lib.mkForce false; # Config in main hm configs
zellij.enable = lib.mkForce false; # Config in main hm configs
fish.enable = lib.mkForce false; # Slow load times
btop.enable = lib.mkForce false; # This usually looks better
};
}

View file

@ -1,9 +1,8 @@
{lib, inputs, pkgs, gpu, system, theme, ...}: {
{ ...}: {
# Themes https://github.com/tinted-theming/base16-schemes
stylix = {
image = /etc/nixos/git/wallpapers/gruvbox/wallpaper1.png;
polarity = "dark";
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
base16Scheme = ./theme.yaml;
autoEnable = true;
};
}

View file

@ -0,0 +1,17 @@
scheme: "Gruvbox dark, hard"
base00: "1d2021" # ----
base01: "3c3836" # ---
base02: "504945" # --
base03: "665c54" # -
base04: "bdae93" # +
base05: "d5c4a1" # ++
base06: "ebdbb2" # +++
base07: "fbf1c7" # ++++
base08: "fb4934" # red
base09: "fe8019" # orange
base0A: "fabd2f" # yellow
base0B: "b8bb26" # green
base0C: "8ec07c" # aqua/cyan
base0D: "83a598" # blue
base0E: "d3869b" # purple
base0F: "d65d0e" # brown

@ -1 +1 @@
Subproject commit 8ed82c9afaac6359cf4603196f7a5bd4b399a4b5
Subproject commit 26552d8bade6fa39188ebf68e9ffa1a8dcd75108