stuff
This commit is contained in:
parent
49cca73363
commit
c05813575f
40 changed files with 2364 additions and 526 deletions
11
home-manager/modules/niri/applications.nix
Normal file
11
home-manager/modules/niri/applications.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs }:
|
||||
{
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
terminal = "${pkgs.ghostty}/bin/ghostty";
|
||||
fileManager = "${pkgs.xfce.thunar}/bin/thunar";
|
||||
appLauncher = "${pkgs.walker}/bin/walker";
|
||||
|
||||
screenshotArea = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim -g \"\\\$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
screenshotWindow = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim -g \"\\\$(${pkgs.slurp}/bin/slurp -w)\" - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
screenshotOutput = "${pkgs.bash}/bin/bash -c '${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy'";
|
||||
}
|
||||
22
home-manager/modules/niri/autostart.nix
Normal file
22
home-manager/modules/niri/autostart.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.niri.settings.spawn-at-startup = [
|
||||
{
|
||||
command = [
|
||||
"systemctl"
|
||||
"--user"
|
||||
"start"
|
||||
"hyprpolkitagent"
|
||||
];
|
||||
}
|
||||
{ command = [ "xwayland-satellite" ]; }
|
||||
{ command = [ "qs" ]; }
|
||||
{ command = [ "swww-daemon" ]; }
|
||||
#{ command = ["${pkgs.swaybg}/bin/swaybg" "-o" "DP-1" "-i" "/home/lysec/nixos/assets/wallpapers/clouds.png" "-m" "fill"]; }
|
||||
#{ command = ["sh" "-c" "swww-daemon & swww img /home/lysec/nixos/wallpapers/cloud.png"]; }
|
||||
];
|
||||
}
|
||||
16
home-manager/modules/niri/default.nix
Normal file
16
home-manager/modules/niri/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.niri.homeModules.niri # Import Niri's home-manager module
|
||||
./settings.nix # Your custom configuration files for Niri
|
||||
./keybinds.nix
|
||||
./rules.nix
|
||||
./autostart.nix
|
||||
./noctaliashell.nix
|
||||
];
|
||||
}
|
||||
69
home-manager/modules/niri/keybinds.nix
Normal file
69
home-manager/modules/niri/keybinds.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
apps = import ./applications.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
programs.niri.settings.binds =
|
||||
with config.lib.niri.actions;
|
||||
let
|
||||
pactl = "${pkgs.pulseaudio}/bin/pactl";
|
||||
|
||||
volume-up = spawn pactl [
|
||||
"set-sink-volume"
|
||||
"@DEFAULT_SINK@"
|
||||
"+5%"
|
||||
];
|
||||
volume-down = spawn pactl [
|
||||
"set-sink-volume"
|
||||
"@DEFAULT_SINK@"
|
||||
"-5%"
|
||||
];
|
||||
in
|
||||
{
|
||||
# Quickshell Keybinds Start
|
||||
"super+space".action = spawn [
|
||||
"noctalia-shell"
|
||||
"ipc"
|
||||
"call"
|
||||
"launcher"
|
||||
"toggle"
|
||||
];
|
||||
# Quickshell Keybinds End
|
||||
|
||||
"xf86audioraisevolume".action = volume-up;
|
||||
"xf86audiolowervolume".action = volume-down;
|
||||
|
||||
"control+super+xf86audioraisevolume".action = spawn "brightness" "up";
|
||||
"control+super+xf86audiolowervolume".action = spawn "brightness" "down";
|
||||
|
||||
"super+q".action = close-window;
|
||||
"super+b".action = spawn apps.browser;
|
||||
"super+Return".action = spawn apps.terminal;
|
||||
#"super+Control+Return".action = spawn apps.appLauncher;
|
||||
"super+E".action = spawn apps.fileManager;
|
||||
|
||||
"super+f".action = maximize-column;
|
||||
"super+Shift+f".action = fullscreen-window;
|
||||
"super+t".action = toggle-window-floating;
|
||||
"super+r".action = switch-preset-column-width;
|
||||
"super+Shift+r".action = switch-preset-window-height;
|
||||
|
||||
# "control+shift+1".action = screenshot;
|
||||
# "control+shift+2".action = screenshot-window {write-to-disk = true;};
|
||||
|
||||
"super+Left".action = focus-column-left;
|
||||
"super+Right".action = focus-column-right;
|
||||
"super+Down".action = focus-workspace-down;
|
||||
"super+Up".action = focus-workspace-up;
|
||||
|
||||
"super+Shift+Left".action = move-column-left;
|
||||
"super+Shift+Right".action = move-column-right;
|
||||
"super+Shift+Down".action = move-column-to-workspace-down;
|
||||
"super+Shift+Up".action = move-column-to-workspace-up;
|
||||
};
|
||||
}
|
||||
68
home-manager/modules/niri/noctaliashell.nix
Normal file
68
home-manager/modules/niri/noctaliashell.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.noctalia.homeModules.default
|
||||
];
|
||||
|
||||
# configure options
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# configure noctalia here
|
||||
bar = {
|
||||
density = "compact";
|
||||
position = "left";
|
||||
showCapsule = false;
|
||||
widgets = {
|
||||
left = [
|
||||
{
|
||||
id = "ControlCenter";
|
||||
useDistroLogo = true;
|
||||
}
|
||||
{
|
||||
id = "Network";
|
||||
}
|
||||
{
|
||||
id = "Bluetooth";
|
||||
}
|
||||
];
|
||||
center = [
|
||||
{
|
||||
hideUnoccupied = false;
|
||||
id = "Workspace";
|
||||
labelMode = "none";
|
||||
}
|
||||
];
|
||||
right = [
|
||||
{
|
||||
alwaysShowPercentage = false;
|
||||
id = "Battery";
|
||||
warningThreshold = 30;
|
||||
}
|
||||
{
|
||||
formatHorizontal = "HH:mm";
|
||||
formatVertical = "HH mm";
|
||||
id = "Clock";
|
||||
useMonospacedFont = true;
|
||||
usePrimaryColor = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
colorSchemes.predefinedScheme = "Monochrome";
|
||||
general = {
|
||||
avatarImage = "/home/drfoobar/.face";
|
||||
radiusRatio = 0.2;
|
||||
};
|
||||
location = {
|
||||
monthBeforeDay = true;
|
||||
name = "Toronto, Canada";
|
||||
};
|
||||
};
|
||||
# this may also be a string or a path to a JSON file.
|
||||
};
|
||||
}
|
||||
48
home-manager/modules/niri/rules.nix
Normal file
48
home-manager/modules/niri/rules.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.niri.settings = {
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^quickshell-wallpaper$";
|
||||
}
|
||||
];
|
||||
#place-within-backdrop = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^quickshell-overview$";
|
||||
}
|
||||
];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
namespace = "^swww-daemon$";
|
||||
}
|
||||
];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
];
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
matches = [ { } ];
|
||||
geometry-corner-radius = {
|
||||
top-left = 20.0;
|
||||
top-right = 20.0;
|
||||
bottom-left = 20.0;
|
||||
bottom-right = 20.0;
|
||||
};
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
31
home-manager/modules/niri/scripts.nix
Normal file
31
home-manager/modules/niri/scripts.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
brightnessScript = pkgs.writeShellScriptBin "brightness" ''
|
||||
BUS=10
|
||||
STEP=5
|
||||
MIN=0
|
||||
MAX=100
|
||||
OSD_FILE="/tmp/brightness_osd_level"
|
||||
|
||||
current=$(ddcutil --bus=$BUS getvcp 10 | grep -oP "current value\\s*=\\s*\\K[0-9]+")
|
||||
new=$current
|
||||
|
||||
if [[ "$1" == "up" ]]; then
|
||||
new=$((current + STEP))
|
||||
(( new > MAX )) && new=$MAX
|
||||
elif [[ "$1" == "down" ]]; then
|
||||
new=$((current - STEP))
|
||||
(( new < MIN )) && new=$MIN
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ddcutil --bus=$BUS setvcp 10 "$new"
|
||||
echo "$new" > "$OSD_FILE"
|
||||
'';
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
brightnessScript
|
||||
];
|
||||
}
|
||||
145
home-manager/modules/niri/settings.nix
Normal file
145
home-manager/modules/niri/settings.nix
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
XDG_ICON_DIR = "${pkgs.whitesur-icon-theme}/share/icons/WhiteSur";
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||
XCURSOR_THEME = "Bibata-Original-Ice";
|
||||
XCURSOR_SIZE = "20";
|
||||
};
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri;
|
||||
settings = {
|
||||
environment = {
|
||||
# CLUTTER_BACKEND = "wayland";
|
||||
# DISPLAY = null;
|
||||
# MOZ_ENABLE_WAYLAND = "1";
|
||||
# NIXOS_OZONE_WL = "1";
|
||||
# QT_QPA_PLATFORM = "wayland;xcb";
|
||||
# QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
WLR_RENDERER = "vulkan";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||
GTK_IM_MODULE = "simple";
|
||||
};
|
||||
spawn-at-startup = [
|
||||
{
|
||||
command = [
|
||||
"noctalia-shell"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
prefer-no-csd = true;
|
||||
|
||||
hotkey-overlay = {
|
||||
skip-at-startup = true;
|
||||
};
|
||||
|
||||
layout = {
|
||||
preset-column-widths = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
default-column-width = {
|
||||
proportion = 0.5;
|
||||
};
|
||||
|
||||
preset-window-heights = [
|
||||
{ proportion = 1. / 3.; }
|
||||
{ proportion = 1. / 2.; }
|
||||
{ proportion = 2. / 3.; }
|
||||
];
|
||||
|
||||
background-color = "#00000000";
|
||||
|
||||
focus-ring = {
|
||||
enable = true;
|
||||
width = 3;
|
||||
active = {
|
||||
color = "#A8AEFF";
|
||||
};
|
||||
inactive = {
|
||||
color = "#505050";
|
||||
};
|
||||
};
|
||||
|
||||
gaps = 6;
|
||||
|
||||
struts = {
|
||||
left = 20;
|
||||
right = 20;
|
||||
top = 20;
|
||||
bottom = 20;
|
||||
};
|
||||
};
|
||||
|
||||
input = {
|
||||
touchpad = {
|
||||
click-method = "button-areas";
|
||||
dwt = true;
|
||||
dwtp = true;
|
||||
natural-scroll = true;
|
||||
scroll-method = "two-finger";
|
||||
tap = true;
|
||||
tap-button-map = "left-right-middle";
|
||||
middle-emulation = true;
|
||||
accel-profile = "adaptive";
|
||||
};
|
||||
focus-follows-mouse.enable = true;
|
||||
warp-mouse-to-focus.enable = false;
|
||||
};
|
||||
|
||||
outputs = {
|
||||
"eDP-1" = {
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
};
|
||||
scale = 1.0;
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
};
|
||||
|
||||
"desc:Microstep MSI MP161 E2 PB7H314B00225" = {
|
||||
mode = {
|
||||
width = 1920;
|
||||
height = 1080;
|
||||
};
|
||||
scale = 1.0;
|
||||
position = {
|
||||
x = 0;
|
||||
y = 1080;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cursor = {
|
||||
size = 20;
|
||||
theme = "Adwaita";
|
||||
};
|
||||
|
||||
environment = {
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
GDK_BACKEND = "wayland,x11";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_CURRENT_DESKTOP = "niri";
|
||||
DISPLAY = ":0";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue