new hyprland config. waybar still sucks

This commit is contained in:
2025-06-27 13:28:03 +02:00
parent 384537d3c2
commit 2adf37e151
5 changed files with 224 additions and 3 deletions

View File

@@ -12,6 +12,7 @@
# Sponsorblock for YouTube # Sponsorblock for YouTube
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } { id = "mnjggcdmjocbbbhaepdhchncahnbgone"; }
]; ];
}; };
} }

View File

@@ -11,6 +11,8 @@
./shell.nix ./shell.nix
./terminal.nix ./terminal.nix
./xgd.nix ./xgd.nix
./hyprland.nix
./rofi.nix
]; ];
home.username = "lukas"; home.username = "lukas";

81
home/lukas/hyprland.nix Normal file
View File

@@ -0,0 +1,81 @@
{
wayland.windowManager.hyprland = {
enable = true;
settings = {
"$mod" = "ALT";
exec-once = [
"waybar"
"dunst"
"nm-applet"
"blueman-applet"
"swww-daemon"
];
binds = {
allow_workspace_cycles = true;
};
xwayland = {
force_zero_scaling = true;
};
bind = [
# terminal
"$mod, Return, exec, alacritty"
# kill current window
"$mod, Q, killactive,"
# lock screen
"$mod, L, exec, hyprlock"
# emacs
"$mod, e, exec, emacs"
# Rofi launcher
"$mod, SPACE, exec, rofi -show drun -theme ~/.config/rofi/theme.rasi"
# Toggle fullscreen
"$mod, M, fullscreen, 2"
# cycle windows
"$mod, N, cyclenext"
# cycle workspaces
"$mod, TAB, workspace, r+1"
# Switch to workspace 13
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
];
general = {
gaps_in = 4;
gaps_out = 8;
border_size = 0;
layout = "dwindle";
};
input = {
kb_layout = "de";
touchpad.disable_while_typing = true;
};
cursor = {
inactive_timeout = 5;
};
decoration = {
rounding = 6;
blur.enabled = false;
shadow.enabled = false;
};
};
};
}

115
home/lukas/rofi.nix Normal file
View File

@@ -0,0 +1,115 @@
let
fullTheme = ''
* {
bg0: #2E3440F2;
bg1: #3B4252;
bg2: #4C566A80;
bg3: #88C0D0F2;
fg0: #D8DEE9;
fg1: #ECEFF4;
fg2: #D8DEE9;
fg3: #4C566A;
}
* {
font: "Fira Code 12";
background-color: transparent;
text-color: @fg0;
margin: 0px;
padding: 0px;
spacing: 0px;
}
window {
location: north;
y-offset: calc(50% - 176px);
width: 480;
border-radius: 24px;
background-color: @bg0;
}
mainbox {
padding: 12px;
}
inputbar {
background-color: @bg1;
border-color: @bg3;
border: 2px;
border-radius: 16px;
padding: 8px 16px;
spacing: 8px;
children: [ prompt, entry ];
}
prompt {
text-color: @fg2;
}
entry {
placeholder: "Search";
placeholder-color: @fg3;
}
message {
margin: 12px 0 0;
border-radius: 16px;
border-color: @bg2;
background-color: @bg2;
}
textbox {
padding: 8px 24px;
}
listview {
background-color: transparent;
margin: 12px 0 0;
lines: 8;
columns: 1;
fixed-height: false;
}
element {
padding: 8px 16px;
spacing: 8px;
border-radius: 16px;
}
element normal active {
text-color: @bg3;
}
element alternate active {
text-color: @bg3;
}
element selected normal, element selected active {
background-color: @bg3;
}
element-icon {
size: 1em;
vertical-align: 0.5;
}
element-text {
text-color: inherit;
}
/* your override */
element selected {
text-color: @bg1;
}
'';
in {
programs.rofi.enable = true;
home.file.".config/rofi/theme.rasi".text = fullTheme;
}

View File

@@ -1,13 +1,13 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
withUWSM = true;
xwayland.enable = true; xwayland.enable = true;
}; };
environment.sessionVariables = { environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
}; };
@@ -22,11 +22,33 @@
pkgs.dunst pkgs.dunst
pkgs.libnotify pkgs.libnotify
pkgs.swww pkgs.swww
pkgs.kitty
pkgs.rofi-wayland pkgs.rofi-wayland
pkgs.hyprlock
pkgs.brightnessctl # adjust backlight via keybindings
pkgs.scrot # simple screenshot
pkgs.slurp # region selector
pkgs.grim # wayland screenshot backend
pkgs.networkmanagerapplet
pkgs.pavucontrol
]; ];
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
services.greetd = {
enable = true;
settings = {
initial_session = {
command = "${pkgs.hyprland}/bin/Hyprland";
user = "lukas";
};
default_session = {
command = "${pkgs.hyprland}/bin/Hyprland";
user = "lukas";
};
};
};
} }