updating a lot of hyprland config pieces

This commit is contained in:
Chris Cochrun 2022-12-21 09:13:28 -06:00
parent 28645f7175
commit d9cf8e32a7
9 changed files with 245 additions and 172 deletions

View file

@ -243,7 +243,7 @@
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 12
corner_radius = 18
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this

37
eww/battery.yuck Normal file
View file

@ -0,0 +1,37 @@
(defwindow battery
:geometry (geometry :x "0px"
:y "40px"
:width "200px"
:height "60px"
:anchor "bottom center")
:stacking "fg"
:monitor "0"
(battery))
(defwidget battery []
(box
:class "battery-container"
:orientation "h"
:vexpand "false"
:hexpand "false"
:space-evenly "false"
:spacing 5
(button
:class "battery-icon"
:onclick "" "")
(box
:orientation "v"
:space-evenly "false"
:vexpand "false"
:hexpand "false"
:spacing 5
(label
:class "battery-label"
:halign "start"
:text "Battery is at ${round(EWW_BATTERY['BAT1'].capacity, 0)}%, plug it in you dope.")
(scale
:class "battery-value"
:value {EWW_BATTERY["BAT1"].capacity}
:orientation "h"
:max 100
:min 0))))

View file

@ -38,6 +38,7 @@ $base0E: #ff6ac1;
$base0F: #b2643c;
$basetransparent: rgba(40, 42, 54, 0.0);
$backtransparent: rgba(40, 42, 54, 0.7);
$darktransparent: rgba(40, 42, 54, 0.97);
/** General **/
.bar_class {
@ -52,7 +53,7 @@ $backtransparent: rgba(40, 42, 54, 0.7);
}
.side{
background-color: $backtransparent;
background-color: $base00;
border-width: 0px;
padding: 30px 30px 0px 30px;
border-radius: 20px 20px 20px 20px;
@ -116,17 +117,23 @@ tooltip label {
border-radius: 5px;
}
.brightbar trough highlight {
background-image: linear-gradient(to right, $orange 30%, #f2cdcd 50%, $orange 100% *50);
background-color: $base09;
border-radius: 10px;
}
.brightbar {
margin-bottom: 2px;
}
.volbar trough highlight {
background-image: linear-gradient(to right, #afcee0 30%, #92B6F4 50%, #77a5bf 100% *50);
background-color: $base08;
border-radius: 10px;
}
.volbar {
margin-bottom: 2px;
}
.volume_icon {
font-size: 18;
color: $base08;
margin: 0px 10px 0px 10px;
margin: 0px 15px 0px 3px;
}
@ -178,7 +185,7 @@ tooltip label {
.bright_icon {
font-size: 18;
color: $base09;
margin: 0px 10px 0px 10px;
margin: 0px 15px 0px 3px;
}
@ -688,3 +695,23 @@ scale trough {
color: $white;
margin: 0px 0px 0px 20px;
}
.battery-container {
background-color: $darktransparent;
border-radius: 16px;
}
.battery-icon {
margin: 10px;
margin-left: 20px;
font-size: 28px;
}
.battery-value trough highlight {
background-color: $base08;
border-radius: 10px;
}
.battery-value {
margin-bottom: 30px;
margin-right: 20px;
}
.battery-label {
margin: 20px 50px 10px 40px;
}

View file

@ -2,6 +2,7 @@
(include "sidebar.yuck")
(include "notifications.yuck")
(include "battery.yuck")
(defpoll clock_time :interval "5s" "date '+\%l:\%M \%p'")
(defpoll clock_date :interval "1h" "date '+%b %d, %Y'")
@ -69,19 +70,16 @@
:space-evenly "false"
:orientation "h"
:spacing "3"
(revealer
:transition "slideright"
:reveal br_reveal
:duration "250ms"
(scale :class "brightbar"
(scale
:class "brightbar"
:value brightness_percent
:orientation "h"
:tooltip "${brightness_percent}%"
:max 100
:min 0
:onchange "brightnessctl s {}%" ))
:onchange "brightnessctl s {}%" )
(label
:text ""
:text ""
:class "bright_icon"
:tooltip "brightness"))))
@ -94,10 +92,6 @@
:space-evenly "false"
:orientation "h"
:spacing "3"
(revealer
:transition "slideright"
:reveal vol_reveal
:duration "250ms"
(scale
:class "volbar"
:value volume_percent
@ -105,7 +99,7 @@
:tooltip "${volume_percent}%"
:max 100
:min 0
:onchange "pamixer --set-volume {}" ))
:onchange "pamixer --set-volume {}" )
(button
:onclick "scripts/pop audio"
:class "volume_icon"
@ -247,14 +241,16 @@
:space-evenly false
:halign "start"
:class "left_modules"
(workspaces)))
:spacing 8
(workspaces)
(appnames)))
(defwidget center []
(box
:orientation "h"
:space-evenly false
:halign "center"
:class "center_modules"
(appnames)))
(clock_module)))
(defwidget right []
(box
:orientation "h"
@ -269,7 +265,6 @@
(cpu)
(mem)
(sep)
(clock_module)
(notif_button)))
(defwidget bar_layout []

View file

@ -7,8 +7,9 @@ icontheme=$(grep "gtk-icon-theme-name" "$HOME"/.config/gtk-3.0/settings.ini | cu
workspaces() {
if [[ ${1:0:12} == "activewindow" ]]; then #set focused workspace
string=${1:14}
export title=$(echo $string | sed 's/.*,//')
class="${string/,*/}"
export title=${string/,/, }
# export title=${string/,/, }
[[ $title == ", " ]] && unset title
export iconpath=$(geticons "$class" -s 16 -c 1 -t "$icontheme" | head -n 1)
fi

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
#define icons for workspaces 1-9
ic=(0       "" "" )
ic=(0    )
#initial check for occupied workspaces
for num in $(hyprctl workspaces | grep ID | awk '{print $3}'); do
@ -55,11 +55,6 @@ echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xar
(button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
(button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
(button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
(button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o5$f5\" \"${ic[5]}\") \
(button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o6$f6\" \"${ic[6]}\") \
(button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o7$f7\" \"${ic[7]}\") \
(button :onclick \"hyprctl dispatch workspace 8\" :onrightclick \"hyprctl dispatch workspace 8 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o8$f8\" \"${ic[8]}\") \
(button :onclick \"hyprctl dispatch workspace 9\" :onrightclick \"hyprctl dispatch workspace 9 && $HOME/.config/hypr/themes/neon/scripts/default_app\" :class \"0$o9$f9\" \"${ic[9]}\") \
)\
)"
}

View file

@ -250,6 +250,4 @@
(label
:class "kernal"
:halign "start"
:text " : ${kernal}")
)
)
:text " : ${kernal}")))

View file

@ -60,8 +60,8 @@ decoration {
# if you want heavy blur, you need to up the blur_passes.
# the more passes, the more you can up the blur_size without noticing artifacts.
drop_shadow=true
shadow_range=30
shadow_offset=5 5
shadow_range=20
shadow_offset=2 2
shadow_render_power=1
dim_inactive=true
dim_strength=0.2

20
scripts/batmon Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env bash
while [ 1 ];
do
capacity=$(cat /sys/class/power_supply/BAT1/capacity)
status=$(cat /sys/class/power_supply/BAT1/status)
if [ $status = 'Charging' ]; then
eww close battery
sleep 10
else
if [ $capacity -le 30 ];
then
eww open battery
else
eww close battery
fi
sleep 10
fi
done