diff --git a/config/hosts/imxyy-nix-x16/home.nix b/config/hosts/imxyy-nix-x16/home.nix index 2d34c9e..07848d2 100644 --- a/config/hosts/imxyy-nix-x16/home.nix +++ b/config/hosts/imxyy-nix-x16/home.nix @@ -61,8 +61,6 @@ desktop.all.enable = true; virt.moonlight.enable = true; - desktop.browser.librewolf.enable = lib.mkForce false; - i18n.fcitx5.enable = true; xdg = { diff --git a/config/hosts/imxyy-nix/home.nix b/config/hosts/imxyy-nix/home.nix index 3c219f8..9a8f7ce 100644 --- a/config/hosts/imxyy-nix/home.nix +++ b/config/hosts/imxyy-nix/home.nix @@ -91,8 +91,6 @@ coding.all.enable = true; desktop.all.enable = true; - desktop.browser.librewolf.enable = lib.mkForce false; - i18n.fcitx5.enable = true; xdg = { diff --git a/flake.lock b/flake.lock index a2e252a..39c79be 100644 --- a/flake.lock +++ b/flake.lock @@ -1001,26 +1001,6 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1753090730, - "narHash": "sha256-QG14m53ZGp2Gk7xD2Q+Tf7RYCKfk/BYRaBtX3X4IKbc=", - "ref": "refs/heads/master", - "rev": "db77c71c216530159c2dcf5b269ebb4706b2e2dd", - "revCount": 653, - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/outfoxxed/quickshell" - } - }, "root": { "inputs": { "chaotic": "chaotic", @@ -1040,7 +1020,6 @@ "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", - "quickshell": "quickshell", "sops-nix": "sops-nix", "stylix": "stylix", "zen": "zen" diff --git a/flake.nix b/flake.nix index c1bc9d4..5f8fcd7 100644 --- a/flake.nix +++ b/flake.nix @@ -32,9 +32,6 @@ niri.inputs.nixpkgs.follows = "nixpkgs"; niri.inputs.nixpkgs-stable.follows = "nixpkgs-stable"; - quickshell.url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; - quickshell.inputs.nixpkgs.follows = "nixpkgs"; - darkly.url = "github:Bali10050/Darkly"; darkly.inputs.nixpkgs.follows = "nixpkgs"; @@ -139,17 +136,6 @@ darkly-qt5 = inputs.darkly.packages.${final.system}.darkly-qt5; darkly-qt6 = inputs.darkly.packages.${final.system}.darkly-qt6; }) - (final: prev: { - quickshell = inputs.quickshell.packages.${final.system}.default.override { - withJemalloc = true; - withQtSvg = true; - withWayland = true; - withPipewire = false; - withPam = false; - withX11 = false; - withHyprland = false; - }; - }) (final: prev: { inherit lib; }) diff --git a/modules/desktop/all.nix b/modules/desktop/all.nix index 6b9f0ef..7b8cc44 100644 --- a/modules/desktop/all.nix +++ b/modules/desktop/all.nix @@ -16,7 +16,6 @@ lib.my.makeSwitch { terminal.all.enable = true; wm.all.enable = true; style.enable = true; - quickshell.enable = true; wine.enable = true; }; }; diff --git a/modules/desktop/browser/all.nix b/modules/desktop/browser/all.nix index 791b6b9..e2c857e 100644 --- a/modules/desktop/browser/all.nix +++ b/modules/desktop/browser/all.nix @@ -10,7 +10,6 @@ lib.my.makeSwitch { config' = { my.desktop.browser = { firefox.enable = true; - librewolf.enable = true; chromium.enable = true; zen.enable = true; }; diff --git a/modules/desktop/browser/librewolf.nix b/modules/desktop/browser/librewolf.nix deleted file mode 100644 index 4d176d7..0000000 --- a/modules/desktop/browser/librewolf.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, ... }: -lib.my.makeHomeProgramConfig { - inherit config; - programName = "librewolf"; - optionPath = [ - "desktop" - "browser" - "librewolf" - ]; - extraConfig = { - my.persist.homeDirs = [ - ".librewolf" - ]; - }; -} diff --git a/modules/desktop/quickshell/config/components/bar/Battery.qml b/modules/desktop/quickshell/config/components/bar/Battery.qml deleted file mode 100644 index bc5e32f..0000000 --- a/modules/desktop/quickshell/config/components/bar/Battery.qml +++ /dev/null @@ -1,48 +0,0 @@ -import Quickshell -import Quickshell.Services.UPower -import QtQuick -import QtQuick.Layouts -import org.kde.kirigami - -Rectangle { - id: bat - - Layout.preferredWidth: batIcon.width - Layout.fillHeight: true - color: 'transparent' - - readonly property var battery: UPower.displayDevice - readonly property int percentage: Math.round(battery.percentage * 100) - property var size: height * 0.4 - - visible: battery.isLaptopBattery - - Icon { - id: batIcon - anchors.centerIn: parent - - implicitHeight: bat.size - implicitWidth: bat.size - - // This recolors the entire svg, instead of only classless components. - // Hopefully in the future classes can be selected for recoloring. - isMask: true - color: 'white' - - source: { - const nearestTen = Math.round(bat.percentage / 10) * 10; - const number = nearestTen.toString().padStart(2, "0"); - let charging; - - if (bat.battery.state == UPowerDeviceState.Charging) { - charging = "-charging"; - } else if (bat.battery.state.toString() == UPowerDeviceState.FullyCharged) { - charging = "-charged"; - } else { - charging = ""; - } - - return Quickshell.iconPath(`battery-level-${number}${charging}-symbolic`); - } - } -} diff --git a/modules/desktop/quickshell/config/components/bar/Clock.qml b/modules/desktop/quickshell/config/components/bar/Clock.qml deleted file mode 100644 index 8256b8a..0000000 --- a/modules/desktop/quickshell/config/components/bar/Clock.qml +++ /dev/null @@ -1,16 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import "../../utils" - -Rectangle { - Layout.fillHeight: true - color: "transparent" - implicitWidth: clockText.width - - Text { - id: clockText - text: Time.time - color: Colors.fg - anchors.centerIn: parent - } -} diff --git a/modules/desktop/quickshell/config/components/bar/Mpris.qml b/modules/desktop/quickshell/config/components/bar/Mpris.qml deleted file mode 100644 index d4d1529..0000000 --- a/modules/desktop/quickshell/config/components/bar/Mpris.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick -import QtQuick.Layouts - -Rectangle { - Layout.fillHeight: true - color: "salmon" - implicitWidth: mprisText.width - - Text { - id: mprisText - text: "Mpris" - anchors.centerIn: parent - } -} diff --git a/modules/desktop/quickshell/config/components/bar/Resources.qml b/modules/desktop/quickshell/config/components/bar/Resources.qml deleted file mode 100644 index d1b2bbb..0000000 --- a/modules/desktop/quickshell/config/components/bar/Resources.qml +++ /dev/null @@ -1,54 +0,0 @@ -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls -import "../../utils" - -Rectangle { - id: resources - - Layout.fillHeight: true - color: "transparent" - implicitWidth: rowLayout.width - - property int valueSize: 8 - property int textSize: 6 - - property string valueColor: "white" - property string textColor: "lightgray" - - RowLayout { - id: rowLayout - anchors.centerIn: parent - - ColumnLayout { - id: cpuColumn - Label { - color: textColor - font.pointSize: textSize - text: "CPU" - Layout.alignment: Qt.AlignCenter - } - Label { - color: valueColor - font.pointSize: valueSize - text: Resources.cpu_percent + "%" - Layout.alignment: Qt.AlignCenter - } - } - - ColumnLayout { - Label { - color: textColor - font.pointSize: textSize - text: "MEM" - Layout.alignment: Qt.AlignCenter - } - Label { - color: valueColor - font.pointSize: valueSize - text: Resources.mem_percent + "%" - Layout.alignment: Qt.AlignCenter - } - } - } -} diff --git a/modules/desktop/quickshell/config/components/bar/Text.qml b/modules/desktop/quickshell/config/components/bar/Text.qml deleted file mode 100644 index 90e0758..0000000 --- a/modules/desktop/quickshell/config/components/bar/Text.qml +++ /dev/null @@ -1,5 +0,0 @@ -import QtQuick - -Text { - renderType: Text.NativeRendering -} diff --git a/modules/desktop/quickshell/config/components/bar/Tray.qml b/modules/desktop/quickshell/config/components/bar/Tray.qml deleted file mode 100644 index 475c83b..0000000 --- a/modules/desktop/quickshell/config/components/bar/Tray.qml +++ /dev/null @@ -1,14 +0,0 @@ -import QtQuick -import QtQuick.Layouts - -Rectangle { - Layout.fillHeight: true - color: "lightblue" - implicitWidth: trayText.width - - Text { - id: trayText - text: "Tray" - anchors.centerIn: parent - } -} diff --git a/modules/desktop/quickshell/config/components/bar/workspaces/Workspace.qml b/modules/desktop/quickshell/config/components/bar/workspaces/Workspace.qml deleted file mode 100644 index f41e838..0000000 --- a/modules/desktop/quickshell/config/components/bar/workspaces/Workspace.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick -import QtQuick.Layouts - -Rectangle { - id: ws - - property bool hovered: false - - Layout.preferredWidth: parent.height * 0.4 - Layout.preferredHeight: parent.height * 0.4 - Layout.alignment: Qt.AlignHCenter - radius: height / 2 - - MouseArea { - anchors.fill: parent - hoverEnabled: true - - onEntered: () => { - ws.hovered = true; - } - onExited: () => { - ws.hovered = false; - } - onClicked: () => console.log(`workspace ?`) - } -} diff --git a/modules/desktop/quickshell/config/components/bar/workspaces/Workspaces.qml b/modules/desktop/quickshell/config/components/bar/workspaces/Workspaces.qml deleted file mode 100644 index b47f570..0000000 --- a/modules/desktop/quickshell/config/components/bar/workspaces/Workspaces.qml +++ /dev/null @@ -1,55 +0,0 @@ -pragma ComponentBehavior: Bound - -import QtQuick -import QtQuick.Layouts -import "../../../utils" -import Quickshell.Hyprland - -Rectangle { - id: workspaces - - color: 'transparent' - - width: workspacesRow.implicitWidth - Layout.fillHeight: true - - RowLayout { - id: workspacesRow - - height: parent.height - implicitWidth: (parent.height * 0.5 + spacing) * 2 - spacing - anchors.centerIn: parent - - spacing: height / 7 - - Repeater { - id: repeater - - model: HyprlandUtils.maxWorkspace - - Workspace { - id: ws - required property int index - property HyprlandWorkspace currWorkspace: Hyprland.workspaces.values.find(e => e.id == index + 1) || null - property bool nonexistent: currWorkspace === null - property bool focused: index + 1 === Hyprland.focusedMonitor.activeWorkspace.id - - Layout.preferredWidth: { - if (focused) { - return parent.height * 0.8; - } else { - return parent.height * 0.4; - } - } - - color: { - if (nonexistent) { - return Colors.bgBlur; - } else { - return Colors.monitorColors[Hyprland.monitors.values.indexOf(Hyprland.workspaces.values.find(e => e.id === index + 1).monitor)]; - } - } - } - } - } -} diff --git a/modules/desktop/quickshell/config/shell.qml b/modules/desktop/quickshell/config/shell.qml deleted file mode 100644 index 932a8cb..0000000 --- a/modules/desktop/quickshell/config/shell.qml +++ /dev/null @@ -1,6 +0,0 @@ -import "./windows" -import Quickshell // for ShellRoot and PanelWindow - -ShellRoot { - Bar {} -} diff --git a/modules/desktop/quickshell/config/utils/Colors.qml b/modules/desktop/quickshell/config/utils/Colors.qml deleted file mode 100644 index 1608de8..0000000 --- a/modules/desktop/quickshell/config/utils/Colors.qml +++ /dev/null @@ -1,9 +0,0 @@ -import Quickshell -pragma Singleton - -Singleton { - property var bgBar: Qt.rgba(0, 0, 0, 0.21) - property var bgBlur: Qt.rgba(0, 0, 0, 0.3) - property var fg: "white" - property list monitorColors: ["#e06c75", "#e5c07b", "#98c379", "#61afef"] -} diff --git a/modules/desktop/quickshell/config/utils/HyprlandUtils.qml b/modules/desktop/quickshell/config/utils/HyprlandUtils.qml deleted file mode 100644 index 6620061..0000000 --- a/modules/desktop/quickshell/config/utils/HyprlandUtils.qml +++ /dev/null @@ -1,67 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Hyprland -import QtQuick - -Singleton { - id: hyprland - - property list workspaces: sortWorkspaces(Hyprland.workspaces.values) - property HyprlandWorkspace focusedWorkspace: Hyprland.focusedMonitor?.activeWorkspace - property int maxWorkspace: findMaxId() - - function sortWorkspaces(ws) { - return [...ws].sort((a, b) => a?.id - b?.id); - } - - function switchWorkspace(w: int): void { - console.log(`workspace: focus ${focusedWorkspace.id} -> ${w}`); - Hyprland.dispatch(`workspace ${w}`); - } - - function findMaxId(): int { - let num = hyprland.workspaces.length; - return hyprland.workspaces[num - 1]?.id; - } - - Connections { - target: Hyprland - function onRawEvent(event) { - // console.log("EVENT NAME", event.name); - // consow.wg("EVENT DATA", event.data); - let eventName = event.name; - - switch (eventName) { - // Both of these are required in order to detect workspace changes - // even when switching monitors. - // case "workspacev2": - // { - // // hyprland.focusedWorkspace = Hyprland.focusedMonitor?.activeWorkspace; - // console.log(`workspace: ${hyprland.focusedWorkspace.id}`); - // console.log(`num workspaces ${hyprland.workspaces.length}`) - // console.log(`num workspaces (real) ${Hyprland.workspaces.values.length}`) - // break; - // } - // case "focusedmonv2": - // { - // // hyprland.focusedWorkspace = Hyprland.focusedMonitor?.activeWorkspace; - // console.log(`workspace: ${hyprland.focusedWorkspace.id}`); - // console.log(`num workspaces ${hyprland.workspaces.length}`) - // console.log(`num workspaces (real) ${Hyprland.workspaces.values.length}`) - // break; - // } - case "createworkspacev2": - { - hyprland.workspaces = hyprland.sortWorkspaces(Hyprland.workspaces.values); - hyprland.maxWorkspace = findMaxId(); - } - case "destroyworkspacev2": - { - hyprland.workspaces = hyprland.sortWorkspaces(Hyprland.workspaces.values); - hyprland.maxWorkspace = findMaxId(); - } - } - } - } -} diff --git a/modules/desktop/quickshell/config/utils/Resources.qml b/modules/desktop/quickshell/config/utils/Resources.qml deleted file mode 100644 index 3a19d80..0000000 --- a/modules/desktop/quickshell/config/utils/Resources.qml +++ /dev/null @@ -1,67 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick - -Singleton { - property int cpu_percent - property string cpu_freq - property int mem_percent - property string mem_used - - Process { - id: process_cpu_percent - running: true - command: ["sh", "-c", "top -bn1 | rg '%Cpu' | awk '{print 100-$8}'"] - stdout: SplitParser { - onRead: data => cpu_percent = Math.round(data) - } - } - - Process { - id: process_cpu_freq - running: true - command: ["sh", "-c", "lscpu --parse=MHZ"] - stdout: SplitParser { - onRead: data => { - // delete the first 4 lines (comments) - const mhz = data.split("\n").slice(4); - // compute mean frequency - const freq = mhz.reduce((acc, e) => acc + Number(e), 0) / mhz.length; - - cpu_freq = Math.round(freq) + " MHz"; - } - } - } - - Process { - id: process_mem_percent - running: true - command: ["sh", "-c", "free | awk 'NR==2{print $3/$2*100}'"] - stdout: SplitParser { - onRead: data => mem_percent = Math.round(data) - } - } - - Process { - id: process_mem_used - running: true - command: ["sh", "-c", "free --si -h | awk 'NR==2{print $3}'"] - stdout: SplitParser { - onRead: data => mem_used = data - } - } - - Timer { - interval: 2000 - running: true - repeat: true - onTriggered: () => { - process_cpu_percent.running = true - process_cpu_freq.running = true - process_mem_percent.running = true - process_mem_used.running = true - } - } -} diff --git a/modules/desktop/quickshell/config/utils/Time.qml b/modules/desktop/quickshell/config/utils/Time.qml deleted file mode 100644 index f03e134..0000000 --- a/modules/desktop/quickshell/config/utils/Time.qml +++ /dev/null @@ -1,29 +0,0 @@ -pragma Singleton - -import Quickshell -import Quickshell.Io -import QtQuick - -Singleton { - property var locale: Qt.locale() - - function createDate(): string { - let date = new Date(); - let hh = date.getHours().toString().padStart(2, 0); - let mm = date.getMinutes().toString().padStart(2, 0) - let weekday = locale.dayName(date.getDay(), Locale.ShortFormat) - let month = locale.monthName(date.getMonth(), Locale.ShortFormat) - let day = date.getDate() - - return `${weekday} ${month} ${day} ${hh}:${mm}` - } - - property var time: createDate() - - Timer { - interval: 1000 - running: true - repeat: true - onTriggered: time = createDate() - } -} diff --git a/modules/desktop/quickshell/config/windows/Bar.qml b/modules/desktop/quickshell/config/windows/Bar.qml deleted file mode 100644 index 8bd8137..0000000 --- a/modules/desktop/quickshell/config/windows/Bar.qml +++ /dev/null @@ -1,79 +0,0 @@ -//@ pragma NativeTextRendering - -import Quickshell -import QtQuick -import QtQuick.Layouts -import "../utils" -import "../components/bar" -import "../components/bar/workspaces" - -Scope { - PanelWindow { - id: barWindow - screen: Quickshell.screens[0] - - anchors { - top: true - left: true - right: true - } - height: 32 - - color: "transparent" - - Rectangle { - id: bar - anchors.fill: parent - - color: Colors.bgBlur - - // left - // RowLayout { - // id: barLeft - // - // anchors.bottom: parent.bottom - // anchors.left: parent.left - // anchors.top: parent.top - // - // anchors.leftMargin: height / 4 - // anchors.rightMargin: height / 4 - // spacing: height / 4 - // - // Workspaces {} - // } - - // middle - RowLayout { - id: barMiddle - - anchors.bottom: parent.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - - anchors.leftMargin: height / 4 - anchors.rightMargin: height / 4 - spacing: height / 4 - - Mpris {} - } - - // right - RowLayout { - id: barRight - - anchors.bottom: parent.bottom - anchors.right: parent.right - anchors.top: parent.top - - anchors.leftMargin: height / 4 - anchors.rightMargin: height / 4 - spacing: height / 4 - - Tray {} - Resources {} - Battery {} - Clock {} - } - } - } -} diff --git a/modules/desktop/quickshell/default.nix b/modules/desktop/quickshell/default.nix deleted file mode 100644 index 96ef609..0000000 --- a/modules/desktop/quickshell/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -lib.my.makeSwitch { - inherit config; - default = false; - optionName = "quickshell"; - optionPath = [ - "desktop" - "quickshell" - ]; - config' = { - my.home = { - home.packages = [ pkgs.quickshell ]; - home.sessionVariables.QML2_IMPORT_PATH = lib.concatStringsSep ":" [ - "${pkgs.quickshell}/lib/qt-6/qml" - "${pkgs.kdePackages.qtdeclarative}/lib/qt-6/qml" - "${pkgs.kdePackages.kirigami.unwrapped}/lib/qt-6/qml" - ]; - xdg.configFile."quickshell" = { - source = ./config; - recursive = true; - }; - }; - }; -} diff --git a/modules/i18n/fcitx5.nix b/modules/i18n/fcitx5.nix index b76d696..d96c0df 100644 --- a/modules/i18n/fcitx5.nix +++ b/modules/i18n/fcitx5.nix @@ -102,15 +102,20 @@ lib.my.makeSwitch { ignoreUserConfig = true; }; }; - nixpkgs.overlays = [( - final: prev: lib.infuse prev (lib.genAttrs [ "qq" "vscodium" ] (pkg: { - ${pkg}.__output.preInstall.__append = '' - gappsWrapperArgs+=( - --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--wayland-text-input-version=3}}" - ) - ''; - })) - )]; + nixpkgs.overlays = [ + ( + final: prev: + lib.infuse prev ( + lib.genAttrs [ "qq" "vscodium" ] (pkg: { + ${pkg}.__output.preInstall.__append = '' + gappsWrapperArgs+=( + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--wayland-text-input-version=3}}" + ) + ''; + }) + ) + ) + ]; my.home.programs.niri.settings = { binds."Mod+Space".action.spawn = [ "fcitx5-remote"