aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2025-12-08 11:53:23 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2025-12-08 11:53:23 +0530
commite6cf56ead8382d6bcd4d9f8d7a28490887bae92a (patch)
tree95160419d00e5f278a0cefbf1916c4f9a852742d
parent6cdd44c09685f15b66bf247801a7d5fbc0f2d0f3 (diff)
miraged from waybar to quickshell
-rw-r--r--README.md11
-rw-r--r--assets/topbar.png (renamed from assets/waybar.png)bin13385 -> 13385 bytes
-rw-r--r--flake.lock23
-rw-r--r--flake.nix14
-rw-r--r--home-manager/home.nix2
-rwxr-xr-xhypr/battery-notif.sh4
-rw-r--r--hypr/battery/battery_critical.png (renamed from waybar/battery_critical.png)bin2574 -> 2574 bytes
-rw-r--r--hypr/battery/battery_low.png (renamed from waybar/battery_low.png)bin2083 -> 2083 bytes
-rw-r--r--hypr/hyprland/exec_once.conf10
-rw-r--r--nixos/desktop-environment.nix7
-rw-r--r--nixos/environment.nix6
-rwxr-xr-xquickshell/battery.sh2
-rwxr-xr-xquickshell/brightness.sh (renamed from waybar/brightness.sh)2
-rwxr-xr-xquickshell/network.sh2
-rw-r--r--quickshell/shell.qml360
-rwxr-xr-xquickshell/volume.sh2
-rw-r--r--waybar/config122
-rw-r--r--waybar/style.css23
18 files changed, 423 insertions, 167 deletions
diff --git a/README.md b/README.md
index bd9f50c..b575028 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ Check ./sync.sh to find where each directory is sourced from
- hyprland as desktop environment
- tmux for terminal sessions
- foot as terminal
-- waybar for top bar
+- quickshell for top bar & elements
- hyprsunset for nightlight
- hyprlock for lock screen
- nvim using NvChad
@@ -66,15 +66,14 @@ Check ./sync.sh to find where each directory is sourced from
Low battery warning notifications
- 30% (Low)
- 15% (Critical)
-Change these values in waybar/config:battery:states & hypr/battery-notif.sh<br>
+Change these values in quickshell/shell.qml(look for "redBatteryPoint" & "orangeBatteryPoint") & hypr/battery-notif.sh<br>
<br>
Wallpapers changes every 10 mintues and picks from ~/Pictures/Screenshots
-### Waybar
-![waybar](./assets/waybar.png)
+### Quickshell
+![topbar](./assets/topbar.png)
-Configure in waybar/config<br>
-Styling in waybar/style.css<br>
+Configure in quickshell/shell.qml<br>
|Label|Description|
diff --git a/assets/waybar.png b/assets/topbar.png
index b9fe46d..b9fe46d 100644
--- a/assets/waybar.png
+++ b/assets/topbar.png
Binary files differ
diff --git a/flake.lock b/flake.lock
index d8f39ab..8afc8ef 100644
--- a/flake.lock
+++ b/flake.lock
@@ -53,11 +53,32 @@
"type": "github"
}
},
+ "quickshell": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1764663772,
+ "narHash": "sha256-sHqLmm0wAt3PC4vczJeBozI1/f4rv9yp3IjkClHDXDs=",
+ "ref": "refs/heads/master",
+ "rev": "26531fc46ef17e9365b03770edd3fb9206fcb460",
+ "revCount": 713,
+ "type": "git",
+ "url": "https://git.outfoxxed.me/quickshell/quickshell"
+ },
+ "original": {
+ "type": "git",
+ "url": "https://git.outfoxxed.me/quickshell/quickshell"
+ }
+ },
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
- "nixpkgs-unstable": "nixpkgs-unstable"
+ "nixpkgs-unstable": "nixpkgs-unstable",
+ "quickshell": "quickshell"
}
}
},
diff --git a/flake.nix b/flake.nix
index 0cc117c..52c2a64 100644
--- a/flake.nix
+++ b/flake.nix
@@ -8,9 +8,19 @@
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
+ quickshell = {
+ url = "git+https://git.outfoxxed.me/quickshell/quickshell";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
};
- outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
+ outputs = {
+ self,
+ nixpkgs,
+ nixpkgs-unstable,
+ home-manager,
+ quickshell,
+ ... }@inputs:
let
system = "x86_64-linux";
username = "aargh";
@@ -32,7 +42,7 @@
nixosConfigurations.main = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
- inherit inputs username hostname unstable symlinkRoot nvidia;
+ inherit quickshell inputs username hostname unstable symlinkRoot nvidia;
};
modules = [
diff --git a/home-manager/home.nix b/home-manager/home.nix
index aff3c24..4597ed9 100644
--- a/home-manager/home.nix
+++ b/home-manager/home.nix
@@ -29,8 +29,8 @@ let
"fortune"
"hypr"
"nvim"
+ "quickshell"
"tmux"
- "waybar"
"wofi"
"yazi"
];
diff --git a/hypr/battery-notif.sh b/hypr/battery-notif.sh
index 4a0165e..40f7db3 100755
--- a/hypr/battery-notif.sh
+++ b/hypr/battery-notif.sh
@@ -5,9 +5,9 @@ while true; do
if [[ "$status" = "Discharging" ]]; then
battery=$(cat /sys/class/power_supply/BAT1/capacity)
if [[ battery -lt 16 ]]; then
- notify-send -u critical "Very Low Battery" -i ~/.config/waybar/battery_critical.png
+ notify-send -u critical "Very Low Battery" -i ~/.config/hypr/battery/battery_critical.png
elif [[ battery -lt 31 ]]; then
- notify-send -u normal "Low Battery" -i ~/.config/waybar/battery_low.png
+ notify-send -u normal "Low Battery" -i ~/.config/hypr/battery/battery_low.png
fi
fi
pid=$!
diff --git a/waybar/battery_critical.png b/hypr/battery/battery_critical.png
index cf73f50..cf73f50 100644
--- a/waybar/battery_critical.png
+++ b/hypr/battery/battery_critical.png
Binary files differ
diff --git a/waybar/battery_low.png b/hypr/battery/battery_low.png
index 39d2d89..39d2d89 100644
--- a/waybar/battery_low.png
+++ b/hypr/battery/battery_low.png
Binary files differ
diff --git a/hypr/hyprland/exec_once.conf b/hypr/hyprland/exec_once.conf
index 9043c15..ff63e90 100644
--- a/hypr/hyprland/exec_once.conf
+++ b/hypr/hyprland/exec_once.conf
@@ -1,6 +1,6 @@
-exec-once = ~/.config/hypr/random-wall.sh # random wallpaper
-exec-once = ~/.config/hypr/battery-notif.sh # low battery notification
-exec-once = wl-paste --watch cliphist store # clipboard
-exec-once = mako # notification
-exec-once = waybar # top bar
+exec-once = ~/.config/hypr/random-wall.sh
+exec-once = ~/.config/hypr/battery-notif.sh
+exec-once = wl-paste --watch cliphist store
+exec-once = mako
+exec-once = qs
exec-once = hyprsunset
diff --git a/nixos/desktop-environment.nix b/nixos/desktop-environment.nix
index 283efcb..5523cb7 100644
--- a/nixos/desktop-environment.nix
+++ b/nixos/desktop-environment.nix
@@ -1,16 +1,15 @@
-{ config, pkgs, ... }:
-let unstable = import <nixos-unstable> { config.allowUnfree = true; };
-in {
+{ config, pkgs, quickshell, ... }:
+{
services.xserver.enable = true;
services.displayManager.ly.enable = true;
services.desktopManager.gnome.enable = false;
programs.hyprland.enable = true;
programs.hyprlock.enable = true;
programs.foot.enable = true;
- programs.waybar.enable = true;
programs.sway.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs; [
+ quickshell.packages.${pkgs.system}.quickshell
wofi
adwaita-icon-theme
swaybg
diff --git a/nixos/environment.nix b/nixos/environment.nix
index 5d1d41e..d663c74 100644
--- a/nixos/environment.nix
+++ b/nixos/environment.nix
@@ -30,7 +30,13 @@
fortune
cowsay
lolcat
+
+ openssl
+ openssl.dev
];
+ environment.variables = {
+ OPENSSL_DIR = "${pkgs.openssl.dev}";
+ };
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
diff --git a/quickshell/battery.sh b/quickshell/battery.sh
new file mode 100755
index 0000000..c7d4302
--- /dev/null
+++ b/quickshell/battery.sh
@@ -0,0 +1,2 @@
+battery=$(cat /sys/class/power_supply/BAT1/capacity)
+echo "$battery"
diff --git a/waybar/brightness.sh b/quickshell/brightness.sh
index cbd597e..ccb2bc2 100755
--- a/waybar/brightness.sh
+++ b/quickshell/brightness.sh
@@ -1,4 +1,4 @@
brightness=$(brightnessctl | grep 'Current brightness' | grep -o '[0-9]\+' | head -n 1)
temp=$(hyprctl hyprsunset temperature 2>/dev/null | grep -o '[0-9]\+')
if [ -z "$temp" ]; then temp=6000; fi
-echo "Photons:<span color='#FFA500'>$brightness</span>(<span color='#FF4040'>$temp</span>K)"
+echo "$brightness $temp"
diff --git a/quickshell/network.sh b/quickshell/network.sh
new file mode 100755
index 0000000..f50707e
--- /dev/null
+++ b/quickshell/network.sh
@@ -0,0 +1,2 @@
+connections=$(nmcli connection show --active | sed -n '2 p')
+echo "$connections"
diff --git a/quickshell/shell.qml b/quickshell/shell.qml
new file mode 100644
index 0000000..bc1290e
--- /dev/null
+++ b/quickshell/shell.qml
@@ -0,0 +1,360 @@
+import Quickshell
+import Quickshell.Wayland
+import Quickshell.Hyprland
+import Quickshell.Io
+import QtQuick
+import QtQuick.Layouts
+
+PanelWindow {
+ id: root
+
+ property int redBatteryPoint: 15
+ property int orangeBatteryPoint: 30
+
+ property color black: "#000000"
+ property color white: "#ffffff"
+ property color green: "#28CD41"
+ property color red: "#FF4040"
+ property color orange: "#FFA500"
+ property color purple: "#BF00FF"
+ property color blue: "#00FFFF"
+ property string fontFamily: "JetBrainsMono Nerd Font"
+ property int fontSize: 18
+
+ property int cpuUsage: 0
+ property int lastCpuTotal: 0
+ property int lastCpuIdle: 0
+
+ Process {
+ id: cpuProc
+ command: ["sh", "-c", "head -1 /proc/stat"]
+
+ stdout: SplitParser {
+ onRead: data => {
+ var p = data.trim().split(/\s+/)
+ var idle = parseInt(p[4]) + parseInt(p[5])
+ var total = p.slice(1, 8).reduce((a, b) => a + parseInt(b), 0)
+ if (lastCpuTotal > 0) {
+ cpuUsage = Math.round(100 * (1 - (idle - lastCpuIdle) / (total - lastCpuTotal)))
+ }
+ lastCpuTotal = total
+ lastCpuIdle = idle
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ property int memUsage: 0
+ Process {
+ id: memProc
+ command: ["sh", "-c", "free | grep Mem"]
+ stdout: SplitParser {
+ onRead: data => {
+ var parts = data.trim().split(/\s+/)
+ var total = parseInt(parts[1]) || 1
+ var used = parseInt(parts[2]) || 0
+ memUsage = Math.round(100 * used / total)
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ property int brightness: 100
+ property int temperature: 6000
+ Process {
+ id: brightnessProc
+ command: ["sh", "-c", "~/.config/quickshell/brightness.sh"]
+ stdout: SplitParser {
+ onRead: data => {
+ var parts = data.trim().split(/\s+/)
+ brightness = parseInt(parts[0]) || 100
+ temperature = parseInt(parts[1]) || 6000
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ property int volume: 12
+ Process {
+ id: volumeProc
+ command: ["sh", "-c", "~/.config/quickshell/volume.sh"]
+ stdout: SplitParser {
+ onRead: data => {
+ volume = parseInt(data.trim()) || 13;
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ property int battery: 12
+ Process {
+ id: batteryProc
+ command: ["sh", "-c", "~/.config/quickshell/battery.sh"]
+ stdout: SplitParser {
+ onRead: data => {
+ battery = parseInt(data.trim()) || 13;
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ property string wifiName: "Offline"
+ Process {
+ id: networkProc
+ command: ["sh", "-c", "~/.config/quickshell/network.sh"]
+ stdout: SplitParser {
+ onRead: data => {
+ var parts = data.trim().split(/\s+/)
+ wifiName = parts[0];
+ }
+ }
+ Component.onCompleted: running = true
+ }
+
+ Timer {
+ interval: 2000
+ running: true
+ repeat: true
+ onTriggered: {
+ cpuProc.running = true
+ memProc.running = true
+ brightnessProc.running = true
+ volumeProc.running = true
+ batteryProc.running = true
+ networkProc.running = true
+ }
+ }
+ Process {
+ id: networkManagerProc
+ command: ["foot", "-e", "nmtui"]
+ Component.onCompleted: running = false
+ }
+
+ anchors.top: true
+ anchors.left: true
+ anchors.right: true
+ implicitHeight: 32
+ color: root.black
+
+ RowLayout {
+ anchors.fill: parent
+ anchors.margins: 0
+
+ Repeater {
+ model: 5
+
+ Text {
+ property bool isActive: Hyprland.focusedWorkspace?.id === (index + 1)
+
+ text: index + 1
+ color: isActive ? root.green : root.white
+ font {
+ pixelSize: root.fontSize;
+ bold: true;
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Hyprland.dispatch("workspace " + (index + 1))
+ }
+ }
+ }
+ Item { Layout.fillWidth: true }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Radio:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: wifiName
+ color: wifiName == "Offline" ? root.red : root.green
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: networkManagerProc.running = true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Electrons:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: battery
+ color: (battery <= redBatteryPoint) ? root.red : ((battery <= orangeBatteryPoint) ? root.orange : root.green)
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Waves:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: volume
+ color: root.green
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Photons:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: brightness
+ color: root.orange
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ Text {
+ text: "(" + temperature + "K)"
+ color: root.red
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Radiation:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: cpuUsage + "K"
+ color: root.orange
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Data Bus:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: cpuUsage
+ color: root.orange
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Latch:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ text: memUsage
+ color: root.orange
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+ }
+ }
+ RowLayout {
+ spacing: 0
+ Text {
+ text: " Spin:"
+ color: root.white
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ }
+ }
+ Text {
+ property var formatMode: "HH:mm:ss"
+
+ id: clock
+ text: Qt.formatDateTime(new Date(), clock.formatMode)
+ color: root.purple
+ font {
+ family: root.fontFamily
+ pixelSize: root.fontSize
+ bold: true
+ }
+
+ Timer {
+ interval: 1000
+ running: true
+ repeat: true
+ onTriggered: clock.text = Qt.formatDateTime(new Date(), clock.formatMode)
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (clock.formatMode === "HH:mm:ss") {
+ clock.formatMode = "yyyy/MM/dd, dddd"
+ } else {
+ clock.formatMode = "HH:mm:ss"
+ }
+ clock.text = Qt.formatDateTime(new Date(), clock.formatMode)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/quickshell/volume.sh b/quickshell/volume.sh
new file mode 100755
index 0000000..3059255
--- /dev/null
+++ b/quickshell/volume.sh
@@ -0,0 +1,2 @@
+volume=$(pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '\d+(?=%)' | head -n 1)
+echo "$volume"
diff --git a/waybar/config b/waybar/config
deleted file mode 100644
index e514a31..0000000
--- a/waybar/config
+++ /dev/null
@@ -1,122 +0,0 @@
-{
- "layer": "top",
- "position": "top",
- "height": 36,
- "spacing": 0,
- "modules-left": [
- "hyprland/workspaces",
- ],
- "modules-right": [
- "network",
- "custom/space",
- "battery",
- "custom/space",
- "pulseaudio",
- "custom/space",
- "custom/brightness",
- "custom/space",
- "custom/temperature",
- "custom/space",
- "memory",
- "custom/space",
- "cpu",
- "custom/space",
- "clock",
- "custom/space",
- ],
- "hyprland/workspaces": {
- "disable-scroll": false,
- "all-outputs": true,
- "format": "{icon}",
- "on-click": "activate",
- "persistent-workspaces": {
- "*":[1,2,3,4,5]
- },
- },
- "custom/space": {
- "format": " ",
- },
- "network": {
- "format-wifi": "Radio(Wifi):<span color='#28CD41'>{essid}</span>",
- "format-ethernet": "Radio(Ethernet)",
- "format-linked": "Radio(Linked)<span color='#28CD41'>{ifname}</span>",
- "format-disconnected": "Radio:<span color='#FF4040'>Offline</span>",
- "interval": 1,
- "on-click": "foot -e nmtui",
- "tooltip-format": "Sending: <span color='#28CD41'>{bandwidthUpBytes}</span> Receiving: <span color='#00BFFF'>{bandwidthDownBytes}</span>",
- },
- "battery": {
- "interval": 1,
- "states": {
- "warning": 30,
- "critical": 15
- },
- "format": "Electrons:<span color='#28CD41'>{capacity}</span>",
- "format-charging": "Electrons:<span color='#28CD41'>AC/DC({capacity})</span>",
- "format-discharging-warning": "Electrons:<span color='#FFA500'>{capacity}</span>",
- "format-discharging-critical": "Electrons:<span color='#FF4040'>{capacity}</span>",
- "tooltip": true
- },
- "pulseaudio": {
- "format": "Waves:<span color='#28CD41'>{volume}</span>",
- "format-muted": "Waves:<span color='#FF4040'>off</span>",
- "format-icons": {
- "headphone": "<span color='#BF00FF'>  </span>",
- "hands-free": "<span color='#BF00FF'>  </span>",
- "headset": "<span color='#BF00FF'>  </span>",
- "phone": "<span color='#00FFFF'>  </span>",
- "portable": "<span color='#00FFFF'>  </span>",
- "car": "<span color='#FFA500'>  </span>",
- "default": [
- "<span color='#808080'>  </span>",
- "<span color='#FFFF66'>  </span>",
- "<span color='#00FF7F'>  </span>"
- ]
- },
- "on-click-right": "pavucontrol -t 3",
- "on-click": "pactl -- set-sink-mute 0 toggle",
- "tooltip": false,
- },
- "custom/brightness": {
- "exec": "~/.config/waybar/brightness.sh",
- "format": "{}",
- "interval": 1,
- "tooltip": false,
- },
- "custom/temperature": {
- "exec": "sensors | awk '/^Package id 0:/ {print int($4) + 273}'",
- "format": "Radiation:<span color='#FFA500'>{}K</span>",
- "interval": 5,
- "tooltip": false,
- },
- "memory": {
- "format": "Latch:<span color='#FFA500'>{used}G</span>",
- "tooltip": false,
- },
- "cpu": {
- "format": "Data Bus:<span color='#FFA500'>{avg_frequency}Hz</span>",
- "tooltip": true,
- },
- "clock": {
- "interval": 1,
- "timezone": "Asia/Kolkata",
- "format": "Spin:<span color='#BF00FF'>{:%H:%M:%S}</span>",
- "calendar": {
- "mode" : "year",
- "mode-mon-col" : 3,
- "weeks-pos" : "right",
- "on-scroll" : 1,
- "on-click-right": "mode",
- "format": {
- "months": "<span color='#ffead3'><b>{}</b></span>",
- "days": "<span color='#ecc6d9'><b>{}</b></span>",
- "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
- "weekdays": "<span color='#ffcc66'><b>{}</b></span>",
- "today": "<span color='#ff6699'><b><u>{}</u></b></span>"
- }
- },
- "tooltip": true,
- "format-alt": "Spin:<span color='#BF00FF'>{:L%Y/%m/%d, %A}</span>",
- "tooltip-format": "<tt><small>{calendar}</small></tt>",
- },
-}
diff --git a/waybar/style.css b/waybar/style.css
deleted file mode 100644
index 9efc646..0000000
--- a/waybar/style.css
+++ /dev/null
@@ -1,23 +0,0 @@
-* {
- font-family: "JetBrainsMono Nerd Font", monospace;
- font-weight: bold;
- font-size: 16px;
- color: #c6d0f5;
- margin: 0;
- border-radius: 0px;
-}
-
-#waybar {
- background-color: rgb(0, 0, 0);
-}
-
-#workspaces button:hover {
- background-color: #303030;
- margin: 0px;
- border-radius: 0px;
-}
-
-#workspaces button.active {
- background-color: #28CD41;
- color: #ea999c;
-}