From 795585a60b8bbaf2c55299fa4a57faeaaed53c45 Mon Sep 17 00:00:00 2001 From: coast Date: Tue, 7 Oct 2025 17:23:57 +0330 Subject: [PATCH] updates --- config/eww/eww.scss | 33 ++++++++++++++++++++++++ config/eww/eww.yuck | 41 ++++++++++++++++++++++++++++++ config/eww/eww_vars.yuck | 3 +++ config/eww/eww_widgets.yuck | 19 ++++++++++++++ config/eww/scripts/day_format.sh | 22 ++++++++++++++++ config/eww/scripts/month_format.sh | 8 ++++++ config/eww/scripts/start.sh | 11 ++++++++ config/eww/scripts/year_format.sh | 8 ++++++ config/qtile/config.py | 6 +++-- local/bin/screenie-wlr | 3 --- local/bin/start_qtile.sh | 3 ++- 11 files changed, 151 insertions(+), 6 deletions(-) create mode 100644 config/eww/eww.scss create mode 100644 config/eww/eww.yuck create mode 100644 config/eww/eww_vars.yuck create mode 100644 config/eww/eww_widgets.yuck create mode 100755 config/eww/scripts/day_format.sh create mode 100755 config/eww/scripts/month_format.sh create mode 100755 config/eww/scripts/start.sh create mode 100755 config/eww/scripts/year_format.sh diff --git a/config/eww/eww.scss b/config/eww/eww.scss new file mode 100644 index 0000000..1e2cb42 --- /dev/null +++ b/config/eww/eww.scss @@ -0,0 +1,33 @@ +* { + all: unset; + background: transparent; + font-family: "Ubuntu Mono"; +} + +window { + background: transparent; +} + +.container { + background-color: #000000; + border-width: 1px; + border-style: solid; + border-color: #ffffff; + color: #ffffff; +} + +.label { + font-size: 24px; + font-weight: bold; +} + +.button-label { + font-size: 24px; + font-weight: bold; +} + +.completelytrans { + background: none; +} + + diff --git a/config/eww/eww.yuck b/config/eww/eww.yuck new file mode 100644 index 0000000..aadab1b --- /dev/null +++ b/config/eww/eww.yuck @@ -0,0 +1,41 @@ +(include "eww_widgets.yuck") + +(defwindow year + :monitor '[0]' + :stacking "bg" + :namespace "eww" + :geometry (geometry + :x "15" + :y "15" + :width "100" + :height "100" + :anchor "top left") + (year) +) + +(defwindow month + :monitor '[0]' + :stacking "bg" + :namespace "eww" + :geometry (geometry + :x "125" + :y "15" + :width "100" + :height "100" + :anchor "top left") + (month) +) + +(defwindow day + :monitor '[0]' + :stacking "bg" + :namespace "eww" + :geometry (geometry + :x "235" + :y "15" + :width "100" + :height "100" + :anchor "top left") + (day) +) + diff --git a/config/eww/eww_vars.yuck b/config/eww/eww_vars.yuck new file mode 100644 index 0000000..fb1b4dd --- /dev/null +++ b/config/eww/eww_vars.yuck @@ -0,0 +1,3 @@ +(defpoll DAY :interval "1s" '~/.config/eww/scripts/day_format.sh') +(defpoll MONTH :interval "1s" '~/.config/eww/scripts/month_format.sh') +(defpoll YEAR :interval "1s" '~/.config/eww/scripts/year_format.sh') diff --git a/config/eww/eww_widgets.yuck b/config/eww/eww_widgets.yuck new file mode 100644 index 0000000..054f49a --- /dev/null +++ b/config/eww/eww_widgets.yuck @@ -0,0 +1,19 @@ +(include "eww_vars.yuck") + +(defwidget day [] + (box :height "100" :width "100" :halign "center" :valign "center" :class "container" + (label :class "label" :text DAY) + ) +) + +(defwidget month [] + (box :height "100" :width "100" :halign "center" :valign "center" :class "container" + (label :class "label" :text MONTH) + ) +) + +(defwidget year [] + (box :height "100" :width "100" :halign "center" :valign "center" :class "container" + (label :class "label" :text YEAR) + ) +) diff --git a/config/eww/scripts/day_format.sh b/config/eww/scripts/day_format.sh new file mode 100755 index 0000000..9474f7f --- /dev/null +++ b/config/eww/scripts/day_format.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Get the day of the month. +day_of_month=$(date +"%d") + +# Remove leading zero from the day of the month +day_of_month=$(echo $day_of_month | sed 's/^0*//') + +# Deduce the correct suffix. +if [[ $day_of_month -ge 11 && $day_of_month -le 13 ]]; then + suffix="th" +else + case $((day_of_month % 10)) in + 1) suffix="st" ;; + 2) suffix="nd" ;; + 3) suffix="rd" ;; + *) suffix="th" ;; + esac +fi + +# Output the formatted day. +echo "${day_of_month}${suffix}" diff --git a/config/eww/scripts/month_format.sh b/config/eww/scripts/month_format.sh new file mode 100755 index 0000000..4b40a26 --- /dev/null +++ b/config/eww/scripts/month_format.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +# Get the month. +month=$(date +"%b") + +# Return the month string. +echo "$month" diff --git a/config/eww/scripts/start.sh b/config/eww/scripts/start.sh new file mode 100755 index 0000000..b3a8f6d --- /dev/null +++ b/config/eww/scripts/start.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Reload/Open eww +eww kill +eww daemon + +# Open widgets for monitor 1 +eww open yearbox +eww open monthbox +eww open daybox +eww open userinfo diff --git a/config/eww/scripts/year_format.sh b/config/eww/scripts/year_format.sh new file mode 100755 index 0000000..9e5bc7a --- /dev/null +++ b/config/eww/scripts/year_format.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +# Get the year. +year=$(date +"%Y") + +# Output the year. +echo "$year" diff --git a/config/qtile/config.py b/config/qtile/config.py index 44dac2b..ca53759 100644 --- a/config/qtile/config.py +++ b/config/qtile/config.py @@ -29,12 +29,13 @@ keys = [ Key([mod], "Return", lazy.spawn(terminal), desc="Launch foot"), Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), Key([mod], "s", lazy.window.kill(), desc="Kill focused window"), - Key([mod], "f", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen on the focused window"), + Key([mod], "w", lazy.window.toggle_fullscreen(), desc="Toggle fullscreen on the focused window"), Key([mod], "space", lazy.window.toggle_floating(), desc="Toggle floating on the focused window"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod, "shift"], "q", lazy.shutdown(), desc="Shutdown Qtile"), Key([mod], "r", lazy.spawn("wmenu-run -f \"Ubuntu Mono Nerd Font 14\" -N #000000 "), desc="Spawn a command using wmenu"), Key([mod], "Print", lazy.spawn("/home/coast/.local/src/local/bin/screenie-wlr")), + Key([mod, "shift"], "Print", lazy.spawn("/usr/bin/grim")), Key([mod], "Left", lazy.window.move_floating(-20, 0)), Key([mod], "Right", lazy.window.move_floating(20, 0)), Key([mod], "Up", lazy.window.move_floating(0, -20)), @@ -45,6 +46,7 @@ keys = [ Key([mod, "shift"], "Down", lazy.window.resize_floating(0, 20)), Key([mod, "shift"], "i", lazy.spawn("pcmanfm")), Key([mod, "shift"], "b", lazy.spawn("firefox-bin")), + Key([mod, "shift"], "v", lazy.spawn("vesktop-bin")), ] for vt in range(1, 8): @@ -94,7 +96,7 @@ extension_defaults = widget_defaults.copy() screens = [ Screen( - top=bar.Bar( + bottom=bar.Bar( [ widget.Prompt(), widget.GroupBox(fontsize = 14.5, font = "Ubuntu Mono Nerd Font", borderwidth = 4, rounded = False, highlight_method = "line", inactive = ["#ffffff"], ), diff --git a/local/bin/screenie-wlr b/local/bin/screenie-wlr index 75507d0..b2967f4 100755 --- a/local/bin/screenie-wlr +++ b/local/bin/screenie-wlr @@ -1,11 +1,8 @@ #!/bin/bash TEMP_FULLSCREEN=$(mktemp /tmp/fullscreen_XXXXXX.png) grim "$TEMP_FULLSCREEN" -mpv --fullscreen --no-border --ontop "$TEMP_FULLSCREEN" & -MPV_PID=$! TEMP_FILE=$(mktemp /tmp/screenshot_XXXXXX.png) grim -g "$(slurp)" "$TEMP_FILE" wl-copy < "$TEMP_FILE" notify-send "Screenshot" "Screenshot taken." -i "$TEMP_FILE" -kill $MPV_PID rm "$TEMP_FILE" "$TEMP_FULLSCREEN" diff --git a/local/bin/start_qtile.sh b/local/bin/start_qtile.sh index e16bd91..131564f 100755 --- a/local/bin/start_qtile.sh +++ b/local/bin/start_qtile.sh @@ -7,5 +7,6 @@ sleep 1 & #swaybg -i /home/coast/.local/src/wall/landscapes/1722895134609554.jpg sleep 1 & #swaybg -i "/home/coast/.local/src/wall/art/508334ldsdl.jpg" -m stretch & -swaybg -i "/home/coast/.local/src/wall/art/1719378313520594.jpg" & +#swaybg -i "/home/coast/.local/src/wall/art/1719378313520594.jpg" & +swaybg -i "/home/coast/.local/src/wall/art/View_of_Cotopaxi_by_Frederic_Edwin_Church_1857.jpg" & /usr/libexec/polkit-gnome-authentication-agent-1 &