mirror of
https://github.com/mrfluffy-dev/dotfiles.git
synced 2026-01-17 05:40:34 +00:00
fixed eww on nixos coz it be broken
This commit is contained in:
@@ -4,28 +4,29 @@
|
|||||||
padding-right: 300px;
|
padding-right: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.0 , .01, .02, .03, .04, .05, .06, .07, .08, .09,
|
.W0 , .W01, .W02, .W03, .W04, .W05, .W06, .W07, .W08, .W09,.W011, .W022, .W033, .W044, .W055, .W066, .W077, .W088, .W099,{
|
||||||
.011, .022, .033, .044, .055, .066, .077, .088, .099,{
|
|
||||||
margin: 0px 0px 0px 0px;
|
margin: 0px 0px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unoccupied */
|
// Unoccupied
|
||||||
.0 {
|
.W0 {
|
||||||
color: #606060;
|
color: #606060;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Occupied */
|
// Occupied
|
||||||
.01, .02, .03, .04, .05, .06, .07, .08, .09 {
|
.W01, .W02, .W03, .W04, .W05, .W06, .W07, .W08, .W09 {
|
||||||
color:#959595;
|
color:#959595;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Focused */
|
// Focused
|
||||||
.011, .022, .033, .044, .055, .066, .077, .088, .099{
|
.W011, .W022, .W033, .W044, .W055, .W066, .W077, .W088, .W099{
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.bar_right{
|
.bar_right{
|
||||||
//padding left
|
//padding left
|
||||||
padding-left: 130px;
|
padding-left: 130px;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
:max-value 100 :min-value 0 :thickness 2 :size 20 "CPU")
|
:max-value 100 :min-value 0 :thickness 2 :size 20 "CPU")
|
||||||
(circular-progress :class "mem" :value "${round(EWW_RAM.used_mem/EWW_RAM.total_mem*100,0)}"
|
(circular-progress :class "mem" :value "${round(EWW_RAM.used_mem/EWW_RAM.total_mem*100,0)}"
|
||||||
:max-value 100 :min-value 0 :thickness 2 :size 20 "RAM")
|
:max-value 100 :min-value 0 :thickness 2 :size 20 "RAM")
|
||||||
(button :class "time" :onclick "scripts/calendar calendar"
|
(button :class "time" :onclick "$HOME/.config/eww/scripts/calendar calendar"
|
||||||
"${date.hour}:${date.min} ${date.am_pm}")
|
"${date.hour}:${date.min} ${date.am_pm}")
|
||||||
(literal :class "idle" :content idle))))
|
(literal :class "idle" :content idle))))
|
||||||
|
|
||||||
@@ -48,6 +48,6 @@
|
|||||||
:date "${date.year}-${date.month}-${date.day}"
|
:date "${date.year}-${date.month}-${date.day}"
|
||||||
:format "%a %d %b"))
|
:format "%a %d %b"))
|
||||||
|
|
||||||
(deflisten workspace "scripts/workspace")
|
(deflisten workspace "$HOME/.config/eww/scripts/workspace")
|
||||||
|
|
||||||
(deflisten idle "scripts/idel")
|
(deflisten idle "$HOME/.config/eww/scripts/idel")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
calendar(){
|
calendar(){
|
||||||
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
LOCK_FILE="$HOME/.cache/eww-calendar.lock"
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
#! /bin/bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
#check if wayland-idle-inhibitor.py is running
|
#check if wayland-idle-inhibitor.py is running
|
||||||
#loop forever
|
#loop forever
|
||||||
while true
|
while true; do
|
||||||
do
|
if pgrep -x "way-inhibitor" >/dev/null; then
|
||||||
if pgrep -x "way-inhibitor" > /dev/null
|
|
||||||
then
|
|
||||||
echo "(button :class \"idle_btn_on\" :onclick \"killall way-inhibitor\"\"\")"
|
echo "(button :class \"idle_btn_on\" :onclick \"killall way-inhibitor\"\"\")"
|
||||||
else
|
else
|
||||||
echo "(button :class \"idle_btn_off\" :onclick \"way-inhibitor &\" \"\")"
|
echo "(button :class \"idle_btn_off\" :onclick \"way-inhibitor &\" \"\")"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#! /bin/bash
|
#! /usr/bin/env bash
|
||||||
|
|
||||||
#define icons for workspaces 1-9
|
#define icons for workspaces 1-9
|
||||||
ic=(0 一 二 三 四 五 六 七 八 九)
|
ic=(0 一 二 三 四 五 六 七 八 九)
|
||||||
@@ -15,34 +15,34 @@ for num in $(hyprctl monitors | grep active | sed 's/()/(1)/g' | awk 'NR>1{print
|
|||||||
done
|
done
|
||||||
|
|
||||||
workspaces() {
|
workspaces() {
|
||||||
if [[ ${1:0:9} == "workspace" ]]; then #set focused workspace
|
if [[ ${1:0:9} == "workspace" ]]; then #set focused workspace
|
||||||
unset -v "$fnum"
|
unset -v "$fnum"
|
||||||
num=${1:11}
|
num=${1:11}
|
||||||
export f"$num"="$num"
|
export f"$num"="$num"
|
||||||
export fnum=f"$num"
|
export fnum=f"$num"
|
||||||
|
|
||||||
elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
|
elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
|
||||||
num=${1:17}
|
num=${1:17}
|
||||||
export o"$num"="$num"
|
export o"$num"="$num"
|
||||||
export f"$num"="$num"
|
export f"$num"="$num"
|
||||||
|
|
||||||
elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
|
elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
|
||||||
num=${1:18}
|
num=${1:18}
|
||||||
unset -v o"$num" f"$num"
|
unset -v o"$num" f"$num"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#output eww widget
|
#output eww widget
|
||||||
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
|
echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
|
||||||
(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"true\" \
|
(box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"true\" \
|
||||||
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && /home/taylor/.config/hypr/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \
|
(button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && /home/taylor/.config/hypr/default_app\" :class \"W0$o1$f1\" \"${ic[1]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && /home/taylor/.config/hypr/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
|
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && /home/taylor/.config/hypr/default_app\" :class \"W0$o2$f2\" \"${ic[2]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && /home/taylor/.config/hypr/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
|
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && /home/taylor/.config/hypr/default_app\" :class \"W0$o3$f3\" \"${ic[3]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && /home/taylor/.config/hypr/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
|
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && /home/taylor/.config/hypr/default_app\" :class \"W0$o4$f4\" \"${ic[4]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5 && /home/taylor/.config/hypr/default_app\" :class \"0$o5$f5\" \"${ic[5]}\") \
|
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5 && /home/taylor/.config/hypr/default_app\" :class \"W0$o5$f5\" \"${ic[5]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6 && /home/taylor/.config/hypr/default_app\" :class \"0$o6$f6\" \"${ic[6]}\") \
|
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6 && /home/taylor/.config/hypr/default_app\" :class \"W0$o6$f6\" \"${ic[6]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7 && /home/taylor/.config/hypr/default_app\" :class \"0$o7$f7\" \"${ic[7]}\") \
|
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7 && /home/taylor/.config/hypr/default_app\" :class \"W0$o7$f7\" \"${ic[7]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8 && /home/taylor/.config/hypr/default_app\" :class \"0$o8$f8\" \"${ic[8]}\") \
|
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8 && /home/taylor/.config/hypr/default_app\" :class \"W0$o8$f8\" \"${ic[8]}\") \
|
||||||
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9 && /home/taylor/.config/hypr/default_app\" :class \"0$o9$f9\" \"${ic[9]}\") \
|
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9 && /home/taylor/.config/hypr/default_app\" :class \"W0$o9$f9\" \"${ic[9]}\") \
|
||||||
)\
|
)\
|
||||||
)"
|
)"
|
||||||
}
|
}
|
||||||
@@ -50,5 +50,5 @@ echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xar
|
|||||||
workspaces
|
workspaces
|
||||||
|
|
||||||
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
|
||||||
workspaces "$event"
|
workspaces "$event"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user