Compare commits

...

2 commits

Author SHA1 Message Date
b3e9b4e6be
qs: wifi pwd 2026-04-14 20:51:28 -07:00
dc2712c66b
flake update 2026-04-14 20:50:41 -07:00
7 changed files with 103 additions and 59 deletions

90
flake.lock generated
View file

@ -20,11 +20,11 @@
]
},
"locked": {
"lastModified": 1772460678,
"narHash": "sha256-NYaWs8fYJ38IgFld0hGSdT2LEVhrgO8SiRReBjIH7YY=",
"lastModified": 1774211390,
"narHash": "sha256-sTtAgCCaX8VNNZlQFACd3i1IQ+DB0Wf3COgiFS152ds=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "5d2cb726b16ee349df443f84b64cff53221b6983",
"rev": "f62a4dbfa4e5584f14ad4c62afedf6e4b433cf70",
"type": "github"
},
"original": {
@ -43,11 +43,11 @@
]
},
"locked": {
"lastModified": 1772938270,
"narHash": "sha256-EGGrJl8GkQianhniX6dvC8VJgtzJuZz7MBQCaU4fqd0=",
"lastModified": 1775381444,
"narHash": "sha256-06aT/yhP4aLA15e8ASbXBfe615jG6QE+sis+KhhVtSo=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "286f28782f03dcfbd6713fce333785e9f8c754e4",
"rev": "c868f794043735f1e2cc8d93f6a6d947bfa9e0f0",
"type": "github"
},
"original": {
@ -122,11 +122,11 @@
]
},
"locked": {
"lastModified": 1772845525,
"narHash": "sha256-Dp5Ir2u4jJDGCgeMRviHvEQDe+U37hMxp6RSNOoMMPc=",
"lastModified": 1775427330,
"narHash": "sha256-pm1SDX9Tj4eHWwjtDEqSU+5QZO7nHHqU8GT0JtbI9rc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "27b93804fbef1544cb07718d3f0a451f4c4cd6c0",
"rev": "7e7269ac064bea120d7b23daed432a096617872d",
"type": "github"
},
"original": {
@ -218,17 +218,16 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1772885694,
"narHash": "sha256-XNPMJcc5+ghqTgK4bnAFhYdfv6xai3YKq7EGAHoPU/U=",
"owner": "outfoxxed",
"repo": "hyprland",
"rev": "213e560d1b7dd3774c2ca0741b4512235bfa7fa0",
"lastModified": 1775416789,
"narHash": "sha256-0IELkB6YXCZGqZqLdmOcTw8mki6NNhDmG47y7Qynuj8=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "aaa2fc342f002bf4acd965f1ad2ead3796347e35",
"type": "github"
},
"original": {
"owner": "outfoxxed",
"ref": "itarget-visualbox-541",
"repo": "hyprland",
"owner": "hyprwm",
"repo": "Hyprland",
"type": "github"
}
},
@ -285,16 +284,15 @@
]
},
"locked": {
"lastModified": 1773116363,
"narHash": "sha256-Xp8XiwRSvAgtdO57PeA7pH2cg9Ene9y2xhZ7kA3WUDg=",
"lastModified": 1775435678,
"narHash": "sha256-gh1o8cIWY+2Z8Qh9GDU3Z6oGnv+MqZqAlQCN9yEOa1g=",
"owner": "outfoxxed",
"repo": "hy3",
"rev": "90fed4a9f093e7850de0277e34f0c1e488d1ca6d",
"rev": "76010d97fe69498557ac6426a7ec6b989ac14343",
"type": "github"
},
"original": {
"owner": "outfoxxed",
"ref": "0.54",
"repo": "hy3",
"type": "github"
}
@ -412,11 +410,11 @@
]
},
"locked": {
"lastModified": 1772908136,
"narHash": "sha256-i2ZF719gjEB1D5pAOurpM5+SuN+SXPOP8h2OCHO0WYc=",
"lastModified": 1774911391,
"narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "8eb974bdeaa64d7127ab2fff272166c705b7a933",
"rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d",
"type": "github"
},
"original": {
@ -466,11 +464,11 @@
]
},
"locked": {
"lastModified": 1772463520,
"narHash": "sha256-GIjASzYnV4fK19HnyJKmHyqyxHxIpjusK9foEA4Yo+4=",
"lastModified": 1773074819,
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "4e1933ae5602b350c5b6633f5c932549c9b8aca2",
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
"type": "github"
},
"original": {
@ -501,11 +499,11 @@
]
},
"locked": {
"lastModified": 1772945408,
"narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=",
"lastModified": 1775365369,
"narHash": "sha256-DgH5mveLoau20CuTnaU5RXZWgFQWn56onQ4Du2CqYoI=",
"owner": "Mic92",
"repo": "nix-index-database",
"rev": "1c1d8ea87b047788fd7567adf531418c5da321ec",
"rev": "cef5cf82671e749ac87d69aadecbb75967e6f6c3",
"type": "github"
},
"original": {
@ -536,11 +534,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1772773019,
"narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=",
"lastModified": 1775036866,
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aca4d95fce4914b3892661bcb80b8087293536c6",
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github"
},
"original": {
@ -557,11 +555,11 @@
]
},
"locked": {
"lastModified": 1772947144,
"narHash": "sha256-wthfdRyLnHUcVR1wQvCs5wu06BTbzDZJ7rv+mB/orzk=",
"lastModified": 1775435376,
"narHash": "sha256-j38MtwM1VFWWU+bCEBGOsZbR1oaR7ByXSlP2+VRBMy4=",
"owner": "nix-community",
"repo": "NUR",
"rev": "06602287438c0066e4353751afee0a21757c61bd",
"rev": "c8fe168c59186cbcb65d5b4022cd5cf39d99a201",
"type": "github"
},
"original": {
@ -580,11 +578,11 @@
]
},
"locked": {
"lastModified": 1772024342,
"narHash": "sha256-+eXlIc4/7dE6EcPs9a2DaSY3fTA9AE526hGqkNID3Wg=",
"lastModified": 1774104215,
"narHash": "sha256-EAtviqz0sEAxdHS4crqu7JGR5oI3BwaqG0mw7CmXkO8=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "6e34e97ed9788b17796ee43ccdbaf871a5c2b476",
"rev": "f799ae951fde0627157f40aec28dec27b22076d0",
"type": "github"
},
"original": {
@ -620,11 +618,11 @@
]
},
"locked": {
"lastModified": 1772925576,
"narHash": "sha256-mMoiXABDtkSJxCYDrkhJ/TrrJf5M46oUfIlJvv2gkZ0=",
"lastModified": 1775335892,
"narHash": "sha256-rWJ//l6k1hwe/A2fNdzuvEuHedBQkMIHLU9eNTu4N7I=",
"ref": "refs/heads/master",
"rev": "15a84097653593dd15fad59a56befc2b7bdc270d",
"revCount": 750,
"rev": "ad5fd9116e25bc502468f4dfa884ee027887c51c",
"revCount": 793,
"type": "git",
"url": "https://git.outfoxxed.me/quickshell/quickshell"
},
@ -710,11 +708,11 @@
]
},
"locked": {
"lastModified": 1772476586,
"narHash": "sha256-N/ZwsRLULLpBP5ecvAUzNq8E/CgLRwPwSrHyY3xB5KM=",
"lastModified": 1773601989,
"narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "eb6c02a2ead882f3474f3d7f2fbe966b64ed5110",
"rev": "a9b862d1aa000a676d310cc62d249f7ad726233d",
"type": "github"
},
"original": {

View file

@ -36,8 +36,7 @@
};
hyprland = {
#url = "github:hyprwm/Hyprland";
url = "github:outfoxxed/hyprland/itarget-visualbox-541";
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
inputs.hyprutils.follows = "hyprutils";
@ -45,7 +44,7 @@
};
hyprland-hy3 = {
url = "github:outfoxxed/hy3/0.54";
url = "github:outfoxxed/hy3";
inputs.hyprland.follows = "hyprland";
};
@ -73,6 +72,7 @@
};
outputs = inputs @ { self, nixpkgs, ... }: {
inherit self;
nixosConfigurations = {
msi = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";

View file

@ -32,6 +32,7 @@
networkmanager = {
enable = true;
dns = lib.mkForce "systemd-resolved";
settings.connectivity.uri = "http://nmcheck.gnome.org/check_network_status.txt";
};
nameservers = [ "9.9.9.9" ];

View file

@ -17,7 +17,7 @@ in {
users.users.${username} = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" ];
extraGroups = [ "wheel" "networkmanager" ];
initialPassword = "test";
};

View file

@ -29,6 +29,7 @@ PanelWindow {
color: "transparent"
WlrLayershell.namespace: "shell:bar"
focusable: tooltip.activeItem != null
readonly property Tooltip tooltip: tooltip;
Tooltip {

View file

@ -11,7 +11,7 @@ import qs.bar
ClickableIcon {
id: root
required property var bar;
readonly property NetworkDevice adapter: Networking.devices.values[0]
readonly property WifiDevice adapter: Networking.devices.values[0] ?? null
readonly property bool connected: adapter.connected
readonly property WifiNetwork activeNetwork: adapter.networks.values.find(network => network.connected)
@ -124,6 +124,7 @@ ClickableIcon {
device: root.adapter
network: modelData
width: parent.width
onConnectionAttempted: root.adapter.scannerEnabled = false
}
}
}

View file

@ -12,17 +12,45 @@ WrapperMouseArea {
required property NetworkDevice device
required property WifiNetwork network
property bool menuOpen: false
readonly property bool showBg: false
property bool passwordRequired: false
readonly property bool showBg: root.passwordRequired
hoverEnabled: true
signal connectionAttempted();
function tryConnect() {
const connecting = root.network.connected || root.network.state == ConnectionState.Connecting;
if (connecting) root.device.disconnect();
else {
root.connectionAttempted();
if (pwField.text != "") root.network.connectWithPsk(pwField.text);
else root.network.connect();
}
}
onClicked: menuOpen = !menuOpen
Connections {
target: root.network
function onConnectionFailed(reason) {
console.log(reason, reason == ConnectionFailReason.NoSecrets);
pwField.text = "";
root.passwordRequired = reason == ConnectionFailReason.NoSecrets;
}
function onStateChanged() {
if (root.network.state == ConnectionState.Connected) {
root.passwordRequired = false;
pwField.text = "";
}
}
}
WrapperRectangle {
color: root.showBg ? ShellGlobals.colors.widget : "transparent"
color: root.showBg ? ShellGlobals.colors.widget : "transparent"
border.width: 1
border.color: root.showBg ? ShellGlobals.colors.widgetOutline : "transparent"
radius: 4
rightMargin: 2
ColumnLayout {
RowLayout {
@ -43,11 +71,7 @@ WrapperMouseArea {
implicitHeight: 24
implicitWidth: height
showAction: root.network.stateChanging
onClicked: {
if (showAction) return;
else if (root.network.connected) root.device.disconnect();
else root.network.connect();
}
onClicked: tryConnect()
}
ClickableIcon {
@ -56,6 +80,25 @@ WrapperMouseArea {
implicitWidth: height
visible: root.network.known
onClicked: root.network.forget()
Layout.rightMargin: 2
}
}
TextField {
id: pwField
visible: root.passwordRequired
Layout.fillWidth: true
Layout.margins: 4
placeholderText: "Password"
echoMode: TextInput.Password
enabled: !(root.network.stateChanging || root.network.connected)
onAccepted: tryConnect()
background: Rectangle {
//color: "transparent" // ShellGlobals.colors.widget
color: pwField.enabled ? "transparent" : ShellGlobals.colors.widgetActive
border.color: ShellGlobals.colors.widgetOutline
radius: 4
}
}
}