From 41a23d7c822373546fcb868db9b850cdb5943a93 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 6 Jul 2024 00:56:31 +0700 Subject: [PATCH] Move ags to common --- flake.nix | 2 +- modules/{dwl => common}/ags/.editorconfig | 0 modules/{dwl => common}/ags/.gitignore | 0 modules/{dwl => common}/ags/config.js | 0 modules/{dwl => common}/ags/covercolors.py | 0 modules/common/ags/default.nix | 18 ++++++++++++------ modules/{dwl => common}/ags/layouts/bar.js | 0 .../ags/layouts/notifications.js | 0 modules/{dwl => common}/ags/layouts/osd.js | 0 .../{dwl => common}/ags/layouts/powermenu.js | 0 .../ags/layouts/quicksettings.js | 0 modules/{dwl => common}/ags/misc.js | 0 modules/{dwl => common}/ags/modules/audio.js | 0 modules/{dwl => common}/ags/modules/battery.js | 0 .../{dwl => common}/ags/modules/bluetooth.js | 0 .../{dwl => common}/ags/modules/brightness.js | 0 modules/{dwl => common}/ags/modules/clock.js | 0 .../{dwl => common}/ags/modules/darkmode.js | 0 modules/{dwl => common}/ags/modules/dwl.js | 0 .../ags/modules/materialcolors.js | 0 modules/{dwl => common}/ags/modules/mpris.js | 0 modules/{dwl => common}/ags/modules/network.js | 0 .../{dwl => common}/ags/modules/nightmode.js | 0 .../ags/modules/notifications.js | 0 .../{dwl => common}/ags/services/brightness.js | 0 modules/{dwl => common}/ags/services/dwl.js | 0 modules/{dwl => common}/ags/services/osd.js | 0 .../ags/services/quicksettings.js | 0 modules/{dwl => common}/ags/style.css | 0 modules/common/kitty.nix | 2 +- modules/common/tsconfig.json | 18 ++++++++++++++++++ modules/dwl/home.nix | 18 ------------------ modules/river/default.nix | 4 +++- modules/river/home.nix | 2 +- 34 files changed, 36 insertions(+), 28 deletions(-) rename modules/{dwl => common}/ags/.editorconfig (100%) rename modules/{dwl => common}/ags/.gitignore (100%) rename modules/{dwl => common}/ags/config.js (100%) rename modules/{dwl => common}/ags/covercolors.py (100%) rename modules/{dwl => common}/ags/layouts/bar.js (100%) rename modules/{dwl => common}/ags/layouts/notifications.js (100%) rename modules/{dwl => common}/ags/layouts/osd.js (100%) rename modules/{dwl => common}/ags/layouts/powermenu.js (100%) rename modules/{dwl => common}/ags/layouts/quicksettings.js (100%) rename modules/{dwl => common}/ags/misc.js (100%) rename modules/{dwl => common}/ags/modules/audio.js (100%) rename modules/{dwl => common}/ags/modules/battery.js (100%) rename modules/{dwl => common}/ags/modules/bluetooth.js (100%) rename modules/{dwl => common}/ags/modules/brightness.js (100%) rename modules/{dwl => common}/ags/modules/clock.js (100%) rename modules/{dwl => common}/ags/modules/darkmode.js (100%) rename modules/{dwl => common}/ags/modules/dwl.js (100%) rename modules/{dwl => common}/ags/modules/materialcolors.js (100%) rename modules/{dwl => common}/ags/modules/mpris.js (100%) rename modules/{dwl => common}/ags/modules/network.js (100%) rename modules/{dwl => common}/ags/modules/nightmode.js (100%) rename modules/{dwl => common}/ags/modules/notifications.js (100%) rename modules/{dwl => common}/ags/services/brightness.js (100%) rename modules/{dwl => common}/ags/services/dwl.js (100%) rename modules/{dwl => common}/ags/services/osd.js (100%) rename modules/{dwl => common}/ags/services/quicksettings.js (100%) rename modules/{dwl => common}/ags/style.css (100%) create mode 100644 modules/common/tsconfig.json diff --git a/flake.nix b/flake.nix index 6ad7553..ad4175c 100644 --- a/flake.nix +++ b/flake.nix @@ -101,7 +101,7 @@ }; in { nixosConfigurations = { - fuhen = mkSystem "fuhen" "dwl" [ + fuhen = mkSystem "fuhen" "river" [ nixos-hardware.nixosModules.tuxedo-infinitybook-pro14-gen7 ({ lib, diff --git a/modules/dwl/ags/.editorconfig b/modules/common/ags/.editorconfig similarity index 100% rename from modules/dwl/ags/.editorconfig rename to modules/common/ags/.editorconfig diff --git a/modules/dwl/ags/.gitignore b/modules/common/ags/.gitignore similarity index 100% rename from modules/dwl/ags/.gitignore rename to modules/common/ags/.gitignore diff --git a/modules/dwl/ags/config.js b/modules/common/ags/config.js similarity index 100% rename from modules/dwl/ags/config.js rename to modules/common/ags/config.js diff --git a/modules/dwl/ags/covercolors.py b/modules/common/ags/covercolors.py similarity index 100% rename from modules/dwl/ags/covercolors.py rename to modules/common/ags/covercolors.py diff --git a/modules/common/ags/default.nix b/modules/common/ags/default.nix index 7d46b70..eb7e5ac 100644 --- a/modules/common/ags/default.nix +++ b/modules/common/ags/default.nix @@ -12,13 +12,19 @@ installPhase = "install -Dm755 ${./covercolors.py} $out/bin/covercolors"; }; in { + home.packages = with pkgs; [ + # TODO: Remove this + covercolors + alsa-utils + sassc + brightnessctl + pavucontrol + glib + ]; + xdg.configFile."ags" = { - source = ./ags; + source = ./.; recursive = true; }; - home.packages = with pkgs; [ - ags - # TOOD: Remove this - covercolors - ]; + } diff --git a/modules/dwl/ags/layouts/bar.js b/modules/common/ags/layouts/bar.js similarity index 100% rename from modules/dwl/ags/layouts/bar.js rename to modules/common/ags/layouts/bar.js diff --git a/modules/dwl/ags/layouts/notifications.js b/modules/common/ags/layouts/notifications.js similarity index 100% rename from modules/dwl/ags/layouts/notifications.js rename to modules/common/ags/layouts/notifications.js diff --git a/modules/dwl/ags/layouts/osd.js b/modules/common/ags/layouts/osd.js similarity index 100% rename from modules/dwl/ags/layouts/osd.js rename to modules/common/ags/layouts/osd.js diff --git a/modules/dwl/ags/layouts/powermenu.js b/modules/common/ags/layouts/powermenu.js similarity index 100% rename from modules/dwl/ags/layouts/powermenu.js rename to modules/common/ags/layouts/powermenu.js diff --git a/modules/dwl/ags/layouts/quicksettings.js b/modules/common/ags/layouts/quicksettings.js similarity index 100% rename from modules/dwl/ags/layouts/quicksettings.js rename to modules/common/ags/layouts/quicksettings.js diff --git a/modules/dwl/ags/misc.js b/modules/common/ags/misc.js similarity index 100% rename from modules/dwl/ags/misc.js rename to modules/common/ags/misc.js diff --git a/modules/dwl/ags/modules/audio.js b/modules/common/ags/modules/audio.js similarity index 100% rename from modules/dwl/ags/modules/audio.js rename to modules/common/ags/modules/audio.js diff --git a/modules/dwl/ags/modules/battery.js b/modules/common/ags/modules/battery.js similarity index 100% rename from modules/dwl/ags/modules/battery.js rename to modules/common/ags/modules/battery.js diff --git a/modules/dwl/ags/modules/bluetooth.js b/modules/common/ags/modules/bluetooth.js similarity index 100% rename from modules/dwl/ags/modules/bluetooth.js rename to modules/common/ags/modules/bluetooth.js diff --git a/modules/dwl/ags/modules/brightness.js b/modules/common/ags/modules/brightness.js similarity index 100% rename from modules/dwl/ags/modules/brightness.js rename to modules/common/ags/modules/brightness.js diff --git a/modules/dwl/ags/modules/clock.js b/modules/common/ags/modules/clock.js similarity index 100% rename from modules/dwl/ags/modules/clock.js rename to modules/common/ags/modules/clock.js diff --git a/modules/dwl/ags/modules/darkmode.js b/modules/common/ags/modules/darkmode.js similarity index 100% rename from modules/dwl/ags/modules/darkmode.js rename to modules/common/ags/modules/darkmode.js diff --git a/modules/dwl/ags/modules/dwl.js b/modules/common/ags/modules/dwl.js similarity index 100% rename from modules/dwl/ags/modules/dwl.js rename to modules/common/ags/modules/dwl.js diff --git a/modules/dwl/ags/modules/materialcolors.js b/modules/common/ags/modules/materialcolors.js similarity index 100% rename from modules/dwl/ags/modules/materialcolors.js rename to modules/common/ags/modules/materialcolors.js diff --git a/modules/dwl/ags/modules/mpris.js b/modules/common/ags/modules/mpris.js similarity index 100% rename from modules/dwl/ags/modules/mpris.js rename to modules/common/ags/modules/mpris.js diff --git a/modules/dwl/ags/modules/network.js b/modules/common/ags/modules/network.js similarity index 100% rename from modules/dwl/ags/modules/network.js rename to modules/common/ags/modules/network.js diff --git a/modules/dwl/ags/modules/nightmode.js b/modules/common/ags/modules/nightmode.js similarity index 100% rename from modules/dwl/ags/modules/nightmode.js rename to modules/common/ags/modules/nightmode.js diff --git a/modules/dwl/ags/modules/notifications.js b/modules/common/ags/modules/notifications.js similarity index 100% rename from modules/dwl/ags/modules/notifications.js rename to modules/common/ags/modules/notifications.js diff --git a/modules/dwl/ags/services/brightness.js b/modules/common/ags/services/brightness.js similarity index 100% rename from modules/dwl/ags/services/brightness.js rename to modules/common/ags/services/brightness.js diff --git a/modules/dwl/ags/services/dwl.js b/modules/common/ags/services/dwl.js similarity index 100% rename from modules/dwl/ags/services/dwl.js rename to modules/common/ags/services/dwl.js diff --git a/modules/dwl/ags/services/osd.js b/modules/common/ags/services/osd.js similarity index 100% rename from modules/dwl/ags/services/osd.js rename to modules/common/ags/services/osd.js diff --git a/modules/dwl/ags/services/quicksettings.js b/modules/common/ags/services/quicksettings.js similarity index 100% rename from modules/dwl/ags/services/quicksettings.js rename to modules/common/ags/services/quicksettings.js diff --git a/modules/dwl/ags/style.css b/modules/common/ags/style.css similarity index 100% rename from modules/dwl/ags/style.css rename to modules/common/ags/style.css diff --git a/modules/common/kitty.nix b/modules/common/kitty.nix index 46b8925..bcc662d 100644 --- a/modules/common/kitty.nix +++ b/modules/common/kitty.nix @@ -37,7 +37,7 @@ map kitty_mod+i scroll_to_prompt 1 map kitty_mod+space show_last_command_output - include light.conf + include dark.conf include theme.conf ''; }; diff --git a/modules/common/tsconfig.json b/modules/common/tsconfig.json new file mode 100644 index 0000000..f6cc8d2 --- /dev/null +++ b/modules/common/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ES2022", + "lib": [ + "ES2022" + ], + "allowJs": true, + "checkJs": true, + "strict": true, + "noImplicitAny": false, + "baseUrl": ".", + "typeRoots": [ + "ags/types" + ], + "skipLibCheck": true + } +} diff --git a/modules/dwl/home.nix b/modules/dwl/home.nix index c06ea4f..f107c77 100644 --- a/modules/dwl/home.nix +++ b/modules/dwl/home.nix @@ -1,18 +1,6 @@ {pkgs, ...}: let wallpaper = pkgs.writeShellScriptBin "wallpaper" (builtins.readFile ./wallpaper.sh); dwlstartup = pkgs.writeShellScriptBin "dwlstartup" (builtins.readFile ./dwlstartup.sh); - covercolors = pkgs.stdenv.mkDerivation { - name = "covercolors"; - dontUnpack = true; - propagatedBuildInputs = [ - (pkgs.python3.withPackages (pyPkgs: - with pyPkgs; [ - material-color-utilities - pillow - ])) - ]; - installPhase = "install -Dm755 ${./ags/covercolors.py} $out/bin/covercolors"; - }; in { imports = [ ../common/apps.nix @@ -37,7 +25,6 @@ in { grim slurp cliphist - covercolors ydotool fusuma gnome-control-center @@ -45,11 +32,6 @@ in { shikane ]; - xdg.configFile."ags" = { - source = ./ags; - recursive = true; - }; - # Keycodes here: https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L202 # :1 is for keydown, :0 for keyup xdg.configFile."fusuma/config.yaml".text = '' diff --git a/modules/river/default.nix b/modules/river/default.nix index f13429b..0172900 100644 --- a/modules/river/default.nix +++ b/modules/river/default.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{pkgs, inputs, ...}: { services.greetd = { enable = true; settings = { @@ -50,6 +50,8 @@ }; environment.systemPackages = with pkgs; [ + # TODO: Remove this + inputs.ags.packages.x86_64-linux.default gnome.gnome-bluetooth polkit_gnome wineWowPackages.stable diff --git a/modules/river/home.nix b/modules/river/home.nix index 76965a5..3f729d1 100644 --- a/modules/river/home.nix +++ b/modules/river/home.nix @@ -63,7 +63,7 @@ in { rule-add = { "-app-id" = { "discord" = "tags '3'"; - "YouTube Music" = "tags '2'"; + "'YouTube Music'" = "tags '2'"; # disable all client side decorations "'*'" = "ssd"; };