diff --git a/Assets/Tests/wallpaper.png b/Assets/Tests/wallpaper.png deleted file mode 100644 index 6974b0d..0000000 Binary files a/Assets/Tests/wallpaper.png and /dev/null differ diff --git a/Commons/Icons.qml b/Commons/Icons.qml index bc9a25c..80c89c7 100644 --- a/Commons/Icons.qml +++ b/Commons/Icons.qml @@ -2,6 +2,7 @@ pragma Singleton import QtQuick import Quickshell +import qs.Services Singleton { id: icons @@ -41,4 +42,13 @@ Singleton { return iconFromName(fallback, fallback) } } + + // Distro logo helper (absolute path or empty string) + function distroLogoPath() { + try { + return (typeof OSInfo !== 'undefined' && OSInfo.distroIconPath) ? OSInfo.distroIconPath : "" + } catch (e) { + return "" + } + } } diff --git a/Commons/Settings.qml b/Commons/Settings.qml index c785ff3..6c85b4b 100644 --- a/Commons/Settings.qml +++ b/Commons/Settings.qml @@ -139,6 +139,8 @@ Singleton { property bool dimDesktop: false property bool showScreenCorners: false property real radiusRatio: 1.0 + // Replace sidepanel toggle with distro logo (shown in bar and/or side panel) + property bool useDistroLogoForSidepanel: false } // location diff --git a/Modules/IPC/IPCManager.qml b/Modules/IPC/IPCManager.qml index 3e26628..78ed64b 100644 --- a/Modules/IPC/IPCManager.qml +++ b/Modules/IPC/IPCManager.qml @@ -6,6 +6,13 @@ import qs.Services Item { id: root + IpcHandler { + target: "screenRecorder" + function toggle() { + ScreenRecorderService.toggleRecording() + } + } + IpcHandler { target: "settings" function toggle() { diff --git a/README.md b/README.md index 1901027..dab4c14 100644 --- a/README.md +++ b/README.md @@ -87,59 +87,108 @@ If you want to use the ArchUpdater Widget, make sure you have any polkit agent i ### Installation +#### For Arch ```bash # Install Quickshell yay -S quickshell-git - # Download and install Noctalia (latest release) mkdir -p ~/.config/quickshell && curl -sL https://github.com/noctalia-dev/noctalia-shell/releases/latest/download/noctalia-latest.tar.gz | tar -xz --strip-components=1 -C ~/.config/quickshell ``` -### Usage + +#### For Nix ```bash -# Start the shell -qs - -# Launcher -qs ipc call launcher toggle - -# SidePanel -qs ipc call sidePanel toggle - -# Clipboard History -qs ipc call launcher clipboard - -# Calculator -qs ipc call launcher calculator - -# Brightness -qs ipc call brightness increase -qs ipc call brightness decrease - -# Power Panel -qs ipc call powerPanel toggle - -# Idle Inhibitor -qs ipc call idleInhibitor toggle - -# Settings Window -qs ipc call settings toggle - -# Toggle lock screen -qs ipc call lockScreen toggle +nix run github:noctalia-dev/noctalia-shell ``` -### Keybinds +
+For flakes -| Action | Command | -|--------|---------| -| Toggle Application Launcher | `qs ipc call appLauncher toggle` | -| Toggle Lock Screen | `qs ipc call lockScreen toggle` | +```nix +{ + description = "Example Nix flake with Noctalia + Quickshell"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + + noctalia = { + url = "github:noctalia-dev/noctalia-shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + quickshell = { + url = "github:outfoxxed/quickshell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, noctalia, quickshell, ... }: + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { + nixosConfigurations.my-host = nixpkgs.lib.nixosSystem { + system = system; + modules = [ + ./configuration.nix + # Add noctalia to system packages + ({ pkgs, ... }: { + environment.systemPackages = [ + noctalia.packages.${system}.default + quickshell.packages.${system}.default + ]; + }) + ]; + }; + }; +} +``` +
+ +### Usage + +
+ With the binary + +| Action | Command | +| --------------------------- | ----------------------------------------- | +| Start the Shell | `noctalia-shell` | +| Toggle Application Launcher | `noctalia-shell ipc call launcher toggle` | +| Toggle Side Panel | `noctalia-shell ipc call sidePanel toggle` | +| Open Clipboard History | `noctalia-shell ipc call launcher clipboard` | +| Open Calculator | `noctalia-shell ipc call launcher calculator` | +| Increase Brightness | `noctalia-shell ipc call brightness increase` | +| Decrease Brightness | `noctalia-shell ipc call brightness decrease` | +| Toggle Power Panel | `noctalia-shell ipc call powerPanel toggle` | +| Toggle Idle Inhibitor | `noctalia-shell ipc call idleInhibitor toggle` | +| Toggle Settings Window | `noctalia-shell ipc call settings toggle` | +| Toggle Lock Screen | `noctalia-shell ipc call lockScreen toggle` | +| Toggle Notification History | `noctalia-shell ipc call notifications toggleHistory` | + +
+ + +
+ Without the binary + +| Action | Command | +| --------------------------- | ----------------------------------------- | +| Start the Shell | `qs` | +| Toggle Application Launcher | `qs ipc call launcher toggle` | +| Toggle Side Panel | `qs ipc call sidePanel toggle` | +| Open Clipboard History | `qs ipc call launcher clipboard` | +| Open Calculator | `qs ipc call launcher calculator` | +| Increase Brightness | `qs ipc call brightness increase` | +| Decrease Brightness | `qs ipc call brightness decrease` | +| Toggle Power Panel | `qs ipc call powerPanel toggle` | +| Toggle Idle Inhibitor | `qs ipc call idleInhibitor toggle` | +| Toggle Settings Window | `qs ipc call settings toggle` | +| Toggle Lock Screen | `qs ipc call lockScreen toggle` | | Toggle Notification History | `qs ipc call notifications toggleHistory` | -| Toggle Settings Panel | `qs ipc call settings toggle` | -| Increase Brightness | `qs ipc call brightness increase` | -| Decrease Brightness | `qs ipc call brightness decrease` | + +
+ ### Configuration diff --git a/flake.lock b/flake.lock index 2a54f7a..bff5156 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1755615617, - "narHash": "sha256-HMwfAJBdrr8wXAkbGhtcby1zGFvs+StOp19xNsbqdOg=", + "lastModified": 1756125398, + "narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20075955deac2583bb12f07151c2df830ef346b4", + "rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7025c70..239cdf2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Desktop shell for Caelestia dots"; + description = "Noctalia shell - a Wayland desktop shell built with Quickshell"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; @@ -11,25 +11,57 @@ }; }; - outputs = { - self, - nixpkgs, - systems, - ... - } @ inputs: let - eachSystem = nixpkgs.lib.genAttrs (import systems); - in { - formatter = eachSystem (pkgs: pkgs.alejandra); + outputs = { self, nixpkgs, systems, quickshell, ... }: + let + eachSystem = nixpkgs.lib.genAttrs (import systems); + in { + formatter = eachSystem (pkgs: pkgs.alejandra); - packages = eachSystem (system: rec { - noctalia-shell = nixpkgs.legacyPackages.${system}.callPackage ./nix { - rev = self.rev or self.dirtyRev; - quickshell = inputs.quickshell.packages.${system}.default.override { - withX11 = false; - withI3 = false; - }; - }; - default = noctalia-shell; - }); - }; + packages = eachSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + qs = quickshell.packages.${system}.default.override { + withX11 = false; + withI3 = false; + }; + + runtimeDeps = with pkgs; [ + bash bluez brightnessctl cava cliphist coreutils ddcutil file + findutils gpu-screen-recorder libnotify matugen networkmanager + swww wl-clipboard + ]; + fontconfig = pkgs.makeFontsConf { + fontDirectories = [ pkgs.material-symbols pkgs.roboto pkgs.inter-nerdfont ]; + }; + in + pkgs.stdenv.mkDerivation { + pname = "noctalia-shell"; + version = self.rev or self.dirtyRev or "dirty"; + src = ./.; + + nativeBuildInputs = [ pkgs.gcc pkgs.makeWrapper pkgs.qt6.wrapQtAppsHook ]; + buildInputs = [ qs pkgs.xkeyboard-config pkgs.qt6.qtbase ]; + propagatedBuildInputs = runtimeDeps; + + installPhase = '' + mkdir -p $out/share/noctalia-shell + cp -r ./* $out/share/noctalia-shell + + makeWrapper ${qs}/bin/qs $out/bin/noctalia-shell \ + --prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps}" \ + --set FONTCONFIG_FILE "${fontconfig}" \ + --add-flags "-p $out/share/noctalia-shell" + ''; + + meta = { + description = "A sleek and minimal desktop shell thoughtfully crafted for Wayland, built with Quickshell."; + homepage = "https://github.com/noctalia-dev/noctalia-shell"; + license = pkgs.lib.licenses.mit; + mainProgram = "noctalia-shell"; + }; + } + ); + + defaultPackage = eachSystem (system: self.packages.${system}); + }; } diff --git a/nix/default.nix b/nix/default.nix deleted file mode 100644 index 7834f17..0000000 --- a/nix/default.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ - rev, - lib, - stdenv, - makeWrapper, - makeFontsConf, - ddcutil, - brightnessctl, - cava, - networkmanager, - wl-clipboard, - libnotify, - bluez, - bash, - coreutils, - findutils, - file, - material-symbols, - roboto, - inter-nerdfont, - matugen, - cliphist, - swww, - gpu-screen-recorder, - gcc, - qt6, - quickshell, - xkeyboard-config, - extraRuntimeDeps ? [], -}: let - runtimeDeps = - [ - bash - bluez - brightnessctl - cava - cliphist - coreutils - ddcutil - file - findutils - gpu-screen-recorder - libnotify - matugen - networkmanager - swww - wl-clipboard - ] - ++ extraRuntimeDeps; - - fontconfig = makeFontsConf { - fontDirectories = [ - material-symbols - roboto - inter-nerdfont - ]; - }; -in - stdenv.mkDerivation { - pname = "noctalia-shell"; - version = "${rev}"; - src = ./..; - - nativeBuildInputs = [gcc makeWrapper qt6.wrapQtAppsHook]; - buildInputs = [quickshell xkeyboard-config qt6.qtbase]; - propagatedBuildInputs = runtimeDeps; - - installPhase = '' - mkdir -p $out/share/noctalia-shell - cp -r ./* $out/share/noctalia-shell - - makeWrapper ${quickshell}/bin/qs $out/bin/noctalia-shell \ - --prefix PATH : "${lib.makeBinPath runtimeDeps}" \ - --set FONTCONFIG_FILE "${fontconfig}" \ - --add-flags "-p $out/share/noctalia-shell" - ''; - - meta = { - description = "A sleek and minimal desktop shell thoughtfully crafted for Wayland, built with Quickshell."; - homepage = "https://github.com/noctalia-dev/noctalia-shell"; - license = lib.licenses.mit; - mainProgram = "noctalia-shell"; - }; - }