From 6c6900299d253071aba4761630a8b1468f490f61 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Tue, 18 Nov 2025 01:02:30 -0800 Subject: [PATCH 1/8] add qs mic toggle --- modules/hyprland/hyprland.conf | 1 + modules/user/dokapon.nix | 64 +++++++++++++++++++ .../shell/bar/audio/AudioControls.qml | 10 +++ 3 files changed, 75 insertions(+) create mode 100644 modules/user/dokapon.nix diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index 9fb22c8..6be884e 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -197,6 +197,7 @@ bind = ,XF86AudioStop, exec, qs -c shell ipc call mpris pauseAll bind = ,XF86AudioPlay, exec, qs -c shell ipc call mpris playPause bind = ,XF86AudioNext, exec, qs -c shell ipc call mpris next bind = ,XF86AudioPrev, exec, qs -c shell ipc call mpris previous +bind = $mod, m, exec, qs -c shell ipc call audio toggleMic bind = $mod, h, hy3:movefocus, l bind = $mod, j, hy3:movefocus, d diff --git a/modules/user/dokapon.nix b/modules/user/dokapon.nix new file mode 100644 index 0000000..ac1df6e --- /dev/null +++ b/modules/user/dokapon.nix @@ -0,0 +1,64 @@ +{ nixpak, pkgs, ... }: +let + dokaponGameDir = "/home/admin/Downloads/dokapon/game"; + + mkNixPak = nixpak.lib.nixpak { + inherit (pkgs) lib; + inherit pkgs; + }; + + dokapon = mkNixPak { + config = + { sloth, ... }: + { + app.package = pkgs.writeShellScriptBin "dokapon" '' + cd ${dokaponGameDir} + exec ${pkgs.wine64}/bin/wine64 DkkStm.exe "$@" + ''; + + flatpak.appId = "com.dokapon.kingdom"; + + bubblewrap = { + network = true; + + bind.rw = [ + (sloth.concat' sloth.xdgDataHome "/dokapon") + (sloth.concat' sloth.homeDir "/.wine") + "/tmp" + "/run/user/1000" + ]; + + bind.ro = [ + (sloth.concat' dokaponGameDir "") + ]; + + sockets = { + wayland = true; + pipewire = true; + pulse = true; + }; + + env = { + WINEDEBUG = "-all"; + WINEESYNC = "1"; + XDG_DATA_HOME = sloth.concat' sloth.xdgDataHome ""; + XDG_CACHE_HOME = sloth.concat' sloth.xdgCacheHome ""; + }; + }; + + dbus.policies = { + "org.freedesktop.Notifications" = "talk"; + }; + + gpu.enable = true; + locale.enable = true; + fonts.enable = true; + }; + + }; +in +{ + environment.systemPackages = [ + dokapon.config.env + ]; +} diff --git a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml index f910307..f9b10c1 100644 --- a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml +++ b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Layouts import Quickshell +import Quickshell.Io import Quickshell.Services.Pipewire import qs.bar @@ -40,4 +41,13 @@ BarWidgetInner { } } } + + IpcHandler { + target: "audio" + + function toggleMic(): void { + const source = Pipewire.defaultAudioSource; + source.audio.muted = !source.audio.muted; + } + } } From edbf7a40686ca304127f81681492f3e4717d7e11 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 3 Jan 2026 23:40:57 -0800 Subject: [PATCH 2/8] hyprland: dont set explicit res so monitor can be resized --- systems/msi/hyprland/hyprland.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systems/msi/hyprland/hyprland.conf b/systems/msi/hyprland/hyprland.conf index 1d8778c..75e8cb3 100644 --- a/systems/msi/hyprland/hyprland.conf +++ b/systems/msi/hyprland/hyprland.conf @@ -1,7 +1,8 @@ env = AQ_DRM_DEVICES,/dev/dri/card1:/dev/dri/card2 monitor = eDP-1, 1920x1080@240Hz, 0x1440, 1 -monitor = DP-1, 5120x1440@120Hz, 1350x0, 1 +monitor = DP-1, highres, 1350x0, 1 +#monitor = DP-1, 5120x1440@120Hz, 1350x0, 1 monitor = , preferred, auto, 1 workspace = 01, monitor:DP-1, default:true From 755a58c50cf63b37fd577868ed7a84af0b11b43f Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 3 Jan 2026 23:43:27 -0800 Subject: [PATCH 3/8] qs: support vol + prev + next controls --- modules/hyprland/hyprland.conf | 4 ++++ .../quickshell/shell/bar/audio/AudioControls.qml | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index 6be884e..cc5ae63 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -198,6 +198,10 @@ bind = ,XF86AudioPlay, exec, qs -c shell ipc call mpris playPause bind = ,XF86AudioNext, exec, qs -c shell ipc call mpris next bind = ,XF86AudioPrev, exec, qs -c shell ipc call mpris previous bind = $mod, m, exec, qs -c shell ipc call audio toggleMic +bind = ,XF86AudioRaiseVolume, exec, qs -c shell ipc call audio volUp +bind = ,XF86AudioLowerVolume, exec, qs -c shell ipc call audio volDown +bind = SHIFT,XF86AudioNext, exec, qs -c shell ipc call mpris next +bind = SHIFT,XF86AudioPrev, exec, qs -c shell ipc call mpris previous bind = $mod, h, hy3:movefocus, l bind = $mod, j, hy3:movefocus, d diff --git a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml index f9b10c1..f3fd830 100644 --- a/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml +++ b/modules/user/modules/quickshell/shell/bar/audio/AudioControls.qml @@ -49,5 +49,15 @@ BarWidgetInner { const source = Pipewire.defaultAudioSource; source.audio.muted = !source.audio.muted; } + + function volUp(): void { + const sink = Pipewire.defaultAudioSink; + sink.audio.volume += 0.05; + } + + function volDown(): void { + const sink = Pipewire.defaultAudioSink; + sink.audio.volume -= 0.05; + } } } From 43d469f225e5e4cedf9d00df6b95ae942a30038a Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sat, 3 Jan 2026 23:44:52 -0800 Subject: [PATCH 4/8] firefox: remove vencord --- modules/user/modules/firefox/default.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/modules/user/modules/firefox/default.nix b/modules/user/modules/firefox/default.nix index faf4640..abc5871 100755 --- a/modules/user/modules/firefox/default.nix +++ b/modules/user/modules/firefox/default.nix @@ -42,13 +42,6 @@ let url = "https://addons.mozilla.org/firefox/downloads/file/3854469/github_repo_size-1.7.0.xpi"; sha256 = "2zGY12esYusaw2IzXM+1kP0B/0Urxu0yj7xXlDlutto="; }; - vencord = remoteXpiAddon { - pname = "vencord"; - version = "1.2.7"; - addonId = "vencord-firefox@vendicated.dev"; - url = "https://addons.mozilla.org/firefox/downloads/file/4123132/vencord_web-1.2.7.xpi"; - sha256 = "A/XKdT0EuDHsQ7mcK9hsXAoAJYUt4Uvp/rtCf/9dAS0="; - }; theme-gray = theme { name = "theme-gray"; @@ -243,7 +236,6 @@ in { extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; with extra-addons; [ ublock-origin - vencord ]; }; From 35a565098840a402f2ae25199342e2bd8ccebcc6 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 4 Jan 2026 00:14:53 -0800 Subject: [PATCH 5/8] random --- modules/overlay-pkgs/cantata/default.nix | 9 +++- modules/overlay-pkgs/default.nix | 8 +++ modules/overlay-pkgs/tws.nix | 4 +- modules/system.nix | 2 + modules/user/dokapon.nix | 64 ------------------------ modules/user/general.nix | 14 ++++-- systems/msi/hardware-configuration.nix | 10 ++-- 7 files changed, 35 insertions(+), 76 deletions(-) delete mode 100644 modules/user/dokapon.nix diff --git a/modules/overlay-pkgs/cantata/default.nix b/modules/overlay-pkgs/cantata/default.nix index 3dfa576..80141e0 100644 --- a/modules/overlay-pkgs/cantata/default.nix +++ b/modules/overlay-pkgs/cantata/default.nix @@ -20,6 +20,8 @@ , lame , withMusicbrainz ? false , libmusicbrainz5 +, libebur128 +, kdePackages , withTaglib ? true , taglib @@ -88,8 +90,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "nullobsi"; repo = "cantata"; - rev = "a19efdf9649c50320f8592f07d82734c352ace9c"; - sha256 = "TVqgTYpHyU1OM9XddJ915GM1XQQrhH9V7yhSxQOaXRs="; + rev = "dc5a0ce77cdf3eaacce29180fe7d2c710b3f31af"; + sha256 = "YcGqVZuP7slfxo5oe0lBPchVCXm+UsSN/wpglwn6UmU="; }; patches = [ @@ -108,6 +110,9 @@ stdenv.mkDerivation rec { qtbase qtsvg qtwayland + libebur128 + kdePackages.kitemviews + kdePackages.karchive (perl.withPackages (ppkgs: with ppkgs; [ URI ])) ] ++ lib.flatten (builtins.catAttrs "pkgs" (builtins.filter (e: e.enable) options)); diff --git a/modules/overlay-pkgs/default.nix b/modules/overlay-pkgs/default.nix index c05233e..5d3cefc 100644 --- a/modules/overlay-pkgs/default.nix +++ b/modules/overlay-pkgs/default.nix @@ -7,6 +7,14 @@ mcontrolcenter = final.callPackage ./mcontrolcenter.nix {}; cantata = final.qt6Packages.callPackage ./cantata {}; tws = final.callPackage ./tws.nix {}; + libsigrok = prev.libsigrok.overrideAttrs { + src = pkgs.fetchFromGitHub { + owner = "sipeed"; + repo = "libsigrok"; + rev = "4bd54163630ab48e3d5cd540ea9e8cf9809c6f3d"; + hash = "sha256-Rl5w2jABGTKPnRXZJehNMEBNeGe4POHOoRzffIhAMTM="; + }; + }; }) ]; } diff --git a/modules/overlay-pkgs/tws.nix b/modules/overlay-pkgs/tws.nix index 9822526..1cc42a5 100644 --- a/modules/overlay-pkgs/tws.nix +++ b/modules/overlay-pkgs/tws.nix @@ -47,7 +47,7 @@ glib gtk2 gtk3 - javaPackages.openjfx21 + javaPackages.openjfx25 libdrm libGL libxkbcommon @@ -74,7 +74,7 @@ in stdenv.mkDerivation { src = fetchurl { url = "https://download2.interactivebrokers.com/installers/tws/latest-standalone/tws-latest-standalone-linux-x64.sh"; - hash = "sha256-Wk7lRE5ypJeAQfvi5aEDZYfUF6fJ3ktueYYytHohIGU="; + hash = "sha256-QN7dSe+R2kfDjtJWa9TIGbc8zCSC3XNmxSxOZOjOB2o="; }; nativeBuildInputs = [ diff --git a/modules/system.nix b/modules/system.nix index 7f43aca..e3c32f3 100644 --- a/modules/system.nix +++ b/modules/system.nix @@ -16,6 +16,8 @@ services.upower.enable = true; services.power-profiles-daemon.enable = true; + services.nixseparatedebuginfod2.enable = true; + environment.systemPackages = with pkgs; [ git git-lfs diff --git a/modules/user/dokapon.nix b/modules/user/dokapon.nix deleted file mode 100644 index ac1df6e..0000000 --- a/modules/user/dokapon.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ nixpak, pkgs, ... }: -let - dokaponGameDir = "/home/admin/Downloads/dokapon/game"; - - mkNixPak = nixpak.lib.nixpak { - inherit (pkgs) lib; - inherit pkgs; - }; - - dokapon = mkNixPak { - config = - { sloth, ... }: - { - app.package = pkgs.writeShellScriptBin "dokapon" '' - cd ${dokaponGameDir} - exec ${pkgs.wine64}/bin/wine64 DkkStm.exe "$@" - ''; - - flatpak.appId = "com.dokapon.kingdom"; - - bubblewrap = { - network = true; - - bind.rw = [ - (sloth.concat' sloth.xdgDataHome "/dokapon") - (sloth.concat' sloth.homeDir "/.wine") - "/tmp" - "/run/user/1000" - ]; - - bind.ro = [ - (sloth.concat' dokaponGameDir "") - ]; - - sockets = { - wayland = true; - pipewire = true; - pulse = true; - }; - - env = { - WINEDEBUG = "-all"; - WINEESYNC = "1"; - XDG_DATA_HOME = sloth.concat' sloth.xdgDataHome ""; - XDG_CACHE_HOME = sloth.concat' sloth.xdgCacheHome ""; - }; - }; - - dbus.policies = { - "org.freedesktop.Notifications" = "talk"; - }; - - gpu.enable = true; - locale.enable = true; - fonts.enable = true; - }; - - }; -in -{ - environment.systemPackages = [ - dokapon.config.env - ]; -} diff --git a/modules/user/general.nix b/modules/user/general.nix index 6e2aeaa..d40634f 100644 --- a/modules/user/general.nix +++ b/modules/user/general.nix @@ -3,7 +3,11 @@ system.extraDependencies = with pkgs; [ ungoogled-chromium ]; - environment.systemPackages = with pkgs; [ nix-output-monitor ]; + environment.systemPackages = with pkgs; [ + nix-output-monitor + pulseview # here because usev rules in libsigrok + ]; + services.udev.packages = [ pkgs.libsigrok ]; environment.sessionVariables.FLAKE = "/home/admin/nixnew"; programs.steam = { @@ -26,7 +30,7 @@ material-symbols font-awesome corefonts - vistafonts + vista-fonts ]); fontconfig = { @@ -97,6 +101,8 @@ ]; }; + #programs.ladybird.enable = true; + home-manager.users.${config.main-user} = homeInputs: let homeConfig = homeInputs.config; in { @@ -106,7 +112,6 @@ ./modules/wofi ./modules/dolphin ./modules/firefox - ./modules/element.nix ./modules/keepassxc ./dev-support.nix ]; @@ -135,6 +140,7 @@ freetube jujutsu + freecad tws distrobox @@ -162,7 +168,7 @@ services = { mpd = { enable = true; - musicDirectory = "/pool/music"; + musicDirectory = "/pool2/music"; network.startWhenNeeded = true; extraConfig = '' diff --git a/systems/msi/hardware-configuration.nix b/systems/msi/hardware-configuration.nix index 46d4c68..69582cc 100644 --- a/systems/msi/hardware-configuration.nix +++ b/systems/msi/hardware-configuration.nix @@ -13,10 +13,10 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "zfs" ]; - networking.hostId = "fd4421b3"; - systemd.services.zfs-mount.enable = false; - services.zfs.autoScrub.enable = true; + #boot.supportedFilesystems = [ "zfs" ]; + #networking.hostId = "fd4421b3"; + #systemd.services.zfs-mount.enable = false; + #services.zfs.autoScrub.enable = true; fileSystems."/" = { device = "/dev/disk/by-uuid/c9cb1730-c0d1-4a2e-a092-12dfa7098476"; @@ -28,6 +28,7 @@ fsType = "vfat"; }; +/* fileSystems."/pool/games" = { fsType = "zfs"; device = "pool/games"; @@ -42,6 +43,7 @@ fsType = "zfs"; device = "pool/music"; }; +*/ swapDevices = [ ]; From 52b53215f52b12c0fffdd99f44e3404b50e2cece Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 4 Jan 2026 00:16:30 -0800 Subject: [PATCH 6/8] qs: recover from screenshot fail --- modules/user/modules/quickshell/shell/screenshot/Controller.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/user/modules/quickshell/shell/screenshot/Controller.qml b/modules/user/modules/quickshell/shell/screenshot/Controller.qml index e57c701..ff27d39 100644 --- a/modules/user/modules/quickshell/shell/screenshot/Controller.qml +++ b/modules/user/modules/quickshell/shell/screenshot/Controller.qml @@ -33,6 +33,7 @@ Scope { } else { console.log("screenshot failed") cleanupProc.running = true + root.shooting = false } } } From c6eef9f01c5585371bbb4fcbb002a879a8e3ee95 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 4 Jan 2026 00:18:19 -0800 Subject: [PATCH 7/8] all: updates --- flake.lock | 308 ++++++++++++++++++++------------- modules/emacs/default.nix | 38 ++-- modules/hyprland/hyprland.conf | 65 +++---- 3 files changed, 230 insertions(+), 181 deletions(-) diff --git a/flake.lock b/flake.lock index 1fdfc0d..bec760d 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1759499898, - "narHash": "sha256-UNzYHLWfkSzLHDep5Ckb5tXc0fdxwPIrT+MY4kpQttM=", + "lastModified": 1765900596, + "narHash": "sha256-+hn8v9jkkLP9m+o0Nm5SiEq10W0iWDSotH2XfjU45fA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "655e067f96fd44b3f5685e17f566b0e4d535d798", + "rev": "d83c97f8f5c0aae553c1489c7d9eff3eadcadace", "type": "github" }, "original": { @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1759544172, - "narHash": "sha256-oSkKuK4qWhN9ccvRMcnYhSCO9TJOmBb67z9+LIRdtNg=", + "lastModified": 1767198468, + "narHash": "sha256-FxDbqVgsT/ofpcVD4oNSO4YyPK0bu0/w4TGr/p87E4A=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "942530872529aad21e9ac205b630694ef6b755de", + "rev": "ff02fe1802aa90146fe3c236ec504c788825b152", "type": "github" }, "original": { @@ -59,11 +59,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -122,11 +122,11 @@ ] }, "locked": { - "lastModified": 1759550472, - "narHash": "sha256-JLM3D6RbnGmXR8x+3WNac9neklAxA1JtZHZscwukFYw=", + "lastModified": 1767104570, + "narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=", "owner": "nix-community", "repo": "home-manager", - "rev": "817ace497b72b38da0c08728a683b7febaccf9cf", + "rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf", "type": "github" }, "original": { @@ -180,11 +180,11 @@ ] }, "locked": { - "lastModified": 1759490292, - "narHash": "sha256-T6iWzDOXp8Wv0KQOCTHpBcmAOdHJ6zc/l9xaztW6Ivc=", + "lastModified": 1763733840, + "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "9431db625cd9bb66ac55525479dce694101d6d7a", + "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", "type": "github" }, "original": { @@ -198,8 +198,8 @@ "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", "hyprgraphics": "hyprgraphics", + "hyprland-guiutils": "hyprland-guiutils", "hyprland-protocols": "hyprland-protocols", - "hyprland-qtutils": "hyprland-qtutils", "hyprlang": [ "hyprlang" ], @@ -207,6 +207,7 @@ "hyprutils" ], "hyprwayland-scanner": "hyprwayland-scanner", + "hyprwire": "hyprwire", "nixpkgs": [ "nixpkgs" ], @@ -217,11 +218,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1759530922, - "narHash": "sha256-9NgZKpibALekGTPDc2O8lP8vFealQSZkXe+L+S7MMZU=", + "lastModified": 1767201430, + "narHash": "sha256-2FF66EaIbsc7CL1jKHbRFslSePDq40fzlTTbUlm5v3k=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "76d998743ac10e712238c1016db4d8e8d16f1049", + "rev": "48a024e0322bbd7c4c88126498ec478444ec4cb2", "type": "github" }, "original": { @@ -230,6 +231,52 @@ "type": "github" } }, + "hyprland-guiutils": { + "inputs": { + "aquamarine": [ + "hyprland", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "hyprtoolkit": "hyprtoolkit", + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1765643131, + "narHash": "sha256-CCGohW5EBIRy4B7vTyBMqPgsNcaNenVad/wszfddET0=", + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "rev": "e50ae912813bdfa8372d62daf454f48d6df02297", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-guiutils", + "type": "github" + } + }, "hyprland-hy3": { "inputs": { "hyprland": [ @@ -237,11 +284,11 @@ ] }, "locked": { - "lastModified": 1759126670, - "narHash": "sha256-p+HObKRf2j3DfI4mcrJoF+WR7IIg9demMioYBsRH0GM=", + "lastModified": 1766381032, + "narHash": "sha256-Wuk2MULnGfgAbP1N/Rp6H6k7zG/ynDiy54mPvkt/4bM=", "owner": "outfoxxed", "repo": "hy3", - "rev": "af94b011af255de87b2b026121fab1e6f2c56c6d", + "rev": "50643d625829f303239f9ec019021f17d7e9f3fc", "type": "github" }, "original": { @@ -262,11 +309,11 @@ ] }, "locked": { - "lastModified": 1749046714, - "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=", + "lastModified": 1765214753, + "narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330", + "rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab", "type": "github" }, "original": { @@ -275,74 +322,6 @@ "type": "github" } }, - "hyprland-qt-support": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprland-qtutils", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "hyprland-qtutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-qtutils", - "systems" - ] - }, - "locked": { - "lastModified": 1749154592, - "narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=", - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qt-support", - "type": "github" - } - }, - "hyprland-qtutils": { - "inputs": { - "hyprland-qt-support": "hyprland-qt-support", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-qtutils", - "hyprlang", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1759080228, - "narHash": "sha256-RgDoAja0T1hnF0pTc56xPfLfFOO8Utol2iITwYbUhTk=", - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "rev": "629b15c19fa4082e4ce6be09fdb89e8c3312aed7", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "type": "github" - } - }, "hyprlang": { "inputs": { "hyprutils": [ @@ -356,11 +335,11 @@ ] }, "locked": { - "lastModified": 1758927902, - "narHash": "sha256-LZgMds7M94+vuMql2bERQ6LiFFdhgsEFezE4Vn+Ys3A=", + "lastModified": 1764612430, + "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "4dafa28d4f79877d67a7d1a654cddccf8ebf15da", + "rev": "0d00dc118981531aa731150b6ea551ef037acddd", "type": "github" }, "original": { @@ -369,6 +348,58 @@ "type": "github" } }, + "hyprtoolkit": { + "inputs": { + "aquamarine": [ + "hyprland", + "hyprland-guiutils", + "aquamarine" + ], + "hyprgraphics": [ + "hyprland", + "hyprland-guiutils", + "hyprgraphics" + ], + "hyprlang": [ + "hyprland", + "hyprland-guiutils", + "hyprlang" + ], + "hyprutils": [ + "hyprland", + "hyprland-guiutils", + "hyprutils" + ], + "hyprwayland-scanner": [ + "hyprland", + "hyprland-guiutils", + "hyprwayland-scanner" + ], + "nixpkgs": [ + "hyprland", + "hyprland-guiutils", + "nixpkgs" + ], + "systems": [ + "hyprland", + "hyprland-guiutils", + "systems" + ] + }, + "locked": { + "lastModified": 1764592794, + "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", + "owner": "hyprwm", + "repo": "hyprtoolkit", + "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprtoolkit", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -379,11 +410,11 @@ ] }, "locked": { - "lastModified": 1759490926, - "narHash": "sha256-7IbZGJ5qAAfZsGhBHIsP8MBsfuFYS0hsxYHVkkeDG5Q=", + "lastModified": 1766253372, + "narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "94cce794344538c4d865e38682684ec2bbdb2ef3", + "rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9", "type": "github" }, "original": { @@ -404,11 +435,11 @@ ] }, "locked": { - "lastModified": 1755184602, - "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", + "lastModified": 1763640274, + "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", + "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", "type": "github" }, "original": { @@ -417,6 +448,35 @@ "type": "github" } }, + "hyprwire": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1766253200, + "narHash": "sha256-26qPwrd3od+xoYVywSB7hC2cz9ivN46VPLlrsXyGxvE=", + "owner": "hyprwm", + "repo": "hyprwire", + "rev": "1079777525b30a947c8d657fac158e00ae85de9d", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwire", + "type": "github" + } + }, "impurity": { "locked": { "lastModified": 1689836741, @@ -439,11 +499,11 @@ ] }, "locked": { - "lastModified": 1759032422, - "narHash": "sha256-WZf+FhebP2/1pK2np5xj/NuDjD6fXK2BHnq/tPUN18o=", + "lastModified": 1765267181, + "narHash": "sha256-d3NBA9zEtBu2JFMnTBqWj7Tmi7R5OikoU2ycrdhQEws=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "ec7a78cb0e098832d8acac091a4df393259c4839", + "rev": "82befcf7dc77c909b0f2a09f5da910ec95c5b78f", "type": "github" }, "original": { @@ -474,11 +534,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1766902085, + "narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4", "type": "github" }, "original": { @@ -495,11 +555,11 @@ ] }, "locked": { - "lastModified": 1759562581, - "narHash": "sha256-Ws/2AeBPNO0rKZClWMZGHzpYYxvzipkQe0Uv0bRcYDM=", + "lastModified": 1767202981, + "narHash": "sha256-XF68CQaLfPcCk5DVAP/OLbyqchc9uj4E65AEf363HI8=", "owner": "nix-community", "repo": "NUR", - "rev": "fc4bde0d1bbd11352fd7836af54e56573f6649e6", + "rev": "8666a7d3d9d26a7a3031ba4d5688ba4e6f83d6bd", "type": "github" }, "original": { @@ -518,11 +578,11 @@ ] }, "locked": { - "lastModified": 1758108966, - "narHash": "sha256-ytw7ROXaWZ7OfwHrQ9xvjpUWeGVm86pwnEd1QhzawIo=", + "lastModified": 1765911976, + "narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "b68b780b69702a090c8bb1b973bab13756cc7a27", "type": "github" }, "original": { @@ -538,11 +598,11 @@ ] }, "locked": { - "lastModified": 1759303785, - "narHash": "sha256-EUXrK7pUIzOQWR1dquZh26A6W8lsY2oiHEEZzQnsarM=", + "lastModified": 1766725085, + "narHash": "sha256-O2aMFdDUYJazFrlwL7aSIHbUSEm3ADVZjmf41uBJfHs=", "ref": "refs/heads/master", - "rev": "9662234759eb57f2a1057f2a1c667da1bf128c1c", - "revCount": 686, + "rev": "41828c4180fb921df7992a5405f5ff05d2ac2fff", + "revCount": 715, "type": "git", "url": "https://git.outfoxxed.me/quickshell/quickshell" }, @@ -571,11 +631,11 @@ }, "stable": { "locked": { - "lastModified": 1759281824, - "narHash": "sha256-FIBE1qXv9TKvSNwst6FumyHwCRH3BlWDpfsnqRDCll0=", + "lastModified": 1767051569, + "narHash": "sha256-0MnuWoN+n1UYaGBIpqpPs9I9ZHW4kynits4mrnh1Pk4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b5be50345d4113d04ba58c444348849f5585b4a", + "rev": "40ee5e1944bebdd128f9fbada44faefddfde29bd", "type": "github" }, "original": { @@ -627,11 +687,11 @@ ] }, "locked": { - "lastModified": 1755354946, - "narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=", + "lastModified": 1761431178, + "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0", + "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", "type": "github" }, "original": { diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix index 93ba4fd..c4c5f5f 100644 --- a/modules/emacs/default.nix +++ b/modules/emacs/default.nix @@ -3,22 +3,6 @@ (with inputs.emacs-overlay.overlays; [ emacs package - - (final: prev: { - tree-sitter = prev.tree-sitter.override { - extraGrammars = { - tree-sitter-astro = { - version = "master"; - src = pkgs.fetchFromGitHub { - owner = "virchau13"; - repo = "tree-sitter-astro"; - rev = "0ad33e32ae9726e151d16ca20ba3e507ff65e01f"; - sha256 = "LhehKOhCDPExEgEiOj3TiuFk8/DohzYhy/9GmUSxaIg="; - }; - }; - }; - }; - }) ]); tree-sitter-parsers = grammars: with grammars; [ @@ -56,15 +40,25 @@ tree-sitter-toml tree-sitter-tsx tree-sitter-typescript - tree-sitter-astro tree-sitter-vim tree-sitter-yaml tree-sitter-zig + (pkgs.tree-sitter.buildGrammar { + language = "astro"; + version = "master"; + src = pkgs.fetchFromGitHub { + owner = "virchau13"; + repo = "tree-sitter-astro"; + rev = "0ad33e32ae9726e151d16ca20ba3e507ff65e01f"; + sha256 = "LhehKOhCDPExEgEiOj3TiuFk8/DohzYhy/9GmUSxaIg="; + }; + }) ]; custom-emacs = with newpkgs; ((emacsPackagesFor (emacs30-pgtk.override { withNativeCompilation = true; })).emacsWithPackages (epkgs: with epkgs; [ + aidermacs transient avy better-jumper company @@ -89,6 +83,7 @@ lsp-ui lsp-haskell lsp-java + dap-mode magit markdown-mode nasm-mode @@ -107,7 +102,14 @@ use-package vertico which-key - melpaPackages.ws-butler + (melpaPackages.ws-butler.overrideAttrs { # https://github.com/nix-community/emacs-overlay/issues/499 + src = pkgs.fetchFromSavannah { + repo = "emacs/nongnu"; + rev = "9ee5a7657a22e836618813c2e2b64a548d27d2f"; + hash = "sha256-S9aFJcFMkyB1KozJc9hpwKjAMkOyEnCZ6Wf3JVZ8d0c="; + }; + }) + minuet zig-ts-mode ])); in { diff --git a/modules/hyprland/hyprland.conf b/modules/hyprland/hyprland.conf index cc5ae63..a90f0d7 100644 --- a/modules/hyprland/hyprland.conf +++ b/modules/hyprland/hyprland.conf @@ -70,7 +70,7 @@ misc { render { direct_scanout = true - new_render_scheduling = true + new_render_scheduling = false } binds { @@ -108,48 +108,36 @@ debug { monitor = , preferred, auto, 1 -layerrule = blur, test -layerrule = ignorezero, test -layerrule = noanim, test +layerrule = match:namespace shell:background, animation fade -layerrule = blur, wofi -layerrule = ignorezero, wofi -layerrule = noanim, ^(selection)$ +layerrule = match:namespace shell:bar, blur on +layerrule = match:namespace shell:bar, blur_popups on +layerrule = match:namespace shell:bar, ignore_alpha 0 +layerrule = match:namespace shell:notifications, blur on +layerrule = match:namespace shell:notifications, ignore_alpha 0 +layerrule = match:namespace shell:notifications, animation 0 +layerrule = match:namespace shell:screenshot, animation 0 -layerrule = blur, termspawner -layerrule = ignorezero, termspawner -layerrule = noanim, termspawner +layerrule = match:namespace shell:launcher, blur on +layerrule = match:namespace shell:launcher, ignore_alpha 0 +layerrule = match:namespace shell:launcher, animation popin 90% -layerrule = animation fade, shell:background +windowrule = match:class org.kde.polkit-kde-authentication-agent-1, float on +windowrule = match:class org.kde.polkit-kde-authentication-agent-1, dim_around on -layerrule = blur, shell:bar -layerrule = blurpopups, shell:bar -layerrule = ignorezero, shell:bar -layerrule = blur, shell:notifications -layerrule = ignorezero, shell:notifications -layerrule = noanim, shell:notifications +windowrule = match:class gcr-prompter, float on +windowrule = match:class gcr-prompter, dim_around on -layerrule = noanim, shell:screenshot +windowrule = match:class org.freedesktop.impl.portal.desktop.kde, float on +windowrule = match:class org.freedesktop.impl.portal.desktop.kde, size 1000 700 +windowrule = match:class org.freedesktop.impl.portal.desktop.kde, dim_around on -layerrule = blur, shell:launcher -layerrule = ignorezero, shell:launcher -layerrule = animation popin 90%, shell:launcher +windowrule = match:title ^(OpenSSH Authentication Passphrase request)$, float on +windowrule = match:title ^(KeePassXC - Access Request)$, float on +windowrule = match:title ^(Unlock Database - KeePassXC)$, float on +windowrule = match:class org.keepassxc.KeePassXC, no_screen_share on -windowrulev2 = float, class:^(opensnitch_ui)$ -windowrulev2 = dimaround, class:^(opensnitch_ui)$ -windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$ -windowrulev2 = dimaround, class:^(org.kde.polkit-kde-authentication-agent-1)$ -windowrulev2 = float, class:^(gcr-prompter)$ -windowrulev2 = dimaround, class:^(gcr-prompter)$ -windowrulev2 = float, class:^(org.freedesktop.impl.portal.desktop.kde)$ -windowrulev2 = size 1000 700, class:^(org.freedesktop.impl.portal.desktop.kde)$ -windowrulev2 = center, class:^(org.freedesktop.impl.portal.desktop.kde)$ -windowrulev2 = dimaround, class:^(org.freedesktop.impl.portal.desktop.kde)$ -windowrulev2 = float, title:^(OpenSSH Authentication Passphrase request)$ -windowrulev2 = float, title:^(KeePassXC - Access Request)$ -windowrulev2 = float, title:^(Unlock Database - KeePassXC)$ - -windowrulev2 = float, class:^(AlacrittyFloating)$ +windowrule = match:class AlacrittyFloating, float on $mod = SUPER $launcher = qs -c shell ipc call launcher open @@ -261,6 +249,5 @@ bind = $mod+SHIFT, 8, hy3:movetoworkspace, 08 bind = $mod+SHIFT, 9, hy3:movetoworkspace, 09 bind = $mod+SHIFT, 0, hy3:movetoworkspace, 10 -workspace = f[1], gapsout:0, gapsin:0 -windowrule = bordersize 0, floating:0, onworkspace:f[1] -windowrule = rounding 0, floating:0, onworkspace:f[1] +workspace = f[1], gapsout:0 +windowrule = match:fullscreen_state_internal 1, border_size 0 From f22dee69f0e034fee5cd4e3ff507366489916bb9 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 4 Jan 2026 00:20:14 -0800 Subject: [PATCH 8/8] all: misc --- .../quickshell/shell/launcher/Controller.qml | 252 ++----------- .../shell/launcher/LaunchContent.qml | 331 ++++++++++++++++++ .../quickshell/shell/launcher/Preview.qml | 5 + .../notifications/NotificationOverlay.qml | 9 +- .../user/modules/quickshell/shell/shell.qml | 8 + 5 files changed, 375 insertions(+), 230 deletions(-) create mode 100644 modules/user/modules/quickshell/shell/launcher/LaunchContent.qml create mode 100644 modules/user/modules/quickshell/shell/launcher/Preview.qml diff --git a/modules/user/modules/quickshell/shell/launcher/Controller.qml b/modules/user/modules/quickshell/shell/launcher/Controller.qml index e803bbc..47cb89d 100644 --- a/modules/user/modules/quickshell/shell/launcher/Controller.qml +++ b/modules/user/modules/quickshell/shell/launcher/Controller.qml @@ -8,8 +8,7 @@ import Quickshell import Quickshell.Io import Quickshell.Wayland import Quickshell.Widgets -import Quickshell.Services.SystemTray -import ".." +import Quickshell.Hyprland Singleton { PersistentProperties { @@ -38,240 +37,37 @@ Singleton { activeAsync: persist.launcherOpen PanelWindow { - width: 450 - height: 7 + searchContainer.implicitHeight + list.topMargin * 2 + list.delegateHeight * 10 + id: launcherWindow + //anchors { left: true; right: true; top: true; bottom: true } color: "transparent" - WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive + implicitWidth: content.width + implicitHeight: content.height + //color: "#20ff0000" + //WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive WlrLayershell.namespace: "shell:launcher" - Rectangle { - //anchors.fill: parent - height: 7 + searchContainer.implicitHeight + list.topMargin + list.bottomMargin + Math.min(list.contentHeight, list.delegateHeight * 10) - Behavior on height { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } } - width: 450 - color: ShellGlobals.colors.bar - radius: 5 - border.color: ShellGlobals.colors.barOutline - border.width: 1 + /*HyprlandWindow.visibleMask: Region { + item: content + }*/ - ColumnLayout { - anchors.fill: parent - anchors.margins: 7 - anchors.bottomMargin: 0 - spacing: 0 + HyprlandFocusGrab { + windows: [launcherWindow] + active: true + //onCleared: console.log("cleared") + onCleared: persist.launcherOpen = false + } - Rectangle { - id: searchContainer - Layout.fillWidth: true - implicitHeight: searchbox.implicitHeight + 10 - color: "#30c0ffff" - radius: 3 - border.color: "#50ffffff" + MouseArea { + anchors.fill: parent - RowLayout { - id: searchbox - anchors.fill: parent - anchors.margins: 5 + onPressed: persist.launcherOpen = false - IconImage { - implicitSize: parent.height - source: "root:icons/magnifying-glass.svg" - } + MouseArea { + anchors.centerIn: parent + width: content.width + height: content.height - TextInput { - id: search - Layout.fillWidth: true - color: "white" - - focus: true - Keys.forwardTo: [list] - Keys.onEscapePressed: persist.launcherOpen = false - - Keys.onPressed: event => { - if (event.modifiers & Qt.ControlModifier) { - if (event.key == Qt.Key_J) { - list.currentIndex = list.currentIndex == list.count - 1 ? 0 : list.currentIndex + 1; - event.accepted = true; - } else if (event.key == Qt.Key_K) { - list.currentIndex = list.currentIndex == 0 ? list.count - 1 : list.currentIndex - 1; - event.accepted = true; - } - } - } - - onAccepted: { - if (list.currentItem) { - list.currentItem.clicked(null); - } - } - - onTextChanged: { - list.currentIndex = 0; - } - } - } - } - - ListView { - id: list - Layout.fillWidth: true - Layout.fillHeight: true - clip: true - cacheBuffer: 0 // works around QTBUG-131106 - //reuseItems: true - model: ScriptModel { - values: DesktopEntries.applications.values - .map(object => { - const stxt = search.text.toLowerCase(); - const ntxt = object.name.toLowerCase(); - let si = 0; - let ni = 0; - - let matches = []; - let startMatch = -1; - - for (let si = 0; si != stxt.length; ++si) { - const sc = stxt[si]; - - while (true) { - // Drop any entries with letters that don't exist in order - if (ni == ntxt.length) return null; - - const nc = ntxt[ni++]; - - if (nc == sc) { - if (startMatch == -1) startMatch = ni; - break; - } else { - if (startMatch != -1) { - matches.push({ - index: startMatch, - length: ni - startMatch, - }); - - startMatch = -1; - } - } - } - } - - if (startMatch != -1) { - matches.push({ - index: startMatch, - length: ni - startMatch + 1, - }); - } - - return { - object: object, - matches: matches, - }; - }) - .filter(entry => entry !== null) - .sort((a, b) => { - let ai = 0; - let bi = 0; - let s = 0; - - while (ai != a.matches.length && bi != b.matches.length) { - const am = a.matches[ai]; - const bm = b.matches[bi]; - - s = bm.length - am.length; - if (s != 0) return s; - - s = am.index - bm.index; - if (s != 0) return s; - - ++ai; - ++bi; - } - - s = a.matches.length - b.matches.length; - if (s != 0) return s; - - s = a.object.name.length - b.object.name.length; - if (s != 0) return s; - - return a.object.name.localeCompare(b.object.name); - }) - .map(entry => entry.object); - - onValuesChanged: list.currentIndex = 0 - } - - topMargin: 7 - bottomMargin: list.count == 0 ? 0 : 7 - - add: Transition { - NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 100 } - } - - displaced: Transition { - NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } - NumberAnimation { property: "opacity"; to: 1; duration: 100 } - } - - move: Transition { - NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } - NumberAnimation { property: "opacity"; to: 1; duration: 100 } - } - - remove: Transition { - NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } - NumberAnimation { property: "opacity"; to: 0; duration: 100 } - } - - highlight: Rectangle { - radius: 5 - color: "#20e0ffff" - border.color: "#30ffffff" - border.width: 1 - } - keyNavigationEnabled: true - keyNavigationWraps: true - highlightMoveVelocity: -1 - highlightMoveDuration: 100 - preferredHighlightBegin: list.topMargin - preferredHighlightEnd: list.height - list.bottomMargin - highlightRangeMode: ListView.ApplyRange - snapMode: ListView.SnapToItem - - readonly property real delegateHeight: 44 - - delegate: MouseArea { - required property DesktopEntry modelData; - - implicitHeight: list.delegateHeight - implicitWidth: ListView.view.width - - onClicked: { - modelData.execute(); - persist.launcherOpen = false; - } - - RowLayout { - id: delegateLayout - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - leftMargin: 5 - } - - IconImage { - Layout.alignment: Qt.AlignVCenter - asynchronous: true - implicitSize: 30 - source: Quickshell.iconPath(modelData.icon) - } - Text { - text: modelData.name - color: "#f0f0f0" - Layout.alignment: Qt.AlignVCenter - } - } - } - } + LaunchContent { id: content } } } } diff --git a/modules/user/modules/quickshell/shell/launcher/LaunchContent.qml b/modules/user/modules/quickshell/shell/launcher/LaunchContent.qml new file mode 100644 index 0000000..51e1f35 --- /dev/null +++ b/modules/user/modules/quickshell/shell/launcher/LaunchContent.qml @@ -0,0 +1,331 @@ +import QtQuick +import QtQuick.Layouts +import QtQuick.Controls +import Quickshell +import Quickshell.Widgets +import Quickshell.Wayland +import qs + +Item { + id: root + height: 7 + searchContainer.implicitHeight + list.topMargin * 2 + list.delegateHeight * 10; + width: 450 + + Rectangle { + id: content + height: 7 + searchContainer.implicitHeight + list.topMargin + list.bottomMargin + Math.min(list.contentHeight, list.delegateHeight * 10) + Behavior on height { NumberAnimation { duration: 200; easing.type: Easing.OutCubic } } + width: 450 + color: ShellGlobals.colors.bar + radius: 5 + border.color: ShellGlobals.colors.barOutline + border.width: 1 + + ColumnLayout { + anchors.fill: parent + anchors.margins: 7 + anchors.bottomMargin: 0 + spacing: 0 + + Rectangle { + id: searchContainer + Layout.fillWidth: true + implicitHeight: searchbox.implicitHeight + 10 + color: "#30c0ffff" + radius: 3 + border.color: "#50ffffff" + + RowLayout { + id: searchbox + anchors.fill: parent + anchors.margins: 5 + + IconImage { + implicitSize: parent.height + source: "root:icons/magnifying-glass.svg" + } + + TextInput { + id: search + Layout.fillWidth: true + color: "white" + + focus: true + Keys.forwardTo: [list] + Keys.onEscapePressed: persist.launcherOpen = false + + Keys.onPressed: event => { + if (event.modifiers & Qt.ControlModifier) { + if (event.key == Qt.Key_J) { + list.currentIndex = list.currentIndex == list.count - 1 ? 0 : list.currentIndex + 1; + event.accepted = true; + } else if (event.key == Qt.Key_K) { + list.currentIndex = list.currentIndex == 0 ? list.count - 1 : list.currentIndex - 1; + event.accepted = true; + } + } + } + + onAccepted: { + if (list.currentItem) { + list.currentItem.clicked(null); + } + } + + onTextChanged: { + list.currentIndex = 0; + } + } + } + } + + ListView { + id: list + Layout.fillWidth: true + Layout.fillHeight: true + clip: true + cacheBuffer: 0 // works around QTBUG-131106 + //reuseItems: true + model: ScriptModel { + values: DesktopEntries.applications.values + .map(object => { + const stxt = search.text.toLowerCase(); + const ntxt = object.name.toLowerCase(); + let si = 0; + let ni = 0; + + let matches = []; + let startMatch = -1; + + for (let si = 0; si != stxt.length; ++si) { + const sc = stxt[si]; + + while (true) { + // Drop any entries with letters that don't exist in order + if (ni == ntxt.length) return null; + + const nc = ntxt[ni++]; + + if (nc == sc) { + if (startMatch == -1) startMatch = ni; + break; + } else { + if (startMatch != -1) { + matches.push({ + index: startMatch, + length: ni - startMatch, + }); + + startMatch = -1; + } + } + } + } + + if (startMatch != -1) { + matches.push({ + index: startMatch, + length: ni - startMatch + 1, + }); + } + + return { + object: object, + matches: matches, + }; + }) + .filter(entry => entry !== null) + .sort((a, b) => { + let ai = 0; + let bi = 0; + let s = 0; + + while (ai != a.matches.length && bi != b.matches.length) { + const am = a.matches[ai]; + const bm = b.matches[bi]; + + s = bm.length - am.length; + if (s != 0) return s; + + s = am.index - bm.index; + if (s != 0) return s; + + ++ai; + ++bi; + } + + s = a.matches.length - b.matches.length; + if (s != 0) return s; + + s = a.object.name.length - b.object.name.length; + if (s != 0) return s; + + return a.object.name.localeCompare(b.object.name); + }) + .map(entry => entry.object); + + onValuesChanged: list.currentIndex = 0 + } + + topMargin: 7 + bottomMargin: list.count == 0 ? 0 : 7 + + add: Transition { + NumberAnimation { property: "opacity"; from: 0; to: 1; duration: 100 } + } + + displaced: Transition { + NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } + NumberAnimation { property: "opacity"; to: 1; duration: 100 } + } + + move: Transition { + NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } + NumberAnimation { property: "opacity"; to: 1; duration: 100 } + } + + remove: Transition { + NumberAnimation { property: "y"; duration: 200; easing.type: Easing.OutCubic } + NumberAnimation { property: "opacity"; to: 0; duration: 100 } + } + + highlight: Rectangle { + radius: 5 + color: "#20e0ffff" + border.color: "#30ffffff" + border.width: 1 + } + + keyNavigationEnabled: true + keyNavigationWraps: true + highlightMoveVelocity: -1 + highlightMoveDuration: 100 + preferredHighlightBegin: list.topMargin + preferredHighlightEnd: list.height - list.bottomMargin + highlightRangeMode: ListView.ApplyRange + snapMode: ListView.SnapToItem + + readonly property real delegateHeight: 44 + + delegate: MouseArea { + required property DesktopEntry modelData; + + implicitHeight: list.delegateHeight + implicitWidth: ListView.view.width + + onClicked: { + modelData.execute(); + persist.launcherOpen = false; + } + + RowLayout { + id: delegateLayout + anchors { + verticalCenter: parent.verticalCenter + left: parent.left + leftMargin: 5 + } + + IconImage { + Layout.alignment: Qt.AlignVCenter + asynchronous: true + implicitSize: 30 + source: Quickshell.iconPath(modelData.icon) + } + Text { + text: modelData.name + color: "#f0f0f0" + Layout.alignment: Qt.AlignVCenter + } + } + } + } + } + } + + Rectangle { + id: preview + + anchors { + left: content.right + leftMargin: 5 + } + + property real listYOffset: 7 + searchContainer.implicitHeight + property real yCenter: list.contentY + y: listYOffset - yCenter - height / 2 + (list.currentItem?.y ?? 0) + list.delegateHeight / 2 + + implicitWidth: previewContent.implicitWidth + previewContent.anchors.margins * 2 + implicitHeight: previewContent.implicitHeight + previewContent.anchors.margins * 2 + + color: ShellGlobals.colors.bar + radius: 5 + border.color: ShellGlobals.colors.barOutline + border.width: 1 + + property DesktopEntry entry: list.currentItem?.modelData ?? null + property var toplevels: !entry ? []: ToplevelManager.toplevels.values + .filter(toplevel => toplevel.appId.toLowerCase() == entry.id.toLowerCase()) + + // waits for hasContent before showing + // cant use visible because layout wont run + property real scaleMul: previewLayout.implicitWidth != 0 ? 1 : 0; + Behavior on scaleMul { SmoothedAnimation { velocity: 5 } } + + opacity: scaleMul + + transform: Scale { + origin.x: 0 + origin.y: preview.height / 2 + xScale: 0.9 + preview.scaleMul * 0.1 + yScale: xScale + } + + Item { + id: previewContent + anchors.fill: parent + anchors.margins: 10 + implicitWidth: previewLayout.implicitWidth + implicitHeight: previewLayout.implicitHeight + + RowLayout { + id: previewLayout + + Repeater { + model: preview.toplevels + + Rectangle { + id: delegate + required property Toplevel modelData; + color: "transparent" + + visible: view.hasContent + implicitWidth: previewContent.implicitWidth + implicitHeight: previewContent.implicitHeight + + ColumnLayout { + id: previewContent + anchors.centerIn: parent + width: 240 + + ScreencopyView { + id: view + implicitWidth: 240 + implicitHeight: 200 + captureSource: modelData + live: true + } + + Label { + text: modelData.title + Layout.fillWidth: true + elide: Text.ElideRight + horizontalAlignment: Text.AlignHCenter + } + } + } + } + } + } + } +} diff --git a/modules/user/modules/quickshell/shell/launcher/Preview.qml b/modules/user/modules/quickshell/shell/launcher/Preview.qml new file mode 100644 index 0000000..088a096 --- /dev/null +++ b/modules/user/modules/quickshell/shell/launcher/Preview.qml @@ -0,0 +1,5 @@ +import QtQuick + +Item { + property real yCenter: 0 +} diff --git a/modules/user/modules/quickshell/shell/notifications/NotificationOverlay.qml b/modules/user/modules/quickshell/shell/notifications/NotificationOverlay.qml index 4a554c0..e2df389 100644 --- a/modules/user/modules/quickshell/shell/notifications/NotificationOverlay.qml +++ b/modules/user/modules/quickshell/shell/notifications/NotificationOverlay.qml @@ -4,6 +4,8 @@ import Quickshell.Wayland import Quickshell.Hyprland PanelWindow { + id: root + WlrLayershell.namespace: "shell:notifications" exclusionMode: ExclusionMode.Ignore color: "transparent" @@ -16,6 +18,9 @@ PanelWindow { right: true } + property var bar: null + //property var fullscreen: Hyprland.monitorFor(root.screen)?.activeWorkspace?.hasFullscreen ?? false + property Component notifComponent: DaemonNotification {} NotificationDisplay { @@ -23,8 +28,8 @@ PanelWindow { anchors.fill: parent - stack.y: 5 + 55//(NotificationManager.showTrayNotifs ? 55 : 0) - stack.x: 72 + stack.y: root.bar.compactState * 10 + 50//5 + 55//(NotificationManager.showTrayNotifs ? 55 : 0) + stack.x: root.bar.leftMargin + root.bar.width - 10 } visible: display.stack.children.length != 0 diff --git a/modules/user/modules/quickshell/shell/shell.qml b/modules/user/modules/quickshell/shell/shell.qml index c2f5f4b..8a8b936 100644 --- a/modules/user/modules/quickshell/shell/shell.qml +++ b/modules/user/modules/quickshell/shell/shell.qml @@ -1,4 +1,5 @@ //@ pragma ShellId shell +//@ pragma IgnoreSystemSettings import Quickshell import Quickshell.Io @@ -13,6 +14,8 @@ import "launcher" as Launcher import "background" ShellRoot { + id: root + Component.onCompleted: [Lock.Controller, Launcher.Controller.init()] Process { @@ -38,8 +41,11 @@ ShellRoot { Notifs.NotificationOverlay { screen: Quickshell.screens.find(s => s.name == "DP-1") + bar: root.bars.find(b => b.screen == screen) } + property var bars: [] + Variants { model: Quickshell.screens @@ -48,6 +54,8 @@ ShellRoot { Bar.Bar { screen: modelData + Component.onCompleted: root.bars = [...root.bars, this] + Component.onDestruction: root.bars = root.bars.filter(b => b == this) } PanelWindow {