all repos — quickshell @ 455b0a4f474d84f7c458adbc1d1aa2554e6082e0

A desert-witch desktop shell

0
trickyni trickyniv56@gmail.com
Fri, 26 Sep 2025 17:50:40 +0300
commit

455b0a4f474d84f7c458adbc1d1aa2554e6082e0

parent

c48aeb07b7fe47b375705cc3383d0e2b8bf73d1f

M Icons.qmlIcons.qml

@@ -10,6 +10,7 @@ property var modules: {

"sunset": "󰖚", "ram": "󰍛", "tasklist": "", + "size": "󰲏", } property var workspaces: { "volume_mixer": "",

@@ -23,17 +24,13 @@ "low": "",

"high": "", } property var network: { + "ethernet": "󰈀", + "nobar": "󰣽", "bar0": "󰣾", "bar1": "󰣴", "bar2": "󰣶", "bar3": "󰣸", "bar4": "󰣺", - "crossed_full": "󰣼", - "crossed_empty": "󰣽", - "one_bar_alert": "󰣵", - "two_bar_alert": "󰣹", - "three_bar_alert": "󰣹", - "full_bar_alert": "󰣻", } property var devices: { "battery": "",
M README.mdREADME.md

@@ -5,14 +5,9 @@ - [WIP] Application launcher

- ...And maybe more ## TODO -- scaling: - - make size changes through native function rather than variable changes Additions: - Battery - Device blacklist - - Network - - wired indicator - - no-connection indicator - resize indicator - zen mode - cam/mic indicator
M bar/Bar.qmlbar/Bar.qml

@@ -19,6 +19,8 @@ Module.Taskwarrior {}

} TopbarLeft { Module.Workspaces {} + Module.Scale{} + } } BottomBar {

@@ -27,7 +29,7 @@ Module.Battery{}

} BottombarLeft{ Module.Network{} - Module.Scale{} + // Module.Scale{} } } }
M bar/TopBar.qmlbar/TopBar.qml

@@ -7,9 +7,9 @@

PanelWindow { id: top_bar anchors { - top: true - left: true - right: true + top: true + left: true + right: true } margins { left: 0

@@ -18,6 +18,5 @@ top: 0

bottom: 0 } height: Resources.barsize.topbar - // height: 24 color: Resources.palette.bg }
A bar/TopBar.qml.bak

@@ -0,0 +1,22 @@

+// TopBar.qml +import Quickshell +import QtQuick +import QtQuick.Layouts +import ".." + +PanelWindow { + id: top_bar + anchors { + top: true + left: true + right: true + } + margins { + left: 0 + right:8 + top: 0 + bottom: 0 + } + height: Resources.barsize.topbar + color: Resources.palette.bg +}
M bar/modules/Network.qmlbar/modules/Network.qml

@@ -17,8 +17,8 @@ workingDirectory: Quickshell.shellDir

running: true stdout: StdioCollector { onStreamFinished: { - network.text = this.text.trim().split("+")[1] - wifi_strength.wifi_strength_data = this.text.trim().split("+")[0] + network.text = this.text.trim().split(" ")[1] + indicator.indicator_data= this.text.trim().split("+")[0] } } }

@@ -30,9 +30,18 @@ onTriggered: network_script.running = true

} } Class.TopbarIcon { - id: wifi_strength - property var wifi_strength_data + id: indicator + property var indicator_data font.pixelSize: 9 - text: Icons.network["bar"+wifi_strength_data]+wifi_strength_data + text: + (indicator_data = 100) ? Icons.network.ethernet + : (indicator_data = 404) ? Icons.network.nobar + : (indicator_data > -50) ? Icons.network.bar4 + : (indicator_data > -60) ? Icons.network.bar3 + : (indicator_data > -70) ? Icons.network.bar2 + : (indicator_data > -80) ? Icons.network.bar1 + : Icons.network.bar0 + + } }
M bar/modules/Scale.qmlbar/modules/Scale.qml

@@ -8,13 +8,9 @@ import "../classes" as Class

RowLayout { spacing: 2 - Class.BotSep { - color: Resources.palette.grey -} - Class.BottombarIcon { - text: " "+Size.scale - color: Resources.palette.grey - font.family: font_jetbrains.name + Class.TopbarIcon { + text: (Size.scale == 1.5) ? Icons.modules.size : "" + font.family: font_icon.name anchors.centerIn: parent } }
M bar/scripts/network.shbar/scripts/network.sh

@@ -1,20 +1,15 @@

#!/usr/bin/env bash # Find the first wireless interface -connection_type=$(iw dev | awk '$1=="Interface"{print $2; exit}') #gets network type (wired/wifi) -network_name=$(iw dev $connection_type link | awk -F': ' '/^\s*SSID:/ {print $2}') -signal_strength=$(iw dev $connection_type link | awk '/signal:/ {print $2}') -if [ -n $signal_strength ]; then - case "$signal_strength" in - -50) bars=4;; - -60) bars=3;; - -70) bars=2;; - -80) bars=1;; - *) bars=0;; - esac -echo -n "$bars"+"$network_name" +ethernet_name=$(nmcli device status | grep ethernet | awk '{print $4}' || false) +if [ $ethernet_name ]; then + echo 100 $ethernet_name else - echo -n "disconnected" + wifi_name=$(nmcli device status | grep -m 1 wifi | awk '{print $4}' || false) + if [ $wifi_name ]; then + wifi_device=$(nmcli device status | grep -m 1 wifi | awk '{print $1}') + signal_strength=$(iw dev $wifi_device link | awk '/signal:/ {print $2}') + echo -n "$signal_strength" "$wifi_name" + fi fi -
A bar/scripts/network.sh.old

@@ -0,0 +1,15 @@

+#!/usr/bin/env bash + +# Find the first wireless interface +is_ethernet=$(nmcli device status | grep ethernet && true || false) +connection_type=$(iw dev | awk '$1=="Interface"{print $2; exit}') #gets network type (wired/wifi) +network_name=$(iw dev $connection_type link | awk -F': ' '/^\s*SSID:/ {print $2}') +signal_strength=$(iw dev $connection_type link | awk '/signal:/ {print $2}') +if [ is ethernet ]; then + echo -n 100 ethernet $network_name +else + if [ -n $signal_strength ]; then + echo -n "$signal_strength"+"$network_name" + fi +fi +