mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-06-08 00:33:43 +02:00
feat: formatter
This commit is contained in:
parent
bf9e720177
commit
9cca7e76c2
3 changed files with 359 additions and 319 deletions
|
@ -4,15 +4,15 @@
|
||||||
|
|
||||||
@import "./assets/scss/windows/vbar.scss";
|
@import "./assets/scss/windows/vbar.scss";
|
||||||
|
|
||||||
@import "./assets/src/control-panel/styles.scss";
|
@import "./src/control-panel/styles.scss";
|
||||||
|
|
||||||
@import "./assets/src/dashboard/styles.scss";
|
@import "./src/dashboard/styles.scss";
|
||||||
|
|
||||||
@import "./assets/src/dock/styles.scss";
|
@import "./src/dock/styles.scss";
|
||||||
|
|
||||||
@import "./assets/src/desktop/styles.scss";
|
@import "./src/desktop/styles.scss";
|
||||||
|
|
||||||
@import "./assets/src/notification/styles.scss";
|
@import "./src/notification/styles.scss";
|
||||||
|
|
||||||
* {
|
* {
|
||||||
all: unset;
|
all: unset;
|
||||||
|
|
|
@ -1 +1,41 @@
|
||||||
echo "Shit"
|
#!/bin/bash
|
||||||
|
|
||||||
|
WATCH_DIR="$(pwd)"
|
||||||
|
|
||||||
|
if [ -z "$WATCH_DIR" ]; then
|
||||||
|
echo "Usage: $0 <directory>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$WATCH_DIR" ]; then
|
||||||
|
echo "Directory $WATCH_DIR does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
format_file() {
|
||||||
|
local file="$1"
|
||||||
|
echo "Formatting $file"
|
||||||
|
vim -E -s "$file" <<EOF
|
||||||
|
:source /path/to/your/yuck.vim
|
||||||
|
:filetype plugin indent on
|
||||||
|
:set filetype=yuck
|
||||||
|
:normal gg=G
|
||||||
|
:wq
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
last_run=0
|
||||||
|
|
||||||
|
inotifywait -m -r -e modify,create,delete,move --format '%w%f' "$WATCH_DIR" | while read -r file; do
|
||||||
|
if [[ "$file" == *.yuck ]]; then
|
||||||
|
current_time=$(date +%s%N | cut -b1-13)
|
||||||
|
|
||||||
|
if ((current_time - last_run > 500)); then
|
||||||
|
sleep 0.1
|
||||||
|
if [ -e "$file" ]; then
|
||||||
|
format_file $file
|
||||||
|
fi
|
||||||
|
last_run=$current_time
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
(playerctl)
|
(playerctl)
|
||||||
))
|
))
|
||||||
|
|
||||||
(defwidget bottom []
|
(defwidget bottom []
|
||||||
(box
|
(box
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
; (battery)
|
; (battery)
|
||||||
))
|
))
|
||||||
|
|
||||||
(defwidget workspaces []
|
(defwidget workspaces []
|
||||||
(eventbox
|
(eventbox
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
:onscroll "./scripts/workspace/set-active {} ${current_workspace}"
|
:onscroll "./scripts/workspace/set-active {} ${current_workspace}"
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
(defwidget home []
|
(defwidget home []
|
||||||
(box
|
(box
|
||||||
:class "widget"
|
:class "widget"
|
||||||
:hexpand false
|
:hexpand false
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
(label :text "" :halign "center" :class "launchicon" :style "padding: 2px 0px;"))))
|
(label :text "" :halign "center" :class "launchicon" :style "padding: 2px 0px;"))))
|
||||||
|
|
||||||
(defwidget systemtray []
|
(defwidget systemtray []
|
||||||
(box
|
(box
|
||||||
:class "widget"
|
:class "widget"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
))
|
))
|
||||||
))
|
))
|
||||||
|
|
||||||
(defwidget clock []
|
(defwidget clock []
|
||||||
(eventbox
|
(eventbox
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
:onclick "${EWW_CMD} open calendar --toggle"
|
:onclick "${EWW_CMD} open calendar --toggle"
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
(label :text tmin)
|
(label :text tmin)
|
||||||
(label :text tpm))))
|
(label :text tpm))))
|
||||||
|
|
||||||
(defwidget battery []
|
(defwidget battery []
|
||||||
(box
|
(box
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
:text ""))
|
:text ""))
|
||||||
(label :text "${EWW_BATTERY.BAT0.capacity}%" :limit-width 3 :show-truncated false)))
|
(label :text "${EWW_BATTERY.BAT0.capacity}%" :limit-width 3 :show-truncated false)))
|
||||||
|
|
||||||
(defwidget hiddenctl []
|
(defwidget hiddenctl []
|
||||||
(eventbox
|
(eventbox
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
:onclick {reveal3 ? "${EWW_CMD} update reveal3=false" : "${EWW_CMD} update reveal3=true"}
|
:onclick {reveal3 ? "${EWW_CMD} update reveal3=false" : "${EWW_CMD} update reveal3=true"}
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
;; (tasklist)))))
|
;; (tasklist)))))
|
||||||
))))
|
))))
|
||||||
|
|
||||||
(defwidget playerctl []
|
(defwidget playerctl []
|
||||||
(eventbox
|
(eventbox
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
(box
|
(box
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
(label :class "picon" :text ""))
|
(label :class "picon" :text ""))
|
||||||
)))
|
)))
|
||||||
|
|
||||||
(defwidget sliders []
|
(defwidget sliders []
|
||||||
(box
|
(box
|
||||||
:class "widget"
|
:class "widget"
|
||||||
:orientation "v"
|
:orientation "v"
|
||||||
|
@ -271,8 +271,8 @@
|
||||||
:flipped true))
|
:flipped true))
|
||||||
))
|
))
|
||||||
|
|
||||||
;; other windows
|
;; other windows
|
||||||
(defwindow calendar
|
(defwindow calendar
|
||||||
:geometry (geometry :x "0"
|
:geometry (geometry :x "0"
|
||||||
:y "0"
|
:y "0"
|
||||||
:width "100"
|
:width "100"
|
||||||
|
@ -286,7 +286,7 @@
|
||||||
:class "unbarwidget"
|
:class "unbarwidget"
|
||||||
(calendar :day calendar_day :year calendar_year :class "cal"))))
|
(calendar :day calendar_day :year calendar_year :class "cal"))))
|
||||||
|
|
||||||
(defwindow music
|
(defwindow music
|
||||||
:geometry (geometry :x "0"
|
:geometry (geometry :x "0"
|
||||||
:y "0"
|
:y "0"
|
||||||
:width "440"
|
:width "440"
|
||||||
|
|
Loading…
Add table
Reference in a new issue