summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.config/quickshell/.editorconfig8
-rw-r--r--.config/quickshell/Bar.qml218
-rw-r--r--.config/quickshell/Battery.qml33
-rw-r--r--.config/quickshell/Brightness.qml18
-rw-r--r--.config/quickshell/Cava.qml20
-rw-r--r--.config/quickshell/Flexoki.qml32
-rw-r--r--.config/quickshell/Song.qml31
-rw-r--r--.config/quickshell/Tags.qml18
-rw-r--r--.config/quickshell/Time.qml15
-rw-r--r--.config/quickshell/Volume.qml22
-rw-r--r--.config/quickshell/Wifi.qml26
-rw-r--r--.config/quickshell/cava.ini8
-rw-r--r--.config/quickshell/shell.qml5
-rw-r--r--.config/s6-rc/default/contents.d/quickshell (renamed from .config/s6-rc/default/contents.d/eww)0
-rwxr-xr-x.config/s6-rc/mpd/run1
-rw-r--r--.config/s6-rc/quickshell-log/consumer-for1
-rw-r--r--.config/s6-rc/quickshell-log/notification-fd1
-rw-r--r--.config/s6-rc/quickshell-log/pipeline-name1
-rwxr-xr-x.config/s6-rc/quickshell-log/run4
-rw-r--r--.config/s6-rc/quickshell-log/type1
-rw-r--r--.config/s6-rc/quickshell/dependencies.d/wayland0
-rwxr-xr-x.config/s6-rc/quickshell/finish3
-rw-r--r--.config/s6-rc/quickshell/producer-for1
-rwxr-xr-x.config/s6-rc/quickshell/run6
-rw-r--r--.config/s6-rc/quickshell/type1
25 files changed, 474 insertions, 0 deletions
diff --git a/.config/quickshell/.editorconfig b/.config/quickshell/.editorconfig
new file mode 100644
index 0000000..e18f182
--- /dev/null
+++ b/.config/quickshell/.editorconfig
@@ -0,0 +1,8 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = tab
+indent_size = 2
diff --git a/.config/quickshell/Bar.qml b/.config/quickshell/Bar.qml
new file mode 100644
index 0000000..b7ec963
--- /dev/null
+++ b/.config/quickshell/Bar.qml
@@ -0,0 +1,218 @@
+import Quickshell
+import Quickshell.Io
+import QtQuick
+import QtQuick.Layouts
+
+Variants {
+ model: Quickshell.screens;
+
+ delegate: Component {
+ PanelWindow {
+ id: root
+
+ required property var modelData
+ screen: modelData
+
+ property string fontFamily: "FiraCode Nerd Font"
+ property int fontSize: 14
+
+ anchors {
+ top: true
+ left: true
+ right: true
+ }
+
+ implicitHeight: 36 + 8
+
+ color: "transparent"
+
+ Rectangle {
+ anchors {
+ fill: parent
+ topMargin: 8
+ leftMargin: 8
+ rightMargin: 8
+ }
+ implicitHeight: 36
+ color: "transparent"
+
+ Rectangle {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ implicitWidth: tags.implicitWidth + 12*2
+ height: parent.height
+ color: Flexoki.bg
+ radius: 18
+
+ RowLayout {
+ id: tags
+ anchors.centerIn: parent
+ implicitHeight: parent.implicitHeight
+ spacing: 6
+
+ Repeater {
+ model: Tags.tags
+
+ delegate: Rectangle {
+ required property bool focused
+ required property bool occupied
+
+ width: 20
+ height: 20
+ radius: 10
+
+ color: {
+ if (focused) {
+ if (occupied) {
+ return Flexoki.re
+ } else {
+ return Flexoki.ui3
+ }
+ } else {
+ return "transparent"
+ }
+ }
+
+ border.width: 2
+ border.color: occupied ? Flexoki.re : Flexoki.ui3
+ }
+ }
+ }
+ }
+
+ RowLayout {
+ anchors.centerIn: parent
+ implicitHeight: parent.implicitHeight
+ spacing: 4
+
+ Rectangle {
+ implicitWidth: song.implicitWidth + 16*2
+ height: parent.height
+ color: Flexoki.bg
+
+ bottomLeftRadius: 18
+ topLeftRadius: 18
+ bottomRightRadius: 4
+ topRightRadius: 4
+
+ Text {
+ id: song
+ anchors.centerIn: parent
+ text: Song.artist + " - " + Song.title
+ color: Flexoki.tx
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+ }
+
+ Rectangle {
+ implicitWidth: cava.implicitWidth + 16*2
+ height: parent.height
+ color: Flexoki.bg
+
+ bottomLeftRadius: 4
+ topLeftRadius: 4
+ bottomRightRadius: 18
+ topRightRadius: 18
+
+ Row {
+ id: cava
+ anchors.centerIn: parent
+ height: 15 + 4
+ spacing: 2
+
+ Repeater {
+ model: 8
+
+ delegate: Rectangle {
+ y: 15 - Cava.heights[index]
+ width: 8
+ height: Cava.heights[index] + 4
+ radius: 4
+ color: Flexoki.tx
+ }
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ implicitWidth: status.implicitWidth + 12*2
+ height: parent.height
+ color: Flexoki.bg
+ radius: 18
+
+ RowLayout {
+ id: status
+ anchors.centerIn: parent
+ implicitHeight: parent.implicitHeight
+ spacing: 24
+
+ Text {
+ text: {
+ //    
+ var icon
+ if (Volume.volume == 0) {
+ icon = " "
+ } else if (Volume.volume < 50) {
+ icon = " "
+ } else {
+ icon = " "
+ }
+ return icon + Volume.volume + "%"
+ }
+ color: Flexoki.re
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+
+ Text {
+ text: Wifi.ssid == "" ? "󰖪 " : "󰖩 " + Wifi.ssid
+ color: Flexoki.or
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+
+ Text {
+ text: " " + Brightness.brightness + "%"
+ color: Flexoki.ye
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+
+ Text {
+ text: {
+ var icon
+ var i = Math.round((Battery.capacity - 1) / 10)
+ switch (Battery.status) {
+ case "Full":
+ icon = "󰂄"
+ break
+ case "Discharging":
+ icon = ["󰁺","󰁻","󰁼","󰁽","󰁾","󰁿","󰂀","󰂁","󰂂","󰁹"][i]
+ break
+ case "Charging":
+ icon = ["󰢜","󰂆","󰂇","󰂈","󰢝","󰂉","󰢞","󰂊","󰂋","󰂅"][i]
+ break
+ }
+ return icon + " " + Battery.capacity + "%"
+ }
+ color: Flexoki.gr
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+
+ Text {
+ text: " " + Time.time
+ color: Flexoki.bl
+ font { family: root.fontFamily; pixelSize: root.fontSize }
+ }
+
+ Text {
+ text: "󰐥"
+ color: Flexoki.pu
+ font { family: root.fontFamily; pixelSize: root.fontSize * 1.5 }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/.config/quickshell/Battery.qml b/.config/quickshell/Battery.qml
new file mode 100644
index 0000000..0d6213c
--- /dev/null
+++ b/.config/quickshell/Battery.qml
@@ -0,0 +1,33 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property string status: "Discharging"
+ property int capacity: 0
+
+ FileView {
+ id: statusFile
+ path: "/sys/class/power_supply/BAT0/status"
+ onLoaded: root.status = this.text().trim()
+ }
+
+ FileView {
+ id: capacityFile
+ path: "/sys/class/power_supply/BAT0/capacity"
+ onLoaded: root.capacity = parseInt(this.text().trim())
+ }
+
+ Timer {
+ interval: 10000
+ running: true
+ repeat: true
+ onTriggered: {
+ statusFile.reload()
+ capacityFile.reload()
+ }
+ }
+}
diff --git a/.config/quickshell/Brightness.qml b/.config/quickshell/Brightness.qml
new file mode 100644
index 0000000..80a8d1f
--- /dev/null
+++ b/.config/quickshell/Brightness.qml
@@ -0,0 +1,18 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property int brightness
+
+ Process {
+ command: ["brightctl", "-l"]
+ running: true
+ stdout: SplitParser {
+ onRead: line => root.brightness = parseInt(line)
+ }
+ }
+}
diff --git a/.config/quickshell/Cava.qml b/.config/quickshell/Cava.qml
new file mode 100644
index 0000000..2067a11
--- /dev/null
+++ b/.config/quickshell/Cava.qml
@@ -0,0 +1,20 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property var heights
+
+ Process {
+ command: ["cava", "-p", "/home/samn/.config/quickshell/cava.ini"]
+ running: true
+ stdout: SplitParser {
+ onRead: line => {
+ root.heights = line.substring(0, line.length - 1).split(';').map(x => parseInt(x))
+ }
+ }
+ }
+}
diff --git a/.config/quickshell/Flexoki.qml b/.config/quickshell/Flexoki.qml
new file mode 100644
index 0000000..1c467b5
--- /dev/null
+++ b/.config/quickshell/Flexoki.qml
@@ -0,0 +1,32 @@
+pragma Singleton
+
+import Quickshell
+
+Singleton {
+ readonly property string bg: "#100F0F"
+ readonly property string bg2: "#1C1B1A"
+ readonly property string ui: "#282726"
+ readonly property string ui2: "#343331"
+ readonly property string ui3: "#403E3C"
+ readonly property string tx3: "#575653"
+ readonly property string tx2: "#878580"
+ readonly property string tx: "#CECDC3"
+
+ readonly property string re: "#D14D41"
+ readonly property string or: "#DA702C"
+ readonly property string ye: "#D0A215"
+ readonly property string gr: "#879A39"
+ readonly property string cy: "#3AA99F"
+ readonly property string bl: "#4385BE"
+ readonly property string pu: "#8B7EC8"
+ readonly property string ma: "#CE5D97"
+
+ readonly property string re2: "#AF3029"
+ readonly property string or2: "#BC5215"
+ readonly property string ye2: "#AD8301"
+ readonly property string gr2: "#66800B"
+ readonly property string cy2: "#24837B"
+ readonly property string bl2: "#205EA6"
+ readonly property string pu2: "#5E409D"
+ readonly property string ma2: "#A02F6F"
+}
diff --git a/.config/quickshell/Song.qml b/.config/quickshell/Song.qml
new file mode 100644
index 0000000..14d7704
--- /dev/null
+++ b/.config/quickshell/Song.qml
@@ -0,0 +1,31 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property string artist
+ property string title
+
+ Process {
+ id: songProc
+ command: ["rmpc", "song"]
+ running: true
+ stdout: StdioCollector {
+ onStreamFinished: {
+ var obj = JSON.parse(this.text);
+ root.artist = obj.metadata.artist
+ root.title = obj.metadata.title
+ }
+ }
+ }
+
+ Timer {
+ interval: 5000
+ running: true
+ repeat: true
+ onTriggered: songProc.running = true
+ }
+}
diff --git a/.config/quickshell/Tags.qml b/.config/quickshell/Tags.qml
new file mode 100644
index 0000000..66aadaa
--- /dev/null
+++ b/.config/quickshell/Tags.qml
@@ -0,0 +1,18 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property var tags: []
+
+ Process {
+ command: ["river-bedload", "-minified", "-watch", "tags"]
+ running: true
+ stdout: SplitParser {
+ onRead: line => root.tags = JSON.parse(line).filter(tag => tag.id < 10)
+ }
+ }
+}
diff --git a/.config/quickshell/Time.qml b/.config/quickshell/Time.qml
new file mode 100644
index 0000000..b54b12f
--- /dev/null
+++ b/.config/quickshell/Time.qml
@@ -0,0 +1,15 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ readonly property string time: Qt.formatDateTime(clock.date, "MMM d hh:mm:ss")
+
+ SystemClock {
+ id: clock
+ precision: SystemClock.Seconds
+ }
+}
diff --git a/.config/quickshell/Volume.qml b/.config/quickshell/Volume.qml
new file mode 100644
index 0000000..875f1c9
--- /dev/null
+++ b/.config/quickshell/Volume.qml
@@ -0,0 +1,22 @@
+pragma Singleton
+
+import QtQuick
+import Quickshell
+import Quickshell.Services.Pipewire
+
+Singleton {
+ id: root
+ property int volume
+
+ PwObjectTracker {
+ objects: [ Pipewire.defaultAudioSink ]
+ }
+
+ Connections {
+ target: Pipewire.defaultAudioSink?.audio
+
+ function onVolumeChanged() {
+ root.volume = Math.round(Pipewire.defaultAudioSink?.audio.volume * 100)
+ }
+ }
+}
diff --git a/.config/quickshell/Wifi.qml b/.config/quickshell/Wifi.qml
new file mode 100644
index 0000000..76ff2b5
--- /dev/null
+++ b/.config/quickshell/Wifi.qml
@@ -0,0 +1,26 @@
+pragma Singleton
+
+import Quickshell
+import Quickshell.Io
+import QtQuick
+
+Singleton {
+ id: root
+ property string ssid
+
+ Process {
+ id: netProc
+ command: ["sh", "-c", "iwctl station wlan0 get-networks | awk -F' ' '/>/ {print $3}'"]
+ running: true
+ stdout: StdioCollector {
+ onStreamFinished: root.ssid = this.text.trim()
+ }
+ }
+
+ Timer {
+ interval: 5000
+ running: true
+ repeat: true
+ onTriggered: netProc.running = true
+ }
+}
diff --git a/.config/quickshell/cava.ini b/.config/quickshell/cava.ini
new file mode 100644
index 0000000..ce42439
--- /dev/null
+++ b/.config/quickshell/cava.ini
@@ -0,0 +1,8 @@
+[general]
+framerate=30
+bars=8
+[output]
+method=raw
+raw_target=/dev/stdout
+data_format=ascii
+ascii_max_range=15
diff --git a/.config/quickshell/shell.qml b/.config/quickshell/shell.qml
new file mode 100644
index 0000000..6bd7760
--- /dev/null
+++ b/.config/quickshell/shell.qml
@@ -0,0 +1,5 @@
+import Quickshell
+
+Scope {
+ Bar {}
+}
diff --git a/.config/s6-rc/default/contents.d/eww b/.config/s6-rc/default/contents.d/quickshell
index e69de29..e69de29 100644
--- a/.config/s6-rc/default/contents.d/eww
+++ b/.config/s6-rc/default/contents.d/quickshell
diff --git a/.config/s6-rc/mpd/run b/.config/s6-rc/mpd/run
index 05142b7..e8b9903 100755
--- a/.config/s6-rc/mpd/run
+++ b/.config/s6-rc/mpd/run
@@ -1,2 +1,3 @@
#!/bin/execlineb -P
+fdmove -c 2 1
mpd --no-daemon --stderr
diff --git a/.config/s6-rc/quickshell-log/consumer-for b/.config/s6-rc/quickshell-log/consumer-for
new file mode 100644
index 0000000..5ca6d9a
--- /dev/null
+++ b/.config/s6-rc/quickshell-log/consumer-for
@@ -0,0 +1 @@
+quickshell
diff --git a/.config/s6-rc/quickshell-log/notification-fd b/.config/s6-rc/quickshell-log/notification-fd
new file mode 100644
index 0000000..00750ed
--- /dev/null
+++ b/.config/s6-rc/quickshell-log/notification-fd
@@ -0,0 +1 @@
+3
diff --git a/.config/s6-rc/quickshell-log/pipeline-name b/.config/s6-rc/quickshell-log/pipeline-name
new file mode 100644
index 0000000..16361a5
--- /dev/null
+++ b/.config/s6-rc/quickshell-log/pipeline-name
@@ -0,0 +1 @@
+quickshell-pipeline
diff --git a/.config/s6-rc/quickshell-log/run b/.config/s6-rc/quickshell-log/run
new file mode 100755
index 0000000..3e483b2
--- /dev/null
+++ b/.config/s6-rc/quickshell-log/run
@@ -0,0 +1,4 @@
+#!/bin/execlineb -P
+importas -i HOME HOME
+exec -c
+s6-log -d3 -- t ${HOME}/.local/state/s6/logs/quickshell
diff --git a/.config/s6-rc/quickshell-log/type b/.config/s6-rc/quickshell-log/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/.config/s6-rc/quickshell-log/type
@@ -0,0 +1 @@
+longrun
diff --git a/.config/s6-rc/quickshell/dependencies.d/wayland b/.config/s6-rc/quickshell/dependencies.d/wayland
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/.config/s6-rc/quickshell/dependencies.d/wayland
diff --git a/.config/s6-rc/quickshell/finish b/.config/s6-rc/quickshell/finish
new file mode 100755
index 0000000..b22f9dc
--- /dev/null
+++ b/.config/s6-rc/quickshell/finish
@@ -0,0 +1,3 @@
+#!/command/execlineb -P
+s6-permafailon 60 10 1-255
+exit
diff --git a/.config/s6-rc/quickshell/producer-for b/.config/s6-rc/quickshell/producer-for
new file mode 100644
index 0000000..b38e57d
--- /dev/null
+++ b/.config/s6-rc/quickshell/producer-for
@@ -0,0 +1 @@
+quickshell-log
diff --git a/.config/s6-rc/quickshell/run b/.config/s6-rc/quickshell/run
new file mode 100755
index 0000000..62ab6b5
--- /dev/null
+++ b/.config/s6-rc/quickshell/run
@@ -0,0 +1,6 @@
+#!/bin/execlineb -P
+redirfd -r 0 /dev/null
+fdmove -c 2 1
+importas -i XDG_RUNTIME_DIR XDG_RUNTIME_DIR
+s6-envdir ${XDG_RUNTIME_DIR}/wl_env
+quickshell
diff --git a/.config/s6-rc/quickshell/type b/.config/s6-rc/quickshell/type
new file mode 100644
index 0000000..5883cff
--- /dev/null
+++ b/.config/s6-rc/quickshell/type
@@ -0,0 +1 @@
+longrun