init
This commit is contained in:
BIN
home/desktop/eww_config/avatar.png
Normal file
BIN
home/desktop/eww_config/avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
62
home/desktop/eww_config/eww.scss
Normal file
62
home/desktop/eww_config/eww.scss
Normal file
@@ -0,0 +1,62 @@
|
||||
// переменные цветов
|
||||
$bg: #1a1a1a;
|
||||
$fg: #fcfcfc;
|
||||
$border: #000000;
|
||||
|
||||
// настройка шрифтов
|
||||
* {
|
||||
font-family: JetBrains Mono NF;
|
||||
font-size: 14;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
// Основной модуль прозрачный
|
||||
.bar {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
// воссоздание такого же модуля бара
|
||||
.bar1 {
|
||||
background: $bg;
|
||||
border: 1px solid $border;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
// Левая секция
|
||||
.ws-number-class {
|
||||
font-weight: 900;
|
||||
margin: 0px 5px 0px 10px;
|
||||
padding: 3px 5px 3px 5px;
|
||||
}
|
||||
|
||||
.ws-title-class {
|
||||
margin: 0px 5px;
|
||||
padding: 3px 5px 3px 5px;
|
||||
}
|
||||
|
||||
// Центральная секция
|
||||
.date-class {
|
||||
color: $fg;
|
||||
padding: 3px 5px;
|
||||
}
|
||||
|
||||
// Правая секция
|
||||
.right {
|
||||
margin: 0px 9px;
|
||||
}
|
||||
|
||||
.volume-class {
|
||||
margin: 0px 2px 0px 0px;
|
||||
}
|
||||
|
||||
.language-class {
|
||||
padding: 0px 10px 0px 5px;
|
||||
}
|
||||
|
||||
.systray-class {
|
||||
margin: 0px 9px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
50
home/desktop/eww_config/eww.yuck
Normal file
50
home/desktop/eww_config/eww.yuck
Normal file
@@ -0,0 +1,50 @@
|
||||
; Импорт скриптов
|
||||
(defpoll TITLE :interval "0.1s" "/home/fox/.config/eww/title.sh")
|
||||
(defpoll NUMBER :interval "0.1s" "/home/fox/.config/eww/number.sh")
|
||||
(defpoll DATE :interval "40s" "date +'%H:%M %a, %b'") ;a, b
|
||||
(defpoll VOLUME :interval "0.1s" "/home/fox/.config/eww/volume.sh")
|
||||
(defpoll LANGUAGE :interval "0.1s" "/home/fox/.config/eww/language.sh")
|
||||
(defpoll MUSIC :interval "0.1s" "/home/fox/.config/eww/music.sh")
|
||||
|
||||
; Основной модуль
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0"
|
||||
:y "15"
|
||||
:width "680"
|
||||
:height "45"
|
||||
:anchor "bottom center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
:windowtype "dock"
|
||||
:wm-ignore false
|
||||
(box :class "bar1" (left) (center) (right)))
|
||||
|
||||
; Левый модуль
|
||||
(defwidget left []
|
||||
(box :orientation "h"
|
||||
:valign "center"
|
||||
:space-evenly "false"
|
||||
(box :halign "center" :orientation "v" (label :class "ws-number-class" :text NUMBER))
|
||||
(box :halign "start" :orientation "v" (label :class "ws-title-class" :text TITLE))))
|
||||
|
||||
; Центральный модуль
|
||||
(defwidget center []
|
||||
(box :orientation "h"
|
||||
:halign "center"
|
||||
:space-evenly "false"
|
||||
(box (label :class "date-class" :text DATE))))
|
||||
|
||||
; Правый модуль
|
||||
(defwidget right []
|
||||
(eventbox :onclick "exec kitty"
|
||||
(box :orientation "h"
|
||||
:halign "end"
|
||||
:valign "center"
|
||||
:space-evenly "false"
|
||||
:class "right"
|
||||
(box (systray :spacing 5 :icon-size 15 :class "systray-class"))
|
||||
(box (label :class "language-class" :text LANGUAGE))
|
||||
(box (label :class "volume-class" :text VOLUME)))))
|
||||
|
||||
|
||||
7
home/desktop/eww_config/language.sh
Executable file
7
home/desktop/eww_config/language.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
if hyprctl devices | grep -q "active keymap: Russian"; then
|
||||
echo "ru"
|
||||
else
|
||||
echo "en"
|
||||
fi
|
||||
|
||||
15
home/desktop/eww_config/music.sh
Executable file
15
home/desktop/eww_config/music.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env 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
|
||||
|
||||
6
home/desktop/eww_config/number.sh
Executable file
6
home/desktop/eww_config/number.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
current_ws=$(hyprctl activeworkspace | grep "workspace ID" | awk '{print $3}' | head -n1)
|
||||
|
||||
#echo "Workspace $current_ws"
|
||||
echo " $current_ws"
|
||||
|
||||
22
home/desktop/eww_config/show.sh
Executable file
22
home/desktop/eww_config/show.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
file_bar="/home/fox/.cache/bar_opened"
|
||||
file_power="/home/fox/.cache/power_opened"
|
||||
|
||||
case $1 in
|
||||
bar)
|
||||
if [[ ! -f "$file_bar" ]] then
|
||||
touch $file_bar
|
||||
eww open bar
|
||||
else
|
||||
rm $file_bar
|
||||
eww close bar
|
||||
fi ;;
|
||||
power)
|
||||
if [[ ! -f "$file_power" ]] then
|
||||
touch $file_power
|
||||
eww open power
|
||||
else
|
||||
rm $file_power
|
||||
eww close power
|
||||
fi ;;
|
||||
esac
|
||||
26
home/desktop/eww_config/title.sh
Executable file
26
home/desktop/eww_config/title.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env 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
|
||||
firefox)
|
||||
echo " Browser"
|
||||
;;
|
||||
kitty)
|
||||
echo " Terminal"
|
||||
;;
|
||||
org.telegram.desktop)
|
||||
echo " Telegram"
|
||||
;;
|
||||
obsidian)
|
||||
echo " Obsidian"
|
||||
;;
|
||||
*)
|
||||
echo "$current_tl"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo " Desktop"
|
||||
fi
|
||||
|
||||
5
home/desktop/eww_config/volume.sh
Executable file
5
home/desktop/eww_config/volume.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
vol=$(pamixer --get-volume)
|
||||
|
||||
echo " $vol "
|
||||
|
||||
Reference in New Issue
Block a user