New backup 2025-12-01 09:07:11

This commit is contained in:
Penelope Gwen 2025-12-01 09:07:11 -08:00
parent 29f1591774
commit c2bddc35eb
22 changed files with 63 additions and 133 deletions

View file

@ -76,14 +76,9 @@ $home-widget-border-hover-color: rgba($color5,0.3);
revealer.home {
font-size: 0.95em;
padding-bottom: 25px;
&>box {
// & scrolledwindow, viewport.frame, box.home { //box.home {
// & scrolledwindow>*, viewport.frame, box.home { //box.home {
// border: 3px solid blue;
//
border-radius: 0px 20px 0px 20px;
// }
margin: 3px 10px;
&:first-child {
padding-top: 10px;
@ -197,7 +192,7 @@ revealer.home {
border: 2px solid $home-widget-border-color;
border-radius: $home-widget-border-radius;
background-color: $home-widget-bg-color;
// box-shadow: 0px 0px 9px 0px $home-widget-bg-color;
box-shadow: 0px 0px 9px 0px $home-widget-bg-color;
}
.revealer-title {
background-color: $home-widget-border-color;

View file

@ -21,7 +21,7 @@
:windowtype "normal"
:exclusive false
:geometry (geometry
; :y "27px"
; :y "0px"
; :width "300px"
:height "100%"
:anchor "center left")

View file

@ -9,7 +9,6 @@
; :class "revealer-preview ${(EWW_BATTERY == '' || jq(EWW_BATTERY,'.[].status?','r') == 'Charging') ? 'active' : 'inactive' }"
; :tooltip "${jq(EWW_BATTERY,'.[].capacity?')}%"
; {(EWW_BATTERY == "") ? "" : `${(jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? " ${jq(EWW_BATTERY,'.[].capacity?')}%" : " ${jq(EWW_BATTERY,'.[].capacity?')}%"}`})
:tooltip `${(EWW_BATTERY == "" || jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? "Charging" : "Discharging"}, ${(EWW_BATTERY == "") ? "" : "${round(jq(EWW_BATTERY,'.total_avg?'),1)}% of total average"}`
:text `${(EWW_BATTERY == "" || jq(EWW_BATTERY,'.[].status?') == '"Charging"') ? " " : "󰁹 "}${(EWW_BATTERY == "") ? "" : "${round(jq(EWW_BATTERY,'.[].capacity?'),0)}%"}`)
(battery_children)))
; ${jq(EWW_BATTERY,'.[].capacity?')}%"}

View file

@ -18,5 +18,4 @@
(for device in array
(button :onclick {(device.connected == "yes") ? 'bluetoothctl disconnect "${device.address}"' : 'bluetoothctl connect "${device.address}"'}
:class {(device.connected == "yes") ? "active" : "inactive"}
:tooltip "${device.name}"
"${device.icon}"))))

View file

@ -4,11 +4,8 @@
:orientation "h"
:space-evenly false
(eventbox
; :onhover "${EWW_CMD} update ${revealvar-name}=true"
:onscroll "if test '{}' = 'down';then ${EWW_CMD} update ${revealvar-name}=true;else ${EWW_CMD} update ${revealvar-name}=false;fi"
; :onscroll "/usr/bin/env bash 'if [[]] ${EWW_CMD} update ${revealvar-name}=true'"
:onhover "${EWW_CMD} update ${revealvar-name}=true"
:onhoverlost "${EWW_CMD} update ${revealvar-name}=false"
; :onhoverlost "${EWW_CMD} update ${revealvar-name}=false"
(box
:space-evenly false
(children :nth 0)

View file

@ -6,20 +6,19 @@
:revealvar-name "reveal_scratchpad"
(label
:class "revealer-preview"
:tooltip "${jq(scratchpadArray,'.[] | "\\(.title) (\\(.name)) \\n"','r')}"
:text " ${jq(scratchpadArray,'. | length')} ${reveal_scratchpad ? '' : ''}")
:text " ${reveal_scratchpad ? '' : ''}")
(scratchpad_children :array scratchpadArray)))
(deflisten scratchpadArray :initial "${[{"icon": "/usr/share/icons/breeze-dark/mimetypes/32/unknown.svg", "name": "placeholder", "title": "placeholder", "win_id": "0", "visible": "false"}]}"
(deflisten scratchpadArray :initial "${[{"icon": "/usr/share/icons/breeze-dark/mimetypes/32/unknown.svg", "name": "placeholder", "title": "placeholder", "win_id": "0"}]}"
'scripts/bar/scratchpad')
(defwidget scratchpad_children [array]
(box :orientation "h"
:class "reveal-children"
:space-evenly false
(for entry in array
(button :onclick 'swaymsg [con_id=${entry.win_id}] scratchpad show'
:class "${(entry.visible == 'true') ? 'active' : 'inactive'}"
:tooltip "${entry.name}\n${entry.title}"
(button :onclick 'swaymsg [con_id=${entry.win_id}] focus'
:tooltip "${entry.name}
${entry.title}"
(image :path {entry.icon}
:image-width 20
:image-height 20)

View file

@ -6,8 +6,8 @@
:revealvar-name "reveal_sysdisk"
(box
:class "revealer-preview"
:tooltip "${jq(EWW_DISK,'to_entries[]|"\\(.key) - \\(.value.used_perc*10|round/10)% Used\\n\\(.value.free/1073741824*100|round/100)GiB Available\\n"','r')}"
(metric :label "󰟒 "
:tooltip "home"
:value {EWW_DISK["/home"].used_perc}))
(sysdisk_children)))

View file

@ -6,7 +6,6 @@
:revealvar-name "reveal_sysmem"
(box
:class "revealer-preview"
:tooltip "${jq(EWW_RAM,'.|"RAM: \\(.used_mem_perc*10|round/10)% Used\\n\\(.used_mem/1073741824*100|round/100)/\\(.total_mem/1073741824*100|round/100)GiB Usage\\nSwap: \\((.total_swap-.free_swap)/.total_swap*1000|round/10)% Usage\\n\\((.total_swap-.free_swap)/1073741824*100|round/100)/\\(.total_swap/1073741824*100|round/100)"','r')}"
(metric :label " "
:value {EWW_RAM.used_mem_perc}))
(sysmem_children)))

View file

@ -1,7 +1,6 @@
(defvar homewidgets_reveal false)
(defwidget home []
; (box :height 27)
(revealer
:transition "slideright"
:reveal homewidgets_reveal
@ -10,7 +9,7 @@
(box
:orientation 'v'
:space-evenly false
(box :height 27)
(box :height 30)
(scroll
:vscroll true
:hscroll false
@ -28,22 +27,13 @@
(mcstatus_revealer)
(box
:visible {(jq(workspacesArray, '.[]\|select(.focused==true).num') <= 20) && (jq(workspacesArray, '.[]\|select(.focused==true).num') >= 11)}
(software_revealer)
)
(software_revealer))
(box
:visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 9}
(notes_revealer)
)
(notes_revealer))
(box
:visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 9}
(reminders_revealer)
)
)
)
;(box :height 10)
)
)
)
(reminders_revealer))))) ) )
;widget templates
(include "modules/home/revealer-on-press.yuck")

View file

@ -28,16 +28,14 @@
:onclick "hass-cli -a services -I area_id -i left_bedroom -d light -s toggle"
(label
:justify "center"
:text "󱣝"
:tooltip "Turn on bedroom lights"))
:text "󱣝"))
(button
:width 60
:height 60
:onclick "librewolf-profile Penelope 'https://hass.pogmom.me'"
(label
:justify "center"
:text "󰟐"
:tooltip "Home Assistant")))
:text "󰟐")))
(box
:visible {jq(workspacesArray, '.[]\|select(.focused==true).num') <= 10}
:orientation "h"
@ -49,24 +47,21 @@
:onclick "librewolf-profile Penelope 'https://cloud.pogmom.me'"
(label
:justify "center"
:text ""
:tooltip "Nextcloud"))
:text ""))
(button
:width 60
:height 60
:onclick "librewolf-profile Penelope 'https://masto.pogmom.me'"
(label
:justify "center"
:text "󰫑"
:tooltip "Mastodon"))
:text "󰫑"))
(button
:width 60
:height 60
:onclick "librewolf-profile Penelope 'https://watch.pogmom.me'"
(label
:justify "center"
:text ""
:tooltip "Jellyfin")))
:text "")))
(box
:visible {(jq(workspacesArray, '.[]\|select(.focused==true).num') <= 20) && (jq(workspacesArray, '.[]\|select(.focused==true).num') >= 11)}
:orientation "h"
@ -79,8 +74,7 @@
:tooltip "smb://server-hp-y2z63av"
(label
:justify "center"
:text "󰡰"
:tooltip "Media Server SMB"))
:text "󰡰"))
(button
:width 60
:height 60

View file

@ -6,7 +6,7 @@ declare -A icons=(
jq_get_windows='
# descend to workspace or scratchpad
.nodes[].nodes[]
.nodes[0].nodes[0]
# save workspace name as .w
| {"w": .name} + (
if (.nodes|length) > 0 then # workspace
@ -17,9 +17,7 @@ jq_get_windows='
+ .floating_nodes
| .[]
# select nodes with no children (windows)
# | select(.nodes==[])
# | select(.scratchpad!="none")
| select(.scratchpad_state=="fresh")
| select(.nodes==[])
)'
jq_windows_to_tsv='
@ -30,8 +28,7 @@ jq_windows_to_tsv='
# get app name (or window class if xwayland)
(.app_id // .window_properties.class),
(.name),
(.pid),
(.visible)
(.pid)
]
| @tsv'
@ -43,8 +40,6 @@ get_hardcoded_icon() {
get_desktop() {
app="$1"
p="/usr/share/applications"
flist=("/var/lib/flatpak/exports/share/applications" "${HOME}/.local/share/flatpak/exports/share/applications")
[[ "$verbose" ]] && echo "searching for '$app'" >&2
# fast and easy cases first:
for prefix in "" org.kde. org.gnome. org.freedesktop.; do
@ -65,6 +60,7 @@ get_desktop() {
return
}
done
# this is fairly reliable but slow:
# look for a .desktop file with Exec=$app eg
# gnome-disks (but exclude gnome-disk-image-writer.desktop)
@ -78,17 +74,6 @@ get_desktop() {
return
}
for f in ${flist[@]};do
[[ "$verbose" ]] && echo "using '$GREP' to search in '${f}'" >&2
d=$( $GREP -il "^startupwmclass=$app.*$" ${f}/* | head -n 1)
[[ "$verbose" ]] && echo "found '$d'" >&2
[[ -r "$d" ]] && {
echo "$d"
[[ "$verbose" ]] && echo "found '$d'" >&2
return
}
done
# desperation - weird apps like com.github.wwmm.pulseeffects.desktop!!
# shellcheck disable=SC2012
d=$( ls "$p/"*".$app.desktop" 2>/dev/null | head -n 1 )
@ -126,24 +111,15 @@ get_icon() {
}
[[ "$icon_name" ]] && {
icon_locations=(
/usr/share/icons/hicolor/scalable/apps
/usr/share/icons/hicolor/48x48/apps
/usr/share/icons/gnome/48x48/apps
/usr/share/icons/gnome/48x48/devices
/usr/share/pixmaps
/var/lib/flatpak/exports/share/icons/hicolor/scalable/apps
/var/lib/flatpak/exports/share/icons/hicolor/48x48/apps
"${HOME}/.local/share/flatpak/exports/share/icons/hicolor/scalable/apps"
"${HOME}/.local/share/flatpak/exports/share/icons/hicolor/48x48/apps"
# icons/hicolor/scalable/apps
# icons/hicolor/48x48/apps
# icons/gnome/48x48/apps
# icons/gnome/48x48/devices
# pixmaps
icons/hicolor/scalable/apps
icons/hicolor/48x48/apps
icons/gnome/48x48/apps
icons/gnome/48x48/devices
pixmaps
)
for d in "${icon_locations[@]}"; do
for s in .svg .png .xpm ""; do
icon=$d/$icon_name$s
icon=/usr/share/$d/$icon_name$s
[[ -r $icon ]] && {
echo "$icon"
[[ "$verbose" ]] && echo "using .desktop icon '$icon'" >&2
@ -159,7 +135,6 @@ get_icon() {
}
}
}
[[ "$verbose" ]] && echo "searching for '$app' icon" >&2
icon=$( find /usr/share/icons /usr/share/pixmaps | grep -E -i "/$app.(png|svg)" | head -n 1 )
[[ "$icon" && -r "$icon" ]] && {
echo "$icon"
@ -178,13 +153,12 @@ function get_scratchpad() {
shopt -s lastpipe
swaymsg -t get_tree |
jq -r "$jq_get_windows | $jq_windows_to_tsv" |
column -s $'\t' -o $'\t' -t | while IFS=$'\t' read -r win_id ws_name app_name win_title pid visible; do
column -s $'\t' -o $'\t' -t | while IFS=$'\t' read -r win_id ws_name app_name win_title pid; do
shopt -s extglob
app_name="${app_name%%*( )}"
icon=$( get_icon "$app_name" "$pid" )
visible=${visible}
[[ "$verbose" ]] && printf "[%s]=%s\n" "$app_name" "$icon" >&2
applist_array_item=$(jq -n --arg icon "${icon}" --arg name "${app_name##*.}" --arg title "${win_title}" --arg win_id "${win_id}" --arg visible "${visible}" '{icon: $icon,name: $name,title: $title,win_id: $win_id,visible: $visible}')
applist_array_item=$(jq -n --arg icon "${icon}" --arg name "${app_name##*.}" --arg title "${win_title}" --arg win_id "${win_id}" '{icon: $icon,name: $name,title: $title,win_id: $win_id}')
applist_array+=("${applist_array_item}")
done
applist=$(printf '%s\n' "${applist_array[@]}" | jq -s .)

View file

@ -1,5 +1,5 @@
.powermenu {
margin: 0px 5px;
$module-color: mix($color0, $color5, 50%);
$module-color: mix($color9, $color5, 50%);
@import "./styles/revealer.scss"
}

View file

@ -11,9 +11,6 @@
min-width: $bar-module-width;
transition: all 0.3s;
background-color: rgba($bar-bg-color,0.5);
& image {
opacity: 0.3;
}
&:hover {
background: linear-gradient(rgba($bar-bg-color,0.5) 15%, rgba($module-color,0.5));
}
@ -22,9 +19,6 @@
&:hover {
background: linear-gradient(mix(rgba($bar-bg-color,0.5), rgba($module-color,0.5)) 15%, rgba($bar-bg-color,0.5));
}
& image {
opacity: 1;
}
}
&.inactive {
background-color: rgba($bar-bg-color,0.3);
@ -32,9 +26,6 @@
&:hover {
background: linear-gradient(rgba($bar-bg-color,0.3) 15%, rgba($module-color,0.3));
}
// & image {
// opacity: 0.3;
// }
}
}
.revealer-preview {

View file

@ -172,10 +172,10 @@ SetEditor=false
1920x1200 screen: Width=623
2 screens: Height=1119
2 screens: Width=490
2048x1280 screen: Height=592
2048x1280 screen: Width=574
3 screens: Height=815
3 screens: Width=1296
2048x1280 screen: Height=1199
2048x1280 screen: Width=2024
3 screens: Height=659
3 screens: Width=1160
[filetree]
editShade=183,220,246

View file

@ -30,7 +30,7 @@ Sort directories first=true
Sort hidden files last=false
Sort reversed=false
Speedbar Width=144
View Style=Simple
View Style=Detail
[KShortcutsDialog Settings]
Dialog Size=600,480

View file

@ -1 +0,0 @@
72299e7f-1873-4b33-b55f-ee2e0cdb6125

View file

@ -1 +0,0 @@
791fc48c-6c74-4961-88bc-2ad08bbf072c

View file

@ -1 +0,0 @@
fc10d4fc-185a-41f5-a69a-14554e7d4985

View file

@ -1 +0,0 @@
2a1d201b-fb0d-4228-8cad-9e2f4e41ca09

View file

@ -1 +0,0 @@
c51bc637-5565-45d1-925a-6897d108daf7

View file

@ -1 +0,0 @@
a39e85f1-be66-4e3e-ab2e-d1b9e1fdb45c

View file

@ -1 +0,0 @@
0fdb1bfc-88d2-43d1-98bc-24ec13994dc3