This commit is contained in:
coast 2025-10-07 17:23:57 +03:30
parent 5276ee2c16
commit 795585a60b
11 changed files with 151 additions and 6 deletions

33
config/eww/eww.scss Normal file
View file

@ -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;
}

41
config/eww/eww.yuck Normal file
View file

@ -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)
)

3
config/eww/eww_vars.yuck Normal file
View file

@ -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')

View file

@ -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)
)
)

View file

@ -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}"

View file

@ -0,0 +1,8 @@
#!/bin/bash
# Get the month.
month=$(date +"%b")
# Return the month string.
echo "$month"

11
config/eww/scripts/start.sh Executable file
View file

@ -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

View file

@ -0,0 +1,8 @@
#!/bin/bash
# Get the year.
year=$(date +"%Y")
# Output the year.
echo "$year"

View file

@ -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"], ),

View file

@ -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"

View file

@ -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 &