summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsubh <subh@subh.space>2026-03-30 00:26:56 +0530
committersubh <subh@subh.space>2026-03-30 00:26:56 +0530
commit4d209f7c9208b5ee3ec4fe642084d523d0ea5a7e (patch)
treeb09ea1ad33d5fc738a4ce20f752235e336820b04
parent759e0c0677c55e99361538054ed87bf7060c654f (diff)
Lots of changes
-rw-r--r--hyprland/hyprland.conf7
-rw-r--r--hyprland/keybinds.conf2
-rwxr-xr-xinstall.sh2
-rw-r--r--quickshell/shell.qml102
-rwxr-xr-xscripts/emoji.sh8
-rwxr-xr-xscripts/netspeed.sh2
-rwxr-xr-xscripts/pid2ps22
7 files changed, 97 insertions, 48 deletions
diff --git a/hyprland/hyprland.conf b/hyprland/hyprland.conf
index c37cb50..0a692fc 100644
--- a/hyprland/hyprland.conf
+++ b/hyprland/hyprland.conf
@@ -81,13 +81,13 @@ decoration {
rounding_power = 0
# Change transparency of focused and unfocused windows
- active_opacity = 1.0
- inactive_opacity = 1.0
+ active_opacity = 1.0
+ inactive_opacity = 1.0
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
- enabled = true
+ enabled = false
size = 5
passes = 3
@@ -204,4 +204,3 @@ windowrule {
#windowrulev2 = suppressevent maximize, class:^(firefox|code|jetbrains-.*|electron)$
windowrule = border_color rgb(f38ba8) rgb(313244), match:class (firefox|librewolf|discord|sublime_text|com.mitchellh.ghostty|org.keepassxc.KeePassXC|burp-StartBurp)
windowrule = suppress_event maximize, match:class .* # You'll probably like this.
-
diff --git a/hyprland/keybinds.conf b/hyprland/keybinds.conf
index e575e67..62c3582 100644
--- a/hyprland/keybinds.conf
+++ b/hyprland/keybinds.conf
@@ -32,6 +32,8 @@ 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, hyprctl getoption general:layout | grep -q 'dwindle' && hyprctl keyword general:layout master || hyprctl keyword general:layout dwindle
+bind = $mainMod, equal, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send "Volume Status" "Current Volume: $(pactl --format json get-sink-volume @DEFAULT_SINK@ | jq -r '.volume."front-left"."value_percent"')"
+bind = $mainMod, minus, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send "Volume Status" "Current Volume: $(pactl --format json get-sink-volume @DEFAULT_SINK@ | jq -r '.volume."front-left"."value_percent"')"
# Move focus with mainMod + arrow keys
bind = $mainMod, h, movefocus, l
diff --git a/install.sh b/install.sh
index 36d2eab..d246341 100755
--- a/install.sh
+++ b/install.sh
@@ -4,7 +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 pass zathura zathura-pdf-mupdf
+sudo pacman -S NetworkManager dunst ly firewalld discord libnotify fastfetch ttf-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 pass zathura zathura-pdf-mupdf
echo "[*] Building yay"
git clone https://aur.archlinux.org/yay.git && cd yay && sudo makepkg -si
diff --git a/quickshell/shell.qml b/quickshell/shell.qml
index fc88e22..8fd50e5 100644
--- a/quickshell/shell.qml
+++ b/quickshell/shell.qml
@@ -26,12 +26,11 @@ ShellRoot {
property string kernelVersion: "Arch"
property string powerProfile: ""
property int cpuUsage: 0
- property int memUsage: 0
- property int diskUsage: 0
+ property string memUsage: ""
+ property string diskUsage: ""
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)
property string upTime: "0"
@@ -43,9 +42,45 @@ ShellRoot {
}
property string weatherTemp: "0"
+ property string weatherIcon: ""
+ property string weatherDesc: ""
property var lastCpuIdle: 0
property var lastCpuTotal: 0
+
+ function getWeatherIcon(desc) {
+ if (!desc) return "❓";
+ var hour = new Date().getHours();
+ var isDay = (hour >= 6 && hour < 18);
+ var d = desc.toLowerCase();
+ if (d.includes("sun") || d.includes("clear")) {
+ return isDay ? "☀️ " : "🌙 ";
+ }
+ if (d.includes("cloud") && d.includes("partly")) {
+ return isDay ? "⛅ " : "☁️ ";
+ }
+ if (d.includes("cloud") || d.includes("overcast")) {
+ return "☁️ ";
+ }
+ if (d.includes("rain") || d.includes("drizzle") || d.includes("showers")) {
+ return "🌧️ ";
+ }
+
+ if (d.includes("thunder") || d.includes("storm")) {
+ return "⛈️ ";
+ }
+
+ if (d.includes("snow") || d.includes("ice") || d.includes("sleet")) {
+ return "❄️ ";
+ }
+
+ if (d.includes("fog") || d.includes("mist") || d.includes("haze")) {
+ return "🌫️ ";
+ }
+
+ return "🌡️";
+ }
+
// Kernel version
Process {
id: kernelProc
@@ -66,23 +101,6 @@ ShellRoot {
}
Component.onCompleted: running = true
}
- // Get Current Layout Information
- Process {
- 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 => {
- if (data) {
- let val = data.trim()
- if (val) layoutCurrent = val
- }
- }
- }
- Component.onCompleted: running = true
- }
@@ -118,14 +136,13 @@ ShellRoot {
// Memory usage
Process {
id: memProc
- command: ["sh", "-c", "free | grep Mem"]
+ command: ["sh", "-c", "free -h | grep Mem"]
stdout: SplitParser {
onRead: data => {
if (!data) return
var parts = data.trim().split(/\s+/)
- var total = parseInt(parts[1]) || 1
- var used = parseInt(parts[2]) || 0
- memUsage = Math.round(100 * used / total)
+ var used = parts[2] || "0"
+ memUsage = used
}
}
Component.onCompleted: running = true
@@ -134,12 +151,17 @@ ShellRoot {
// Weather
Process {
id: weatherProc
- command: ["sh", "-c", "curl -s 'https://wttr.in/prayagraj?format=j1' | jq -r '.current_condition[].FeelsLikeC'"]
+ command: ["sh", "-c", "curl -s 'https://wttr.in/prayagraj?format=j1' | jq -r '.current_condition[] | [.weatherDesc[0].value, .FeelsLikeC + \"°C\"] | join(\"|\")'"]
stdout: SplitParser {
onRead: data => {
- if (!data) return
- var temp = parseInt(data.trim()) || 0
- weatherTemp = temp + "°C"
+ if (!data || data.trim() === "") return
+ var parts = data.trim().split('|')
+ if (parts.length >= 2) {
+ weatherDesc = parts[0]
+ weatherTemp = parts[1]
+
+ weatherIcon = getWeatherIcon(weatherDesc.toLowerCase())
+ }
}
}
Component.onCompleted: running = true
@@ -148,13 +170,13 @@ ShellRoot {
// Disk usage
Process {
id: diskProc
- command: ["sh", "-c", "df / | tail -1"]
+ command: ["sh", "-c", "df -h / | tail -1"]
stdout: SplitParser {
onRead: data => {
if (!data) return
var parts = data.trim().split(/\s+/)
- var percentStr = parts[4] || "0%"
- diskUsage = parseInt(percentStr.replace('%', '')) || 0
+ var StrInGB = parts[2] || "0G"
+ diskUsage = StrInGB
}
}
Component.onCompleted: running = true
@@ -220,7 +242,7 @@ ShellRoot {
}
}
// Weather Timer
- Timer { interval: 900000; running: true; repeat: true; onTriggered: weatherProc.running = true }
+ Timer { interval: 1800000; running: true; repeat: true; onTriggered: weatherProc.running = true }
Connections {
target: Hyprland
@@ -311,23 +333,19 @@ ShellRoot {
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: 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 }
+ Text { text: weatherIcon + 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 }
+ 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.colPurple; 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 }
+ Text { text: "🧠 " + memUsage; 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: " " + diskUsage + "%"; color: root.colBlue; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true; Layout.rightMargin: 8 }
+ 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
@@ -350,7 +368,7 @@ ShellRoot {
}
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 }
+ 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 }
diff --git a/scripts/emoji.sh b/scripts/emoji.sh
new file mode 100755
index 0000000..7780d0f
--- /dev/null
+++ b/scripts/emoji.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+chosen=$(cat ~/.local/share/larbs/emoji | rofi -dmenu | sed "s/ .*//")
+
+[ -z "$chosen" ] && exit
+
+printf "%s" "$chosen" | wl-copy
+notify-send "'$chosen' copied to clipboard."
diff --git a/scripts/netspeed.sh b/scripts/netspeed.sh
index 24f8cfa..ad33271 100755
--- a/scripts/netspeed.sh
+++ b/scripts/netspeed.sh
@@ -15,5 +15,5 @@ while true; do
RX=$(( (NEW_RX - OLD_RX) / 1024 ))
TX=$(( (NEW_TX - OLD_TX) / 1024 ))
- echo "↓ ${RX} KB/s ↑ ${TX} KB/s"
+ echo "⬇️ ${RX} KB/s ⬆️ ${TX} KB/s"
done
diff --git a/scripts/pid2ps b/scripts/pid2ps
new file mode 100755
index 0000000..25cb6e5
--- /dev/null
+++ b/scripts/pid2ps
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Simple PID to PS resolver
+
+pid=$1
+if [[ -z $pid ]]; then
+ echo "[*] Usage: pid2ps <PID>"
+ exit 1
+fi
+
+if [[ $pid =~ ^[0-9]+$ ]]; then
+ if name=$(/bin/cat /proc/$pid/comm 2>/dev/null); then
+ echo $name
+ else
+ echo "[!] No such process"
+ exit 1
+ fi
+else
+ echo "[!] Invalid PID"
+ exit 1
+fi
+