Introduces eww bar
This commit is contained in:
parent
75bc7eb6a7
commit
e58899e4ae
30 changed files with 279 additions and 1147 deletions
6
.config/eww/widgets/bar/scripts/audio-icons.json
Normal file
6
.config/eww/widgets/bar/scripts/audio-icons.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"alsa_output.pci-0000_08_00.0.iec958-stereo": "",
|
||||
"alsa_output.usb-Razer_Razer_Nari-00.pro-output-1": "",
|
||||
"alsa_output.usb-Razer_Razer_Nari-00.pro-output-0": "",
|
||||
"bluez_output.B4_9A_95_D3_B3_9E.1": " "
|
||||
}
|
||||
5
.config/eww/widgets/bar/scripts/audio.sh
Executable file
5
.config/eww/widgets/bar/scripts/audio.sh
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
cat "$SCRIPT_DIR/audio-icons.json" | jq -r --arg currentSink "$(pactl get-default-sink)" '.[$currentSink]'
|
||||
39
.config/eww/widgets/bar/scripts/clientIcons.json
Normal file
39
.config/eww/widgets/bar/scripts/clientIcons.json
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"firefox|org.mozilla.firefox|librewolf|floorp|mercury-browser|[Cc]achy-browser": "",
|
||||
"kitty|konsole|com.mitchellh.ghostty": "",
|
||||
"kitty-dropterm": "",
|
||||
"Chromium|Thorium": "",
|
||||
"zen": "",
|
||||
"thunar": "",
|
||||
"[Tt]hunderbird|[Tt]hunderbird-esr": "",
|
||||
"eu.betterbird.Betterbird": "",
|
||||
"discord|[Ww]ebcord|Vesktop": "",
|
||||
"subl": "",
|
||||
"mpv": "",
|
||||
"celluloid|Zoom": "",
|
||||
"Cider": "",
|
||||
"virt-manager": "",
|
||||
".virt-manager-wrapped": "",
|
||||
"codeblocks": "",
|
||||
"mousepad": "",
|
||||
"libreoffice-writer": "",
|
||||
"libreoffice-startcenter": "",
|
||||
"com.obsproject.Studio": "",
|
||||
"polkit-gnome-authentication-agent-1": "",
|
||||
"nwg-look": "",
|
||||
"waterfox|waterfox-bin": "",
|
||||
"microsoft-edge": "",
|
||||
"vlc": "",
|
||||
"steam": "",
|
||||
"microsoftteams-nativefier-6234c0": "",
|
||||
"org.remmina.Remmina": "",
|
||||
"com.github.th_ch.youtube_music": "",
|
||||
"feishin": "",
|
||||
"ONLYOFFICE": "",
|
||||
"Beeper": "",
|
||||
"blender": "",
|
||||
"heroic": "",
|
||||
"net.lutris.Lutris": "",
|
||||
"Unity": "",
|
||||
"jetbrains-rider|jetbrains-phpstorm": ""
|
||||
}
|
||||
17
.config/eww/widgets/bar/scripts/workspaces.jq
Normal file
17
.config/eww/widgets/bar/scripts/workspaces.jq
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
$workspaces | map({
|
||||
id: .id,
|
||||
name: .name,
|
||||
activeOnCurrentScreen: .id == $activeWorkspace.id,
|
||||
activeOnAnyScreen: (.id as $workspaceId | any($monitors[]; .activeWorkspace.id == $workspaceId)),
|
||||
windows: (
|
||||
.id as $workspaceId | $clients | map ( select(.workspace.id == $workspaceId) | {
|
||||
class: .class,
|
||||
title: .title,
|
||||
pid: .pid,
|
||||
icon: (
|
||||
.class as $class |
|
||||
($clientIcons | keys | .[] | select(. as $regex | $class | test($regex)) | $clientIcons[.]) // " "
|
||||
)
|
||||
})
|
||||
)
|
||||
}) | sort_by(.id)
|
||||
11
.config/eww/widgets/bar/scripts/workspaces.sh
Executable file
11
.config/eww/widgets/bar/scripts/workspaces.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)
|
||||
|
||||
jq --null-input \
|
||||
--argjson activeWorkspace "$(hyprctl -j activeworkspace)" \
|
||||
--argjson workspaces "$(hyprctl -j workspaces)" \
|
||||
--argjson monitors "$(hyprctl -j monitors)" \
|
||||
--argjson clients "$(hyprctl -j clients)" \
|
||||
--argjson clientIcons "$(cat "$SCRIPT_DIR/clientIcons.json")" \
|
||||
--from-file "$SCRIPT_DIR/workspaces.jq"
|
||||
Loading…
Add table
Add a link
Reference in a new issue