refactore directory structure
This commit is contained in:
parent
3830eef1f4
commit
e87bfb7c39
485 changed files with 66 additions and 1696 deletions
40
.config/eww/scripts/appname
Executable file
40
.config/eww/scripts/appname
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#define icons for workspaces 1-9
|
||||
#icontheme=$(geticons -U)
|
||||
icontheme=$(grep "gtk-icon-theme-name" "$HOME"/.config/gtk-3.0/settings.ini | cut --delimiter="=" -f 2)
|
||||
|
||||
workspaces() {
|
||||
# if [[ ${1:0:12} == "activewindowv2" ]]; then
|
||||
# fi
|
||||
|
||||
if [[ ${1:0:12} == "activewindow" ]]; then #set focused workspace
|
||||
line=$(hyprctl activewindow | rg Window | cut -f 4- -d ' ' | sed 's/://')
|
||||
class=$(hyprctl activewindow | rg "class:" | awk '{print $2}')
|
||||
export iconpath=$(geticons "$class" -s 32 -c 1 -t "$icontheme" | head -n 1)
|
||||
export title=$line
|
||||
fi
|
||||
}
|
||||
|
||||
module() {
|
||||
#output eww widget
|
||||
echo "(box \
|
||||
:orientation \"h\" \
|
||||
:halign \"start\" \
|
||||
:valign \"center\" \
|
||||
:space-evenly false \
|
||||
(image \
|
||||
:class \"app-icon\" \
|
||||
:path \"$iconpath\" \
|
||||
:image-width \"18\") \
|
||||
(label \
|
||||
:class \"app-name\" \
|
||||
:limit-width \"45\" \
|
||||
:text \"$title\" \
|
||||
:tooltip \"$title\"))"
|
||||
}
|
||||
|
||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||
workspaces "$event"
|
||||
module
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue