add eww
This commit is contained in:
parent
aa0f005523
commit
144f573fda
36
eww/bar/eww.scss
Normal file
36
eww/bar/eww.scss
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
/* @use "~/.cache/wal/colors.scss" as cols; */
|
||||||
|
|
||||||
|
* { all: unset; }
|
||||||
|
|
||||||
|
// Variable Color's
|
||||||
|
$background: #1A1B26;
|
||||||
|
$foreground: #A9B1D6;
|
||||||
|
|
||||||
|
$black: #24283B;
|
||||||
|
$gray: #565F89;
|
||||||
|
$red: #F7768E;
|
||||||
|
$green: #73DACA;
|
||||||
|
$yellow: #E0AF68;
|
||||||
|
$blue: #7AA2F7;
|
||||||
|
$magenta: #BB9AF7;
|
||||||
|
$cyan: #7DCFFF;
|
||||||
|
$white: $foreground;
|
||||||
|
|
||||||
|
.bar{
|
||||||
|
background-color: $background;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 5px;
|
||||||
|
// font-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icons{
|
||||||
|
margin: .3rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.launcher{
|
||||||
|
color: $cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip {
|
||||||
|
background-color: white;
|
||||||
|
}
|
71
eww/bar/eww.yuck
Normal file
71
eww/bar/eww.yuck
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
(defpoll checkupdates :interval "60s" "scripts/systemupdates --check")
|
||||||
|
(defpoll checkupdatescount :interval "60s" "scripts/systemupdates --count")
|
||||||
|
(defpoll current-brightness :interval "1s" "brightnessctl -m -d intel_backlight | awk -F, '{print substr($4, 0, length($4)-1)}' | tr -d '%'")
|
||||||
|
|
||||||
|
(defwindow bar
|
||||||
|
:monitor 0
|
||||||
|
:stacking "fg"
|
||||||
|
:windowtype "dock"
|
||||||
|
:exclusive true
|
||||||
|
:geometry (geometry
|
||||||
|
:x "0"
|
||||||
|
:y "10"
|
||||||
|
:width "98%"
|
||||||
|
:height "3%"
|
||||||
|
:anchor "top center"
|
||||||
|
)
|
||||||
|
(bar)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(defwidget bar []
|
||||||
|
(box
|
||||||
|
:class "bar"
|
||||||
|
:orientatoin "h"
|
||||||
|
;; :space-evenly false
|
||||||
|
(box
|
||||||
|
:orientation "h"
|
||||||
|
:halign "start"
|
||||||
|
(launcher)
|
||||||
|
)
|
||||||
|
(box
|
||||||
|
:orientation "h"
|
||||||
|
:halign "end"
|
||||||
|
:hexpand "true"
|
||||||
|
;; :space-evenly "false"
|
||||||
|
(bright)
|
||||||
|
(power)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget launcher []
|
||||||
|
(box
|
||||||
|
:orientation "h"
|
||||||
|
(button
|
||||||
|
:class "launcher"
|
||||||
|
:tooltip "App Launcher"
|
||||||
|
:onclick "bash ~/dotfiles/scripts/applauncher.sh"
|
||||||
|
""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget bright []
|
||||||
|
(box
|
||||||
|
:class "icons"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly "false"
|
||||||
|
:tooltip current-brightness
|
||||||
|
""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget power []
|
||||||
|
(button
|
||||||
|
:class "icons"
|
||||||
|
:tooltip "wlogout"
|
||||||
|
:onclick "bash ~/dotfiles/scripts/wlogout.sh" "⏻"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
1
eww/eww.scss
Normal file
1
eww/eww.scss
Normal file
@ -0,0 +1 @@
|
|||||||
|
@import "./bar/eww.scss";
|
1
eww/eww.yuck
Normal file
1
eww/eww.yuck
Normal file
@ -0,0 +1 @@
|
|||||||
|
(include "./bar/eww.yuck")
|
4
eww/launch.sh
Executable file
4
eww/launch.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
eww daemon
|
||||||
|
eww open bar
|
24
eww/scripts/checksystemupdates
Executable file
24
eww/scripts/checksystemupdates
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Requires pacman-contrib trizen
|
||||||
|
|
||||||
|
# Define threshholds for color indicators
|
||||||
|
threshhold_green=0
|
||||||
|
threshhold_yellow=25
|
||||||
|
threshhold_red=100
|
||||||
|
|
||||||
|
# Calculate available updates pacman and aur (with trizen)
|
||||||
|
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||||
|
updates_arch=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||||
|
updates_aur=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
updates=$(("$updates_arch" + "$updates_aur"))
|
||||||
|
|
||||||
|
if [[ $updates -gt 0 ]]; then
|
||||||
|
printf ''
|
||||||
|
else
|
||||||
|
printf ''
|
||||||
|
fi
|
3
eww/scripts/network
Executable file
3
eww/scripts/network
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
kitty ~/dotfiles/scripts/networkmanager.sh
|
40
eww/scripts/systemupdates
Executable file
40
eww/scripts/systemupdates
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
|
||||||
|
updates_arch=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
|
||||||
|
updates_aur=0
|
||||||
|
fi
|
||||||
|
|
||||||
|
updates=$(("$updates_arch" + "$updates_aur"))
|
||||||
|
|
||||||
|
function check () {
|
||||||
|
if [[ $updates -gt 0 ]]; then
|
||||||
|
printf ''
|
||||||
|
else
|
||||||
|
printf ''
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function count () {
|
||||||
|
printf '%s Update(s)' "$updates"
|
||||||
|
}
|
||||||
|
|
||||||
|
function install () {
|
||||||
|
echo "Starting install updates"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
yay
|
||||||
|
|
||||||
|
notify-send "Update complete"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [[ $1 == "--check" ]]; then
|
||||||
|
check
|
||||||
|
elif [[ $1 == "--install" ]]; then
|
||||||
|
install
|
||||||
|
elif [[ $1 == "--count" ]]; then
|
||||||
|
count
|
||||||
|
fi
|
3
eww/scripts/wlogout
Executable file
3
eww/scripts/wlogout
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
wlogout
|
@ -6,5 +6,6 @@ exec-once = ~/dotfiles/scripts/lockscreentime.sh
|
|||||||
exec-once = ~/dotfiles/scripts/updatewal-swww.sh
|
exec-once = ~/dotfiles/scripts/updatewal-swww.sh
|
||||||
exec-once = ~/dotfiles/gtk/gtk.sh
|
exec-once = ~/dotfiles/gtk/gtk.sh
|
||||||
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
|
exec-once = hyprctl setcursor Bibata-Modern-Ice 24
|
||||||
exec-once = ~/dotfiles/waybar/launch.sh
|
# exec-once = ~/dotfiles/waybar/launch.sh
|
||||||
|
exec-once = ~/dotfiles/eww/launch.sh
|
||||||
exec-once = wl-paste --watch cliphist store
|
exec-once = wl-paste --watch cliphist store
|
||||||
|
@ -19,7 +19,7 @@ swww img $wallpaper \
|
|||||||
--transition-duration=0.7 \
|
--transition-duration=0.7 \
|
||||||
--transition-pos "$( hyprctl cursorpos )"
|
--transition-pos "$( hyprctl cursorpos )"
|
||||||
|
|
||||||
~/dotfiles/waybar/launch.sh
|
# ~/dotfiles/waybar/launch.sh
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# Send notification
|
# Send notification
|
||||||
|
@ -33,7 +33,7 @@ if [ "$selected" ]; then
|
|||||||
--transition-duration=0.7 \
|
--transition-duration=0.7 \
|
||||||
--transition-pos "$( hyprctl cursorpos )"
|
--transition-pos "$( hyprctl cursorpos )"
|
||||||
|
|
||||||
~/dotfiles/waybar/launch.sh
|
# ~/dotfiles/waybar/launch.sh
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# -----------------------------------------------------
|
# -----------------------------------------------------
|
||||||
|
@ -65,7 +65,7 @@ tooltip {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: @backgroundlight;
|
background-color: @backgroundlight;
|
||||||
opacity:0.8;
|
opacity:0.8;
|
||||||
padding:20px;
|
padding:10px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user