summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubh <subh@subh.space>2026-03-28 09:06:29 +0530
committersubh <subh@subh.space>2026-03-28 09:06:29 +0530
commitebd27cd9d043a9b729bde9e72cfc0cf865f83458 (patch)
treeeba939aed78230b52d2e219ac1a2a29e24ebc523
parent53c9d8dc80e7fb9b714fbbe050b9e0caff7f5cf8 (diff)
Added a layout indicator in quickshell, along with a pdf reader named zathura. Also, removed the powerprofiles script
-rw-r--r--hyprland/keybinds.conf3
-rwxr-xr-xinstall.sh3
-rw-r--r--quickshell/shell.qml57
-rwxr-xr-xscripts/power-profiles.sh6
4 files changed, 42 insertions, 27 deletions
diff --git a/hyprland/keybinds.conf b/hyprland/keybinds.conf
index b788d9d..83ac060 100644
--- a/hyprland/keybinds.conf
+++ b/hyprland/keybinds.conf
@@ -30,8 +30,7 @@ bind = $mainMod|Shift, V, exec, /opt/scripts/vpn_disconnect.sh
bind = $mainMod, X, exec, /opt/scripts/screen-record.sh
bind = $mainMod|Shift, X, exec, /opt/scripts/screen-record-stop.sh
bind = $mainMod, Y, exec, hyprctl workspaces -j | jq '.[].lastwindowtitle' | rofi -show window
-bind = $mainMod, P, exec, /opt/scripts/power-profiles.sh
-
+bind = $mainMod, P, exec, hyprctl getoption general:layout | grep -q 'dwindle' && hyprctl keyword general:layout master || hyprctl keyword general:layout dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
diff --git a/install.sh b/install.sh
index 1cc241c..8a7b0ec 100755
--- a/install.sh
+++ b/install.sh
@@ -4,8 +4,7 @@
sudo pacman -Syu
echo "[*] Installing core packages"
-sudo pacman -S NetworkManager dunst ly firewalld discord libnotify fastfetch ttd-iosevka-nerd quickshell fzf hyprlock hyprshot exa fd ripgrep bat pcmanfm make cmake hyprland wayland pipewire ghostty swww rofi pavucontrol pulseaudio mpv feh maim dbus wl-clipboard tmux docker docker-compose rust go cargo uv python3 doas openvpn net-tools 7zip zip netcat socat wget curl spotify zoxide octopi cuda nvidia-settings nvidia-utils opencl-nvidia bore grex protonvpn keepassxc flameshot power-profiles-daemon flatpak pass
-
+sudo pacman -S NetworkManager dunst ly firewalld discord libnotify fastfetch ttd-iosevka-nerd quickshell fzf hyprlock hyprshot exa fd ripgrep bat pcmanfm make cmake hyprland wayland pipewire ghostty swww rofi pavucontrol pulseaudio mpv feh maim dbus wl-clipboard tmux docker docker-compose rust go cargo uv python3 doas openvpn net-tools 7zip zip netcat socat wget curl spotify zoxide octopi cuda nvidia-settings nvidia-utils opencl-nvidia bore grex protonvpn keepassxc flameshot power-profiles-daemon flatpak pass zathura zathura-pdf-mupdf
flatpak install flathub com.stremio.Stremio
echo "[*] Building yay"
diff --git a/quickshell/shell.qml b/quickshell/shell.qml
index 259b48a..b26cc66 100644
--- a/quickshell/shell.qml
+++ b/quickshell/shell.qml
@@ -31,6 +31,7 @@ ShellRoot {
property int volumeLevel: 0
property string activeWindow: "Window"
property string currentLayout: "Tile"
+ property string layoutCurrent: ""
property string cpuTemp: "0"
property int cpuTempInt: parseInt(cpuTemp, 10)
@@ -40,14 +41,6 @@ ShellRoot {
else return "#f38ba8" // Red
}
- property color powerProfileColor: {
- switch (powerProfile) {
- case "power-saver": return "#a6e3a1"
- case "balanced": return "#89b4fa"
- case "performance": return "#f38ba8"
- default: return "#bac2de"
- }
- }
property string weatherTemp: "0"
property var lastCpuIdle: 0
property var lastCpuTotal: 0
@@ -62,19 +55,26 @@ ShellRoot {
Component.onCompleted: running = true
}
- // Power Profile
+ // Get Current Layout Information
Process {
- id: powerProfileProc
- command: ["sh", "-c", "powerprofilesctl get"]
+ id: layoutMonitor
+ command: [
+ "sh", "-c",
+ "socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do hyprctl getoption general:layout | awk '/str/ {print $2}'; done"
+ ]
stdout: SplitParser {
onRead: data => {
- const v = data.trim()
- if (v != powerProfile) powerProfile = v
+ if (data) {
+ let val = data.trim()
+ if (val) layoutCurrent = val
+ }
}
}
Component.onCompleted: running = true
}
+
+
// CPU usage
Process {
id: cpuProc
@@ -287,17 +287,18 @@ ShellRoot {
// System Stats (Right Side)
Text { text: "󰣇 " + kernelVersion; color: root.colCyan; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
-
- Text { text: "󰠠 " + powerProfile; color: powerProfileColor; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
- Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
+
+ Text { text: layoutCurrent; color: root.colRed; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
+
+ Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
Text { text: "󰖐 " + weatherTemp; color: root.colYellow; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
Text { text: " " + cpuTemp; color: tempColor; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
- Text { text: " " + cpuUsage + "%"; color: root.colYellow; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
+ Text { text: " " + cpuUsage + "%"; color: root.colPurple; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
Text { text: "󰘚 " + memUsage + "%"; color: root.colCyan; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
@@ -306,9 +307,31 @@ ShellRoot {
Text { text: " " + diskUsage + "%"; color: root.colBlue; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
+ // netspeed
+ Text {
+ id: netSpeed
+ color: root.colRed
+ font.pixelSize: 15
+ font.family: root.fontFamily
+ font.bold: true
+ Layout.rightMargin: 8
+
+ Process {
+ id: netProc
+ command: ["bash", "/opt/scripts/netspeed.sh", "wlp8s0"]
+ running: true
+ stdout: SplitParser {
+ onRead: data => netSpeed.text = data.trim()
+ }
+ }
+ }
+
+ Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
Text { text: " " + volumeLevel + "%"; color: root.colPurple; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.rightMargin: 8; color: root.colMuted }
+
+
// Clock
Text {
id: clockText
diff --git a/scripts/power-profiles.sh b/scripts/power-profiles.sh
deleted file mode 100755
index ec6e84e..0000000
--- a/scripts/power-profiles.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-powerprofilesctl | awk '/:$/ {gsub(/[:*]/,""); print $1}' | rofi -dmenu | xargs powerprofilesctl set
-
-CURRENT_PROFILE="$(powerprofilesctl get)"
-notify-send -u normal -i preferences-system-power "Profile Updated" "Current Profile: $CURRENT_PROFILE"