From 53da54d4cdb009448bb57a8697aff3aee5dfbbc1 Mon Sep 17 00:00:00 2001 From: HacknetAOS Date: Wed, 18 Nov 2026 05:24:19 +0000 Subject: [PATCH 1/4] Fix media and volume keys (pause/stop/micmute and locked sway binds) --- compositor/hyprland/hacknet.lua | 5 ++++- compositor/sway/hacknet.conf | 15 +++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/compositor/hyprland/hacknet.lua b/compositor/hyprland/hacknet.lua index cfdb333..a0a6379 100644 --- a/compositor/hyprland/hacknet.lua +++ b/compositor/hyprland/hacknet.lua @@ -172,11 +172,14 @@ hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("sh -c 'mkdir -p ~/.local/ -- Super+E opens file manager (thunar) hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("thunar")) --- Volume controls +-- Volume & media controls hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("hacknetctl volume up")) hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("hacknetctl volume down")) hl.bind("XF86AudioMute", hl.dsp.exec_cmd("hacknetctl volume mute")) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle")) hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("hacknetctl media play_pause")) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("hacknetctl media pause")) +hl.bind("XF86AudioStop", hl.dsp.exec_cmd("hacknetctl media stop")) hl.bind("XF86AudioNext", hl.dsp.exec_cmd("hacknetctl media next")) hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("hacknetctl media previous")) diff --git a/compositor/sway/hacknet.conf b/compositor/sway/hacknet.conf index b5bf7d8..55b55c1 100644 --- a/compositor/sway/hacknet.conf +++ b/compositor/sway/hacknet.conf @@ -76,12 +76,15 @@ bindsym $mod+l exec sh -c 'mkdir -p ~/.local/state/hacknet && touch ~/.local/sta bindsym $mod+e exec thunar # Volume and media. -bindsym XF86AudioRaiseVolume exec hacknetctl volume up -bindsym XF86AudioLowerVolume exec hacknetctl volume down -bindsym XF86AudioMute exec hacknetctl volume mute -bindsym XF86AudioPlay exec hacknetctl media play_pause -bindsym XF86AudioNext exec hacknetctl media next -bindsym XF86AudioPrev exec hacknetctl media previous +bindsym --locked XF86AudioRaiseVolume exec hacknetctl volume up +bindsym --locked XF86AudioLowerVolume exec hacknetctl volume down +bindsym --locked XF86AudioMute exec hacknetctl volume mute +bindsym --locked XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle +bindsym --locked XF86AudioPlay exec hacknetctl media play_pause +bindsym --locked XF86AudioPause exec hacknetctl media pause +bindsym --locked XF86AudioStop exec hacknetctl media stop +bindsym --locked XF86AudioNext exec hacknetctl media next +bindsym --locked XF86AudioPrev exec hacknetctl media previous # Screenshots (saves to Pictures, copies to clipboard, and notifies) bindsym Print exec sh -c 'mkdir -p "$HOME/Pictures"; f="$HOME/Pictures/Screenshot_$(date +%Y%m%d_%H%M%S).png"; grim "$f" && (wl-copy < "$f" 2>/dev/null || true) && hacknetctl notify "Screenshot" "Saved to ~/Pictures"' From 66e678e7190d8ce79b11884c89adbad3072f33c0 Mon Sep 17 00:00:00 2001 From: HacknetAOS Date: Wed, 18 Nov 2026 05:28:07 +0000 Subject: [PATCH 2/4] Fix greeter power buttons and match HexBackground monochrome wave to reference video --- greeter/HexBackground.qml | 16 ++++++++-------- greeter/PowerModal.qml | 3 ++- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/greeter/HexBackground.qml b/greeter/HexBackground.qml index 3094e7f..723f3d0 100644 --- a/greeter/HexBackground.qml +++ b/greeter/HexBackground.qml @@ -27,17 +27,17 @@ Item { Repeater { model: 16 Rectangle { - width: 460 + width: 520 height: waveRow.height color: "transparent" gradient: Gradient { orientation: Gradient.Horizontal GradientStop { position: 0.00; color: "#00000000" } - GradientStop { position: 0.28; color: "#00000000" } - GradientStop { position: 0.39; color: "#0a0e14" } - GradientStop { position: 0.50; color: "#18202a" } - GradientStop { position: 0.61; color: "#0a0e14" } - GradientStop { position: 0.72; color: "#00000000" } + GradientStop { position: 0.18; color: "#00000000" } + GradientStop { position: 0.34; color: "#0d0d0d" } + GradientStop { position: 0.50; color: "#262626" } + GradientStop { position: 0.66; color: "#0d0d0d" } + GradientStop { position: 0.82; color: "#00000000" } GradientStop { position: 1.00; color: "#00000000" } } } @@ -45,8 +45,8 @@ Item { NumberAnimation on x { from: 0 - to: -460 - duration: 10500 + to: -520 + duration: 12000 loops: Animation.Infinite running: true } diff --git a/greeter/PowerModal.qml b/greeter/PowerModal.qml index bd9f84c..be987f3 100644 --- a/greeter/PowerModal.qml +++ b/greeter/PowerModal.qml @@ -13,7 +13,8 @@ Item { } function execPower(cmd) { - powerProc.command = ["loginctl", cmd]; + powerProc.running = false; + powerProc.command = ["systemctl", cmd]; powerProc.running = true; } From fcf8b0d093a6c37ee3ee538ccc6b963c17724939 Mon Sep 17 00:00:00 2001 From: HacknetAOS Date: Wed, 18 Nov 2026 22:51:28 +0000 Subject: [PATCH 3/4] Bind Super_L/Super_R release directly to hacknet-launcher (remove Super+Space) --- compositor/hyprland/hacknet.lua | 6 +++--- compositor/sway/hacknet.conf | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compositor/hyprland/hacknet.lua b/compositor/hyprland/hacknet.lua index a0a6379..1473a9a 100644 --- a/compositor/hyprland/hacknet.lua +++ b/compositor/hyprland/hacknet.lua @@ -124,9 +124,9 @@ hl.workspace = { -- ---------------------------------------------------------------- keybinds local mainMod = "SUPER" --- App Opener / Search Bar: Super key alone or Super+Space opens search bar -hl.bind(mainMod .. " + SPACE", hl.dsp.exec_cmd("hacknet-launcher")) -hl.bind(mainMod, hl.dsp.exec_cmd("hacknet-launcher")) +-- App Opener / Search Bar: Super key alone (release) opens search bar +hl.bind(mainMod .. " + Super_L", hl.dsp.exec_cmd("hacknet-launcher"), { release = true }) +hl.bind(mainMod .. " + Super_R", hl.dsp.exec_cmd("hacknet-launcher"), { release = true }) -- Terminal: Super+Enter opens a NEW left dock terminal slot (own NetMap node) hl.bind(mainMod .. " + RETURN", hl.dsp.exec_cmd("hacknet-dock-term")) diff --git a/compositor/sway/hacknet.conf b/compositor/sway/hacknet.conf index 55b55c1..e5484e3 100644 --- a/compositor/sway/hacknet.conf +++ b/compositor/sway/hacknet.conf @@ -30,9 +30,9 @@ input * { # ---------------------------------------------------------------- keybinds set $mod Mod4 -# App Opener / Search Bar: Super key alone (release) or Super+Space opens search bar -bindsym --release $mod exec hacknet-launcher -bindsym $mod+space exec hacknet-launcher +# App Opener / Search Bar: Super key alone (release) opens search bar +bindsym --release Super_L exec hacknet-launcher +bindsym --release Super_R exec hacknet-launcher # Terminal: Super+Enter opens a new docked (left) terminal slot. Each terminal # gets its own slot and its own NetMap node. From c8eb8a9de3031d3743e55cc0618a7553f25d1c01 Mon Sep 17 00:00:00 2001 From: HacknetOS-Builder Date: Thu, 19 Nov 2026 00:28:06 +0000 Subject: [PATCH 4/4] Streamline Control Center and add user keybind/input includes --- components/AppLauncher.qml | 16 ++- components/SettingsPanel.qml | 239 ++++++++------------------------ compositor/hyprland/hacknet.lua | 9 +- compositor/sway/hacknet.conf | 4 + 4 files changed, 83 insertions(+), 185 deletions(-) diff --git a/components/AppLauncher.qml b/components/AppLauncher.qml index d3aa3fd..6e59683 100644 --- a/components/AppLauncher.qml +++ b/components/AppLauncher.qml @@ -109,12 +109,22 @@ Rectangle { type: "action", badge: "[DESKTOP]", badgeColor: Theme.accent, - title: "Control Center / Settings", - desc: "Open display, audio, network, and theme settings", + title: "Control Center", + desc: "Quick volume, media, brightness, Wi-Fi, and Bluetooth controls", icon: "preferences-system", - keywords: "settings control center config preferences options display audio network", + keywords: "control center volume audio bluetooth wifi brightness media", action: function() { Ui.closeAll(); Ui.toggleSettings(); } }, + { + type: "action", + badge: "[SYSTEM]", + badgeColor: Theme.accent, + title: "HacknetOS Settings", + desc: "Open full system, theme, desktop, input, and keybind settings", + icon: "preferences-system", + keywords: "settings preferences theme keybinds display network keyboard mouse timezone", + action: function() { Ui.closeAll(); Quickshell.execDetached(["hacknet-settings"]); } + }, { type: "action", badge: "[DESKTOP]", diff --git a/components/SettingsPanel.qml b/components/SettingsPanel.qml index b1de24b..b496dbb 100644 --- a/components/SettingsPanel.qml +++ b/components/SettingsPanel.qml @@ -1,13 +1,13 @@ import QtQuick +import Quickshell import "../singletons" -// Settings / control center, styled like a Hacknet window: grey caption strip, -// flat buttons, no rounded panels or coloured gradients. -// Sections appear dynamically based on available hardware/commands. +// Control Center: quick hardware & media controls only. +// Full OS, desktop, theme, and keybind settings live in hacknet-settings. Rectangle { id: root implicitWidth: 520 - implicitHeight: 640 + implicitHeight: 560 color: "#0b0d13" border.width: 1 @@ -29,8 +29,6 @@ Rectangle { color: Theme.borderDim } - // Scrollable content: the control center holds more sections than fit on - // small outputs, so nothing is ever cut off. Flickable { id: flick anchors { left: parent.left; right: parent.right; top: parent.top; topMargin: 30 @@ -80,49 +78,9 @@ Rectangle { anchors { left: parent.left; right: parent.right; leftMargin: 18; rightMargin: 18 } spacing: 14 - // -------------------------------------------------------- THEME + // -------------------------------------------------------- VOLUME Text { - text: "THEME" - color: "#9aa0ab" - font.family: Theme.mono - font.pixelSize: Theme.monoPx - font.letterSpacing: 1 - } - - Flow { - width: parent.width - spacing: 8 - Repeater { - model: [ - { id: "blue", name: "BLUE" }, - { id: "ente", name: "ENTE" }, - { id: "hellhound", name: "HELLHOUND" }, - { id: "naix", name: "NAIX" }, - { id: "hacknet", name: "HACKNET" } - ] - delegate: LauncherButton { - label: modelData.name - active: Theme.themeId === modelData.id - onTriggered: Daemon.setTheme(modelData.id) - } - } - } - - // Admin-configurable default theme from /etc/hacknetos/theme.cfg - Text { - width: parent.width - text: "config: " + (Daemon.themeCfg || "blue") - color: Theme.dim - font.family: Theme.mono - font.pixelSize: Math.max(7, Theme.monoPx - 3) - visible: Daemon.themeCfg !== "" - } - - Rectangle { width: parent.width; height: 1; color: Theme.borderDim } - - // ------------------------------------------------------ DISPLAY - Text { - text: "DISPLAY" + text: "VOLUME" color: "#9aa0ab" font.family: Theme.mono font.pixelSize: Theme.monoPx @@ -131,76 +89,36 @@ Rectangle { HacknetSlider { width: parent.width - visible: Daemon.hasBrightness - label: "BRIGHTNESS" - value: Daemon.currentBrightness - onValueChangedByUser: (val) => Daemon.setBrightness(val) + label: "OUTPUT VOLUME" + value: Math.min(1.0, Daemon.currentVolume) + displayValue: Daemon.isMuted ? "MUTED" : Math.round(Daemon.currentVolume * 100) + "%" + onValueChangedByUser: (val) => Daemon.setVolume(val) } - Flow { - width: parent.width - spacing: 8 - - LauncherButton { - label: "RAM GUTTER: " + (Daemon.gutterHidden ? "OFF" : "ON") - active: !Daemon.gutterHidden - onTriggered: Daemon.run("hacknetctl", ["toggle-gutter"]) - } - - LauncherButton { - label: "CONSOLE: " + (Daemon.terminalBottomOnly - ? "BOTTOM RIGHT" : "FULL COLUMN") - active: !Daemon.terminalBottomOnly - onTriggered: Daemon.toggleTerminalBottomOnly() - } - - LauncherButton { - label: "FULLSCREEN" - visible: Daemon.stageWindows.length > 0 - onTriggered: { - const w = Daemon.stageWindows.find(x => x.active) - || Daemon.stageWindows[0]; - if (w) Daemon.setFullscreen(String(w.id), true); - } - } - - LauncherButton { - label: "LEAVE FULLSCREEN" - visible: Daemon.fullscreenActive - onTriggered: { - if (Daemon.fullscreenWindow) - Daemon.setFullscreen(Daemon.fullscreenWindow, false); - } - } + LauncherButton { + label: Daemon.isMuted ? "UNMUTE" : "MUTE" + active: Daemon.isMuted + onTriggered: Daemon.toggleMute() } Rectangle { width: parent.width; height: 1; color: Theme.borderDim } - // -------------------------------------------------------- AUDIO + // ------------------------------------------------ MEDIA CONTROLS Text { - text: "AUDIO" + text: "MEDIA CONTROLS" color: "#9aa0ab" font.family: Theme.mono font.pixelSize: Theme.monoPx font.letterSpacing: 1 } - HacknetSlider { - width: parent.width - label: "VOLUME" - value: Math.min(1.0, Daemon.currentVolume) - displayValue: Daemon.isMuted ? "MUTED" : Math.round(Daemon.currentVolume * 100) + "%" - onValueChangedByUser: (val) => Daemon.setVolume(val) - } - Flow { width: parent.width spacing: 8 LauncherButton { - label: Daemon.isMuted ? "UNMUTE" : "MUTE" - active: Daemon.isMuted - onTriggered: Daemon.toggleMute() + label: "PREV" + onTriggered: Daemon.run("hacknetctl", ["media", "prev"]) } LauncherButton { @@ -209,8 +127,8 @@ Rectangle { } LauncherButton { - label: "PREV" - onTriggered: Daemon.run("hacknetctl", ["media", "prev"]) + label: "STOP" + onTriggered: Daemon.run("hacknetctl", ["media", "stop"]) } LauncherButton { @@ -219,50 +137,44 @@ Rectangle { } } - Rectangle { width: parent.width; height: 1; color: Theme.borderDim } + // -------------------------------------------- DISPLAY BRIGHTNESS + Rectangle { + width: parent.width; height: 1; color: Theme.borderDim + visible: Daemon.hasBrightness + } - // ------------------------------------------------ NOTIFICATIONS Text { - text: "NOTIFICATIONS" + text: "DISPLAY BRIGHTNESS" color: "#9aa0ab" font.family: Theme.mono font.pixelSize: Theme.monoPx font.letterSpacing: 1 + visible: Daemon.hasBrightness } - Flow { + HacknetSlider { width: parent.width - spacing: 8 - - LauncherButton { - label: "DO NOT DISTURB: " + (Daemon.dnd ? "ON" : "OFF") - active: Daemon.dnd - onTriggered: Daemon.setDnd(!Daemon.dnd) - } - - LauncherButton { - label: "CLEAR HISTORY" - onTriggered: Notifs.clear() - } + visible: Daemon.hasBrightness + label: "BRIGHTNESS" + value: Daemon.currentBrightness + onValueChangedByUser: (val) => Daemon.setBrightness(val) } + // ------------------------------------------------- WIFI SETTINGS Rectangle { width: parent.width; height: 1; color: Theme.borderDim - visible: Daemon.hasWifi || Daemon.hasBluetooth + visible: Daemon.hasWifi } - // ------------------------------------------------------ NETWORK - // Only shown when the hardware exists. Text { - text: "NETWORK" + text: "WIFI SETTINGS" color: "#9aa0ab" font.family: Theme.mono font.pixelSize: Theme.monoPx font.letterSpacing: 1 - visible: Daemon.hasWifi || Daemon.hasBluetooth + visible: Daemon.hasWifi } - // Wi-Fi Section Column { id: wifiSection width: parent.width @@ -418,7 +330,21 @@ Rectangle { } } - // Bluetooth Section + // -------------------------------------------- BLUETOOTH SETTINGS + Rectangle { + width: parent.width; height: 1; color: Theme.borderDim + visible: Daemon.hasBluetooth + } + + Text { + text: "BLUETOOTH SETTINGS" + color: "#9aa0ab" + font.family: Theme.mono + font.pixelSize: Theme.monoPx + font.letterSpacing: 1 + visible: Daemon.hasBluetooth + } + Column { width: parent.width spacing: 8 @@ -496,71 +422,22 @@ Rectangle { Rectangle { width: parent.width; height: 1; color: Theme.borderDim } - // ----------------------------------------------------- DESKTOPS - Text { - text: "DESKTOPS" - color: "#9aa0ab" - font.family: Theme.mono - font.pixelSize: Theme.monoPx - font.letterSpacing: 1 - } - Row { spacing: 8 LauncherButton { - label: "+ NEW DESKTOP" - onTriggered: Daemon.addDesktop() + label: "OPEN SETTINGS" + onTriggered: { + Ui.closeAll(); + Quickshell.execDetached(["hacknet-settings"]); + } } LauncherButton { - label: "- REMOVE" - visible: Daemon.desktopCount > 1 - onTriggered: Daemon.removeDesktop(Daemon.currentDesktop) - } - } - - Flow { - width: parent.width - spacing: 8 - - Repeater { - model: Daemon.desktopCount - delegate: LauncherButton { - label: "D" + (index + 1) - active: Daemon.currentDesktop === (index + 1) - onTriggered: Daemon.switchDesktop(index + 1) - } + label: "CLOSE" + onTriggered: Ui.closeAll() } } - - Rectangle { width: parent.width; height: 1; color: Theme.borderDim } - - // ------------------------------------------------------- SYSTEM - Text { - text: "SYSTEM" - color: "#9aa0ab" - font.family: Theme.mono - font.pixelSize: Theme.monoPx - font.letterSpacing: 1 - } - - Text { - width: parent.width - text: "host " + Daemon.hostname + " addr " + Daemon.homeAddress - + "\nuser " + Daemon.username + " kernel " + Daemon.version - color: Theme.dim - font.family: Theme.mono - font.pixelSize: Math.max(9, Theme.monoPx - 1) - lineHeight: 1.3 - } - - Item { width: 1; height: 6 } - - LauncherButton { - label: "CLOSE" - onTriggered: Ui.closeAll() - } } } } diff --git a/compositor/hyprland/hacknet.lua b/compositor/hyprland/hacknet.lua index 1473a9a..59581f5 100644 --- a/compositor/hyprland/hacknet.lua +++ b/compositor/hyprland/hacknet.lua @@ -199,4 +199,11 @@ hl.exec_cmd("sh -c 'sleep 2; exec quickshell -p /usr/share/quickshell/hacknet/sh hl.exec_cmd("sh -c 'while :; do pgrep -f \"[f]oot.*hacknet-term\" >/dev/null 2>&1 || hacknet-term --app-id hacknet-term; sleep 2; done'") -- Keep the pointer usable even with no window focused. --- (Not needed for Hyprland, handled by cursor_no_warps) \ No newline at end of file +-- (Not needed for Hyprland, handled by cursor_no_warps) + +-- User-defined keybinds and input overrides from hacknet-settings +local home = os.getenv("HOME") or "" +if home ~= "" then + pcall(dofile, home .. "/.config/hypr/hacknet-user-binds.lua") + pcall(dofile, home .. "/.config/hypr/hacknet-user-input.lua") +end \ No newline at end of file diff --git a/compositor/sway/hacknet.conf b/compositor/sway/hacknet.conf index e5484e3..1668190 100644 --- a/compositor/sway/hacknet.conf +++ b/compositor/sway/hacknet.conf @@ -131,3 +131,7 @@ exec sh -c 'while :; do pgrep -f "[f]oot.*hacknet-term" >/dev/null 2>&1 || hackn # Keep the pointer usable even with no window focused. seat seat0 hide_cursor 0 + +# User-defined keybinds and input overrides from hacknet-settings +include ~/.config/sway/hacknet-user-binds.con[f] +include ~/.config/sway/hacknet-user-input.con[f]