From 5a769eb97ea642cacd788fcead43e909edba46c7 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Fri, 23 Dec 2022 12:27:13 +0100 Subject: [PATCH] Fixed music icon bug --- eww/.config/eww/debug | 2524 --------------------------- eww/.config/eww/eww.yuck | 4 +- eww/.config/eww/scripts/musicstatus | 12 + 3 files changed, 14 insertions(+), 2526 deletions(-) delete mode 100644 eww/.config/eww/debug create mode 100755 eww/.config/eww/scripts/musicstatus diff --git a/eww/.config/eww/debug b/eww/.config/eww/debug deleted file mode 100644 index de72a5f..0000000 --- a/eww/.config/eww/debug +++ /dev/null @@ -1,2524 +0,0 @@ -App { - scope_graph: ScopeGraph { - graph: ScopeGraphInternal { - last_index: ScopeIndex(20308), - scopes: { - ScopeIndex(20297): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20296), - ), - data: { - "data": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20297), - }, - ScopeIndex(20265): Scope { - name: "volume", - ancestor: Some( - ScopeIndex(20264), - ), - data: {}, - listeners: { - "EWW_CMD": [ - Listener { - needed_variables: [ - "EWW_CMD", - ], - f: "function", - }, - Listener { - needed_variables: [ - "EWW_CMD", - ], - f: "function", - }, - ], - "muted-volume": [ - Listener { - needed_variables: [ - "muted-volume", - ], - f: "function", - }, - ], - "volume": [ - Listener { - needed_variables: [ - "volume", - ], - f: "function", - }, - ], - "current-volume": [ - Listener { - needed_variables: [ - "current-volume", - ], - f: "function", - }, - Listener { - needed_variables: [ - "current-volume", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20265), - }, - ScopeIndex(20302): Scope { - name: "for ws = {\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: {}, - node_index: ScopeIndex(20302), - }, - ScopeIndex(20294): Scope { - name: "for ws = {\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: {}, - node_index: ScopeIndex(20294), - }, - ScopeIndex(20299): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20298), - ), - data: { - "data": "{"index": 0, "iscurrent": false, "isempty": false, "name": "1"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20299), - }, - ScopeIndex(20260): Scope { - name: "bar-2", - ancestor: Some( - ScopeIndex(20253), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20260), - }, - ScopeIndex(20253): Scope { - name: "global", - ancestor: None, - data: { - "EWW_TEMPS": "{ "ACPITZ_TEMP1": 27.8,"ACPITZ_TEMP2": 29.8,"CORETEMP_CORE_0": 49,"CORETEMP_CORE_1": 51,"CORETEMP_CORE_2": 46,"CORETEMP_CORE_3": 48,"CORETEMP_PACKAGE_ID_0": 52,"NVME_COMPOSITE_WDS100T3X0C-00SJG0_TEMP1": 51.85 }", - "EWW_CPU": "{ "cores": [{"core": "cpu0", "freq": 2510, "usage": 74},{"core": "cpu1", "freq": 2813, "usage": 72},{"core": "cpu2", "freq": 1185, "usage": 69},{"core": "cpu3", "freq": 3379, "usage": 64}], "avg": 69.81179 }", - "EWW_NET": "{ "virbr0": { "NET_UP": 0, "NET_DOWN": 0 },"enp0s31f6": { "NET_UP": 29945, "NET_DOWN": 55800 },"lo": { "NET_UP": 0, "NET_DOWN": 0 } }", - "workspaces-data": "["{\"index\": 0, \"iscurrent\": false, \"isempty\": false, \"name\": \"1\"}", "{\"index\": 1, \"iscurrent\": true, \"isempty\": false, \"name\": \"2\"}", "{\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", "{\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", "{\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}"]", - "EWW_BATTERY": "", - "current-volume": "30", - "EWW_CONFIG_DIR": "/home/elal/.dotfiles/eww/.config/eww", - "EWW_CMD": ""/usr/bin/eww" --config "/home/elal/.dotfiles/eww/.config/eww"", - "muted-volume": "o", - "time": "1709.13 2022-12-22", - "EWW_DISK": "{ "/": {"name": "/dev/mapper/alpha-lvroot", "total": 933618941952, "free": 391724208128, "used": 541894733824, "used_perc": 58.04239},"/boot": {"name": "/dev/nvme0n1p1", "total": 535805952, "free": 369704960, "used": 166100992, "used_perc": 31.000216},"/srv/nfs": {"name": "192.168.1.17:/volume1/pub8", "total": 17447062470656, "free": 6607216967680, "used": 10839845502976, "used_perc": 62.129913} }", - "EWW_RAM": "{"total_mem": 33590120448, "free_mem": 16591785984, "total_swap": 8589930496, "free_swap": 8589930496, "available_mem": 29888126976, "used_mem": 3701993500, "used_mem_perc": 11.021078}", - "EWW_EXECUTABLE": "/usr/bin/eww", - "volume": "false", - }, - listeners: {}, - node_index: ScopeIndex(20253), - }, - ScopeIndex(20268): Scope { - name: "for ws = {\"index\": 0, \"iscurrent\": true, \"isempty\": false, \"name\": \"1\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 0, "iscurrent": true, "isempty": false, "name": "1"}", - }, - listeners: {}, - node_index: ScopeIndex(20268), - }, - ScopeIndex(20284): Scope { - name: "for ws = {\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: {}, - node_index: ScopeIndex(20284), - }, - ScopeIndex(20255): Scope { - name: "bar", - ancestor: Some( - ScopeIndex(20254), - ), - data: { - "screen": "1", - }, - listeners: {}, - node_index: ScopeIndex(20255), - }, - ScopeIndex(20291): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20290), - ), - data: { - "data": "{"index": 1, "iscurrent": true, "isempty": false, "name": "2"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20291), - }, - ScopeIndex(20307): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20306), - ), - data: { - "data": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20307), - }, - ScopeIndex(20290): Scope { - name: "for ws = {\"index\": 1, \"iscurrent\": true, \"isempty\": false, \"name\": \"2\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 1, "iscurrent": true, "isempty": false, "name": "2"}", - }, - listeners: {}, - node_index: ScopeIndex(20290), - }, - ScopeIndex(20256): Scope { - name: "logo", - ancestor: Some( - ScopeIndex(20255), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20256), - }, - ScopeIndex(20267): Scope { - name: "time", - ancestor: Some( - ScopeIndex(20266), - ), - data: {}, - listeners: { - "time": [ - Listener { - needed_variables: [ - "time", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20267), - }, - ScopeIndex(20306): Scope { - name: "for ws = {\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: {}, - node_index: ScopeIndex(20306), - }, - ScopeIndex(20262): Scope { - name: "logo", - ancestor: Some( - ScopeIndex(20261), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20262), - }, - ScopeIndex(20263): Scope { - name: "workspaces", - ancestor: Some( - ScopeIndex(20261), - ), - data: { - "wsp": "["{\"index\": 0, \"iscurrent\": false, \"isempty\": false, \"name\": \"1\"}", "{\"index\": 1, \"iscurrent\": true, \"isempty\": false, \"name\": \"2\"}", "{\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", "{\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", "{\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}"]", - }, - listeners: { - "wsp": [ - Listener { - needed_variables: [ - "wsp", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20263), - }, - ScopeIndex(20304): Scope { - name: "for ws = {\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: {}, - node_index: ScopeIndex(20304), - }, - ScopeIndex(20301): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20300), - ), - data: { - "data": "{"index": 1, "iscurrent": true, "isempty": false, "name": "2"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20301), - }, - ScopeIndex(20259): Scope { - name: "volume", - ancestor: Some( - ScopeIndex(20258), - ), - data: {}, - listeners: { - "EWW_CMD": [ - Listener { - needed_variables: [ - "EWW_CMD", - ], - f: "function", - }, - Listener { - needed_variables: [ - "EWW_CMD", - ], - f: "function", - }, - ], - "muted-volume": [ - Listener { - needed_variables: [ - "muted-volume", - ], - f: "function", - }, - ], - "current-volume": [ - Listener { - needed_variables: [ - "current-volume", - ], - f: "function", - }, - Listener { - needed_variables: [ - "current-volume", - ], - f: "function", - }, - ], - "volume": [ - Listener { - needed_variables: [ - "volume", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20259), - }, - ScopeIndex(20289): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20288), - ), - data: { - "data": "{"index": 0, "iscurrent": false, "isempty": false, "name": "1"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20289), - }, - ScopeIndex(20254): Scope { - name: "bar-1", - ancestor: Some( - ScopeIndex(20253), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20254), - }, - ScopeIndex(20292): Scope { - name: "for ws = {\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: {}, - node_index: ScopeIndex(20292), - }, - ScopeIndex(20261): Scope { - name: "bar", - ancestor: Some( - ScopeIndex(20260), - ), - data: { - "screen": "2", - }, - listeners: {}, - node_index: ScopeIndex(20261), - }, - ScopeIndex(20264): Scope { - name: "control", - ancestor: Some( - ScopeIndex(20261), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20264), - }, - ScopeIndex(20300): Scope { - name: "for ws = {\"index\": 1, \"iscurrent\": true, \"isempty\": false, \"name\": \"2\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 1, "iscurrent": true, "isempty": false, "name": "2"}", - }, - listeners: {}, - node_index: ScopeIndex(20300), - }, - ScopeIndex(20288): Scope { - name: "for ws = {\"index\": 0, \"iscurrent\": false, \"isempty\": false, \"name\": \"1\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 0, "iscurrent": false, "isempty": false, "name": "1"}", - }, - listeners: {}, - node_index: ScopeIndex(20288), - }, - ScopeIndex(20303): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20302), - ), - data: { - "data": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20303), - }, - ScopeIndex(20266): Scope { - name: "time-thing", - ancestor: Some( - ScopeIndex(20253), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20266), - }, - ScopeIndex(20257): Scope { - name: "workspaces", - ancestor: Some( - ScopeIndex(20255), - ), - data: { - "wsp": "["{\"index\": 0, \"iscurrent\": false, \"isempty\": false, \"name\": \"1\"}", "{\"index\": 1, \"iscurrent\": true, \"isempty\": false, \"name\": \"2\"}", "{\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", "{\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", "{\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}"]", - }, - listeners: { - "wsp": [ - Listener { - needed_variables: [ - "wsp", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20257), - }, - ScopeIndex(20295): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20294), - ), - data: { - "data": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20295), - }, - ScopeIndex(20305): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20304), - ), - data: { - "data": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20305), - }, - ScopeIndex(20276): Scope { - name: "for ws = {\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: {}, - node_index: ScopeIndex(20276), - }, - ScopeIndex(20293): Scope { - name: "workspace", - ancestor: Some( - ScopeIndex(20292), - ), - data: { - "data": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: { - "data": [ - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - Listener { - needed_variables: [ - "data", - ], - f: "function", - }, - ], - }, - node_index: ScopeIndex(20293), - }, - ScopeIndex(20270): Scope { - name: "for ws = {\"index\": 1, \"iscurrent\": false, \"isempty\": false, \"name\": \"2\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 1, "iscurrent": false, "isempty": false, "name": "2"}", - }, - listeners: {}, - node_index: ScopeIndex(20270), - }, - ScopeIndex(20296): Scope { - name: "for ws = {\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: {}, - node_index: ScopeIndex(20296), - }, - ScopeIndex(20272): Scope { - name: "for ws = {\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: {}, - node_index: ScopeIndex(20272), - }, - ScopeIndex(20274): Scope { - name: "for ws = {\"index\": 7, \"iscurrent\": false, \"isempty\": false, \"name\": \"8\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 7, "iscurrent": false, "isempty": false, "name": "8"}", - }, - listeners: {}, - node_index: ScopeIndex(20274), - }, - ScopeIndex(20298): Scope { - name: "for ws = {\"index\": 0, \"iscurrent\": false, \"isempty\": false, \"name\": \"1\"}", - ancestor: Some( - ScopeIndex(20257), - ), - data: { - "ws": "{"index": 0, "iscurrent": false, "isempty": false, "name": "1"}", - }, - listeners: {}, - node_index: ScopeIndex(20298), - }, - ScopeIndex(20282): Scope { - name: "for ws = {\"index\": 2, \"iscurrent\": false, \"isempty\": false, \"name\": \"3\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 2, "iscurrent": false, "isempty": false, "name": "3"}", - }, - listeners: {}, - node_index: ScopeIndex(20282), - }, - ScopeIndex(20280): Scope { - name: "for ws = {\"index\": 1, \"iscurrent\": false, \"isempty\": false, \"name\": \"2\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 1, "iscurrent": false, "isempty": false, "name": "2"}", - }, - listeners: {}, - node_index: ScopeIndex(20280), - }, - ScopeIndex(20278): Scope { - name: "for ws = {\"index\": 0, \"iscurrent\": true, \"isempty\": false, \"name\": \"1\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 0, "iscurrent": true, "isempty": false, "name": "1"}", - }, - listeners: {}, - node_index: ScopeIndex(20278), - }, - ScopeIndex(20286): Scope { - name: "for ws = {\"index\": 8, \"iscurrent\": false, \"isempty\": false, \"name\": \"9\"}", - ancestor: Some( - ScopeIndex(20263), - ), - data: { - "ws": "{"index": 8, "iscurrent": false, "isempty": false, "name": "9"}", - }, - listeners: {}, - node_index: ScopeIndex(20286), - }, - ScopeIndex(20258): Scope { - name: "control", - ancestor: Some( - ScopeIndex(20255), - ), - data: {}, - listeners: {}, - node_index: ScopeIndex(20258), - }, - }, - hierarchy_relations: OneToNElementsMap { - child_to_parent: { - ScopeIndex(20280): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20261): ( - ScopeIndex(20260), - [], - ), - ScopeIndex(20286): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20284): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20301): ( - ScopeIndex(20300), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20300): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20291): ( - ScopeIndex(20290), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20265): ( - ScopeIndex(20264), - [], - ), - ScopeIndex(20272): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20293): ( - ScopeIndex(20292), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20268): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20289): ( - ScopeIndex(20288), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20270): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20295): ( - ScopeIndex(20294), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20306): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20256): ( - ScopeIndex(20255), - [], - ), - ScopeIndex(20264): ( - ScopeIndex(20261), - [], - ), - ScopeIndex(20278): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20257): ( - ScopeIndex(20255), - [ - ProvidedAttr { - attr_name: "wsp", - expression: workspaces-data, - }, - ], - ), - ScopeIndex(20296): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20298): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20258): ( - ScopeIndex(20255), - [], - ), - ScopeIndex(20267): ( - ScopeIndex(20266), - [], - ), - ScopeIndex(20304): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20260): ( - ScopeIndex(20253), - [], - ), - ScopeIndex(20276): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20299): ( - ScopeIndex(20298), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20262): ( - ScopeIndex(20261), - [], - ), - ScopeIndex(20294): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20259): ( - ScopeIndex(20258), - [], - ), - ScopeIndex(20292): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20302): ( - ScopeIndex(20257), - [], - ), - ScopeIndex(20307): ( - ScopeIndex(20306), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20288): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20290): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20255): ( - ScopeIndex(20254), - [], - ), - ScopeIndex(20263): ( - ScopeIndex(20261), - [ - ProvidedAttr { - attr_name: "wsp", - expression: workspaces-data, - }, - ], - ), - ScopeIndex(20266): ( - ScopeIndex(20253), - [], - ), - ScopeIndex(20303): ( - ScopeIndex(20302), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20254): ( - ScopeIndex(20253), - [], - ), - ScopeIndex(20282): ( - ScopeIndex(20263), - [], - ), - ScopeIndex(20297): ( - ScopeIndex(20296), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20305): ( - ScopeIndex(20304), - [ - ProvidedAttr { - attr_name: "data", - expression: ws, - }, - ], - ), - ScopeIndex(20274): ( - ScopeIndex(20257), - [], - ), - }, - parent_to_children: { - ScopeIndex(20276): {}, - ScopeIndex(20274): {}, - ScopeIndex(20270): {}, - ScopeIndex(20257): { - ScopeIndex(20274), - ScopeIndex(20268), - ScopeIndex(20298), - ScopeIndex(20302), - ScopeIndex(20270), - ScopeIndex(20306), - ScopeIndex(20272), - ScopeIndex(20304), - ScopeIndex(20300), - ScopeIndex(20276), - }, - ScopeIndex(20264): { - ScopeIndex(20265), - }, - ScopeIndex(20272): {}, - ScopeIndex(20280): {}, - ScopeIndex(20268): {}, - ScopeIndex(20260): { - ScopeIndex(20261), - }, - ScopeIndex(20282): {}, - ScopeIndex(20304): { - ScopeIndex(20305), - }, - ScopeIndex(20294): { - ScopeIndex(20295), - }, - ScopeIndex(20258): { - ScopeIndex(20259), - }, - ScopeIndex(20284): {}, - ScopeIndex(20302): { - ScopeIndex(20303), - }, - ScopeIndex(20292): { - ScopeIndex(20293), - }, - ScopeIndex(20286): {}, - ScopeIndex(20254): { - ScopeIndex(20255), - }, - ScopeIndex(20253): { - ScopeIndex(20266), - ScopeIndex(20260), - ScopeIndex(20254), - }, - ScopeIndex(20266): { - ScopeIndex(20267), - }, - ScopeIndex(20261): { - ScopeIndex(20264), - ScopeIndex(20263), - ScopeIndex(20262), - }, - ScopeIndex(20288): { - ScopeIndex(20289), - }, - ScopeIndex(20296): { - ScopeIndex(20297), - }, - ScopeIndex(20263): { - ScopeIndex(20290), - ScopeIndex(20288), - ScopeIndex(20296), - ScopeIndex(20280), - ScopeIndex(20286), - ScopeIndex(20294), - ScopeIndex(20292), - ScopeIndex(20278), - ScopeIndex(20282), - ScopeIndex(20284), - }, - ScopeIndex(20290): { - ScopeIndex(20291), - }, - ScopeIndex(20298): { - ScopeIndex(20299), - }, - ScopeIndex(20255): { - ScopeIndex(20256), - ScopeIndex(20257), - ScopeIndex(20258), - }, - ScopeIndex(20300): { - ScopeIndex(20301), - }, - ScopeIndex(20306): { - ScopeIndex(20307), - }, - ScopeIndex(20278): {}, - }, - }, - inheritance_relations: OneToNElementsMap { - child_to_parent: { - ScopeIndex(20260): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20294): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20307): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20293): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20278): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20298): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20280): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20265): ( - ScopeIndex(20253), - Inherits { - references: { - "current-volume", - "muted-volume", - "EWW_CMD", - "volume", - }, - }, - ), - ScopeIndex(20297): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20258): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20290): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20263): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20259): ( - ScopeIndex(20253), - Inherits { - references: { - "muted-volume", - "EWW_CMD", - "current-volume", - "volume", - }, - }, - ), - ScopeIndex(20255): ( - ScopeIndex(20253), - Inherits { - references: { - "workspaces-data", - }, - }, - ), - ScopeIndex(20270): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20284): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20303): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20276): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20266): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20272): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20292): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20299): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20254): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20302): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20295): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20291): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20296): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20256): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20289): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20268): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20305): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20304): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20306): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20262): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20282): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20286): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20264): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20267): ( - ScopeIndex(20253), - Inherits { - references: { - "time", - }, - }, - ), - ScopeIndex(20261): ( - ScopeIndex(20253), - Inherits { - references: { - "workspaces-data", - }, - }, - ), - ScopeIndex(20257): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20288): ( - ScopeIndex(20263), - Inherits { - references: {}, - }, - ), - ScopeIndex(20301): ( - ScopeIndex(20253), - Inherits { - references: {}, - }, - ), - ScopeIndex(20300): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - ScopeIndex(20274): ( - ScopeIndex(20257), - Inherits { - references: {}, - }, - ), - }, - parent_to_children: { - ScopeIndex(20257): { - ScopeIndex(20274), - ScopeIndex(20300), - ScopeIndex(20268), - ScopeIndex(20298), - ScopeIndex(20270), - ScopeIndex(20276), - ScopeIndex(20304), - ScopeIndex(20272), - ScopeIndex(20306), - ScopeIndex(20302), - }, - ScopeIndex(20253): { - ScopeIndex(20299), - ScopeIndex(20259), - ScopeIndex(20262), - ScopeIndex(20264), - ScopeIndex(20297), - ScopeIndex(20303), - ScopeIndex(20267), - ScopeIndex(20265), - ScopeIndex(20295), - ScopeIndex(20293), - ScopeIndex(20305), - ScopeIndex(20254), - ScopeIndex(20258), - ScopeIndex(20257), - ScopeIndex(20261), - ScopeIndex(20260), - ScopeIndex(20266), - ScopeIndex(20255), - ScopeIndex(20301), - ScopeIndex(20263), - ScopeIndex(20256), - ScopeIndex(20289), - ScopeIndex(20291), - ScopeIndex(20307), - }, - ScopeIndex(20263): { - ScopeIndex(20278), - ScopeIndex(20286), - ScopeIndex(20290), - ScopeIndex(20280), - ScopeIndex(20292), - ScopeIndex(20296), - ScopeIndex(20294), - ScopeIndex(20282), - ScopeIndex(20284), - ScopeIndex(20288), - }, - }, - }, - }, - root_index: ScopeIndex(20253), - event_sender: UnboundedSender { - chan: Tx { - inner: Chan { - tx: Tx { - block_tail: 0x00005604e67b3500, - tail_position: 10858, - }, - semaphore: 0, - rx_waker: AtomicWaker, - tx_count: 22, - rx_fields: "...", - }, - }, - }, - }, - eww_config: EwwConfig { - widgets: { - "time": WidgetDefinition { - name: "time", - expected_args: [], - widget: Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 2803..2817, - attrs: {}, - }, - children: [ - Basic( - BasicWidgetUse { - name: "label", - attrs: Attributes { - span: 2808..2817, - attrs: { - "text": AttrEntry { - key_span: 2808..2817, - value: {"${time}"}, - }, - }, - }, - children: [], - span: 2808..2817, - name_span: 2808..2808, - }, - ), - ], - span: 2799..2818, - name_span: 2800..2803, - }, - ), - span: 2776..2819, - args_span: 2792..2794, - }, - "bar": WidgetDefinition { - name: "bar", - expected_args: [ - AttrSpec { - name: "screen", - optional: false, - span: 16..22, - }, - ], - widget: Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 30..255, - attrs: { - "orientation": AttrEntry { - key_span: 31..43, - value: "v", - }, - "vexpand": AttrEntry { - key_span: 55..63, - value: "false", - }, - "hexpand": AttrEntry { - key_span: 79..87, - value: "false", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 104..249, - attrs: { - "orientation": AttrEntry { - key_span: 191..203, - value: "v", - }, - "valign": AttrEntry { - key_span: 137..144, - value: "start", - }, - "space-evenly": AttrEntry { - key_span: 217..230, - value: "false", - }, - "class": AttrEntry { - key_span: 105..111, - value: "segment-start", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "logo", - attrs: Attributes { - span: 248..248, - attrs: {}, - }, - children: [], - span: 243..249, - name_span: 244..248, - }, - ), - ], - span: 100..255, - name_span: 101..104, - }, - ), - Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 264..406, - attrs: { - "space-evenly": AttrEntry { - key_span: 347..360, - value: "false", - }, - "valign": AttrEntry { - key_span: 295..302, - value: "center", - }, - "orientation": AttrEntry { - key_span: 321..333, - value: "v", - }, - "class": AttrEntry { - key_span: 265..271, - value: "segment-mid", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "workspaces", - attrs: Attributes { - span: 384..405, - attrs: { - "wsp": AttrEntry { - key_span: 385..389, - value: workspaces-data, - }, - }, - }, - children: [], - span: 373..406, - name_span: 374..384, - }, - ), - ], - span: 260..412, - name_span: 261..264, - }, - ), - Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 421..536, - attrs: { - "space-evenly": AttrEntry { - key_span: 501..514, - value: "false", - }, - "class": AttrEntry { - key_span: 422..428, - value: "segment-end", - }, - "orientation": AttrEntry { - key_span: 475..487, - value: "v", - }, - "valign": AttrEntry { - key_span: 452..459, - value: "end", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "control", - attrs: Attributes { - span: 535..535, - attrs: {}, - }, - children: [], - span: 527..536, - name_span: 528..535, - }, - ), - ], - span: 417..542, - name_span: 418..421, - }, - ), - ], - span: 26..546, - name_span: 27..30, - }, - ), - span: 0..548, - args_span: 15..23, - }, - "workspaces": WidgetDefinition { - name: "workspaces", - expected_args: [ - AttrSpec { - name: "wsp", - optional: false, - span: 2035..2038, - }, - ], - widget: Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 2046..2166, - attrs: { - "class": AttrEntry { - key_span: 2094..2100, - value: "workspaces", - }, - "space-evenly": AttrEntry { - key_span: 2047..2060, - value: "true", - }, - "spacing": AttrEntry { - key_span: 2066..2074, - value: "4", - }, - "orientation": AttrEntry { - key_span: 2077..2089, - value: "v", - }, - }, - }, - children: [ - Loop( - LoopWidgetUse { - element_name: "ws", - elements_expr: wsp, - elements_expr_span: 2128..2131, - body: Basic( - BasicWidgetUse { - name: "workspace", - attrs: Attributes { - span: 2150..2159, - attrs: { - "data": AttrEntry { - key_span: 2151..2156, - value: ws, - }, - }, - }, - children: [], - span: 2140..2160, - name_span: 2141..2150, - }, - ), - span: 2117..2166, - }, - ), - ], - span: 2042..2167, - name_span: 2043..2046, - }, - ), - span: 2012..2168, - args_span: 2034..2039, - }, - "logo": WidgetDefinition { - name: "logo", - expected_args: [], - widget: Basic( - BasicWidgetUse { - name: "button", - attrs: Attributes { - span: 595..622, - attrs: { - "class": AttrEntry { - key_span: 596..602, - value: "logo", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "label", - attrs: Attributes { - span: 618..622, - attrs: { - "text": AttrEntry { - key_span: 618..622, - value: "Λ", - }, - }, - }, - children: [], - span: 618..622, - name_span: 618..618, - }, - ), - ], - span: 588..629, - name_span: 589..595, - }, - ), - span: 565..630, - args_span: 581..583, - }, - "volume": WidgetDefinition { - name: "volume", - expected_args: [], - widget: Basic( - BasicWidgetUse { - name: "eventbox", - attrs: Attributes { - span: 901..1694, - attrs: { - "onhoverlost": AttrEntry { - key_span: 963..975, - value: {"${EWW_CMD} update volume=false"}, - }, - "onhover": AttrEntry { - key_span: 906..914, - value: {"${EWW_CMD} update volume=true"}, - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 1017..1528, - attrs: { - "orientation": AttrEntry { - key_span: 1025..1037, - value: "v", - }, - "spacing": AttrEntry { - key_span: 1096..1104, - value: "2", - }, - "space-evenly": AttrEntry { - key_span: 1058..1071, - value: "false", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "revealer", - attrs: Attributes { - span: 1124..1518, - attrs: { - "duration": AttrEntry { - key_span: 1194..1203, - value: "450ms", - }, - "transition": AttrEntry { - key_span: 1125..1136, - value: "slideup", - }, - "reveal": AttrEntry { - key_span: 1163..1170, - value: volume, - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "scale", - attrs: Attributes { - span: 1226..1506, - attrs: { - "flipped": AttrEntry { - key_span: 1331..1339, - value: "true", - }, - "max": AttrEntry { - key_span: 1415..1419, - value: "101", - }, - "min": AttrEntry { - key_span: 1440..1444, - value: "0", - }, - "tooltip": AttrEntry { - key_span: 1361..1369, - value: {"Volume: ${current-volume}%"}, - }, - "class": AttrEntry { - key_span: 1228..1234, - value: "volbar", - }, - "onchange": AttrEntry { - key_span: 1463..1472, - value: "amixer -D pulse sset Master {}%", - }, - "value": AttrEntry { - key_span: 1260..1266, - value: current-volume, - }, - "orientation": AttrEntry { - key_span: 1298..1310, - value: "v", - }, - }, - }, - children: [], - span: 1220..1518, - name_span: 1221..1226, - }, - ), - ], - span: 1115..1528, - name_span: 1116..1124, - }, - ), - Basic( - BasicWidgetUse { - name: "button", - attrs: Attributes { - span: 1542..1682, - attrs: { - "onclick": AttrEntry { - key_span: 1545..1553, - value: "amixer -D pulse set Master 1+ toggle", - }, - "class": AttrEntry { - key_span: 1609..1615, - value: "icon volume", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "label", - attrs: Attributes { - span: 1647..1682, - attrs: { - "text": AttrEntry { - key_span: 1647..1682, - value: {((muted-volume != "on") ? "m" : "")}, - }, - }, - }, - children: [], - span: 1647..1682, - name_span: 1647..1647, - }, - ), - ], - span: 1535..1690, - name_span: 1536..1542, - }, - ), - ], - span: 1013..1694, - name_span: 1014..1017, - }, - ), - ], - span: 892..1695, - name_span: 893..901, - }, - ), - span: 869..1696, - args_span: 887..889, - }, - "metric": WidgetDefinition { - name: "metric", - expected_args: [ - AttrSpec { - name: "label", - optional: false, - span: 2464..2469, - }, - AttrSpec { - name: "value", - optional: false, - span: 2470..2475, - }, - AttrSpec { - name: "onchange", - optional: false, - span: 2476..2484, - }, - ], - widget: Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 2492..2590, - attrs: { - "class": AttrEntry { - key_span: 2517..2523, - value: "metric", - }, - "space-evenly": AttrEntry { - key_span: 2540..2553, - value: "false", - }, - "orientation": AttrEntry { - key_span: 2493..2505, - value: "v", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 2568..2589, - attrs: { - "class": AttrEntry { - key_span: 2569..2575, - value: "label", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "label", - attrs: Attributes { - span: 2584..2589, - attrs: { - "text": AttrEntry { - key_span: 2584..2589, - value: {label}, - }, - }, - }, - children: [], - span: 2584..2589, - name_span: 2584..2584, - }, - ), - ], - span: 2564..2590, - name_span: 2565..2568, - }, - ), - Basic( - BasicWidgetUse { - name: "scale", - attrs: Attributes { - span: 2601..2771, - attrs: { - "min": AttrEntry { - key_span: 2602..2606, - value: "0", - }, - "onchange": AttrEntry { - key_span: 2753..2762, - value: onchange, - }, - "max": AttrEntry { - key_span: 2620..2624, - value: "101", - }, - "value": AttrEntry { - key_span: 2707..2713, - value: {((value == "") ? "0" : value)}, - }, - "active": AttrEntry { - key_span: 2671..2678, - value: {(onchange != "")}, - }, - }, - }, - children: [], - span: 2595..2772, - name_span: 2596..2601, - }, - ), - ], - span: 2488..2773, - name_span: 2489..2492, - }, - ), - span: 2445..2774, - args_span: 2463..2485, - }, - "control": WidgetDefinition { - name: "control", - expected_args: [], - widget: Basic( - BasicWidgetUse { - name: "box", - attrs: Attributes { - span: 690..757, - attrs: { - "space-evenly": AttrEntry { - key_span: 708..721, - value: "false", - }, - "class": AttrEntry { - key_span: 691..697, - value: "control", - }, - "orientation": AttrEntry { - key_span: 728..740, - value: "v", - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "volume", - attrs: Attributes { - span: 756..756, - attrs: {}, - }, - children: [], - span: 749..757, - name_span: 750..756, - }, - ), - ], - span: 686..846, - name_span: 687..690, - }, - ), - span: 662..850, - args_span: 681..683, - }, - "workspace": WidgetDefinition { - name: "workspace", - expected_args: [ - AttrSpec { - name: "data", - optional: false, - span: 2212..2216, - }, - ], - widget: Basic( - BasicWidgetUse { - name: "button", - attrs: Attributes { - span: 2228..2377, - attrs: { - "class": AttrEntry { - key_span: 2278..2284, - value: {((data["iscurrent"] == "true") ? "ws ws-active" : "ws ws-inactive")}, - }, - "onclick": AttrEntry { - key_span: 2229..2237, - value: {"wmctrl -s ${data["index"]}"}, - }, - }, - }, - children: [ - Basic( - BasicWidgetUse { - name: "label", - attrs: Attributes { - span: 2360..2377, - attrs: { - "text": AttrEntry { - key_span: 2360..2377, - value: {"${data["name"]}"}, - }, - }, - }, - children: [], - span: 2360..2377, - name_span: 2360..2360, - }, - ), - ], - span: 2221..2390, - name_span: 2222..2228, - }, - ), - span: 2190..2391, - args_span: 2211..2217, - }, - }, - windows: { - "time-thing": WindowDefinition { - name: "time-thing", - geometry: Some( - WindowGeometry { - anchor_point: AnchorPoint { - x: END, - y: START, - }, - offset: CoordsWithUnits(0, 0), - size: CoordsWithUnits(182, 38), - }, - ), - stacking: Foreground, - monitor: Some( - Numeric( - 0, - ), - ), - widget: Basic( - BasicWidgetUse { - name: "time", - attrs: Attributes { - span: 3895..3895, - attrs: {}, - }, - children: [], - span: 3890..3896, - name_span: 3891..3895, - }, - ), - resizable: true, - backend_options: BackendWindowOptions { - wm_ignore: false, - sticky: true, - window_type: Dock, - struts: StrutDefinition { - side: Right, - dist: 0, - }, - }, - }, - "bar-2": WindowDefinition { - name: "bar-2", - geometry: Some( - WindowGeometry { - anchor_point: AnchorPoint { - x: START, - y: CENTER, - }, - offset: CoordsWithUnits(0, 0), - size: CoordsWithUnits(42, 100), - }, - ), - stacking: Foreground, - monitor: Some( - Numeric( - 1, - ), - ), - widget: Basic( - BasicWidgetUse { - name: "bar", - attrs: Attributes { - span: 3554..3564, - attrs: { - "screen": AttrEntry { - key_span: 3555..3562, - value: "2", - }, - }, - }, - children: [], - span: 3550..3565, - name_span: 3551..3554, - }, - ), - resizable: true, - backend_options: BackendWindowOptions { - wm_ignore: false, - sticky: true, - window_type: Dock, - struts: StrutDefinition { - side: Left, - dist: 42, - }, - }, - }, - "bar-1": WindowDefinition { - name: "bar-1", - geometry: Some( - WindowGeometry { - anchor_point: AnchorPoint { - x: START, - y: CENTER, - }, - offset: CoordsWithUnits(0, 0), - size: CoordsWithUnits(42, 100), - }, - ), - stacking: Foreground, - monitor: Some( - Numeric( - 0, - ), - ), - widget: Basic( - BasicWidgetUse { - name: "bar", - attrs: Attributes { - span: 3217..3227, - attrs: { - "screen": AttrEntry { - key_span: 3218..3225, - value: "1", - }, - }, - }, - children: [], - span: 3213..3228, - name_span: 3214..3217, - }, - ), - resizable: true, - backend_options: BackendWindowOptions { - wm_ignore: false, - sticky: true, - window_type: Dock, - struts: StrutDefinition { - side: Left, - dist: 42, - }, - }, - }, - }, - initial_variables: { - "EWW_CONFIG_DIR": "/home/elal/.dotfiles/eww/.config/eww", - "volume": "false", - "EWW_CMD": ""/usr/bin/eww" --config "/home/elal/.dotfiles/eww/.config/eww"", - "EWW_EXECUTABLE": "/usr/bin/eww", - }, - script_vars: { - "workspaces-data": Listen( - ListenScriptVar { - name: "workspaces-data", - command: "scripts/workspace.py", - initial_value: "", - command_span: 2419..2441, - name_span: 2403..2418, - }, - ), - "EWW_TEMPS": Poll( - PollScriptVar { - name: "EWW_TEMPS", - run_while_expr: "true", - command: Function( - 0x00005604e43e28c0, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "EWW_DISK": Poll( - PollScriptVar { - name: "EWW_DISK", - run_while_expr: "true", - command: Function( - 0x00005604e43e06b0, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "EWW_CPU": Poll( - PollScriptVar { - name: "EWW_CPU", - run_while_expr: "true", - command: Function( - 0x00005604e43e24e0, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "muted-volume": Poll( - PollScriptVar { - name: "muted-volume", - run_while_expr: "true", - command: Shell( - 1886..1984, - "amixer -D pulse sget Master | grep -oh -E '[on]' | head -1 | sed -E 's/([|])//g' | tr -d '%'", - ), - initial_value: Some( - "", - ), - interval: 200ms, - name_span: 1855..1867, - }, - ), - "current-volume": Poll( - PollScriptVar { - name: "current-volume", - run_while_expr: "true", - command: Shell( - 1736..1822, - "amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%'", - ), - initial_value: Some( - "", - ), - interval: 1s, - name_span: 1706..1720, - }, - ), - "EWW_NET": Poll( - PollScriptVar { - name: "EWW_NET", - run_while_expr: "true", - command: Function( - 0x00005604e43e2200, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "EWW_BATTERY": Poll( - PollScriptVar { - name: "EWW_BATTERY", - run_while_expr: "true", - command: Function( - 0x00005604e43e0940, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "EWW_RAM": Poll( - PollScriptVar { - name: "EWW_RAM", - run_while_expr: "true", - command: Function( - 0x00005604e43e0320, - ), - initial_value: None, - interval: 2s, - name_span: DUMMY, - }, - ), - "time": Poll( - PollScriptVar { - name: "time", - run_while_expr: "true", - command: Shell( - 2854..2880, - "date '+%H%M.%S %Y-%m-%d'", - ), - initial_value: Some( - "", - ), - interval: 500ms, - name_span: 2829..2833, - }, - ), - }, - run_while_mentions: {}, - }, - open_windows: { - "bar-1": EwwWindow { - name: "bar-1", - scope_index: ScopeIndex(20254), - gtk_window: Window { - inner: ObjectRef { - inner: 0x00005604e6468cf0, - type: GtkWindow, - }, - }, - destroy_event_handler_id: Some( - SignalHandlerId( - 311146, - ), - ), - }, - "bar-2": EwwWindow { - name: "bar-2", - scope_index: ScopeIndex(20260), - gtk_window: Window { - inner: ObjectRef { - inner: 0x00005604e6468510, - type: GtkWindow, - }, - }, - destroy_event_handler_id: Some( - SignalHandlerId( - 311248, - ), - ), - }, - "time-thing": EwwWindow { - name: "time-thing", - scope_index: ScopeIndex(20266), - gtk_window: Window { - inner: ObjectRef { - inner: 0x00005604e6468270, - type: GtkWindow, - }, - }, - destroy_event_handler_id: Some( - SignalHandlerId( - 311286, - ), - ), - }, - }, - failed_windows: {}, - paths: EwwPaths { - log_file: "/home/elal/.cache/eww_7bd7da1877b61659.log", - ipc_socket_file: "/run/user/1000/eww-server_7bd7da1877b61659", - config_dir: "/home/elal/.dotfiles/eww/.config/eww", - }, -} diff --git a/eww/.config/eww/eww.yuck b/eww/.config/eww/eww.yuck index 96bdc63..0a6ac60 100644 --- a/eww/.config/eww/eww.yuck +++ b/eww/.config/eww/eww.yuck @@ -205,7 +205,7 @@ ;; Music widget (defwidget music [] - (revealer :reveal {music-status == "Playing" || music-status == "Paused"} + (revealer :reveal {music-status == "true"} (eventbox :onhover "${EWW_CMD} update music=true" :onhoverlost "${EWW_CMD} update music=false" ;; :onclick "wget ${artUrl} -O /tmp/cover.jpg; sleep 1; notify-send -i /tmp/cover.jpg '${title} - ${artist}' '${songtime}'" @@ -246,7 +246,7 @@ ) ))) -(defpoll music-status :interval "200ms" "playerctl status") +(defpoll music-status :interval "200ms" "scripts/musicstatus") (defpoll artUrl :interval "200ms" "playerctl metadata artUrl") (defpoll title :interval "200ms" "playerctl metadata title") (defpoll artist :interval "200ms" "playerctl metadata artist") diff --git a/eww/.config/eww/scripts/musicstatus b/eww/.config/eww/scripts/musicstatus new file mode 100755 index 0000000..ea23bcc --- /dev/null +++ b/eww/.config/eww/scripts/musicstatus @@ -0,0 +1,12 @@ +#!/usr/bin/bash + +status=$(playerctl status &>/dev/stdout) + +if [[ "$status" == "No players found" ]] +then + echo "false" +else + echo "true" +fi + +