initial commit x2

This commit is contained in:
sophron
2025-06-23 00:47:36 +05:00
commit f2f225110a
193 changed files with 4737 additions and 0 deletions

68
old_rach/eww/eww.scss Normal file
View File

@@ -0,0 +1,68 @@
$bg: #282828;
$fg: #ebdbb2;
$bg2: #373633;
$fg2: #32302f;
* {
font-family: JetBrains Mono NF;
font-size: 14;
font-weight: 700;
}
.bar {
border: 2px solid $fg2;
border-radius: 12px;
}
.ws-number-class {
font-weight: 900;
margin: 0px 5px 0px 10px;
background: $bg2;
padding: 3px 5px 3px 5px;
border-radius: 6px;
}
.ws-title-class {
margin: 0px 5px;
padding: 3px 5px 3px 5px;
border-radius: 6px;
}
.right1 {
margin: 0px 10px;
}
.date-class {
background: $fg;
color: $bg;
padding: 3px 5px;
border-radius: 6px;
}
.volume-class {
background: $bg2;
margin: 0px 8px 0px 0px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
}
.language-class {
background: $bg2;
padding: 0px 10px 0px 5px;
border-top-left-radius: 6px;
border-bottom-left-radius: 6px;
}
.uptime-class {
margin: 0px 10px;
}
.music {
background: $bg2;
padding: 3px 3px;
border-radius: 6px;
}

66
old_rach/eww/eww.yuck Normal file
View File

@@ -0,0 +1,66 @@
(defpoll WS :interval "0.1s" "/home/fox/.config/eww/workspace-number.sh")
(defpoll WST :interval "0.1s" "/home/fox/.config/eww/workspace-title.sh")
(defpoll DATE :interval "40s" "date +'%H:%M'")
(defpoll VOL :interval "0.1s" "/home/fox/.config/eww/volume.sh")
(defpoll LGN :interval "0.1s" "/home/fox/.config/eww/language.sh")
(defpoll UPT :interval "3600s" "/home/fox/.config/eww/uptime.sh")
(defpoll MS :interval "0.1s" "/home/fox/.config/eww/music.sh")
(defwindow bar
:monitor 0
:geometry (geometry :x "0"
:y "7"
:width "850"
:height "45"
:anchor "bottom center")
:stacking "fg"
:exclusive true
:windowtype "dock"
:wm-ignore false
(box (left)
(center)
(right)))
(defwidget left []
(box :orientation "h"
:valign "center"
:space-evenly "false"
(box :halign "center"
:orientation "v"
(label :class "ws-number-class"
:text WS))
(box :halign "start"
:orientation "v"
(label :class "ws-title-class"
:text WST))))
(defwidget center []
(box :orientation "h"
:halign "center"
:valign "center"
:class "music"
MS))
(defwidget right []
(box :orientation "h"
:halign "end"
:valign "center"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
:class "right1"
(box :orientation "h" :class "upt"
(label :class "uptime-class"
:text UPT))
(box (label :class "language-class"
:text LGN))
(box (label :class "volume-class"
:text VOL))
(box (label :class "date-class"
:text DATE))))

7
old_rach/eww/language.sh Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
if hyprctl devices | grep -q "active keymap: Russian"; then
echo "ru"
else
echo "en"
fi

15
old_rach/eww/music.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
music=$(playerctl metadata --format "{{title}}" 2>/dev/null)
max_length=15
if [ -z "$music" ]; then
echo ":: No playing ::"
else
if [ ${#music} -gt $max_length ]; then
echo "${music:0:$max_length}..."
else
echo "$music"
fi
fi

3
old_rach/eww/uptime.sh Executable file
View File

@@ -0,0 +1,3 @@
command=$(uptime | awk '{print $3}')
echo "$command"

4
old_rach/eww/volume.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
vol=$(pamixer --get-volume)
echo "$vol "

View File

@@ -0,0 +1,5 @@
#!/bin/bash
current_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -n1)
#echo "Workspace $current_ws"
echo "$current_ws"

25
old_rach/eww/workspace-title.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
current_tl=$(hyprctl activewindow | grep -A1 "title" | tail -n1 | awk '{$1=""; print substr($0, 2)}')
air=""
if [[ $current_tl != $air ]]; then
case $current_tl in
zen)
echo " Browser"
;;
kitty)
echo " Terminal"
;;
org.telegram.desktop)
echo " Telegram"
;;
obsidian)
echo " Obsidian"
;;
*)
echo "$current_tl"
;;
esac
else
echo "󰇄 Desktop"
fi

47
old_rach/eww/ws.sh Executable file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
#c_ws=$( hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -1)
#l_ws=""
#while true; do
# if [[ "$c_ws" != "$l_ws" ]]; then
# echo $c_ws
# l_ws=$c_ws
# fi
#done
#prev_value_ws=""
#while true; do
# current_value_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -1)
# if [[ "$current_value_ws" != "$prev_value_ws" ]]; then
# echo "$current_value_ws"
# prev_value_ws="$current_value_ws"
# fi
#done
#prev_value_tl=""
#while true; do
# current_value_tl=$(hyprctl activewindow | grep title | awk 'NR == 2' | awk '{print $2}')
# if [[ "$current_value_tl" != "$prev_value_tl" ]]; then
# echo "$current_value_tl"
# prev_value_ws="$current_value_tl"
# fi
#done
prev_ws=""
prev_tl=""
output_file="/home/fox/.cache/waybar_output"
while true; do
current_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -n1)
current_tl=$(hyprctl activewindow | grep -A1 "title" | tail -n1 | awk '{$1=""; print substr($0, 2)}')
if [[ "$current_ws" != "$prev_ws" || "$current_tl" != "$prev_tl" ]]; then
echo "$current_ws"
echo "$current_tl"
prev_ws="$current_ws"
prev_tl="$current_tl"
fi
sleep 0.1
done