added proof-of-concept monocle tabs bar
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"fixed-center": "true",
|
||||
"margin-top": -8,
|
||||
"margin-bottom": 0,
|
||||
"margin-left": 5,
|
||||
"margin-right": 5,
|
||||
"spacing": 0,
|
||||
|
||||
// Load Modules
|
||||
"include": [
|
||||
"~/.config/sdgos/monocle/modules.json"
|
||||
],
|
||||
"modules-left": [
|
||||
"custom/daemon",
|
||||
"custom/window1",
|
||||
"custom/window2",
|
||||
"custom/window3",
|
||||
"custom/window4",
|
||||
"custom/window5",
|
||||
"custom/window6",
|
||||
"custom/window7",
|
||||
"custom/window8",
|
||||
"custom/window9",
|
||||
"custom/window10",
|
||||
|
||||
|
||||
],
|
||||
"modules-center": [
|
||||
],
|
||||
"modules-right": [
|
||||
]
|
||||
}
|
||||
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
INDEX="$1"
|
||||
|
||||
WINDOWTITLE=$(cat ~/.config/monocle.state | grep -e "index:$INDEX" | cut -d'\' -f2)
|
||||
|
||||
echo "$WINDOWTITLE"
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
INDEX="$1"
|
||||
|
||||
ACTIVEMON=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) | .name' -r)
|
||||
echo "activemon is $ACTIVEMON"
|
||||
ACTIVETAG=$(mmsg get tags $ACTIVEMON | jq '.tags[] | select(.is_active == true) | .index' -r)
|
||||
echo "activetag is $ACTIVETAG"
|
||||
|
||||
WINDOWID=$(cat ~/.config/monocle.state | grep -e "index:$INDEX" | cut -d'\' -f3)
|
||||
WINDOWtitle=$(cat ~/.config/monocle.state | grep -e "index:$INDEX" | cut -d'\' -f2)
|
||||
echo "moving window $WINDOWID"
|
||||
|
||||
mmsg dispatch zoom client,$WINDOWID
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
MONITOR=HDMI-A-1
|
||||
|
||||
# get all clients on that monitor: mmsg get all-clients | jq '.clients[] | select( .monitor == "HDMI-A-1") | .id' -r
|
||||
|
||||
ACTIVEMON=$(mmsg get all-monitors | jq '.monitors[] | select(.active == true) | .name' -r)
|
||||
#echo "activemon is $ACTIVEMON"
|
||||
ACTIVETAG=$(mmsg get tags $MONITOR | jq '.tags[] | select(.is_active == true) | .index' -r)
|
||||
#echo "activetag is $ACTIVETAG"
|
||||
ACTIVEWINDOWS=$(mmsg get all-clients | jq -r --arg ACTIVETAG "$ACTIVETAG" --arg ACTIVEMON "$MONITOR" '.clients[] | select(.tags[] == ($ACTIVETAG | tonumber) and .monitor == $ACTIVEMON) | .id')
|
||||
#echo "active windows are:"
|
||||
#echo "----------------------------------------"
|
||||
#echo "$ACTIVEWINDOWS"
|
||||
#echo "----------------------------------------"
|
||||
INDEX=0
|
||||
echo "" > ~/.config/monocle.state
|
||||
|
||||
while read LINE; do
|
||||
ID=$LINE
|
||||
TITLE=$(mmsg get all-clients | jq -r --arg ID "$LINE" '.clients[] | select(.id == ($ID | tonumber)) | .title' )
|
||||
INDEX=$((INDEX+1))
|
||||
echo "index:$INDEX \ $TITLE \ $ID" >> ~/.config/monocle.state
|
||||
|
||||
done <<< "$ACTIVEWINDOWS"
|
||||
|
||||
echo "(running)"
|
||||
@@ -0,0 +1,340 @@
|
||||
|
||||
{
|
||||
|
||||
|
||||
// Test Button
|
||||
"custom/daemon": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "daemon is running, click to refresh",
|
||||
"on-click": "~/.config/sdgos/monocle/indexer.sh",
|
||||
"exec": "~/.config/sdgos/monocle/indexer.sh",
|
||||
"interval": 5
|
||||
|
||||
},
|
||||
|
||||
"custom/window1": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 1: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 1",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 1",
|
||||
"interval": 2.1
|
||||
|
||||
},
|
||||
"custom/window2": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 2: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 2",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 2",
|
||||
"interval": 2.1
|
||||
|
||||
},
|
||||
|
||||
"custom/window3": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 3: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 3",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 3",
|
||||
"interval": 2.1
|
||||
|
||||
},
|
||||
|
||||
"custom/window4": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 4: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 4",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 4",
|
||||
"interval": 2.1
|
||||
|
||||
},
|
||||
|
||||
"custom/window5": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 5: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 5",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 5",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/window6": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 6: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 6",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 6",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/window7": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 7: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 7",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 7",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/window8": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 8: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 8",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 8",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/window9": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 9: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 9",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 9",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/window10": {
|
||||
"tooltip": true,
|
||||
"format":"{text}",
|
||||
"tooltip-format": "window 10: {text}",
|
||||
"on-click": "~/.config/sdgos/monocle/focuswindow.sh 10",
|
||||
"exec": "~/.config/sdgos/monocle/fetchwindow.sh 10",
|
||||
"interval": 1
|
||||
|
||||
},
|
||||
|
||||
"custom/test-button2": {
|
||||
"tooltip": true,
|
||||
"format":"oooh",
|
||||
"tooltip-format": "this is a button",
|
||||
"on-click": "ydotool key 125:1 16:1 125:0 16:0"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-fuzzel": {
|
||||
"tooltip": true,
|
||||
"format":"run",
|
||||
"tooltip-format": "application start menu",
|
||||
"on-click": "fuzzel"
|
||||
|
||||
},
|
||||
"custom/button-term": {
|
||||
"tooltip": true,
|
||||
"format":"shell",
|
||||
"tooltip-format": "launch terminal",
|
||||
"on-click": "alacritty"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-files": {
|
||||
"tooltip": true,
|
||||
"format":"files",
|
||||
"tooltip-format": "launch files",
|
||||
"on-click": "nautilus"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-next": {
|
||||
"tooltip": true,
|
||||
"format":"next",
|
||||
"tooltip-format": "next window",
|
||||
"on-click": "ydotool key 56:1 15:1 56:0 15:0"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-prev": {
|
||||
"tooltip": true,
|
||||
"format": "prev",
|
||||
"tooltip-format": "previous window",
|
||||
"on-click": "ydotool key 56:1 42:1 15:1 56:0 42:0 15:0"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-fit": {
|
||||
"tooltip": true,
|
||||
"format":"fit",
|
||||
"tooltip-format": "fit cluster to viewport",
|
||||
"on-click": "ydotool key 125:1 42:1 50:1 125:0 42:0 50:0"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-zoomin": {
|
||||
"tooltip": true,
|
||||
"format":"+",
|
||||
"tooltip-format": "zoom in",
|
||||
"on-click": "ydotool key 125:1 13:1 125:0 13:0"
|
||||
|
||||
},
|
||||
|
||||
"custom/button-zoomout": {
|
||||
"tooltip": true,
|
||||
"format":"-",
|
||||
"tooltip-format": "zoom out",
|
||||
"on-click": "ydotool key 125:1 12:1 125:0 12:0"
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
// Keyboard State
|
||||
"keyboard-state": {
|
||||
"numlock": true,
|
||||
"capslock": true,
|
||||
"format": "{name} {icon}",
|
||||
"format-icons": {
|
||||
"locked": "",
|
||||
"unlocked": ""
|
||||
}
|
||||
},
|
||||
|
||||
// System tray
|
||||
"tray": {
|
||||
// "icon-size": 21,
|
||||
"spacing": 10
|
||||
},
|
||||
|
||||
// Clock
|
||||
"clock": {
|
||||
// "timezone": "Europe/Amsterdam",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format-alt": "{:%Y-%m-%d}"
|
||||
},
|
||||
|
||||
// System
|
||||
"custom/system": {
|
||||
"format": "",
|
||||
"tooltip": false
|
||||
},
|
||||
|
||||
// CPU
|
||||
"cpu": {
|
||||
"format": "/ C {usage}% ",
|
||||
"on-click": "alacritty -e btop"
|
||||
},
|
||||
|
||||
// Memory
|
||||
"memory": {
|
||||
"format": "/ M {}% ",
|
||||
"on-click": "alacritty -e btop"
|
||||
},
|
||||
|
||||
// Harddisc space used
|
||||
"disk": {
|
||||
"interval": 30,
|
||||
"format": "D {percentage_used}% ",
|
||||
"path": "/",
|
||||
"on-click": "alacritty -e btop"
|
||||
},
|
||||
|
||||
"hyprland/language": {
|
||||
"format": "/ K {short}"
|
||||
},
|
||||
|
||||
// Group Hardware
|
||||
"group/hardware": {
|
||||
"orientation": "inherit",
|
||||
"drawer": {
|
||||
"transition-duration": 300,
|
||||
"children-class": "not-memory",
|
||||
"transition-left-to-right": false
|
||||
},
|
||||
"modules": [
|
||||
"custom/system",
|
||||
"disk",
|
||||
"cpu",
|
||||
"memory",
|
||||
"hyprland/language"
|
||||
]
|
||||
},
|
||||
|
||||
// Network
|
||||
"network": {
|
||||
"format": "{ifname}",
|
||||
"format-wifi": " {essid}({signalStrength}%)",
|
||||
"format-ethernet": " {ifname}",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"tooltip-format": " {ifname} via {gwaddri}",
|
||||
"tooltip-format-wifi": " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\nUp: {bandwidthUpBits} Down: {bandwidthDownBits}",
|
||||
"tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n up: {bandwidthUpBits} down: {bandwidthDownBits}",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"max-length": 50,
|
||||
"on-click": "nm-connection-editor"
|
||||
},
|
||||
|
||||
// Battery
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-charging": " {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": [" ", " ", " ", " ", " "]
|
||||
},
|
||||
|
||||
// Pulseaudio
|
||||
"pulseaudio": {
|
||||
// "scroll-step": 1, // %, can be a float
|
||||
"format": "{icon} {volume}%",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", " ", " "]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
|
||||
// Bluetooth
|
||||
"bluetooth": {
|
||||
"format-disabled": "",
|
||||
"format-off": "",
|
||||
"interval": 30,
|
||||
"on-click": "blueman-manager",
|
||||
"format-no-controller": ""
|
||||
},
|
||||
|
||||
// Other
|
||||
"user": {
|
||||
"format": "{user}",
|
||||
"interval": 60,
|
||||
"icon": false
|
||||
},
|
||||
|
||||
// Idle Inhibator
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"tooltip": true,
|
||||
"format-icons":{
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
},
|
||||
"on-click-right": "hyprlock"
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-weight: bold;
|
||||
min-height: 0;
|
||||
/* set font-size to 100% if font scaling is set to 1.00 using nwg-look */
|
||||
font-size: 97%;
|
||||
font-feature-settings: '"zero", "ss01", "ss02", "ss03", "ss04", "ss05", "cv31"';
|
||||
border: 0px;
|
||||
padding: 2px;
|
||||
background-color: black;
|
||||
animation: gradient_f 20s ease-in infinite;
|
||||
transition: all 0.3s cubic-bezier(.55,-0.68,.48,1.682);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#custom-daemon,
|
||||
#custom-window1,
|
||||
#custom-window2,
|
||||
#custom-window3,
|
||||
#custom-window4,
|
||||
#custom-window5,
|
||||
#custom-window6,
|
||||
#custom-window7,
|
||||
#custom-window8,
|
||||
#custom-window9,
|
||||
#custom-window10,
|
||||
#custom-button-term,
|
||||
#custom-button-files,
|
||||
#custom-button-next,
|
||||
#custom-button-prev,
|
||||
#custom-button-zoomin,
|
||||
#custom-button-zoomout,
|
||||
#custom-button-fit {
|
||||
background-color: #333333;
|
||||
color: white;
|
||||
border: 1px;
|
||||
border-style: solid;
|
||||
border-color: white;
|
||||
border-radius: 10px;
|
||||
padding-top: 4px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-bottom: 4px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user