✨ eww: add new tiles to control-center, new notification popup, new styles for a lot of widgets
This commit is contained in:
+4
-1
@@ -9,6 +9,9 @@
|
|||||||
(include "windows/volume-control.yuck")
|
(include "windows/volume-control.yuck")
|
||||||
(include "windows/volume-popup.yuck")
|
(include "windows/volume-popup.yuck")
|
||||||
(include "windows/floating-media.yuck")
|
(include "windows/floating-media.yuck")
|
||||||
|
(include "windows/floating-notifications.yuck")
|
||||||
|
(include "windows/hardware-monitor.yuck")
|
||||||
|
|
||||||
; Widgets
|
; Universal Widgets
|
||||||
(include "widgets/big-media.yuck")
|
(include "widgets/big-media.yuck")
|
||||||
|
(include "widgets/separator.yuck")
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This script reloads eww configuration and updates
|
||||||
|
# window status variables, used in eww-window.sh
|
||||||
|
# script. Avoids issues with widgets that use status
|
||||||
|
# variables to dinamically change their content.
|
||||||
|
# ----------
|
||||||
|
# Licensed under the MIT License
|
||||||
|
# Made by retrozinndev (João Dias)
|
||||||
|
# From https://github.com/retrozinndev/Hyprland-Dots
|
||||||
|
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
open_windows=$(eww active-windows | awk -F: '{ print $1 }' | sed -e 's/ /\\[n]/g')
|
||||||
|
echo $open_windows
|
||||||
|
|
||||||
|
#for window in $()
|
||||||
@@ -44,7 +44,7 @@ Licensed under the MIT License, as in retrozinndev's Hyprland-Dots repo."
|
|||||||
|
|
||||||
--open | open)
|
--open | open)
|
||||||
check_if_empty $2 "WINDOW_NAME"
|
check_if_empty $2 "WINDOW_NAME"
|
||||||
if [[ $(eww get "window_state_$2") == "closed" ]]; then
|
if ! [[ $(eww active-windows) =~ "$2" ]]; then
|
||||||
eww open "$2"
|
eww open "$2"
|
||||||
eww update "window_state_$2=open"
|
eww update "window_state_$2=open"
|
||||||
else
|
else
|
||||||
@@ -54,7 +54,7 @@ Licensed under the MIT License, as in retrozinndev's Hyprland-Dots repo."
|
|||||||
|
|
||||||
--close | close)
|
--close | close)
|
||||||
check_if_empty $2 "WINDOW_NAME"
|
check_if_empty $2 "WINDOW_NAME"
|
||||||
if [[ $(eww get "window_state_$2") == "open" ]]; then
|
if [[ $(eww active-windows) =~ "$2" ]]; then
|
||||||
eww close "$2"
|
eww close "$2"
|
||||||
eww update "window_state_$2=closed"
|
eww update "window_state_$2=closed"
|
||||||
else
|
else
|
||||||
@@ -64,7 +64,7 @@ Licensed under the MIT License, as in retrozinndev's Hyprland-Dots repo."
|
|||||||
|
|
||||||
--toggle | toggle)
|
--toggle | toggle)
|
||||||
check_if_empty $2 "WINDOW_NAME"
|
check_if_empty $2 "WINDOW_NAME"
|
||||||
if [[ $(eww get "window_state_$2") == "closed" ]]; then
|
if ! [[ $(eww active-windows) =~ "$2" ]]; then
|
||||||
eww open "$2"
|
eww open "$2"
|
||||||
eww update "window_state_$2=open"
|
eww update "window_state_$2=open"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
pidfile="$HOME/.cache/night-light.pid"
|
||||||
|
temperature=4500 # in K
|
||||||
|
|
||||||
|
# run only if pid file does not exist
|
||||||
|
if ! [[ -f $pidfile ]]; then
|
||||||
|
touch $pidfile
|
||||||
|
hyprsunset -t $temperature &
|
||||||
|
_pid=$!
|
||||||
|
echo -e $_pid > $pidfile
|
||||||
|
wait $_pid && rm -f $pidfile
|
||||||
|
else
|
||||||
|
echo "There's already an instance running! Mistake? Delete \"~/.cache/night-light.pid\"."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
lockfile=$HOME/.cache/notification-history.lock
|
||||||
|
json_history_file=$HOME/.cache/notification-history.json
|
||||||
|
|
||||||
|
if ! [[ -f $lockfile ]]; then
|
||||||
|
echo "{ \"history\": [] }" > $json_history_file
|
||||||
|
fi
|
||||||
@@ -1,18 +1,73 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# initial notification history
|
# A notification logger, saves notifications inside
|
||||||
json_initial_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
# a file instead of saving on memory! file is located
|
||||||
echo $json_initial_history
|
# in `~/.cache/notification-history.json`.
|
||||||
|
# -----------
|
||||||
|
# Licensed under the MIT License
|
||||||
|
# Made by retrozinndev (João Dias)
|
||||||
|
# From https://github.com/retrozinndev/Hyprland-Dots
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
json_history_file="$HOME/.cache/notification-history.json"
|
||||||
|
lock_file="$HOME/.cache/notification-history.lock"
|
||||||
|
|
||||||
|
# get max entries from mako file
|
||||||
|
max_entries=$(cat $HOME/.config/mako/config | grep "max-history=" | awk -F= '{ print $2 }')
|
||||||
|
|
||||||
|
touch $json_history_file
|
||||||
|
|
||||||
|
function Init_history_file() {
|
||||||
|
if [[ $(cat $json_history_file) == "" ]]; then
|
||||||
|
echo -e "{\"history\":[]}" > $json_history_file
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function Check_history_file() {
|
||||||
|
if ! [[ -f $json_history_file ]]; then
|
||||||
|
touch $json_history_file
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function Treat_specials() {
|
||||||
|
echo $@ | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g'
|
||||||
|
}
|
||||||
|
|
||||||
|
Check_history_file
|
||||||
|
Init_history_file
|
||||||
|
|
||||||
|
json_latest_notification="$(makoctl history | jq -c '.data[][0]')"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# watch history every 200ms
|
sleep .1
|
||||||
sleep .2
|
if ! [[ -f $lock_file ]]; then
|
||||||
|
json_actual_latest="$(makoctl history | jq -c '.data[][0]')"
|
||||||
|
if ! [[ $json_actual_latest == $json_latest_notification ]]; then
|
||||||
|
if [[ $(echo $(Treat_specials $json_actual_latest) | jq -c '.id.data') == $(echo $(Treat_specials $json_latest_notification) | jq -c '.id.data') ]]; then
|
||||||
|
if [[ $(echo $(Treat_specials $json_actual_latest) | jq -c '.summary.data') == $(echo $(Treat_specials $json_latest_notification) | jq -c '.summary.data') ]]; then
|
||||||
|
continue
|
||||||
|
else
|
||||||
|
sh $HOME/.config/eww/scripts/notification-remove.sh $(echo $(Treat_specials $json_latest_notification) | jq -c '.id.data') &
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# frequently updated history variable
|
Check_history_file
|
||||||
json_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
Init_history_file
|
||||||
|
json_latest_notification=$(makoctl history | jq -c '.data[][0]')
|
||||||
|
json_first_notification=$(jq -c ".history[$(jq -c '.history | length - 1' $json_history_file)]" $json_history_file)
|
||||||
|
|
||||||
if ! [[ "$json_initial_history" == "$json_history" ]]; then
|
if ! [[ $(makoctl mode) =~ "dnd" ]]; then
|
||||||
json_initial_history="$json_history"
|
sh $HOME/.config/eww/scripts/notification-popup.sh "$(Treat_specials $json_latest_notification)" &
|
||||||
echo "$json_initial_history"
|
fi
|
||||||
|
|
||||||
|
if [[ $(jq -c ".history | length" $json_history_file) == $max_entries ]]; then
|
||||||
|
sh $HOME/.config/eww/scripts/notification-remove.sh $(echo $json_first_notification | jq -c '.id.data')
|
||||||
|
fi
|
||||||
|
|
||||||
|
json_output=$(jq -c ".history |= [$(Treat_specials $json_latest_notification)] + ." $json_history_file)
|
||||||
|
|
||||||
|
echo -e "$json_output" > $json_history_file
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Removes notification from popup by id provided
|
||||||
|
# in arg1.
|
||||||
|
# ---------
|
||||||
|
# Licensed under the MIT License
|
||||||
|
# Made by retrozinndev (João Dias)
|
||||||
|
# From https://github.com/retrozinndev/Hyprland-Dots
|
||||||
|
|
||||||
|
|
||||||
|
if ! [[ $1 == "" ]]; then
|
||||||
|
json_popup_notifications=$(eww get json_popup_notifications)
|
||||||
|
if [[ $(eww get json_popup_notifications | jq -c '.notifications | length') == 1 ]]; then
|
||||||
|
sh $HOME/.config/eww/scripts/eww-window.sh close floating-notifications >> /dev/null
|
||||||
|
fi
|
||||||
|
eww update "json_popup_notifications=$(echo $json_popup_notifications | jq -c "del(.notifications[] | select(.id.data == $1))")"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[error] Notification Id not provided!"
|
||||||
|
exit 1
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This scripts receives a notification from arg1,
|
||||||
|
# in a json format, displays in eww, counting
|
||||||
|
# down depending on notification urgency and
|
||||||
|
# removes the notification from json.
|
||||||
|
|
||||||
|
# Timeout in seconds
|
||||||
|
# When set to 0, notification will disappear
|
||||||
|
# only when hovering it.
|
||||||
|
timeout_low=3
|
||||||
|
timeout_normal=6
|
||||||
|
timeout_critical=0
|
||||||
|
|
||||||
|
if ! [[ $@ == "" ]]; then
|
||||||
|
# Urgency levels:
|
||||||
|
# Low: 0, Normal: 1, Critical: 2
|
||||||
|
urgency=$(echo $@ | jq -c ".urgency.data")
|
||||||
|
id=$(echo $@ | jq -c ".id.data")
|
||||||
|
json_popup_notifications="$(eww get json_popup_notifications)"
|
||||||
|
json_notification=$(echo $@ | jq -c '.')
|
||||||
|
|
||||||
|
if [[ $json_popup_notifications == "" ]]; then
|
||||||
|
eww update "json_popup_notifications="'{"notifications":[]}' >> /dev/null
|
||||||
|
json_popup_notifications='{"notifications":[]}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
eww update "json_popup_notifications=$(echo $json_popup_notifications | jq -c ".notifications |= [$json_notification] + .")" >> /dev/null
|
||||||
|
sh $HOME/.config/eww/scripts/eww-window.sh open floating-notifications >> /dev/null
|
||||||
|
|
||||||
|
# Critical urgency is handled by eww, no need to count down
|
||||||
|
case $urgency in
|
||||||
|
0*)
|
||||||
|
sleep $timeout_low
|
||||||
|
;;
|
||||||
|
1*)
|
||||||
|
sleep $timeout_normal
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if ! [[ $urgency == 2 ]]; then
|
||||||
|
sh $HOME/.config/eww/scripts/notification-popup-remove.sh "$id" &
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Removes notification from history file by
|
||||||
|
# id provided in arg1.
|
||||||
|
# ---------
|
||||||
|
# Licensed under the MIT License
|
||||||
|
# Made by retrozinndev (João Dias)
|
||||||
|
# From https://github.com/retrozinndev/Hyprland-Dots
|
||||||
|
|
||||||
|
json_history_file="$HOME/.cache/notification-history.json"
|
||||||
|
lock_file="$HOME/.cache/notification-history.lock"
|
||||||
|
|
||||||
|
if [[ -f $HOME/.cache/notification-history.json ]] && ! [[ $1 == "" ]]; then
|
||||||
|
touch $lock_file
|
||||||
|
json_updated_history=$(jq -c "del(.history[] | select(.id.data == $1))" $json_history_file)
|
||||||
|
echo -e $json_updated_history > $json_history_file
|
||||||
|
rm -f $lock_file
|
||||||
|
else
|
||||||
|
echo "[error] Notification history not reachable or id not provided"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# This script watches notification file changes
|
||||||
|
# and output file contents.
|
||||||
|
# -----------
|
||||||
|
# Licensed under the MIT License
|
||||||
|
# Made by retrozinndev (João Dias)
|
||||||
|
# From https://github.com/retrozinndev/Hyprland-Dots
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
json_history_file="$HOME/.cache/notification-history.json"
|
||||||
|
|
||||||
|
if ! [[ -f $json_history_file ]]; then
|
||||||
|
echo -e "{\"history\":[]}" > $json_history_file
|
||||||
|
fi
|
||||||
|
|
||||||
|
json_history="$(cat $json_history_file)"
|
||||||
|
|
||||||
|
echo $json_history
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
sleep .1
|
||||||
|
json_newest_history=$(cat $json_history_file)
|
||||||
|
|
||||||
|
if ! [[ "$json_history" == "$json_newest_history" ]]; then
|
||||||
|
json_history="$json_newest_history"
|
||||||
|
echo $json_history
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
dest="$HOME/Recordings"
|
||||||
|
if ! [[ $(xdg-user-dir VIDEOS) == "" ]]; then
|
||||||
|
dest="$(xdg-user-dir VIDEOS)/Recordings"
|
||||||
|
fi
|
||||||
|
lock="$HOME/.cache/recording.lock"
|
||||||
|
pidfile="$HOME/.cache/recording.pid"
|
||||||
|
ext="mp4" # mp4,mkv...
|
||||||
|
filename=$(date +"%Y-%m-%d-%H%M%S_rec.$ext")
|
||||||
|
|
||||||
|
mkdir -p $dest
|
||||||
|
|
||||||
|
# run only if lockfile does not exist
|
||||||
|
if ! [[ -f $lock ]]; then
|
||||||
|
touch $lock
|
||||||
|
wf-recorder -f "$dest/$filename" &
|
||||||
|
rec_pid=$!
|
||||||
|
echo -e $rec_pid > $pidfile
|
||||||
|
wait $rec_pid && (
|
||||||
|
notify-send -a "Screen Recorder" "Recording Done" "The screen recording has been saved as '$dest/$filename'!"
|
||||||
|
rm -f $lock $pidfile
|
||||||
|
)
|
||||||
|
else
|
||||||
|
notify-send -a "Screen Recorder" "Recording Error" "There's already an instance running! Mistake? Delete $lock and $pidfile."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# initial history
|
|
||||||
json_notification_history=$(dunstctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')
|
|
||||||
json_recent_notifications="[]"
|
|
||||||
notification_timeout='8s'
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
# check history every 200ms
|
|
||||||
sleep .2
|
|
||||||
|
|
||||||
if ! [[ "$json_notification_history" == "$(dunstctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')" ]]; then
|
|
||||||
json_notification_history="$(dunstctl history | jq -c '.data[]' | sed 's/\\[n]/\\n/g')"
|
|
||||||
json_last_notification=$(echo $json_notification_history | jq -c ".[0]")
|
|
||||||
|
|
||||||
json_recent_notifications=$(echo $json_recent_notifications | jq -c ". |= [$json_last_notification] + .")
|
|
||||||
echo $json_recent_notifications
|
|
||||||
for (( i=0; i<$($(echo $json_recent_notifications | jq 'length')); i++ )); do
|
|
||||||
sleep $notification_timeout
|
|
||||||
json_recent_notifications=$(echo $json_recent_notifications | jq -c "del(.[$i])")
|
|
||||||
echo $json_recent_notifications
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
is_holding=$(eww get hold_volume_popup)
|
if [[ $(eww get hold_volume_popup) == true ]]; then
|
||||||
if [[ $is_holding == true ]]; then
|
|
||||||
sleep 4
|
sleep 4
|
||||||
sh ./eww-window.sh close volume-popup
|
sh ./eww-window.sh close volume-popup
|
||||||
eww update "hold_volume_popup=false"
|
eww update "hold_volume_popup=false"
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
print_workspaces_literal() {
|
print_workspaces_literal() {
|
||||||
active_workspace_id=$(hyprctl -j activeworkspace | jq .id | xargs)
|
active_workspace_id=$(hyprctl -j activeworkspace | jq -c '.id' | xargs)
|
||||||
existing_workspaces=$(hyprctl -j workspaces | jq .[].id | xargs)
|
json_workspaces=$(hyprctl -j workspaces | jq -c '.')
|
||||||
|
existing_workspaces=$(echo $json_workspaces | jq -c '.[].id' | xargs)
|
||||||
|
|
||||||
output="
|
output="
|
||||||
(box :space-evenly false
|
(box :space-evenly false
|
||||||
@@ -11,7 +12,7 @@ print_workspaces_literal() {
|
|||||||
for i in {1..10}; do
|
for i in {1..10}; do
|
||||||
output=$output"
|
output=$output"
|
||||||
(button :onclick \"hyprctl dispatch workspace $i >> /dev/null \"
|
(button :onclick \"hyprctl dispatch workspace $i >> /dev/null \"
|
||||||
:class { $active_workspace_id == $i ? \"active\" : \"\" }
|
:class \"\${ $active_workspace_id == $i ? 'active' : '' } $( [[ $(echo $json_workspaces | jq -c ".[$i - 1].name") =~ "special:" ]] && echo 'special' )\"
|
||||||
:visible { \"$existing_workspaces\" =~ $i ? true : false }
|
:visible { \"$existing_workspaces\" =~ $i ? true : false }
|
||||||
:tooltip \"Workspace ${i}\"
|
:tooltip \"Workspace ${i}\"
|
||||||
\"\")"
|
\"\")"
|
||||||
|
|||||||
+70
-20
@@ -18,6 +18,13 @@
|
|||||||
|
|
||||||
& > * {
|
& > * {
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
|
border-radius: 12px;
|
||||||
|
&.button {
|
||||||
|
margin: 0;
|
||||||
|
& > box {
|
||||||
|
margin: 0 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > *:first-child {
|
& > *:first-child {
|
||||||
@@ -35,21 +42,27 @@
|
|||||||
|
|
||||||
// Styles the literal script for workspace indicators
|
// Styles the literal script for workspace indicators
|
||||||
.workspaces {
|
.workspaces {
|
||||||
padding: 2px 0px;
|
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
||||||
& button {
|
& button {
|
||||||
$padding-block: 5px;
|
|
||||||
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
margin: 0 2px;
|
margin: 0 2px;
|
||||||
padding: $padding-block 12px;
|
padding: 5px 12px;
|
||||||
background: lighten($color: $color1, $amount: 10);
|
background: lighten($color: $color1, $amount: 10);
|
||||||
|
|
||||||
|
&:not(.active):hover {
|
||||||
|
box-shadow: inset 0 0 0 50px rgba($color: $foreground, $alpha: .5);
|
||||||
|
}
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
padding: $padding-block 22px;
|
padding-right: 22px;
|
||||||
|
padding-left: 22px;
|
||||||
background: $foreground;
|
background: $foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.special {
|
||||||
|
background: darken($color: $color3, $amount: 5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,17 +112,10 @@
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& > box.separator {
|
|
||||||
margin: 8px 4px;
|
|
||||||
padding: 0 1px;
|
|
||||||
background: darken($color: $foreground, $amount: 20);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.revealed {
|
&.revealed {
|
||||||
background: darken($color: $color3, $amount: 25);
|
|
||||||
transition: 80ms linear;
|
transition: 80ms linear;
|
||||||
|
|
||||||
.media > box {
|
.media > box {
|
||||||
@@ -118,12 +124,31 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.media-controls {
|
.media-controls {
|
||||||
background: darken($color: $color3, $amount: 25);
|
padding: 3px;
|
||||||
|
background: darken($color: $color3, $amount: 10);
|
||||||
border-top-right-radius: 12px;
|
border-top-right-radius: 12px;
|
||||||
border-bottom-right-radius: 12px;
|
border-bottom-right-radius: 12px;
|
||||||
|
|
||||||
& button:last-child {
|
& button {
|
||||||
border-radius: inherit;
|
background: $color2;
|
||||||
|
margin: 0 1px;
|
||||||
|
border-radius: 2px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: lighten($color: $color2, $amount: 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
border-top-left-radius: 8px;
|
||||||
|
border-bottom-left-radius: 8px;
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-top-right-radius: 8px;
|
||||||
|
border-bottom-right-radius: 8px;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,7 +160,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.window {
|
.window {
|
||||||
padding: 0 4px;
|
padding: 0 6px;
|
||||||
|
|
||||||
& > .icon {
|
& > .icon {
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
@@ -146,17 +171,18 @@
|
|||||||
font-size: 9.8px;
|
font-size: 9.8px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
color: darken($color: $foreground, $amount: 20);
|
color: darken($color: $foreground, $amount: 20);
|
||||||
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > label.window-title {
|
& > label.window-title {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: $foreground;
|
color: $foreground;
|
||||||
margin-top: -3px;
|
margin-top: -1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.network button {
|
.network-eventbox > box {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 7px;
|
padding-right: 7px;
|
||||||
}
|
}
|
||||||
@@ -193,8 +219,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.clock button.cal-open {
|
.clock {
|
||||||
background: darken($color: $color3, $amount: 10);
|
& .cal-open > box {
|
||||||
|
background: darken($color: $color3, $amount: 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
& .icon {
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& label:not(.icon) {
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.control-center-toggle {
|
.control-center-toggle {
|
||||||
@@ -217,3 +253,17 @@
|
|||||||
background: darken($color: $color3, $amount: 10);
|
background: darken($color: $color3, $amount: 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hardware {
|
||||||
|
& > box {
|
||||||
|
margin: 0 5px;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,31 +4,38 @@
|
|||||||
background: rgba($background, 0.6);
|
background: rgba($background, 0.6);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
|
||||||
& > label.calendar-header {
|
& > .time {
|
||||||
font-size: 15px;
|
font-size: 42px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .date {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.month-calendar {
|
.month-calendar {
|
||||||
& > * {
|
|
||||||
background: lighten($color: $background, $amount: 2);
|
|
||||||
}
|
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 0 5px;
|
padding: 0 5px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|
||||||
& > .header {
|
& > .header {
|
||||||
|
background: unset;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border-bottom-left-radius: 0;
|
border-bottom-left-radius: 0;
|
||||||
border-bottom-right-radius: 0;
|
border-bottom-right-radius: 0;
|
||||||
border-bottom: solid .5px gray;
|
border-bottom: solid .5px gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $color2;
|
||||||
|
}
|
||||||
|
|
||||||
// Selected day / Current day
|
// Selected day / Current day
|
||||||
&:selected {
|
&:selected {
|
||||||
background: darken($color: $color1, $amount: 20);
|
border: 1px solid $color2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
box.cc {
|
box.cc {
|
||||||
margin-top: 8px;
|
margin: 12px;
|
||||||
margin-bottom: 14px;
|
margin-right: 0;
|
||||||
margin-left: 14px;
|
|
||||||
background: rgba($background, .85);
|
background: rgba($background, .85);
|
||||||
border-top-left-radius: 24px;
|
border-top-left-radius: 24px;
|
||||||
border-bottom-left-radius: 24px;
|
border-bottom-left-radius: 24px;
|
||||||
padding: 18px;
|
padding: 18px;
|
||||||
box-shadow: 0 5 8px 1px black;
|
box-shadow: 0 3px 4px 1px $background;
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-bar {
|
.top-bar {
|
||||||
@@ -50,7 +49,7 @@ box.cc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.cc-notifications {
|
.cc-notifications {
|
||||||
& > .vertical-scroll {
|
&.scroll {
|
||||||
.notifications {
|
.notifications {
|
||||||
box.notification {
|
box.notification {
|
||||||
background: darken($color: $color1, $amount: 10);
|
background: darken($color: $color1, $amount: 10);
|
||||||
@@ -70,6 +69,11 @@ box.cc {
|
|||||||
}
|
}
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.close {
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 9px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
& .content {
|
& .content {
|
||||||
@@ -87,7 +91,7 @@ box.cc {
|
|||||||
|
|
||||||
& .text {
|
& .text {
|
||||||
& label {
|
& label {
|
||||||
font-family: "Cantarell", "Noto Sans CJK JP", "Noto Sans CJK KR";
|
font-family: "Cantarell", "Noto Sans", "Noto Sans CJK JP", "Noto Sans CJK KR";
|
||||||
}
|
}
|
||||||
|
|
||||||
& label.summary {
|
& label.summary {
|
||||||
@@ -117,33 +121,36 @@ box.cc {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggles {
|
.tiles-grid {
|
||||||
|
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
& > .toggle-checkbox:first-child {
|
|
||||||
|
.tiles {
|
||||||
|
margin-bottom: 2px;
|
||||||
|
|
||||||
|
& > .tile-checkbox:first-child {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .toggle-checkbox:last-child {
|
& > .tile-checkbox:last-child {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
& .toggle-checkbox {
|
& .tile-checkbox {
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
& > box {
|
& > box {
|
||||||
background: darken($color: $color2, $amount: 15);
|
background: $color3;
|
||||||
}
|
}
|
||||||
&:checked > box {
|
&:checked > box {
|
||||||
background: $color3;
|
background: $color2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:checked {
|
&:checked {
|
||||||
& > box {
|
& > box {
|
||||||
background: darken($color: $color3, $amount: 5);
|
background: $color2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +158,7 @@ box.cc {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > .toggle {
|
& > .tile {
|
||||||
background: darken($color: $foreground, $amount: 65);
|
background: darken($color: $foreground, $amount: 65);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
@@ -180,4 +187,16 @@ box.cc {
|
|||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& .screen-rec {
|
||||||
|
.icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& .night-light {
|
||||||
|
.icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
.floating-notifications {
|
.floating-notifications {
|
||||||
& > .floating-notification {
|
& > .notifications .floating-notification {
|
||||||
$background-color: darken($color: $color1, $amount: 40);
|
$background-color: darken($color: $color1, $amount: 40);
|
||||||
background: $background-color;
|
background: $background-color;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
@@ -45,4 +45,32 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
& > .bottom {
|
||||||
|
padding: 8px;
|
||||||
|
margin: 0 8px;
|
||||||
|
|
||||||
|
& .tip {
|
||||||
|
background: darken($color: $color1, $amount: 40);
|
||||||
|
border-radius: 12px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
box-shadow: 0 0 0px 1px $background;
|
||||||
|
|
||||||
|
& > .icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .right {
|
||||||
|
background: darken($color: $color1, $amount: 40);
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 0 0px 1px $background;
|
||||||
|
|
||||||
|
& .icon {
|
||||||
|
margin-right: 4px;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-3
@@ -12,7 +12,6 @@ label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
box.button-row {
|
box.button-row {
|
||||||
padding: 2px;
|
|
||||||
$bg-color: darken($color: $foreground, $amount: 25);
|
$bg-color: darken($color: $foreground, $amount: 25);
|
||||||
|
|
||||||
& > button {
|
& > button {
|
||||||
@@ -169,7 +168,7 @@ tooltip {
|
|||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: center 0;
|
background-position: center 0;
|
||||||
margin-right: 12px;
|
margin-right: 12px;
|
||||||
border-radius: 11px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > box > .right {
|
& > box > .right {
|
||||||
@@ -210,8 +209,23 @@ tooltip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.album-bg {
|
&.album-bg {
|
||||||
box-shadow: inset 0 0 0 100px rgba($background, .55);
|
box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .5);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
box.separator {
|
||||||
|
background: darken($color: $foreground, $amount: 20);
|
||||||
|
|
||||||
|
&.horizontal {
|
||||||
|
margin: 8px 4px;
|
||||||
|
padding: 0 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.vertical {
|
||||||
|
margin: 4px 10px;
|
||||||
|
padding: 0 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
+13
-21
@@ -1,7 +1,7 @@
|
|||||||
; All globally used variables should be stored here
|
; All globally used variables, polls and listeners should be stored here
|
||||||
|
|
||||||
|
; Variables
|
||||||
; State
|
; State
|
||||||
(defvar window_state_powermenu "closed")
|
(defvar window_state_powermenu "closed")
|
||||||
(defvar window_state_control-center "closed")
|
(defvar window_state_control-center "closed")
|
||||||
(defvar window_state_floating-notifications "closed")
|
(defvar window_state_floating-notifications "closed")
|
||||||
@@ -11,10 +11,12 @@
|
|||||||
(defvar window_state_volume-popup "closed")
|
(defvar window_state_volume-popup "closed")
|
||||||
(defvar window_state_floating-media "closed")
|
(defvar window_state_floating-media "closed")
|
||||||
|
|
||||||
|
(defvar json_popup_notifications "{ \"notifications\": [] }")
|
||||||
|
|
||||||
|
|
||||||
; Listeners
|
; Listeners
|
||||||
(deflisten json_notifications :initial "[]"
|
(deflisten json_notification_history :initial "{\"history\": []}"
|
||||||
`sh scripts/notification-handler.sh`)
|
`sh scripts/notification-watch.sh`)
|
||||||
|
|
||||||
(deflisten json_volume :initial `{ "output": 60, "source": 80 }`
|
(deflisten json_volume :initial `{ "output": 60, "source": 80 }`
|
||||||
`sh scripts/get-volume-watch.sh`)
|
`sh scripts/get-volume-watch.sh`)
|
||||||
@@ -25,24 +27,11 @@
|
|||||||
(deflisten json_media :initial "{}"
|
(deflisten json_media :initial "{}"
|
||||||
`python3 scripts/mediaplayer.py`)
|
`python3 scripts/mediaplayer.py`)
|
||||||
|
|
||||||
(deflisten active_window :initial `{ "title": "null", "class": "null" }`
|
(deflisten json_active_window :initial "{ \"title\": \"null\", \"class\": \"null\" }"
|
||||||
`sh scripts/active-window.sh`)
|
`sh scripts/active-window.sh`)
|
||||||
|
|
||||||
|
|
||||||
; Polls
|
; Polls
|
||||||
(defpoll day-name :interval "5s"
|
|
||||||
`date +"%A"`)
|
|
||||||
(defpoll day :interval "5s"
|
|
||||||
`date +"%d"`)
|
|
||||||
(defpoll month :interval "5s"
|
|
||||||
`date +"%m"`)
|
|
||||||
(defpoll month-name :interval "5s"
|
|
||||||
`date +"%B"`)
|
|
||||||
(defpoll year :interval "5s"
|
|
||||||
`date +"%Y"`)
|
|
||||||
(defpoll time :interval "5s"
|
|
||||||
`date +"%H:%M"`)
|
|
||||||
|
|
||||||
(defpoll hostname :initial "GNU/Linux"
|
(defpoll hostname :initial "GNU/Linux"
|
||||||
:interval "24h"
|
:interval "24h"
|
||||||
`cat /etc/hostname`)
|
`cat /etc/hostname`)
|
||||||
@@ -64,5 +53,8 @@
|
|||||||
&& json_media.player != "null" }
|
&& json_media.player != "null" }
|
||||||
`playerctl shuffle`)
|
`playerctl shuffle`)
|
||||||
|
|
||||||
; Variables
|
(defpoll is_recording :interval "1s"
|
||||||
(defvar hold_volume_popup false)
|
`sh -c "[[ -f $HOME/.cache/recording.lock ]] && echo true || echo false"`)
|
||||||
|
|
||||||
|
(defpoll night_light :interval "1s"
|
||||||
|
`sh -c "[[ -f $HOME/.cache/night-light.pid ]] && echo true || echo false"`)
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
|
|
||||||
(defwidget audio []
|
(defwidget audio []
|
||||||
(eventbox :onclick "sh scripts/eww-window.sh toggle volume-control"
|
(eventbox :onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh toggle volume-control"
|
||||||
:class "audio-eventbox"
|
:class "audio-eventbox"
|
||||||
|
:cursor "pointer"
|
||||||
(box :class "audio ${window_state_volume-control}"
|
(box :class "audio ${window_state_volume-control}"
|
||||||
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
|
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-`
|
||||||
(label :text "${ json_volume.output != 0 ? '' : '' } ${json_volume.output}%"))
|
(label :text "${ json_volume.output != 0 ? '' : '' } ${json_volume.output}%"))
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
(defwidget battery [ ?device ]
|
(defwidget battery [ ?device ]
|
||||||
(box :class "battery"
|
(box :class "battery"
|
||||||
:visible { EWW_BATTERY != "" ? true : false }
|
:visible { EWW_BATTERY != "" ? true : false }
|
||||||
(label :text " ${EWW_BATTERY}%")
|
(label :text " ${ EWW_BATTERY != '' ? EWW_BATTERY?.status : '' }%")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,8 +1,26 @@
|
|||||||
(defwidget clock []
|
(defwidget clock []
|
||||||
(box :class "clock"
|
(box :class "clock"
|
||||||
:tooltip "${day-name}, ${month-name} ${day}"
|
:tooltip { formattime(EWW_TIME, "%A, %B %d") }
|
||||||
(button :onclick "sh scripts/eww-window.sh toggle calendar-window"
|
|
||||||
:class "${window_state_calendar-window == 'open' ? 'cal-open' : ''}"
|
(eventbox :onclick "sh scripts/eww-window.sh toggle calendar-window"
|
||||||
"${day-name} ${day}, ${time}")
|
:class '${ window_state_calendar-window == "open" ? "cal-open" : "" } button'
|
||||||
|
(box :space-evenly false
|
||||||
|
(box :space-evenly false
|
||||||
|
:class "time"
|
||||||
|
(label :text ""
|
||||||
|
:class "icon")
|
||||||
|
|
||||||
|
(label :text "${ formattime(EWW_TIME, "%A") }")
|
||||||
|
|
||||||
|
(revealer :reveal { window_state_calendar-window == "closed" }
|
||||||
|
:transition "slideright"
|
||||||
|
:duration "240ms"
|
||||||
|
:class "unrevealer"
|
||||||
|
|
||||||
|
(label :text { formattime(EWW_TIME, "%d, %H:%M") } )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
(defwidget hardware [ ?cpu ?memory ?visible ]
|
||||||
|
(eventbox :class "hardware-eventbox button"
|
||||||
|
:onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh toggle hardware-monitor"
|
||||||
|
:visible { visible == "" || visible ? true : false }
|
||||||
|
(box :class "hardware"
|
||||||
|
:space-evenly false
|
||||||
|
(box :class "cpu"
|
||||||
|
:visible { cpu == "" || cpu ? true : false }
|
||||||
|
(label :text " ${ round(EWW_CPU?.avg, 0) }%")
|
||||||
|
)
|
||||||
|
(box :class "memory"
|
||||||
|
:visible { memory == "" || memory ? true : false }
|
||||||
|
(label :text " ${ round(EWW_RAM?.used_mem_perc, 0) }%")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
:onhoverlost "${EWW_CMD} update media_reveal_controls=false"
|
:onhoverlost "${EWW_CMD} update media_reveal_controls=false"
|
||||||
:visible { json_media == "" || (json_media.title == "null" &&
|
:visible { json_media == "" || (json_media.title == "null" &&
|
||||||
json_media.artist == "null") ||
|
json_media.artist == "null") ||
|
||||||
(active_window.class =~ json_media.player ||
|
(json_active_window.class =~ json_media.player ||
|
||||||
active_window.title =~ json_media.title) ?
|
json_active_window.title =~ json_media.title) ?
|
||||||
false : true
|
false : true
|
||||||
}
|
}
|
||||||
:onclick "sh scripts/eww-window.sh toggle floating-media"
|
:onclick "sh scripts/eww-window.sh toggle floating-media"
|
||||||
@@ -27,7 +27,9 @@
|
|||||||
:text "${json_media.title}"
|
:text "${json_media.title}"
|
||||||
:limit-width 40)
|
:limit-width 40)
|
||||||
|
|
||||||
(box :class "separator")
|
(separator :orientation "horizontal"
|
||||||
|
:alpha 0.8
|
||||||
|
:style "border-radius: 2x;")
|
||||||
|
|
||||||
(label :class "media-artist"
|
(label :class "media-artist"
|
||||||
:text "${json_media.artist}"
|
:text "${json_media.artist}"
|
||||||
@@ -37,9 +39,13 @@
|
|||||||
(revealer :class "media-controls-revealer"
|
(revealer :class "media-controls-revealer"
|
||||||
:reveal { media_reveal_controls ? "${ window_state_floating-media == 'closed' ? true : false }" : false }
|
:reveal { media_reveal_controls ? "${ window_state_floating-media == 'closed' ? true : false }" : false }
|
||||||
:transition "slideright"
|
:transition "slideright"
|
||||||
:duration "180ms"
|
:duration "220ms"
|
||||||
|
|
||||||
(box :class "media-controls"
|
(box :class "media-controls"
|
||||||
|
(button :class "url"
|
||||||
|
:onclick "wl-copy '${json_media.url}'"
|
||||||
|
:tooltip "Copy link to Clipboard"
|
||||||
|
"")
|
||||||
(button :class "previous"
|
(button :class "previous"
|
||||||
:onclick "playerctl previous --player=${json_media.player}"
|
:onclick "playerctl previous --player=${json_media.player}"
|
||||||
"")
|
"")
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
(defwidget network []
|
(defwidget network []
|
||||||
(box :class "network"
|
(eventbox :class "button network-eventbox"
|
||||||
(button "${ network_status == 'full' ? ' ' : ' ' }")
|
:onclick "hyprctl dispatch exec 'nm-connection-editor'"
|
||||||
|
(box :class "network"
|
||||||
|
(label :text "${ network_status == 'full' ? ' ' : ' ' }")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,26 +1,27 @@
|
|||||||
|
|
||||||
(defwidget window []
|
(defwidget window []
|
||||||
(box :class "window"
|
(box :class "window"
|
||||||
:visible { active_window.class == "" || active_window.class == "null" ? false : true }
|
:visible { json_active_window.class == "" || json_active_window.class == "null" ? false : true }
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:valign "center"
|
||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
|
|
||||||
(image :class "icon"
|
(image :class "icon"
|
||||||
:icon "${ active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : active_window.initialClass }"
|
:icon "${ json_active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : json_active_window.initialClass }"
|
||||||
:icon-size "toolbar")
|
:icon-size "toolbar")
|
||||||
|
|
||||||
(box :class "info"
|
(box :class "info"
|
||||||
:orientation { active_window.title == "" ? "horizontal" : "vertical" }
|
:orientation { json_active_window.title == "" ? "horizontal" : "vertical" }
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(label :class "window-class"
|
(label :class "window-class"
|
||||||
:text "${active_window.class}"
|
:text "${json_active_window.class}"
|
||||||
:xalign 0
|
:xalign 0
|
||||||
:yalign 0)
|
:yalign 0)
|
||||||
(label :class "window-title"
|
(label :class "window-title"
|
||||||
:text "${active_window.title}"
|
:text "${json_active_window.title}"
|
||||||
:visible { active_window.title != "" ? true : false }
|
:visible { json_active_window.title != "" ? true : false }
|
||||||
:limit-width 45
|
:limit-width 45
|
||||||
:tooltip "${active_window.title}"
|
:tooltip "${json_active_window.title}"
|
||||||
:xalign 0
|
:xalign 0
|
||||||
:yalign 0)
|
:yalign 0)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
:onhover "${EWW_CMD} update hover_workspaces=true"
|
:onhover "${EWW_CMD} update hover_workspaces=true"
|
||||||
:onhoverlost "${EWW_CMD} update hover_workspaces=false"
|
:onhoverlost "${EWW_CMD} update hover_workspaces=false"
|
||||||
(box :class "workspaces"
|
(box :class "workspaces"
|
||||||
|
:valign "center"
|
||||||
(literal :content literal_workspaces)
|
(literal :content literal_workspaces)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
(defwidget big-media [ show-album-bg show-album-image ?album-image-size ?style-background-color ?visible ]
|
(defwidget big-media [ show-album-bg show-album-image ?album-image-size ?style ?visible ]
|
||||||
(box :class "big-media ${ show-album-bg ? 'album-bg' : '' } ${ show-album-image ? 'album-image' : '' }"
|
(box :class "big-media ${ show-album-bg ? 'album-bg' : '' } ${ show-album-image ? 'album-image' : '' }"
|
||||||
:style "${ show-album-bg ? 'background-image: image(url(\"${json_media.artUrl}\"))' : '' } ${
|
:style "${ show-album-bg ? 'background-image: url(\"${json_media.artUrl}\");' : '' } ${style}"
|
||||||
style-background-color != '' ? 'background-color: ${style-background-color}' : '' }"
|
|
||||||
:visible { visible == "" ? true : "${ visible ? true : false }" }
|
:visible { visible == "" ? true : "${ visible ? true : false }" }
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
|
|||||||
@@ -23,9 +23,8 @@
|
|||||||
:text "${application_name}")
|
:text "${application_name}")
|
||||||
)
|
)
|
||||||
(button :class "close"
|
(button :class "close"
|
||||||
:style "border-radius: 10px; padding: 6px; padding-left: 10px; padding-right: 10px;"
|
|
||||||
:onclick "${onclickclose}"
|
:onclick "${onclickclose}"
|
||||||
:visible false ; Temporary, will try doing something to remove history items
|
:visible true
|
||||||
"")
|
"")
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -43,7 +42,7 @@
|
|||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
|
||||||
(label :class "summary"
|
(label :class "summary"
|
||||||
:text "${summary}"
|
:markup "${summary}"
|
||||||
:xalign 0
|
:xalign 0
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:show-truncated true)
|
:show-truncated true)
|
||||||
|
|||||||
@@ -1,54 +1,38 @@
|
|||||||
(defwidget notifications []
|
(defwidget notifications []
|
||||||
(box :class "cc-notifications"
|
(scroll :class "cc-notifications scroll"
|
||||||
:orientation "vertical"
|
:hscroll false
|
||||||
:space-evenly false
|
:vscroll true
|
||||||
|
:vexpand true
|
||||||
(scroll :class "vertical-scroll"
|
:style "border-radius: 16px;"
|
||||||
:hscroll false
|
|
||||||
:vscroll true
|
|
||||||
:hexpand true
|
|
||||||
:vexpand true
|
|
||||||
:height 500
|
|
||||||
:style "border-radius: 16px;"
|
|
||||||
|
|
||||||
(box :class "notifications"
|
(box :class "notifications"
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
:space-evenly false
|
|
||||||
|
|
||||||
|
|
||||||
(for notification in json_notifications
|
|
||||||
(notification :application_name "${notification.app-name.data}"
|
|
||||||
:image "${notification.app-icon.data}"
|
|
||||||
:summary "${notification.summary.data}"
|
|
||||||
:body "${notification.body.data}"
|
|
||||||
:onclick "makoctl invoke -n ${notification.id.data} view"
|
|
||||||
:icon "${notification.app-name.data}"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(box :class "empty-notifications"
|
|
||||||
:visible { arraylength(json_notifications) == 0 ? true : false }
|
|
||||||
:style "margin-top: 50px;"
|
|
||||||
:space-evenly false
|
|
||||||
:orientation "vertical"
|
|
||||||
:halign "center"
|
|
||||||
|
|
||||||
(label :class "bell-icon"
|
|
||||||
:text ""
|
|
||||||
:style "font-size: 96px")
|
|
||||||
|
|
||||||
(label :text "You're done!"
|
|
||||||
:style "margin-left: 12px;")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(box :class "bottom button-row"
|
|
||||||
:halign "end"
|
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(button :class "clear-all"
|
|
||||||
:onclick { arraylength(json_notifications) > 0 ? "pkill mako; hyprctl dispatch exec mako" : "" }
|
(for notification in { json_notification_history["history"] }
|
||||||
" Clear")
|
(notification :application_name "${notification.app-name.data}"
|
||||||
|
:image "${notification.app-icon.data}"
|
||||||
|
:summary "${notification.summary.data}"
|
||||||
|
:body "${notification.body.data}"
|
||||||
|
:onclickclose "sh scripts/notification-remove.sh ${notification.id.data}"
|
||||||
|
:icon "${notification.app-name.data}")
|
||||||
|
)
|
||||||
|
|
||||||
|
(box :class "empty-notifications"
|
||||||
|
:visible { arraylength(json_notification_history["history"]) == 0 }
|
||||||
|
:style "margin-top: 50px;"
|
||||||
|
:space-evenly false
|
||||||
|
:orientation "vertical"
|
||||||
|
:halign "center"
|
||||||
|
:valign "center"
|
||||||
|
|
||||||
|
(label :class "bell-icon"
|
||||||
|
:text ""
|
||||||
|
:style "font-size: 96px")
|
||||||
|
|
||||||
|
(label :text "You're done!"
|
||||||
|
:style "margin-left: 12px;")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
(defwidget tiles []
|
||||||
|
(box :class "tiles-grid"
|
||||||
|
:orientation "vertical"
|
||||||
|
(box :class "tiles tiles1"
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Network"
|
||||||
|
:enabled { network_status == "full" ? true : false }
|
||||||
|
:onenable "nmcli n on"
|
||||||
|
:ondisable "nmcli n off"
|
||||||
|
:visible true
|
||||||
|
:class "network")
|
||||||
|
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Bluetooth"
|
||||||
|
:enabled { bluetooth_powered == "yes" ? true : false }
|
||||||
|
:onenable "bluetoothctl power on"
|
||||||
|
:ondisable "bluetoothctl power off"
|
||||||
|
:visible true)
|
||||||
|
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Do Not Disturb"
|
||||||
|
:enabled { notification_modes =~ "dnd" ? true : false }
|
||||||
|
:onenable "makoctl mode -a dnd"
|
||||||
|
:ondisable "makoctl mode -r dnd"
|
||||||
|
:visible true
|
||||||
|
:class "dnd")
|
||||||
|
)
|
||||||
|
(box :class "tiles tiles2"
|
||||||
|
:visible true
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Airplane Mode"
|
||||||
|
:enabled { (network_status != "full" && network_status != "partial") && bluetooth_powered != "yes" ? true : false }
|
||||||
|
:onenable "bluetoothctl power off; nmcli n off"
|
||||||
|
:ondisable "bluetoothctl power on; nmcli n on")
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Screen Record"
|
||||||
|
:enabled "${is_recording}"
|
||||||
|
:onenable "hyprctl dispatch exec \"sh $HOME/.config/eww/scripts/screen-recording.sh\" >> /dev/null"
|
||||||
|
:ondisable "kill $(cat $HOME/.cache/recording.pid)"
|
||||||
|
:class "screen-rec")
|
||||||
|
(tile :icon ''
|
||||||
|
:label "Night Light"
|
||||||
|
:enabled "${night_light}"
|
||||||
|
:onenable "hyprctl dispatch exec \"sh $HOME/.config/eww/scripts/night-light.sh\""
|
||||||
|
:ondisable "kill $(cat $HOME/.cache/night-light.pid)"
|
||||||
|
:class "night-light")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget tile [ ?class icon label ?onclickarrow ?enabled onenable ondisable ?visible ?min-width ]
|
||||||
|
(checkbox :onchecked "${onenable}"
|
||||||
|
:onunchecked "${ondisable}"
|
||||||
|
:visible { visible == "" || visible ? true : false }
|
||||||
|
:checked { enabled == "" || !enabled ? false : true }
|
||||||
|
:class "tile-checkbox ${class}"
|
||||||
|
|
||||||
|
(box :class "tile"
|
||||||
|
:space-evenly false
|
||||||
|
:valign "center"
|
||||||
|
|
||||||
|
(label :text "${icon}"
|
||||||
|
:class "icon"
|
||||||
|
:unindent true
|
||||||
|
:limit-width 1
|
||||||
|
:show-truncated false
|
||||||
|
:xalign 0)
|
||||||
|
|
||||||
|
(label :text "${label}"
|
||||||
|
:class "label"
|
||||||
|
:xalign 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
(defwidget toggles []
|
|
||||||
(box :class "toggles-grid"
|
|
||||||
:orientation "vertical"
|
|
||||||
(box :class "toggles toggles1"
|
|
||||||
(_toggle :icon ''
|
|
||||||
:label "Network"
|
|
||||||
:enabled { network_status == "full" ? true : false }
|
|
||||||
:onenable "nmcli n on"
|
|
||||||
:ondisable "nmcli n off"
|
|
||||||
:visible true
|
|
||||||
:class "network")
|
|
||||||
(_toggle :icon ''
|
|
||||||
:label "Bluetooth"
|
|
||||||
:enabled { bluetooth_powered == "yes" ? true : false }
|
|
||||||
:onenable "bluetoothctl power on"
|
|
||||||
:ondisable "bluetoothctl power off"
|
|
||||||
:visible true)
|
|
||||||
(_toggle :icon ''
|
|
||||||
:label "Do Not Disturb"
|
|
||||||
:show-arrow false
|
|
||||||
:enabled { notification_modes =~ "dnd" ? true : false }
|
|
||||||
:onenable "makoctl mode -a dnd"
|
|
||||||
:ondisable "makoctl mode -r dnd"
|
|
||||||
:visible true
|
|
||||||
:class "dnd")
|
|
||||||
)
|
|
||||||
(box :class "toggles toggles2"
|
|
||||||
:visible false
|
|
||||||
(_toggle :icon ''
|
|
||||||
:label "Airplane Mode"
|
|
||||||
:show-arrow false
|
|
||||||
:onenable "notify-send -a 'Airplane Mode' 'Toggle AP mode!'"
|
|
||||||
:ondisable ""
|
|
||||||
:visible true)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(defwidget _toggle [ ?class icon label ?onclickarrow ?enabled onenable ondisable visible ?min-width ]
|
|
||||||
(checkbox :onchecked "${onenable}"
|
|
||||||
:onunchecked "${ondisable}"
|
|
||||||
:checked { enabled == true ? true : false }
|
|
||||||
:class "toggle-checkbox ${class}"
|
|
||||||
|
|
||||||
(box :class "toggle"
|
|
||||||
:space-evenly false
|
|
||||||
:valign "center"
|
|
||||||
|
|
||||||
(label :text "${icon}"
|
|
||||||
:class "icon"
|
|
||||||
:unindent true
|
|
||||||
:limit-width 1
|
|
||||||
:show-truncated false
|
|
||||||
:xalign 0)
|
|
||||||
|
|
||||||
(label :text "${label}"
|
|
||||||
:class "label"
|
|
||||||
:xalign 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
(defwidget separator [ ?orientation ?alpha ?style ]
|
||||||
|
(box :class "separator ${ orientation == '' || orientation == 'horizontal' ? 'horizontal' : 'vertical' }"
|
||||||
|
:style "opacity: ${ alpha == '' ? 1 : alpha }; ${style}")
|
||||||
|
)
|
||||||
+12
-1
@@ -7,19 +7,25 @@
|
|||||||
(include "widgets/bar/window.yuck")
|
(include "widgets/bar/window.yuck")
|
||||||
(include "widgets/bar/network.yuck")
|
(include "widgets/bar/network.yuck")
|
||||||
(include "widgets/bar/battery.yuck")
|
(include "widgets/bar/battery.yuck")
|
||||||
|
(include "widgets/bar/hardware.yuck")
|
||||||
|
|
||||||
(defwindow bar
|
(defwindow bar
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :width "100%"
|
:geometry (geometry :width "100%"
|
||||||
:height "44px"
|
:height "50px"
|
||||||
:anchor "top center")
|
:anchor "top center")
|
||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:exclusive true
|
:exclusive true
|
||||||
:namespace "eww-bar"
|
:namespace "eww-bar"
|
||||||
|
(box :class "bar"
|
||||||
|
:vexpand true
|
||||||
|
:hexpand false
|
||||||
(centerbox :orientation "horizontal"
|
(centerbox :orientation "horizontal"
|
||||||
(box :class "widgets-left"
|
(box :class "widgets-left"
|
||||||
:halign "start"
|
:halign "start"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:vexpand true
|
||||||
|
|
||||||
(logo)
|
(logo)
|
||||||
(workspaces)
|
(workspaces)
|
||||||
(window)
|
(window)
|
||||||
@@ -27,12 +33,16 @@
|
|||||||
(box :class "widgets-center"
|
(box :class "widgets-center"
|
||||||
:halign "center"
|
:halign "center"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:vexpand true
|
||||||
|
|
||||||
(clock)
|
(clock)
|
||||||
(media)
|
(media)
|
||||||
)
|
)
|
||||||
(box :class "widgets-right"
|
(box :class "widgets-right"
|
||||||
:halign "end"
|
:halign "end"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:vexpand true
|
||||||
|
|
||||||
(systray :spacing 0
|
(systray :spacing 0
|
||||||
:orientation "horizontal"
|
:orientation "horizontal"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
@@ -46,4 +56,5 @@
|
|||||||
(cc-toggle)
|
(cc-toggle)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,8 +9,11 @@
|
|||||||
:space-evenly false
|
:space-evenly false
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
|
|
||||||
(label :class "calendar-header"
|
(label :class "time"
|
||||||
:text "${month-name} ${day}, ${year}")
|
:text { formattime(EWW_TIME, "%H:%M") })
|
||||||
|
|
||||||
|
(label :class "date"
|
||||||
|
:text { formattime(EWW_TIME, "%B %d, %Y") })
|
||||||
(calendar :class "month-calendar"
|
(calendar :class "month-calendar"
|
||||||
:show-details true
|
:show-details true
|
||||||
:show-heading true
|
:show-heading true
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
(include "widgets/control-center/top-bar.yuck")
|
(include "widgets/control-center/top-bar.yuck")
|
||||||
(include "widgets/control-center/notifications.yuck")
|
(include "widgets/control-center/notifications.yuck")
|
||||||
(include "widgets/control-center/notification.yuck")
|
(include "widgets/control-center/notification.yuck")
|
||||||
(include "widgets/control-center/toggles.yuck")
|
(include "widgets/control-center/tiles.yuck")
|
||||||
|
|
||||||
(defwindow control-center []
|
(defwindow control-center []
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :width "500px"
|
:geometry (geometry :width "500px"
|
||||||
|
:height "90%"
|
||||||
:anchor "top right")
|
:anchor "top right")
|
||||||
:stacking "overlay"
|
:stacking "overlay"
|
||||||
:exclusive false
|
:exclusive false
|
||||||
@@ -15,10 +16,23 @@
|
|||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
(top-bar)
|
(top-bar)
|
||||||
(toggles)
|
(tiles)
|
||||||
(big-media :show-album-bg true
|
(revealer :reveal { window_state_floating-media != "open" }
|
||||||
:show-album-image true
|
:transition "slideup"
|
||||||
:visible { json_media == "" || (json_media.title == "null" && json_media.artist == "null") ? false : true })
|
:duration "380ms"
|
||||||
|
(big-media :show-album-bg true
|
||||||
|
:show-album-image true
|
||||||
|
:visible { json_media == "" || (json_media.title == "null"
|
||||||
|
&& json_media.artist == "null") ? false : true })
|
||||||
|
)
|
||||||
(notifications)
|
(notifications)
|
||||||
|
(box :class "bottom button-row"
|
||||||
|
:halign "end"
|
||||||
|
:space-evenly false
|
||||||
|
(button :class "clear-all"
|
||||||
|
:onclick "sh scripts/notification-clear.sh"
|
||||||
|
:visible { arraylength(json_notification_history["history"]) > 0 }
|
||||||
|
" Clear")
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
(defwindow floating-media []
|
(defwindow floating-media []
|
||||||
:monitor 0
|
:monitor 0
|
||||||
:geometry (geometry :anchor "top center"
|
:geometry (geometry :anchor "top center"
|
||||||
:width "400px")
|
:width "450px")
|
||||||
:exclusive false
|
:exclusive false
|
||||||
:stacking "fg"
|
:stacking "fg"
|
||||||
:focusable false
|
:focusable false
|
||||||
@@ -9,8 +9,15 @@
|
|||||||
(box :class "floating-media"
|
(box :class "floating-media"
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
:space-evenly false
|
:space-evenly false
|
||||||
|
:visible { json_media == "" || (json_media.title == "null"
|
||||||
|
&& json_media.artist == "null") ? false : true }
|
||||||
|
|
||||||
(big-media :show-album-bg true
|
(big-media :show-album-bg true
|
||||||
:album-image-size 124
|
:album-image-size 124
|
||||||
:show-album-image true)
|
:show-album-image true
|
||||||
|
:style "margin: 16px; margin-top: 0; box-shadow:
|
||||||
|
0 5px 6px 1px rgba(0, 0, 0, .6),
|
||||||
|
inset 0 0 0 200px rgba(0, 0, 0, .52);"
|
||||||
|
:visible true)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
(defwindow floating-notifications []
|
||||||
|
:monitor 0
|
||||||
|
:exclusive false
|
||||||
|
:focusable false
|
||||||
|
:namespace "eww-notification-popup"
|
||||||
|
:geometry (geometry :anchor "top right"
|
||||||
|
:width "512px"
|
||||||
|
:height "1px"
|
||||||
|
:x "5px")
|
||||||
|
:stacking "overlay"
|
||||||
|
|
||||||
|
(box :class "floating-notifications"
|
||||||
|
:orientation "vertical"
|
||||||
|
:space-evenly false
|
||||||
|
:hexpand true
|
||||||
|
:vexpand false
|
||||||
|
|
||||||
|
(box :class "notifications"
|
||||||
|
:space-evenly false
|
||||||
|
:orientation "vertical"
|
||||||
|
|
||||||
|
(for item in { json_popup_notifications["notifications"] }
|
||||||
|
(floating-notification :summary "${item.summary.data}"
|
||||||
|
:body "${item.body.data}"
|
||||||
|
:image "${item.app-icon.data}"
|
||||||
|
:app-name "${item.app-name.data}"
|
||||||
|
:onhoverlost "sh scripts/notification-popup-remove.sh ${item.id.data}")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(box :visible { arraylength(json_popup_notifications?.["notifications"]) > 0 }
|
||||||
|
:orientation "horizontal"
|
||||||
|
:valign "end"
|
||||||
|
:class "bottom"
|
||||||
|
:space-evenly true
|
||||||
|
:vexpand false
|
||||||
|
|
||||||
|
(box :class "left"
|
||||||
|
:space-evenly false
|
||||||
|
(box :space-evenly false
|
||||||
|
:class "tip"
|
||||||
|
:valign "center"
|
||||||
|
(label :text ""
|
||||||
|
:class "icon")
|
||||||
|
(label :halign "start"
|
||||||
|
:text "Hover to dismiss"
|
||||||
|
:yalign 0.5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(box :class "right"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "end"
|
||||||
|
(eventbox :class "button"
|
||||||
|
:onclick "sh ${EWW_CONFIG_DIR}/scripts/eww-window.sh close floating-notifications; ${EWW_CMD} update 'json_popup_notifications={\"notifications\": []}'"
|
||||||
|
(box :class "clear-all"
|
||||||
|
:space-evenly false
|
||||||
|
|
||||||
|
(label :text ""
|
||||||
|
:class "icon")
|
||||||
|
(label :text "Clear all")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
(defwidget floating-notification [ summary body image app-name ?onhoverlost ]
|
||||||
|
(eventbox :onhoverlost "${onhoverlost}"
|
||||||
|
:class "floating-notification-eventbox"
|
||||||
|
(box :class "floating-notification"
|
||||||
|
:space-evenly false
|
||||||
|
:orientation "vertical"
|
||||||
|
|
||||||
|
(box :orientation "horizontal"
|
||||||
|
:class "top"
|
||||||
|
:space-evenly false
|
||||||
|
|
||||||
|
(image :class "app-icon"
|
||||||
|
:icon "${ app-name =~ 'zen-alpha' ? 'zen-browser' : app-name }"
|
||||||
|
:icon-size "menu")
|
||||||
|
|
||||||
|
(label :text "${app-name}"
|
||||||
|
:xalign 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
(box :orientation "horizontal"
|
||||||
|
:space-evenly false
|
||||||
|
:class "content"
|
||||||
|
(box :class "image"
|
||||||
|
:style "background-image: image(url('${image}'));"
|
||||||
|
:width 86
|
||||||
|
:height 85
|
||||||
|
:visible { image != "" ? true : false })
|
||||||
|
|
||||||
|
(box :class "text-content"
|
||||||
|
:orientation "vertical"
|
||||||
|
:space-evenly false
|
||||||
|
|
||||||
|
(label :class "summary"
|
||||||
|
:markup "${summary}"
|
||||||
|
:xalign 0)
|
||||||
|
|
||||||
|
(label :class "body"
|
||||||
|
:markup "${body}"
|
||||||
|
:xalign 0
|
||||||
|
:wrap true
|
||||||
|
:show-truncated false)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
(defwindow hardware-monitor []
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :width "320"
|
||||||
|
:anchor "top right")
|
||||||
|
|
||||||
|
:exclusive 0
|
||||||
|
:namespace "eww-hardware"
|
||||||
|
:focusable false
|
||||||
|
:stacking "fg"
|
||||||
|
|
||||||
|
(box :class "hardware-monitor"
|
||||||
|
; TODO
|
||||||
|
)
|
||||||
|
)
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
(defwindow floating-notifications []
|
|
||||||
:monitor 0
|
|
||||||
:exclusive false
|
|
||||||
:focusable false
|
|
||||||
:namespace "eww-notification-popup"
|
|
||||||
:geometry (geometry :anchor "top right"
|
|
||||||
:width "512px"
|
|
||||||
:height "1px"
|
|
||||||
:x "5px")
|
|
||||||
:stacking "overlay"
|
|
||||||
|
|
||||||
(box :class "floating-notifications"
|
|
||||||
:orientation "vertical"
|
|
||||||
(for item in json_recent_notifications
|
|
||||||
(floating-notification :summary "${item.summary.data}"
|
|
||||||
:body "${item.body.data}"
|
|
||||||
:image "${item.icon_path.data}"
|
|
||||||
:app-name "${item.appname.data}")
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(defwidget floating-notification [ summary body image app-name ]
|
|
||||||
(box :class "floating-notification"
|
|
||||||
:space-evenly false
|
|
||||||
:orientation "vertical"
|
|
||||||
|
|
||||||
(box :orientation "horizontal"
|
|
||||||
:class "top"
|
|
||||||
:space-evenly false
|
|
||||||
|
|
||||||
(image :class "app-icon"
|
|
||||||
:icon "${ app-name =~ 'zen-alpha' ? 'zen-browser' : app-name }"
|
|
||||||
:icon-size "menu")
|
|
||||||
|
|
||||||
(label :text "${app-name}"
|
|
||||||
:xalign 0)
|
|
||||||
)
|
|
||||||
|
|
||||||
(box :orientation "horizontal"
|
|
||||||
:space-evenly false
|
|
||||||
:class "content"
|
|
||||||
(box :class "image"
|
|
||||||
:style "background-image: image(url('${image}'));"
|
|
||||||
:width 86
|
|
||||||
:height 85
|
|
||||||
:visible { image != "" ? true : false })
|
|
||||||
|
|
||||||
(box :class "text-content"
|
|
||||||
:orientation "vertical"
|
|
||||||
:space-evenly false
|
|
||||||
|
|
||||||
(label :class "summary"
|
|
||||||
:text "${summary}"
|
|
||||||
:xalign 0)
|
|
||||||
|
|
||||||
(label :class "body"
|
|
||||||
:text "${body}"
|
|
||||||
:xalign 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
@@ -18,7 +18,8 @@
|
|||||||
(output-slider)
|
(output-slider)
|
||||||
(source-slider)
|
(source-slider)
|
||||||
|
|
||||||
(box :class "separator")
|
(separator :orientation "vertical"
|
||||||
|
:alpha 0.5)
|
||||||
|
|
||||||
(box :class "vertical button-row"
|
(box :class "vertical button-row"
|
||||||
:orientation "vertical"
|
:orientation "vertical"
|
||||||
|
|||||||
@@ -11,5 +11,6 @@
|
|||||||
(box :class "volume-popup"
|
(box :class "volume-popup"
|
||||||
(output-slider)
|
(output-slider)
|
||||||
(source-slider)
|
(source-slider)
|
||||||
|
; TODO
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user