mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-27 23:12:49 -05:00
Merge branch 'master' of github.com:bbedward/DankMaterialShell
This commit is contained in:
119
flake.nix
119
flake.nix
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
description = "Dank material shell.";
|
description = "Dank material shell.";
|
||||||
|
|
||||||
@@ -6,11 +5,9 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell";
|
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell";
|
||||||
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
niri.url = "github:sodiboo/niri-flake";
|
|
||||||
niri.inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, niri, quickshell, ... }:
|
outputs = { self, nixpkgs, quickshell, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
@@ -31,19 +28,24 @@
|
|||||||
homeModules.dankMaterialShell = { config, pkgs, lib, ... }:
|
homeModules.dankMaterialShell = { config, pkgs, lib, ... }:
|
||||||
let cfg = config.programs.dankMaterialShell;
|
let cfg = config.programs.dankMaterialShell;
|
||||||
in {
|
in {
|
||||||
imports = [ niri.homeModules.niri ];
|
|
||||||
|
|
||||||
options.programs.dankMaterialShell = {
|
options.programs.dankMaterialShell = {
|
||||||
enable = lib.mkEnableOption "DankMaterialShell";
|
enable = lib.mkEnableOption "DankMaterialShell";
|
||||||
enableKeybinds = lib.mkEnableOption "DankMaterialShell Niri keybinds";
|
enableKeybinds =
|
||||||
enableSystemd = lib.mkEnableOption "DankMaterialShell systemd startup";
|
lib.mkEnableOption "DankMaterialShell Niri keybinds";
|
||||||
|
enableSystemd =
|
||||||
|
lib.mkEnableOption "DankMaterialShell systemd startup";
|
||||||
|
enableSpawn =
|
||||||
|
lib.mkEnableOption "DankMaterialShell Niri spawn-at-startup";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.quickshell = {
|
programs.quickshell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = quickshell.packages.${system}.quickshell;
|
package = quickshell.packages.${system}.quickshell;
|
||||||
configs.DankMaterialShell = "${self.packages.${system}.dankMaterialShell}/etc/xdg/quickshell/DankMaterialShell";
|
configs.DankMaterialShell = "${
|
||||||
|
self.packages.${system}.dankMaterialShell
|
||||||
|
}/etc/xdg/quickshell/DankMaterialShell";
|
||||||
activeConfig = lib.mkIf cfg.enableSystemd "DankMaterialShell";
|
activeConfig = lib.mkIf cfg.enableSystemd "DankMaterialShell";
|
||||||
systemd = lib.mkIf cfg.enableSystemd {
|
systemd = lib.mkIf cfg.enableSystemd {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -53,34 +55,107 @@
|
|||||||
|
|
||||||
programs.niri.settings = lib.mkMerge [
|
programs.niri.settings = lib.mkMerge [
|
||||||
(lib.mkIf cfg.enableKeybinds {
|
(lib.mkIf cfg.enableKeybinds {
|
||||||
binds = with config.lib.niri.actions; {
|
binds = {
|
||||||
"Mod+Space".action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "spotlight" "toggle";
|
"Mod+Space".action.spawn = [
|
||||||
"Mod+V".action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "clipboard" "toggle";
|
"qs"
|
||||||
"Mod+M".action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "processlist" "toggle";
|
"-c"
|
||||||
"Mod+Comma".action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "settings" "toggle";
|
"DankMaterialShell"
|
||||||
"Super+Alt+L".action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "lock" "lock";
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"spotlight"
|
||||||
|
"toggle"
|
||||||
|
];
|
||||||
|
"Mod+V".action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"clipboard"
|
||||||
|
"toggle"
|
||||||
|
];
|
||||||
|
"Mod+M".action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"processlist"
|
||||||
|
"toggle"
|
||||||
|
];
|
||||||
|
"Mod+Comma".action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"settings"
|
||||||
|
"toggle"
|
||||||
|
];
|
||||||
|
"Super+Alt+L".action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"lock"
|
||||||
|
"lock"
|
||||||
|
];
|
||||||
"XF86AudioRaiseVolume" = {
|
"XF86AudioRaiseVolume" = {
|
||||||
allow-when-locked = true;
|
allow-when-locked = true;
|
||||||
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "audio" "increment" "3";
|
action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"audio"
|
||||||
|
"increment"
|
||||||
|
"3"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"XF86AudioLowerVolume" = {
|
"XF86AudioLowerVolume" = {
|
||||||
allow-when-locked = true;
|
allow-when-locked = true;
|
||||||
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "audio" "decrement" "3";
|
action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"audio"
|
||||||
|
"decrement"
|
||||||
|
"3"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"XF86AudioMute" = {
|
"XF86AudioMute" = {
|
||||||
allow-when-locked = true;
|
allow-when-locked = true;
|
||||||
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "audio" "mute";
|
action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"audio"
|
||||||
|
"mute"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
"XF86AudioMicMute" = {
|
"XF86AudioMicMute" = {
|
||||||
allow-when-locked = true;
|
allow-when-locked = true;
|
||||||
action = spawn "qs" "-c" "DankMaterialShell" "ipc" "call" "audio" "micmute";
|
action.spawn = [
|
||||||
|
"qs"
|
||||||
|
"-c"
|
||||||
|
"DankMaterialShell"
|
||||||
|
"ipc"
|
||||||
|
"call"
|
||||||
|
"audio"
|
||||||
|
"micmute"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
(lib.mkIf (!cfg.enableSystemd) {
|
(lib.mkIf (cfg.enableSpawn) {
|
||||||
spawn-at-startup = [{
|
spawn-at-startup =
|
||||||
command = [ "qs" "-c" "DankMaterialShell" ];
|
[{ command = [ "qs" "-c" "DankMaterialShell" ]; }];
|
||||||
}];
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user