home/dms: split the config
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
dconf.settings = {
|
||||||
|
"org/gnome/desktop/wm/preferences" = {
|
||||||
|
button-layout = "icon:maximize,close";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
+11
-2
@@ -5,10 +5,12 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
browsers # app chooser in rust (and without bugs)
|
||||||
celluloid # mpv gui in libadwaita
|
celluloid # mpv gui in libadwaita
|
||||||
|
file-roller # archive manager
|
||||||
gnome-text-editor
|
gnome-text-editor
|
||||||
helvum # pipewire patchbay in rust
|
helvum # pipewire patchbay in rust
|
||||||
junction # app chooser
|
# junction # app chooser
|
||||||
loupe # image viewer and editor in rust
|
loupe # image viewer and editor in rust
|
||||||
nautilus # file manager
|
nautilus # file manager
|
||||||
papers # pdf reader in rust
|
papers # pdf reader in rust
|
||||||
@@ -19,14 +21,21 @@
|
|||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = let
|
defaultApplications = let
|
||||||
|
archive_manager = ["org.gnome.FileRoller.desktop"];
|
||||||
file_manager = ["org.gnome.Nautilus.desktop"];
|
file_manager = ["org.gnome.Nautilus.desktop"];
|
||||||
image_viewer = ["org.gnome.Loupe.desktop"];
|
image_viewer = ["org.gnome.Loupe.desktop"];
|
||||||
pdf_reader = ["org.gnome.Papers.desktop"];
|
pdf_reader = ["org.gnome.Papers.desktop"];
|
||||||
video_player = ["io.github.celluloid_player.Celluloid.desktop"];
|
video_player = ["io.github.celluloid_player.Celluloid.desktop"];
|
||||||
web_browser = ["re.sonny.Junction.desktop"];
|
web_browser = ["software.Browsers.desktop"];
|
||||||
in {
|
in {
|
||||||
# TODO: add text/ mimetypes for gnome-editor
|
# TODO: add text/ mimetypes for gnome-editor
|
||||||
"application/pdf" = pdf_reader;
|
"application/pdf" = pdf_reader;
|
||||||
|
"application/vnd.rar" = archive_manager;
|
||||||
|
"application/x-7z-compressed" = archive_manager;
|
||||||
|
"application/x-bzip2-compressed-tar" = archive_manager;
|
||||||
|
"application/x-compressed-tar" = archive_manager;
|
||||||
|
"application/x-xz-compressed-tar" = archive_manager;
|
||||||
|
"application/zip" = archive_manager;
|
||||||
"image/jpeg" = image_viewer;
|
"image/jpeg" = image_viewer;
|
||||||
"image/png" = image_viewer;
|
"image/png" = image_viewer;
|
||||||
"inode/directory" = file_manager;
|
"inode/directory" = file_manager;
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
{pkgs, ...}: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# gui libadwaita utilities
|
||||||
|
helvum # pipewire patchbay in rust
|
||||||
|
pwvucontrol # pipewire gui in rust
|
||||||
|
wdisplays # wlroots display configurator
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
}
|
||||||
+46
-8
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
|
pkgs,
|
||||||
perSystem,
|
perSystem,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
@@ -41,6 +42,7 @@ with lib; let
|
|||||||
in {
|
in {
|
||||||
programs.niri.settings = {
|
programs.niri.settings = {
|
||||||
environment = {
|
environment = {
|
||||||
|
DMS_SCREENSHOT_EDITOR = "satty";
|
||||||
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||||
QT_QPA_PLATFORM = "wayland";
|
QT_QPA_PLATFORM = "wayland";
|
||||||
QT_QPA_PLATFORMTHEME = "gtk3";
|
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||||
@@ -78,7 +80,7 @@ in {
|
|||||||
clipboard.disable-primary = true;
|
clipboard.disable-primary = true;
|
||||||
hotkey-overlay.skip-at-startup = true;
|
hotkey-overlay.skip-at-startup = true;
|
||||||
prefer-no-csd = true;
|
prefer-no-csd = true;
|
||||||
xwayland-satellite.path = lib.getExe perSystem.xwst.xwayland-satellite;
|
xwayland-satellite.path = lib.getExe perSystem.niri-flake.xwayland-satellite-unstable;
|
||||||
|
|
||||||
overview.workspace-shadow.enable = false;
|
overview.workspace-shadow.enable = false;
|
||||||
# TODO: enable when implemented in github:sodiboo/niri-flake
|
# TODO: enable when implemented in github:sodiboo/niri-flake
|
||||||
@@ -129,6 +131,27 @@ in {
|
|||||||
binds = with config.lib.niri.actions; let
|
binds = with config.lib.niri.actions; let
|
||||||
dms-ipc = spawn "dms" "ipc";
|
dms-ipc = spawn "dms" "ipc";
|
||||||
sh = spawn "sh" "-c";
|
sh = spawn "sh" "-c";
|
||||||
|
focus = spawn "wlrctl" "window" "focus";
|
||||||
|
focus-meet = pkgs.writeShellApplication {
|
||||||
|
name = "focus-zen-google-meet";
|
||||||
|
runtimeInputs = with pkgs; [wlrctl jq gnugrep config.programs.niri.package];
|
||||||
|
text = ''
|
||||||
|
wlrctl window focus app_id:app.zen_browser.zen \
|
||||||
|
title:"$(niri msg --json windows \
|
||||||
|
| jq -r '.[].title' \
|
||||||
|
| grep -E 'Meet: "[a-zA-Z0-9-]+?"')"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
focus-equicord = pkgs.writeShellApplication {
|
||||||
|
name = "focus-equicord";
|
||||||
|
runtimeInputs = with pkgs; [wlrctl jq gnugrep config.programs.niri.package];
|
||||||
|
text = ''
|
||||||
|
wlrctl window focus app_id:equibop \
|
||||||
|
title:"$(niri msg --json windows \
|
||||||
|
| jq -r '.[].title' \
|
||||||
|
| grep -E 'Meet: "[a-zA-Z0-9-]+?"')"
|
||||||
|
'';
|
||||||
|
};
|
||||||
in
|
in
|
||||||
lib.attrsets.mergeAttrsList [
|
lib.attrsets.mergeAttrsList [
|
||||||
{
|
{
|
||||||
@@ -139,20 +162,19 @@ in {
|
|||||||
|
|
||||||
"Mod+Q".action = close-window;
|
"Mod+Q".action = close-window;
|
||||||
|
|
||||||
"Mod+Ctrl+G".action = toggle-window-floating;
|
|
||||||
|
|
||||||
"Mod+M".action = maximize-column;
|
"Mod+M".action = maximize-column;
|
||||||
"Mod+Ctrl+M".action = fullscreen-window;
|
"Mod+Ctrl+M".action = fullscreen-window;
|
||||||
"Mod+Shift+M".action = maximize-window-to-edges;
|
"Mod+Shift+M".action = maximize-window-to-edges;
|
||||||
"Mod+Ctrl+Shift+M".action = toggle-windowed-fullscreen;
|
"Mod+Ctrl+Shift+M".action = toggle-windowed-fullscreen;
|
||||||
|
|
||||||
"Mod+S" = {action = set-column-width "50%";};
|
"Mod+S".action = set-column-width "50%";
|
||||||
"Mod+Shift+S" = {action = set-column-width "33%";};
|
"Mod+Shift+S".action = set-column-width "33%";
|
||||||
"Mod+Ctrl+S" = {action = set-column-width "67%";};
|
"Mod+Ctrl+S".action = set-column-width "67%";
|
||||||
|
|
||||||
"Mod+T" = {action = toggle-column-tabbed-display;};
|
"Mod+T" = {action = toggle-column-tabbed-display;};
|
||||||
|
|
||||||
"Mod+F".action = switch-focus-between-floating-and-tiling;
|
"Mod+F".action = switch-focus-between-floating-and-tiling;
|
||||||
|
"Mod+Ctrl+F".action = toggle-window-floating;
|
||||||
|
|
||||||
"Mod+Ctrl+Comma".action = consume-or-expel-window-left;
|
"Mod+Ctrl+Comma".action = consume-or-expel-window-left;
|
||||||
"Mod+Ctrl+Period".action = consume-or-expel-window-right;
|
"Mod+Ctrl+Period".action = consume-or-expel-window-right;
|
||||||
@@ -179,6 +201,13 @@ in {
|
|||||||
"Mod+Ctrl+R".action = sh "while wl-kbptr -o modes=split,click; do :; done";
|
"Mod+Ctrl+R".action = sh "while wl-kbptr -o modes=split,click; do :; done";
|
||||||
"Mod+Shift+R".action = sh "wl-kbptr -o modes=tile,bisect,click";
|
"Mod+Shift+R".action = sh "wl-kbptr -o modes=tile,bisect,click";
|
||||||
|
|
||||||
|
"Super+Alt+G".action = spawn "${lib.getExe focus-meet}";
|
||||||
|
"Super+Alt+G".hotkey-overlay.title = "Focus Google Meet";
|
||||||
|
"Super+Alt+U".action = focus "app.zen_browser.zen" "state:inactive";
|
||||||
|
"Super+Alt+B".action = focus "io.github.ungoogled_software.ungoogled_chromium" "state:inactive";
|
||||||
|
"Super+Alt+D".action = focus "equibop";
|
||||||
|
"Super+Alt+T".action = focus "io.github.kukuruzka165.materialgram";
|
||||||
|
|
||||||
"Mod+D" = {
|
"Mod+D" = {
|
||||||
action = spawn "vicinae" "toggle";
|
action = spawn "vicinae" "toggle";
|
||||||
hotkey-overlay.title = "Toggle Application Launcher";
|
hotkey-overlay.title = "Toggle Application Launcher";
|
||||||
@@ -337,11 +366,20 @@ in {
|
|||||||
];
|
];
|
||||||
open-floating = true;
|
open-floating = true;
|
||||||
}
|
}
|
||||||
|
# {
|
||||||
|
# matches = [
|
||||||
|
# {
|
||||||
|
# # telegram's picture-in-picture mode
|
||||||
|
# app-id = "io.github.kukuruzka165.materialgram";
|
||||||
|
# title = "materialgram";
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# }
|
||||||
{
|
{
|
||||||
matches = [
|
matches = [
|
||||||
{app-id = "re.sonny.Junction";}
|
{app-id = "re.sonny.Junction";}
|
||||||
{app-id = "com.github.hluk.copyq";}
|
{app-id = "com.github.hluk.copyq";}
|
||||||
{title = "r\"^.* - Choose User Profile$\"";}
|
{title = "Zen - Choose User Profile";}
|
||||||
];
|
];
|
||||||
open-floating = true;
|
open-floating = true;
|
||||||
open-focused = true;
|
open-focused = true;
|
||||||
@@ -364,7 +402,7 @@ in {
|
|||||||
{app-id = "Alacritty";}
|
{app-id = "Alacritty";}
|
||||||
{app-id = "com.mitchellh.ghostty";}
|
{app-id = "com.mitchellh.ghostty";}
|
||||||
{app-id = "org.wezfurlong.wezterm";}
|
{app-id = "org.wezfurlong.wezterm";}
|
||||||
{app-id = "zen";}
|
{app-id = "app.zen_browser.zen";}
|
||||||
];
|
];
|
||||||
# default-column-width = {proportion = 1.0;};
|
# default-column-width = {proportion = 1.0;};
|
||||||
draw-border-with-background = false;
|
draw-border-with-background = false;
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
programs.satty.enable = true;
|
||||||
|
}
|
||||||
+1
-1
@@ -15,6 +15,7 @@
|
|||||||
label_symbols = "abcdefghijklmnopqrstuvwxyz";
|
label_symbols = "abcdefghijklmnopqrstuvwxyz";
|
||||||
};
|
};
|
||||||
mode_tile = {
|
mode_tile = {
|
||||||
|
label_font_size = "8 50% 100";
|
||||||
inherit
|
inherit
|
||||||
(mode_floating)
|
(mode_floating)
|
||||||
label_color
|
label_color
|
||||||
@@ -25,7 +26,6 @@
|
|||||||
label_font_family
|
label_font_family
|
||||||
label_symbols
|
label_symbols
|
||||||
;
|
;
|
||||||
label_font_size = "8 50% 100";
|
|
||||||
};
|
};
|
||||||
mode_bisect = {
|
mode_bisect = {
|
||||||
inherit (mode_floating) label_color unselectable_bg_color label_font_family;
|
inherit (mode_floating) label_color unselectable_bg_color label_font_family;
|
||||||
+1
-1
@@ -9,7 +9,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
components = ["secrets"];
|
components = ["secrets"];
|
||||||
};
|
};
|
||||||
kanshi = import ../niri/services/kanshi;
|
kanshi = import ../../niri/services/kanshi;
|
||||||
udiskie = {
|
udiskie = {
|
||||||
enable = true;
|
enable = true;
|
||||||
automount = false;
|
automount = false;
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
# dconf.settings = {
|
||||||
|
# "org/gnome/desktop/interface" = {
|
||||||
|
# icon-theme = config.gtk.iconTheme.name;
|
||||||
|
# color-scheme =
|
||||||
|
# if config.stylix.polarity == "dark"
|
||||||
|
# then lib.mkDefault "prefer-dark"
|
||||||
|
# else lib.mkDefault "prefer-light";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
# stylix.targets.niri.enable = false;
|
||||||
|
|
||||||
|
# stylix.targets.gtk.enable = false;
|
||||||
|
# gtk = {
|
||||||
|
# enable = true;
|
||||||
|
# theme = {
|
||||||
|
# name = "adw-gtk3";
|
||||||
|
# package = pkgs.adw-gtk3;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#
|
||||||
|
|
||||||
|
stylix.targets.qt.enable = false;
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "gtk3";
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.configFile."DankMaterialShell/stylix.json".source = with config.lib.stylix.colors.withHashtag;
|
||||||
|
lib.mkIf config.stylix.enable (
|
||||||
|
pkgs.writers.writeJSON "dms-stylix-theme.json" {
|
||||||
|
"name" = "Stylix";
|
||||||
|
"primary" = base0C;
|
||||||
|
"primaryText" = base00;
|
||||||
|
"primaryContainer" = base0D;
|
||||||
|
"secondary" = base0E;
|
||||||
|
"surface" = base00;
|
||||||
|
"surfaceText" = base05;
|
||||||
|
"surfaceVariant" = base01;
|
||||||
|
"surfaceVariantText" = base04;
|
||||||
|
"surfaceTint" = base0C;
|
||||||
|
"background" = base00;
|
||||||
|
"backgroundText" = base07;
|
||||||
|
"outline" = base03;
|
||||||
|
"surfaceContainer" = base01;
|
||||||
|
"surfaceContainerHigh" = base02;
|
||||||
|
"error" = base08;
|
||||||
|
"warning" = base0A;
|
||||||
|
"info" = base0D;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
dconf.settings = {
|
|
||||||
"org/gnome/desktop/wm/preferences" = {
|
|
||||||
button-layout = "icon:maximize,close";
|
|
||||||
};
|
|
||||||
# "org/gnome/desktop/interface" = {
|
|
||||||
# icon-theme = config.gtk.iconTheme.name;
|
|
||||||
# color-scheme =
|
|
||||||
# if config.stylix.polarity == "dark"
|
|
||||||
# then lib.mkDefault "prefer-dark"
|
|
||||||
# else lib.mkDefault "prefer-light";
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -10,83 +10,16 @@ with lib; let
|
|||||||
cfg = config.desktop.dms;
|
cfg = config.desktop.dms;
|
||||||
# inherit (config.lib.stylix) colors;
|
# inherit (config.lib.stylix) colors;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = with inputs; [
|
||||||
# inputs.niri.homeModules.niri
|
dms.homeModules.dankMaterialShell.default
|
||||||
inputs.dankMaterialShell.homeModules.dankMaterialShell.default
|
dms.homeModules.dankMaterialShell.niri
|
||||||
inputs.dankMaterialShell.homeModules.dankMaterialShell.niri
|
|
||||||
];
|
];
|
||||||
options = {
|
options = {
|
||||||
desktop.dms.enable =
|
desktop.dms.enable =
|
||||||
mkEnableOption "enable DankMaterialShell";
|
mkEnableOption "enable DankMaterialShell";
|
||||||
};
|
};
|
||||||
config = let
|
config = let
|
||||||
importWithArgs = file: import file {inherit config inputs lib perSystem pkgs;};
|
importWithArgs = file: import file {inherit config inputs lib perSystem pkgs importWithArgs;};
|
||||||
in
|
in
|
||||||
mkIf cfg.enable (mkMerge [
|
mkIf cfg.enable (importWithArgs ./config);
|
||||||
(import ./dconf.nix)
|
|
||||||
(importWithArgs ./mimeapps.nix)
|
|
||||||
(importWithArgs ./programs/niri.nix)
|
|
||||||
(importWithArgs ./programs/wl-kbptr.nix)
|
|
||||||
(importWithArgs ./services.nix)
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
# gui libadwaita utilities
|
|
||||||
helvum # pipewire patchbay in rust
|
|
||||||
pwvucontrol # pipewire gui in rust
|
|
||||||
wdisplays # wlroots display configurator
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# stylix.targets.niri.enable = false;
|
|
||||||
|
|
||||||
# stylix.targets.gtk.enable = false;
|
|
||||||
# gtk = {
|
|
||||||
# enable = true;
|
|
||||||
# theme = {
|
|
||||||
# name = "adw-gtk3";
|
|
||||||
# package = pkgs.adw-gtk3;
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
#
|
|
||||||
|
|
||||||
stylix.targets.qt.enable = false;
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme.name = "gtk3";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
programs.dankMaterialShell = {
|
|
||||||
enable = true;
|
|
||||||
systemd.enable = true;
|
|
||||||
niri.enableKeybinds = false; # Automatic keybinding configuration
|
|
||||||
# niri.enableSpawn = true; # Auto-start DMS with niri
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
xdg.configFile."DankMaterialShell/stylix.json".source = with config.lib.stylix.colors.withHashtag;
|
|
||||||
lib.mkIf config.stylix.enable (
|
|
||||||
pkgs.writers.writeJSON "dms-stylix-theme.json" {
|
|
||||||
"name" = "Stylix";
|
|
||||||
"primary" = base0C;
|
|
||||||
"primaryText" = base00;
|
|
||||||
"primaryContainer" = base0D;
|
|
||||||
"secondary" = base0E;
|
|
||||||
"surface" = base00;
|
|
||||||
"surfaceText" = base05;
|
|
||||||
"surfaceVariant" = base01;
|
|
||||||
"surfaceVariantText" = base04;
|
|
||||||
"surfaceTint" = base0C;
|
|
||||||
"background" = base00;
|
|
||||||
"backgroundText" = base07;
|
|
||||||
"outline" = base03;
|
|
||||||
"surfaceContainer" = base01;
|
|
||||||
"surfaceContainerHigh" = base02;
|
|
||||||
"error" = base08;
|
|
||||||
"warning" = base0A;
|
|
||||||
"info" = base0D;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
imports = [
|
|
||||||
./niri.nix
|
|
||||||
./wl-kbptr.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user