Compare commits

..

4 Commits

Author SHA1 Message Date
dd8afc8954 refactor: overlay 2025-07-26 12:34:11 +08:00
e69600cc77 chore: update flake.lock 2025-07-26 12:33:07 +08:00
17ef457181 chore: drop unused softwares 2025-07-26 12:22:06 +08:00
a39b966a91 refactor: fcitx5 overlay 2025-07-26 12:19:59 +08:00
25 changed files with 88 additions and 642 deletions

View File

@@ -1,4 +1,8 @@
{ config, hostname, ... }:
{
config,
hostname,
...
}:
{
# I prefer this to the default issue text
# ported from ArchLinux IIRC

View File

@@ -61,8 +61,6 @@
desktop.all.enable = true;
virt.moonlight.enable = true;
desktop.browser.librewolf.enable = lib.mkForce false;
i18n.fcitx5.enable = true;
xdg = {

View File

@@ -91,8 +91,6 @@
coding.all.enable = true;
desktop.all.enable = true;
desktop.browser.librewolf.enable = lib.mkForce false;
i18n.fcitx5.enable = true;
xdg = {

141
flake.lock generated
View File

@@ -37,11 +37,11 @@
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1748408240,
"narHash": "sha256-9M2b1rMyMzJK0eusea0x3lyh3mu5nMeEDSc4RZkGm+g=",
"lastModified": 1752979451,
"narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "6c711ab1a9db6f51e2f6887cc3345530b33e152e",
"rev": "27cf1e66e50abc622fb76a3019012dc07c678fac",
"type": "github"
},
"original": {
@@ -107,11 +107,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1753146705,
"narHash": "sha256-WzmXODUzg8jeEsAhpmp55zk5I2fmv3kv+RofZ/+FYlg=",
"lastModified": 1753452257,
"narHash": "sha256-Q8r+/655196nmMd4t93SxNdZ/RLP8UuS7Lml9ymOPXc=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "02b3c2a45f6ddbd704f797c5730bc2d161f10ce0",
"rev": "e8e28d053b45299a4aef1da2e9d5d1e742025c12",
"type": "github"
},
"original": {
@@ -128,11 +128,11 @@
]
},
"locked": {
"lastModified": 1753134819,
"narHash": "sha256-K0dxmI2P5PG8sRkolcmSfPFd9ZCRvYgLLvMZJZyETaI=",
"lastModified": 1753219021,
"narHash": "sha256-wYL0oMGwFPbhYT0G2NcR4ud00TI06TEWOrvPpN4eNl0=",
"owner": "Bali10050",
"repo": "Darkly",
"rev": "5d5696091e706fcdcf13b90affa3e9783b8b3ac0",
"rev": "79ec260ff2a9af1f4de10e670c75b31b7fbcd5da",
"type": "github"
},
"original": {
@@ -171,11 +171,11 @@
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1753166582,
"narHash": "sha256-EUjND31oxYwWw9Nl6HPLbsruNpicUQU8T/ZwgqB/OCY=",
"lastModified": 1753425938,
"narHash": "sha256-zmFdkhodqdHZnSsWqXkQwhUgqQ+FaPhc4tHvUMnWm18=",
"owner": "nix-community",
"repo": "fenix",
"rev": "a96e6ce7ec45c47aedad3728ef32de4ae4c0e416",
"rev": "a3c87849545a6f4d60ce4a8dbb08da9c009905ac",
"type": "github"
},
"original": {
@@ -457,11 +457,11 @@
]
},
"locked": {
"lastModified": 1748528448,
"narHash": "sha256-Tyn+PgBm78Ibq28/WbEz8+pYJZMdbJKsyXMCpT6TjrM=",
"lastModified": 1751817769,
"narHash": "sha256-j7ORyAJFNxYWwF+6fs2z5IcJ40TpVwrkFYU9/CGHwfA=",
"owner": "imxyy1soope1",
"repo": "go-musicfox",
"rev": "1870fd3501631577ad4daef1489b03885abcb037",
"rev": "179b9440b6f209e7fd6ade589117b72bdd9042a6",
"type": "github"
},
"original": {
@@ -500,11 +500,11 @@
]
},
"locked": {
"lastModified": 1753132348,
"narHash": "sha256-0i3jU9AHuNXb0wYGzImnVwaw+miE0yW13qfjC0F+fIE=",
"lastModified": 1753365873,
"narHash": "sha256-+Swd3wJppukESlWkbdopl9ZThjNVIFARVlb/eA2xjUA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e4bf85da687027cfc4a8853ca11b6b86ce41d732",
"rev": "e2fe7256c4ebbb35bfd1b4c6f52b57a3845ab1d0",
"type": "github"
},
"original": {
@@ -520,11 +520,11 @@
]
},
"locked": {
"lastModified": 1753132348,
"narHash": "sha256-0i3jU9AHuNXb0wYGzImnVwaw+miE0yW13qfjC0F+fIE=",
"lastModified": 1753470191,
"narHash": "sha256-hOUWU5L62G9sm8NxdiLWlLIJZz9H52VuFiDllHdwmVA=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e4bf85da687027cfc4a8853ca11b6b86ce41d732",
"rev": "a1817d1c0e5eabe7dfdfe4caa46c94d9d8f3fdb6",
"type": "github"
},
"original": {
@@ -595,11 +595,11 @@
]
},
"locked": {
"lastModified": 1752755091,
"narHash": "sha256-H/k35QJLyQxkFnXR5ckMv/Z+ElNa5f22qNKdyGBMAn4=",
"lastModified": 1753333833,
"narHash": "sha256-S5RHVk+6PMwThIJY2mSbeoWTY1JrBSy1v1E1LDOFQW8=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "0d09755fe1df1886e5f07dbb16f7ed373080f86a",
"rev": "e462677116c12bf23bd681a6a87dc7f98e689adf",
"type": "github"
},
"original": {
@@ -668,11 +668,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1753132162,
"narHash": "sha256-ycK2rB1kltXcrz5+dpldPngiYMukgaT2atwxhTjkIZQ=",
"lastModified": 1753374784,
"narHash": "sha256-R6vHaUJiehdXSnzZqCOxmtmAnHA4GBOpS/UKydzAI38=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "f7cc80e3ad7e34ac523ba401ece49c4151fc19ca",
"rev": "da95771a65821bc98118cf3478eb2fc6fbfe035a",
"type": "github"
},
"original": {
@@ -804,11 +804,11 @@
]
},
"locked": {
"lastModified": 1752682362,
"narHash": "sha256-ZNIpqCG/CfhmV+TgIeyO/XbhDjSWpwWokHM44j0Mn0w=",
"lastModified": 1753450337,
"narHash": "sha256-l0QLEenVKuU6U2g1wI0zuf9IAm7QpisIbf8wAI6BUX4=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "20001f9bf0aaf2b1c307e43a5eec8cf8f800fe14",
"rev": "a8dfcd2962f6e788759a75b36ca86b14aa44d8e5",
"type": "github"
},
"original": {
@@ -819,11 +819,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1752950548,
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"type": "github"
},
"original": {
@@ -847,11 +847,11 @@
},
"nixpkgs-master": {
"locked": {
"lastModified": 1753168712,
"narHash": "sha256-z3xENTx8CgQjxTYwpzFgp+IGcHuEYiObaCnsZ/n7Wf4=",
"lastModified": 1753502843,
"narHash": "sha256-GC9AscLIjgfiOEpUCoa0PjzheC/ktxwRu+EbyisIfAA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "52bfb2685fa0afc1394201103ab1c8511e74261e",
"rev": "3df1e8c22800589a7eeac3892a27932829e8ba6e",
"type": "github"
},
"original": {
@@ -863,11 +863,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1753168829,
"narHash": "sha256-/xbkt7rKnCgpzjRTPiqJTsauV+w1FGSgLzFISTxulfg=",
"lastModified": 1753489912,
"narHash": "sha256-uDCFHeXdRIgJpYmtcUxGEsZ+hYlLPBhR83fdU+vbC1s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ec031223f1f94bbbaca8f7d975cb5a7441f90505",
"rev": "13e8d35b7d6028b7198f8186bc0347c6abaa2701",
"type": "github"
},
"original": {
@@ -879,11 +879,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1753088943,
"narHash": "sha256-cIyYVyDTSR6K3+xUGvEO3GAtBsdBhBcDALqHK50QEIQ=",
"lastModified": 1753418588,
"narHash": "sha256-pdpkbarGU0sP38sWt56FQRRGnpOy6pGfVkoRNP3fhRw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "91b279d8c68718659084298ea287c73b5bf6df2c",
"rev": "a0a889d240ff8fda7209aec00d1877d440b23735",
"type": "github"
},
"original": {
@@ -943,11 +943,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1752950548,
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
"lastModified": 1753250450,
"narHash": "sha256-i+CQV2rPmP8wHxj0aq4siYyohHwVlsh40kV89f3nw1s=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
"rev": "fc02ee70efb805d3b2865908a13ddd4474557ecf",
"type": "github"
},
"original": {
@@ -963,11 +963,11 @@
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1753166477,
"narHash": "sha256-ftWDv9eUl0cNsJfhwx7RrIZvtUt0SH3LoGsBZfGyWDw=",
"lastModified": 1753498336,
"narHash": "sha256-FbQQZpHpVEDZGChNFX+ITiuK3JcusatsbeSOlEFuk7U=",
"owner": "nix-community",
"repo": "NUR",
"rev": "690f8c0102a674b35ac4e919bb34a8ef10d0e84c",
"rev": "af0aef6562e29628d3050ee105b926ee22c3c170",
"type": "github"
},
"original": {
@@ -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"
@@ -1049,11 +1028,11 @@
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1753115469,
"narHash": "sha256-5U3eokxjR/nTDQokJVZSL3j0THxQwWbYBpLO1dp8ZOw=",
"lastModified": 1753350080,
"narHash": "sha256-f5KlFKKTjs1i2ZGUmo+vDXYOzWm7MAML5YSK9OuN/cQ=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "9a1ee18e4dccc29c41d5c642860e58641d5ed0de",
"rev": "922e04a134f789737b5b7a954bd62a8f4cbb0e8b",
"type": "github"
},
"original": {
@@ -1071,11 +1050,11 @@
]
},
"locked": {
"lastModified": 1753066249,
"narHash": "sha256-j2UBrfDRIePGx3532Bbb9UeosNX2F73hfOAHtmACfnM=",
"lastModified": 1753325142,
"narHash": "sha256-7A8epLZ/LW9tek4OJY4IHesH7BgfBKr3aEm9JjUwqQo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "0751b65633a1785743ca44fd7c14a633c54c1f91",
"rev": "cf608fb54d8854f31d7f7c499e2d2c928af48036",
"type": "github"
},
"original": {
@@ -1125,11 +1104,11 @@
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1753117651,
"narHash": "sha256-7gWBlUOe2c0nYGyoVDa9hw15pI3DXDR0KK+nYh9KOpU=",
"lastModified": 1753490930,
"narHash": "sha256-noQ6sJ1twQvvGH34d13iM0uh95Syx+kb3nw45wTalIM=",
"owner": "danth",
"repo": "stylix",
"rev": "ea60526c8c2a1c5df2743a9495814dc0b319ef3b",
"rev": "744431e17676177c18c4c52e8781ba6e91db30d6",
"type": "github"
},
"original": {
@@ -1290,11 +1269,11 @@
]
},
"locked": {
"lastModified": 1753069499,
"narHash": "sha256-YtgY0ueqKNrBma4Euu8WH23BhUkBujirJDMDE1KujnU=",
"lastModified": 1753502836,
"narHash": "sha256-VOytqgYsI6CfsVhbwVnDQS239+ht7pFLNVrRCKemBqU=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "c64b94235ae24e3b9e01a08f0331d8bb0e5b037a",
"rev": "cd46b6cddf3f83ad439108b8ead8cf65f041d445",
"type": "github"
},
"original": {

View File

@@ -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";
@@ -71,10 +68,10 @@
let
inherit (self) outputs;
vars = import ./vars.nix;
forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
forAllHosts =
mkSystem:
nixpkgs.lib.attrsets.mergeAttrsList (
lib.mergeAttrsList (
builtins.map (hostname: {
${hostname} = mkSystem hostname;
}) (builtins.attrNames (builtins.readDir ./config/hosts))
@@ -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;
})

View File

@@ -16,7 +16,6 @@ lib.my.makeSwitch {
terminal.all.enable = true;
wm.all.enable = true;
style.enable = true;
quickshell.enable = true;
wine.enable = true;
};
};

View File

@@ -10,7 +10,6 @@ lib.my.makeSwitch {
config' = {
my.desktop.browser = {
firefox.enable = true;
librewolf.enable = true;
chromium.enable = true;
zen.enable = true;
};

View File

@@ -1,15 +0,0 @@
{ config, lib, ... }:
lib.my.makeHomeProgramConfig {
inherit config;
programName = "librewolf";
optionPath = [
"desktop"
"browser"
"librewolf"
];
extraConfig = {
my.persist.homeDirs = [
".librewolf"
];
};
}

View File

@@ -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`);
}
}
}

View File

@@ -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
}
}

View File

@@ -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
}
}

View File

@@ -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
}
}
}
}

View File

@@ -1,5 +0,0 @@
import QtQuick
Text {
renderType: Text.NativeRendering
}

View File

@@ -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
}
}

View File

@@ -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 ?`)
}
}

View File

@@ -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)];
}
}
}
}
}
}

View File

@@ -1,6 +0,0 @@
import "./windows"
import Quickshell // for ShellRoot and PanelWindow
ShellRoot {
Bar {}
}

View File

@@ -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<var> monitorColors: ["#e06c75", "#e5c07b", "#98c379", "#61afef"]
}

View File

@@ -1,67 +0,0 @@
pragma Singleton
import Quickshell
import Quickshell.Hyprland
import QtQuick
Singleton {
id: hyprland
property list<HyprlandWorkspace> 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();
}
}
}
}
}

View File

@@ -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
}
}
}

View File

@@ -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()
}
}

View File

@@ -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 {}
}
}
}
}

View File

@@ -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;
};
};
};
}

View File

@@ -102,6 +102,27 @@ lib.my.makeSwitch {
ignoreUserConfig = true;
};
};
nixpkgs.overlays = [
(
final: prev:
lib.infuse prev (
lib.mergeAttrsList (
map
(pkg: {
${pkg}.__output.preInstall.__append = ''
gappsWrapperArgs+=(
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--wayland-text-input-version=3}}"
)
'';
})
[
"qq"
"vscodium"
]
)
)
)
];
my.home.programs.niri.settings = {
binds."Mod+Space".action.spawn = [
"fcitx5-remote"

View File

@@ -22,11 +22,6 @@
cage.__output.patches.__append = [ ./cage-specify-output-name.patch ];
matrix-synapse.__assign = final.stable.matrix-synapse;
bottles.__input.removeWarningPopup.__assign = true;
qq.__output.preInstall.__append = ''
gappsWrapperArgs+=(
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--wayland-text-input-version=3}}"
)
'';
sing-box.__assign = prev.sing-box.overrideAttrs (finalAttrs: {
version = "1.11.14";