diff options
| -rw-r--r-- | hyprland/keybinds.conf | 7 | ||||
| -rw-r--r-- | quickshell/shell.qml | 25 | ||||
| -rwxr-xr-x | scripts/bookmark.sh | 16 |
3 files changed, 44 insertions, 4 deletions
diff --git a/hyprland/keybinds.conf b/hyprland/keybinds.conf index 9545dba..e575e67 100644 --- a/hyprland/keybinds.conf +++ b/hyprland/keybinds.conf @@ -4,10 +4,12 @@ bind = $mainMod, Return, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod|Shift, Q, exit, bind = $mainMod, F, exec, $fileManager +bind = $mainMod, E, exec, /opt/scripts/emoji.sh bind = $mainMod|Shift, F , togglefloating, bind = $mainMod, R, exec, $menu -bind = $mainMod|Shift, B, exec, /opt/scripts/stremio.sh +bind = $mainMod|Shift, B, exec, /opt/scripts/bookmark.sh +bind = $mainMod, B, exec, cat /home/subh/.local/share/larbs/bookmarks | rofi -dmenu -p "bookmarks" | xargs -I {} xdg-open "{}" bind = $mainMod, z, exec, zen-browser bind = $mainMod|Shift, R, exec, $reload_qs bind = $mainMod|Ctrl, R, exec, $reload_hypr @@ -18,10 +20,9 @@ bind = $mainMod, D, exec, $discord bind = $mainMod|Shift, D, exec, kill -9 `pidof discord` bind = $mainMod|Shift, A, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy bind = $mainMod|Ctrl, L, exec, /opt/scripts/power.sh -bind = $mainMod, B, exec, /opt/scripts/wallpaper-picker.sh +bind = $mainMod|Shift, W, exec, /opt/scripts/wallpaper-picker.sh bind = $mainMod, N, exec, /opt/scripts/wifi-connect.sh bind = $mainMod|Shift, N, exec, /opt/scripts/wifi-disconnect.sh -bind = $mainMod, M, exec, spotify bind = $mainMod|Shift, M, exec, kill -9 `pidof spotify` bind = $mainMod|Ctrl, K, exec, keepassxc bind = $mainMod, S, exec, subl diff --git a/quickshell/shell.qml b/quickshell/shell.qml index b26cc66..fc88e22 100644 --- a/quickshell/shell.qml +++ b/quickshell/shell.qml @@ -34,6 +34,7 @@ ShellRoot { property string layoutCurrent: "" property string cpuTemp: "0" property int cpuTempInt: parseInt(cpuTemp, 10) + property string upTime: "0" property color tempColor: { if (cpuTempInt < 50 ) return "#a6e3a1" // Green @@ -55,6 +56,16 @@ ShellRoot { Component.onCompleted: running = true } + // System UpTime + Process { + id: upTimeProc + command: ["sh", "-c", "uptime|awk '{gsub(\",\",\"\");print $3}'"] + // command: ["sh", "-c", "uptime"] + stdout: SplitParser { + onRead: data => { if (data) upTime = data.trim() } + } + Component.onCompleted: running = true + } // Get Current Layout Information Process { id: layoutMonitor @@ -193,6 +204,14 @@ ShellRoot { } // Timers + // UpTime Timer + Timer { + interval: 60000; running: true; repeat: true + onTriggered: { + upTimeProc.running = true + } + } + // SysEssentials Timer Timer { interval: 2000; running: true; repeat: true onTriggered: { @@ -200,7 +219,7 @@ ShellRoot { volProc.running = true; cpuTempProc.running = true; powerProfileProc.running = true } } - + // Weather Timer Timer { interval: 900000; running: true; repeat: true; onTriggered: weatherProc.running = true } Connections { @@ -278,6 +297,10 @@ ShellRoot { // Separator Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.leftMargin: 8; Layout.rightMargin: 8; color: root.colMuted } + Text { text: "uptime: " + upTime; color: root.colCyan; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true } + + Rectangle { Layout.preferredWidth: 1; Layout.preferredHeight: 16; Layout.leftMargin: 8; Layout.rightMargin: 8; color: root.colMuted } + // Window Title Text { text: activeWindow; color: root.colPurple; font.pixelSize: root.fontSize; font.family: root.fontFamily; font.bold: true diff --git a/scripts/bookmark.sh b/scripts/bookmark.sh new file mode 100755 index 0000000..a41eb8e --- /dev/null +++ b/scripts/bookmark.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +bookmark=$(wl-paste -p) +filename="$HOME/.local/share/larbs/bookmarks" + + +if [[ "$bookmark" =~ ^https?:// ]]; then + if grep -q "^$bookmark$" "$filename"; then + notify-send "Bookmark Status" "Already Bookmarked" + else + notify-send "Bookmark Status" "Bookmark Added" + echo "$bookmark" >> "$filename" + fi +else + exit 1 +fi |
