✨ feat: move to Elkowar's Wacky Widgets (#2)
✨ Move to Elkowar's Wacky Widgets, Eww Merge pull request #2 from retrozinndev/eww-edition
@@ -1 +1,6 @@
|
||||
|
||||
# Ignore personal configurations (e.g.: hyprpaper.conf, input.conf)
|
||||
hypr/hyprpaper.conf
|
||||
hypr/input.conf
|
||||
|
||||
*.log
|
||||
|
||||
@@ -1,40 +1,42 @@
|
||||
# Retrozinn's Hyprland Dots
|
||||
My customized Hyprland configuration that I use everyday!
|
||||
|
||||
<div align="center">
|
||||
<div class="screenshot-container">
|
||||
<img width=48% src="repo/shots/lockscreen.png">
|
||||
<img width=48% src="repo/shots/showoff.png">
|
||||
<img width=48% src="repo/shots/tools.png">
|
||||
<img width=48% src="repo/shots/gh_profile.png">
|
||||
</div>
|
||||
|
||||
more screenshots in [`repo/shots`](https://github.com/retrozinndev/Hyprland-Dots/tree/ryo/repo/shots)
|
||||
<br>
|
||||
<br>
|
||||
|
||||
https://github.com/user-attachments/assets/6da4ee8f-56d0-4b2e-9ce7-5d721ad9c943
|
||||
|
||||
<p>(for some reason I was nervous when recording this lol)</p>
|
||||
</div>
|
||||
<br>
|
||||
My customized Hyprland dotfiles that I keep improving almost everyday 🤩 !
|
||||
|
||||
> [!note]
|
||||
> I am currently working with eww, you can see how my work is going in the branch `eww-edition`.
|
||||
> Thus I may be a little bit inactive in the main branch (`ryo`).
|
||||
> Finally, the Eww edition is ready! You can now use it if you want to! :heart: <br>
|
||||
> If you're searching for the previous dotfiles with Waybar and Swaync, go
|
||||
> to the [`waybar-edition`](https://github.com/retrozinndev/Hyprland-Dots/tree/waybar-edition) branch!
|
||||
|
||||
## 🌄 Screenshots
|
||||
<div align="center"
|
||||
|
||||
<img src="repo/shots/desktop.png" width="45%">
|
||||
<img src="repo/shots/control_center.png" width="45%">
|
||||
<img src="repo/shots/showing_off_rice.png" width="45%">
|
||||
<img src="repo/shots/runner.png" width="45%">
|
||||
<img src="repo/shots/floating_github.png" width="45%">
|
||||
<img src="repo/shots/calendar.png" width="45%">
|
||||
<img src="repo/shots/floating_media.png" width="45%">
|
||||
<img src="repo/shots/power_menu.png" width="45%">
|
||||
|
||||
more shots in [`repo/shots`](https://github.com/retrozinndev/Hyprland-Dots/tree/ryo/repo/shots)
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
## 🎨 Colors
|
||||
All the colors are dynamically based on the current wallpaper! This is possible by using [pywal], a cli tool to generate colorschemes by using an image as a base.
|
||||
All the colors of the interface are dynamically generated from your wallpaper! This is possible by using [pywal16] (fork of pywal), a cli tool to generate color schemes on the fly.
|
||||
|
||||
## 🖼️ Wallpapers
|
||||
When you're at the [Installation](#Installation) process, you can choose to copy my dotfiles' wallpapers folder. If you chose to copy, you can change the current wallpaper by pressing <kbd>SUPER</kbd> + <kbd>W</kbd>, or clicking to change wallpaper in the Control Center.
|
||||
When you're at the [Installation](#Installation) process, you can choose whether to install my wallpapers. If you chose to install, you can select any of them by clicking to change wallpaper in the Control Center. Or if you haven't chose to install, you can create the directory `~/wallpapers` in your home directory `~` and put an image you want to use as wallpaper and choose it using the menu inside control center and also by pressing <kbd>SUPER</kbd> + <kbd>W</kbd>!
|
||||
|
||||
### Source
|
||||
All wallpapers inside this repo are not made by me! You can find all sources inside [`WALLPAPERS.md`](https://github.com/retrozinndev/Hyprland-Dots/blob/ryo/WALLPAPERS.md) file.
|
||||
See more bindings inside the `~/.config/hypr/bindings.conf` file or check the [Wiki/Usage] page!
|
||||
|
||||
### ℹ️ Source
|
||||
All wallpapers inside this repo are not made by me! You can find all sources inside the [`WALLPAPERS.md`](https://github.com/retrozinndev/Hyprland-Dots/blob/ryo/WALLPAPERS.md) file.
|
||||
|
||||
|
||||
## Installation
|
||||
You'll need to have installed all needed packages before installing my dotfiles! Use your package manager to do so. See needed packages on [`Wiki/Dependencies`].
|
||||
You'll need to have installed all needed packages before installing my dotfiles! Use your package manager to do so. See needed packages in [Wiki/Dependencies].
|
||||
|
||||
In order to install this style right away, just run this installation script:
|
||||
|
||||
@@ -43,13 +45,10 @@ In order to install this style right away, just run this installation script:
|
||||
> 💡 Tip: Note the `$` character means that it's recommended to run this command without root privileges.
|
||||
|
||||
```nushell
|
||||
$ git clone "https://github.com/retrozinndev/Hyprland-Dots.git"; cd Hyprland-Dots; bash apply.sh
|
||||
$ git clone https://github.com/retrozinndev/Hyprland-Dots; cd Hyprland-Dots; sh apply.sh
|
||||
```
|
||||
|
||||
### ❔ How to Use
|
||||
See usage and other relevant info on the [Wiki].
|
||||
|
||||
### 🎉 Apps
|
||||
### 🎉 Tools
|
||||
- Browser: [Zen Browser]
|
||||
- Text Editor: [Neovim], my config is [here](https://github.com/retrozinndev/nvim-conf.lua)
|
||||
- Terminal Emulator: [Kitty]
|
||||
@@ -67,7 +66,7 @@ Thanks to everyone who starred my dotfiles! 💖
|
||||
[](https://starchart.cc/retrozinndev/Hyprland-Dots)
|
||||
|
||||
<!-- References of other projects -->
|
||||
[pywal]: https://github.com/dylanaraps/pywal
|
||||
[pywal16]: https://github.com/eylles/pywal16
|
||||
[zen browser]: https://zen-browser.app
|
||||
[neovim]: https://neovim.io
|
||||
[nushell]: https://nushell.sh
|
||||
@@ -81,7 +80,8 @@ Thanks to everyone who starred my dotfiles! 💖
|
||||
[issues]: https://github.com/retrozinndev/Hyprland-Dots/issues
|
||||
|
||||
<!-- Wiki Pages -->
|
||||
[`wiki/dependencies`]: https://github.com/retrozinndev/Hyprland-Dots/wiki/Dependencies
|
||||
[wiki/dependencies]: https://github.com/retrozinndev/Hyprland-Dots/wiki/Dependencies
|
||||
[wiki/usage]: https://github.com/retrozinndev/Hyprland-Dots/wiki/Usage
|
||||
|
||||
<!-- Action Links -->
|
||||
[new issue]: https://github.com/retrozinndev/Hyprland-Dots/issues/new
|
||||
|
||||
@@ -15,6 +15,10 @@ the links down below.
|
||||
- [Arch Miku (DeviantArt, nesyah)](https://www.deviantart.com/nesyah/art/Arch-linux-feat-Hatsune-Miku-858316759)
|
||||
- [Others (Alpha Coders)](https://alphacoders.com/vocaloid-wallpapers)
|
||||
|
||||
## Dan Da Dan Wallpapers
|
||||
|
||||
- [Alpha Coders](https://alphacoders.com/dandadan-wallpapers)
|
||||
|
||||
## Hypr-chan Wallpaper
|
||||
|
||||
- [GitHub (hyprwm/Hyprland)](https://github.com/hyprwm/Hyprland)
|
||||
|
||||
@@ -10,7 +10,7 @@ echo "######################################"
|
||||
printf "\n"
|
||||
|
||||
CONFIG_DIR="$HOME/.config"
|
||||
DOTFILES_DIRS=("hypr" "waybar" "swaync" "wlogout" "anyrun" "wal" "fastfetch")
|
||||
DOTFILES_DIRS=("hypr" "eww" "kitty" "anyrun" "wal" "fastfetch" "mako")
|
||||
DOTFILES_BACKUP_DIR="$HOME/hyprland-dotfiles-bkp"
|
||||
TRASH_DIR="$HOME/.local/share/Trash/files"
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
@import "../../.cache/wal/colors.scss";
|
||||
|
||||
@import "styles/general.scss";
|
||||
@import "styles/bar.scss";
|
||||
@import "styles/calendar.scss";
|
||||
@import "styles/control-center.scss";
|
||||
@import "styles/powermenu.scss";
|
||||
@import "styles/volume-control.scss";
|
||||
@import "styles/floating-notifications.scss";
|
||||
@@ -0,0 +1,14 @@
|
||||
; Variables
|
||||
(include "variables.yuck")
|
||||
|
||||
; Windows
|
||||
(include "windows/calendar-window.yuck")
|
||||
(include "windows/control-center.yuck")
|
||||
(include "windows/bar.yuck")
|
||||
(include "windows/powermenu.yuck")
|
||||
(include "windows/volume-control.yuck")
|
||||
(include "windows/volume-popup.yuck")
|
||||
(include "windows/floating-media.yuck")
|
||||
|
||||
; Widgets
|
||||
(include "widgets/big-media.yuck")
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# output current window before event trigger to prevent issues
|
||||
hyprctl -j activewindow | jq -c | sed 's/\\[n]//g'
|
||||
|
||||
handle() {
|
||||
case $1 in
|
||||
activewindow*) hyprctl -j activewindow | jq -c | sed 's/\\[n]//g' ;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
send_notification() {
|
||||
notify-send -u normal -a "Color Picker" "$1" "$2"
|
||||
}
|
||||
|
||||
# Check if user has hyprpicker installed
|
||||
if ! [[ -f /bin/hyprpicker ]]; then
|
||||
send_notification "An error occurred" "Looks like you don't have Hyprpicker installed! Try installing it before using the Color Picker tool."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
selected_color=$(hyprpicker)
|
||||
|
||||
if ! [[ $selected_color == "" ]]; then
|
||||
wl-copy $selected_color
|
||||
send_notification "Selected Color" "The selected color is <span foreground='$selected_color'>$selected_color</span>, it was also copied to your clipboard!"
|
||||
fi
|
||||
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# arg1,$1 should be one of the options listed in help command;
|
||||
# arg2,$2 should be the literal window name as defined in eww configuration.
|
||||
|
||||
check_if_empty() {
|
||||
if [[ -z $1 ]]; then
|
||||
echo "[error] argument $2 is empty!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--help | -h | help | h)
|
||||
printf \
|
||||
"This is a helper script that helps opening/closing eww windows on
|
||||
retrozinndev's Hyprland Dots, by checking if the window is already
|
||||
open/closed before doing anything, also changes eww state variables.
|
||||
This needs a variable like window_state_WINDOWNAME to work, where
|
||||
WINDOWNAME is the literal name of the declared window inside the
|
||||
eww configuration you are using.
|
||||
|
||||
Usage:
|
||||
arg1 arg2
|
||||
./eww-window.sh [SINGLE OPTION] [WINDOW_NAME]
|
||||
|
||||
Options:
|
||||
-h, --help, help: Shows this help message;
|
||||
--open, open: Opens a window and changes its state variable to
|
||||
\"open\" if not open, or else does nothing;
|
||||
--toggle, toggle: Toggles a window. If open, the specified
|
||||
window is closed, if closed, the
|
||||
specified window is open. Same thing goes to
|
||||
the eww window state variable;
|
||||
--close, close: Closes a window and also changes its state
|
||||
variable to \"closed\" if open, or else does
|
||||
nothing.
|
||||
|
||||
|
||||
Developer: retrozinndev (João Dias), https://github.com/retrozinndev
|
||||
Issue tracker: https://github.com/retrozinndev/Hyprland-Dots/issues
|
||||
Licensed under the MIT License, as in retrozinndev's Hyprland-Dots repo."
|
||||
;;
|
||||
|
||||
--open | open)
|
||||
check_if_empty $2 "WINDOW_NAME"
|
||||
if [[ $(eww get "window_state_$2") == "closed" ]]; then
|
||||
eww open "$2"
|
||||
eww update "window_state_$2=open"
|
||||
else
|
||||
echo "[info] Window '$2' is already open, ignored."
|
||||
fi
|
||||
;;
|
||||
|
||||
--close | close)
|
||||
check_if_empty $2 "WINDOW_NAME"
|
||||
if [[ $(eww get "window_state_$2") == "open" ]]; then
|
||||
eww close "$2"
|
||||
eww update "window_state_$2=closed"
|
||||
else
|
||||
echo "[info] Window '$2' is already closed, ignored."
|
||||
fi
|
||||
;;
|
||||
|
||||
--toggle | toggle)
|
||||
check_if_empty $2 "WINDOW_NAME"
|
||||
if [[ $(eww get "window_state_$2") == "closed" ]]; then
|
||||
eww open "$2"
|
||||
eww update "window_state_$2=open"
|
||||
else
|
||||
eww close "$2"
|
||||
eww update "window_state_$2=closed"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "[error] Action not specified or incorrect command order. Good example: \`./eww-window.sh open bar\`"
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sink_="@DEFAULT_AUDIO_SINK@"
|
||||
source_="@DEFAULT_AUDIO_SOURCE@"
|
||||
|
||||
print_json() {
|
||||
echo "{ \"output\": $output_vol, \"source\": $source_vol }"
|
||||
}
|
||||
|
||||
get_vol() {
|
||||
echo $(wpctl get-volume $1 | awk "{print int(\$2*100)}")
|
||||
}
|
||||
|
||||
output_vol=$(get_vol $sink_)
|
||||
source_vol=$(get_vol $source_)
|
||||
|
||||
print_json
|
||||
|
||||
# Loop
|
||||
pactl subscribe | grep --line-buffered -e "on sink" -e "on source" | while read -r; do
|
||||
|
||||
output_vol=$(get_vol $sink_)
|
||||
source_vol=$(get_vol $source_)
|
||||
|
||||
print_json
|
||||
done
|
||||
@@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Original code is from Alexays/Waybar repo in https://github.com/Alexays/Waybar
|
||||
# Modified by retrozinndev to support Spotube and MPD. Dotfiles: https://github.com/retrozinndev/Hyprland-Dots
|
||||
# Modified by retrozinndev to work on Eww and more players.
|
||||
# Dotfiles: https://github.com/retrozinndev/Hyprland-Dots
|
||||
|
||||
import gi
|
||||
gi.require_version("Playerctl", "2.0")
|
||||
@@ -68,16 +69,6 @@ class PlayerManager:
|
||||
def get_players(self) -> List[Player]:
|
||||
return self.manager.props.players
|
||||
|
||||
def write_output(self, text, player):
|
||||
logger.debug(f"Writing output: {text}")
|
||||
|
||||
output = {"text": text,
|
||||
"class": "custom-" + player.props.player_name,
|
||||
"alt": player.props.player_name}
|
||||
|
||||
sys.stdout.write(json.dumps(output) + "\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def clear_output(self):
|
||||
sys.stdout.write("\n")
|
||||
sys.stdout.flush()
|
||||
@@ -119,20 +110,13 @@ class PlayerManager:
|
||||
title = player.get_title()
|
||||
|
||||
track_info = ""
|
||||
if ((player_name == "spotify" or player_name == "spotube" or player_name == "mpv") and "mpris:trackid" in metadata.keys() and ":ad:" in player.props.metadata["mpris:trackid"]):
|
||||
if ((player_name == "spotify") and "mpris:trackid" in metadata.keys() and ":ad:" in player.props.metadata["mpris:trackid"]):
|
||||
track_info = "Advertisement"
|
||||
elif artist != None and title != None:
|
||||
track_info = f"{artist} - {title}"
|
||||
if(artist == "" or artist == " "):
|
||||
track_info = f"{title}"
|
||||
else:
|
||||
track_info = title
|
||||
|
||||
if track_info:
|
||||
if player.props.status == "Playing":
|
||||
track_info = " " + track_info
|
||||
else:
|
||||
track_info = " " + track_info
|
||||
# only print output if no other player is playing
|
||||
current_playing = self.get_first_playing_player()
|
||||
if current_playing is None or current_playing.props.player_name == player.props.player_name:
|
||||
@@ -140,6 +124,22 @@ class PlayerManager:
|
||||
else:
|
||||
logger.debug(f"Other player {current_playing.props.player_name} is playing, skipping")
|
||||
|
||||
def write_output(self, text, player):
|
||||
logger.debug(f"Writing output: {text}")
|
||||
|
||||
output = {
|
||||
"status": player.props.status.lower(),
|
||||
"title": player.get_title(),
|
||||
"artist": player.get_artist(),
|
||||
"player": player.props.player_name.lower(),
|
||||
"artUrl": player.print_metadata_prop("mpris:artUrl"),
|
||||
"length": player.print_metadata_prop("mpris:length"),
|
||||
"url": player.print_metadata_prop("xesam:url")
|
||||
}
|
||||
|
||||
sys.stdout.write(json.dumps(output) + "\n")
|
||||
sys.stdout.flush()
|
||||
|
||||
def on_player_appeared(self, _, player):
|
||||
logger.info(f"Player has appeared: {player.name}")
|
||||
if player.name in self.excluded_player:
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# initial notification history
|
||||
json_initial_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
||||
echo $json_initial_history
|
||||
|
||||
while true; do
|
||||
# watch history every 200ms
|
||||
sleep .2
|
||||
|
||||
# frequently updated history variable
|
||||
json_history=$(makoctl history | jq -c '.data[]' | sed -e 's/\\[n]/\\n/g' -e 's/&/&/g')
|
||||
|
||||
if ! [[ "$json_initial_history" == "$json_history" ]]; then
|
||||
json_initial_history="$json_history"
|
||||
echo "$json_initial_history"
|
||||
fi
|
||||
done
|
||||
@@ -0,0 +1,81 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Original Script by vimjoyer, modified by retrozinndev
|
||||
# Licensed under the MIT License, as in vimjoyer's repository and also in retrozinndev's Hyprland Dots.
|
||||
# This script watches for notifications to display as a popup in eww.
|
||||
|
||||
import threading
|
||||
import time
|
||||
import dbus
|
||||
import dbus.service
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
from gi.repository import GLib
|
||||
|
||||
class Notification:
|
||||
def __init__(self, app_name, summary, body, icon, replaces_id):
|
||||
self.app_name = app_name
|
||||
self.summary = summary
|
||||
self.body = body
|
||||
self.icon = icon
|
||||
self.replaces_id = replaces_id
|
||||
|
||||
notifications = []
|
||||
notification_timeout = 8 # In seconds
|
||||
|
||||
def remove_popup_notification(notification):
|
||||
time.sleep(notification_timeout)
|
||||
notifications.remove(notification)
|
||||
reload_output()
|
||||
|
||||
def add_popup_notification(notification):
|
||||
notifications.insert(0, notification)
|
||||
reload_output()
|
||||
timer_thread = threading.Thread(target=remove_popup_notification, args=(notification,))
|
||||
timer_thread.start()
|
||||
|
||||
def reload_output():
|
||||
lastItem_notifications = len(notifications) - 1
|
||||
output = ""
|
||||
|
||||
os.popen(". /etc/profile; eww open floating-notifications >> /dev/null")
|
||||
|
||||
for item in notifications:
|
||||
if item is not notifications[lastItem_notifications]:
|
||||
output = output + f"{{ \"applicationName\": \"{item.app_name}\", \"image\": \"{item.icon}\", \"summary\": \"{item.summary}\", \"body\": \"{item.body}\", \"id\": {item.replaces_id} }}, "
|
||||
|
||||
else:
|
||||
output = "["+ output + f"{{ \"applicationName\": \"{item.app_name}\", \"image\": \"{item.icon}\", \"summary\": \"{item.summary}\", \"body\": \"{item.body}\", \"id\": {item.replaces_id} }} ]"
|
||||
|
||||
|
||||
# Check if notifications(var) is empty
|
||||
if not notifications:
|
||||
output = "[]"
|
||||
os.popen(". /etc/profile; eww close floating-notifications >> /dev/null")
|
||||
|
||||
print(f"{output}", flush=True)
|
||||
|
||||
|
||||
class NotificationServer(dbus.service.Object):
|
||||
def __init__(self):
|
||||
bus_name = dbus.service.BusName("org.freedesktop.Notifications", bus=dbus.SessionBus())
|
||||
dbus.service.Object.__init__(self, bus_name, "/org/freedesktop/Notifications")
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", in_signature="susssasa{ss}i", out_signature="u")
|
||||
def Notify(self, app_name, replaces_id, icon, summary, body, actions, hints, timeout):
|
||||
add_popup_notification(Notification(app_name, summary, body, icon, replaces_id))
|
||||
return 0
|
||||
|
||||
@dbus.service.method("org.freedesktop.Notifications", out_signature="ssss")
|
||||
def GetServerInformation(self):
|
||||
return ("Custom Notification Server", "ExampleNS", "1.0", "1.2")
|
||||
|
||||
|
||||
DBusGMainLoop(set_as_default=True)
|
||||
|
||||
if __name__ == "__main__":
|
||||
server = NotificationServer()
|
||||
mainloop = GLib.MainLoop()
|
||||
mainloop.run()
|
||||
@@ -0,0 +1,24 @@
|
||||
#!/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
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while true; do
|
||||
is_holding=$(eww get hold_volume_popup)
|
||||
if [[ $is_holding == true ]]; then
|
||||
sleep 4
|
||||
sh ./eww-window.sh close volume-popup
|
||||
eww update "hold_volume_popup=false"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
print_workspaces_literal() {
|
||||
active_workspace_id=$(hyprctl -j activeworkspace | jq .id | xargs)
|
||||
existing_workspaces=$(hyprctl -j workspaces | jq .[].id | xargs)
|
||||
|
||||
output="
|
||||
(box :class \"workspaces\"
|
||||
:space-evenly false
|
||||
:orientation \"horizontal\""
|
||||
|
||||
for i in {1..10}; do
|
||||
output=$output"
|
||||
(button :onclick \"hyprctl dispatch workspace $i >> /dev/null \"
|
||||
:class { $active_workspace_id == $i ? \"active\" : \"\" }
|
||||
:visible { \"$existing_workspaces\" =~ $i ? true : false }
|
||||
:tooltip \"Workspace ${i}\"
|
||||
\"\")"
|
||||
|
||||
if [ $i == 10 ]; then
|
||||
output=$output")" # closes box if last
|
||||
fi
|
||||
done
|
||||
|
||||
echo "$(echo $output | xargs -0)"
|
||||
}
|
||||
|
||||
# display workspaces on startup
|
||||
print_workspaces_literal
|
||||
|
||||
handle() {
|
||||
case $1 in
|
||||
workspace*) print_workspaces_literal;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done
|
||||
@@ -0,0 +1,219 @@
|
||||
|
||||
.bar {
|
||||
background: transparent;
|
||||
padding: 4px;
|
||||
|
||||
& label {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* Styles .widgets-[left/center/right] */
|
||||
.widgets-left,
|
||||
.widgets-center,
|
||||
.widgets-right {
|
||||
background: rgba($background, 0.6);
|
||||
border-radius: 18px;
|
||||
padding: 6px;
|
||||
|
||||
& > * {
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
& > *:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
& > *:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
& > *:only-child {
|
||||
margin: 0 0px;
|
||||
}
|
||||
}
|
||||
|
||||
// Styles the literal script for workspace indicators
|
||||
.workspaces {
|
||||
padding: 2px 0px;
|
||||
border-radius: 50%;
|
||||
|
||||
& > button {
|
||||
$padding-block: 5px;
|
||||
|
||||
border-radius: 16px;
|
||||
margin: 0 2px;
|
||||
padding: $padding-block 12px;
|
||||
background: lighten($color: $color1, $amount: 10);
|
||||
|
||||
&.active {
|
||||
padding: $padding-block 22px;
|
||||
background: $foreground;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.distro-logo {
|
||||
padding: 0;
|
||||
padding-left: 12px;
|
||||
padding-right: 6px;
|
||||
|
||||
& > label {
|
||||
font-size: 15px;
|
||||
padding-right: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.systray {
|
||||
all: unset;
|
||||
|
||||
& > * > * {
|
||||
margin: 0 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.mediaplayer {
|
||||
border-radius: 12px;
|
||||
|
||||
& > .media {
|
||||
border-radius: inherit;
|
||||
|
||||
&:hover {
|
||||
& > box {
|
||||
box-shadow: inset 0 0 0 50px rgba($color: $foreground, $alpha: .1);
|
||||
}
|
||||
}
|
||||
& > box {
|
||||
border-radius: inherit;
|
||||
background: darken($color: $color3, $amount: 5);
|
||||
|
||||
& > label {
|
||||
color: $foreground;
|
||||
font-size: inherit;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
& > box.separator {
|
||||
margin: 8px 4px;
|
||||
padding: 0 1px;
|
||||
background: darken($color: $foreground, $amount: 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.revealed {
|
||||
background: darken($color: $color3, $amount: 25);
|
||||
transition: 80ms linear;
|
||||
|
||||
.media > box {
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.media-controls {
|
||||
background: darken($color: $color3, $amount: 25);
|
||||
border-top-right-radius: 12px;
|
||||
border-bottom-right-radius: 12px;
|
||||
|
||||
& button:last-child {
|
||||
border-radius: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0 7px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.window {
|
||||
padding: 0 4px;
|
||||
|
||||
& > .icon {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
& > box.info {
|
||||
& > label.window-class {
|
||||
font-size: 9.8px;
|
||||
font-family: monospace;
|
||||
color: darken($color: $foreground, $amount: 20);
|
||||
}
|
||||
|
||||
& > label.window-title {
|
||||
font-size: 12px;
|
||||
color: $foreground;
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.network button {
|
||||
padding-left: 10px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.bluetooth button {
|
||||
padding-left: 10px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.audio-eventbox {
|
||||
&:hover box.audio {
|
||||
background: darken($color: $color2, $amount: 5);
|
||||
}
|
||||
|
||||
& > .audio {
|
||||
padding: 0 8px;
|
||||
border-radius: 12px;
|
||||
|
||||
&.open {
|
||||
background: darken($color: $color3, $amount: 10);
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 600;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.clock button.cal-open {
|
||||
background: darken($color: $color3, $amount: 10);
|
||||
}
|
||||
|
||||
.control-center-toggle {
|
||||
border-radius: 12px;
|
||||
|
||||
&:hover {
|
||||
background: darken($color: $color2, $amount: 10);
|
||||
}
|
||||
|
||||
& > box {
|
||||
padding-left: 12px;
|
||||
padding-right: 14px;
|
||||
|
||||
label {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
&.open {
|
||||
background: darken($color: $color3, $amount: 10);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
.calendar-box {
|
||||
padding: 10px;
|
||||
background: rgba($background, 0.6);
|
||||
border-radius: 16px;
|
||||
|
||||
& > label.calendar-header {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.month-calendar {
|
||||
& > * {
|
||||
background: lighten($color: $background, $amount: 2);
|
||||
}
|
||||
border-radius: 12px;
|
||||
padding: 0 5px;
|
||||
padding-top: 10px;
|
||||
font-weight: 500;
|
||||
|
||||
& > .header {
|
||||
border-radius: 6px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom: solid .5px gray;
|
||||
}
|
||||
|
||||
// Selected day / Current day
|
||||
&:selected {
|
||||
background: darken($color: $color1, $amount: 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
box.cc {
|
||||
margin-top: 8px;
|
||||
margin-bottom: 14px;
|
||||
margin-left: 14px;
|
||||
background: rgba($background, .85);
|
||||
border-top-left-radius: 24px;
|
||||
border-bottom-left-radius: 24px;
|
||||
padding: 18px;
|
||||
box-shadow: 0 5 8px 1px black;
|
||||
}
|
||||
|
||||
.top-bar {
|
||||
margin-bottom: 15px;
|
||||
|
||||
& label {
|
||||
&.hostname {
|
||||
font-size: 13.3px;
|
||||
font-weight: 700;
|
||||
border-bottom: .5px solid rgba(darken($color: $foreground, $amount: 15), .5);
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
&.uptime {
|
||||
font-size: 11.7px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.button-row {
|
||||
margin: 7px 0;
|
||||
}
|
||||
|
||||
.wallpaper {
|
||||
padding-left: 9px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.screenshot {
|
||||
padding-left: 9px;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
.color-picker {
|
||||
padding-right: 11px;
|
||||
}
|
||||
|
||||
.powermenu {
|
||||
padding-right: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.cc-notifications {
|
||||
& > .vertical-scroll {
|
||||
.notifications {
|
||||
box.notification {
|
||||
background: darken($color: $color1, $amount: 10);
|
||||
border-radius: 16px;
|
||||
margin: 4px 0;
|
||||
|
||||
& > .top {
|
||||
border-top-left-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
background: darken($color: $color1, $amount: 7);
|
||||
border-bottom: .5px solid rgba(darken($color: $foreground, $amount: 15), .3);
|
||||
padding: 5px 6px;
|
||||
|
||||
& > .app-info {
|
||||
& .app-icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
& .content {
|
||||
padding: 8px;
|
||||
padding-top: 0px;
|
||||
|
||||
& > .image {
|
||||
border-radius: 16px;
|
||||
margin-right: 6px;
|
||||
margin-top: 6px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 0;
|
||||
}
|
||||
|
||||
& .text {
|
||||
& label {
|
||||
font-family: "Cantarell", "Noto Sans CJK JP", "Noto Sans CJK KR";
|
||||
}
|
||||
|
||||
& label.summary {
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
& label.body {
|
||||
font-size: 13.1px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .bottom {
|
||||
margin-top: 4px;
|
||||
|
||||
&.button-row {
|
||||
& button.do-not-disturb {
|
||||
padding-right: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.toggles {
|
||||
|
||||
margin-bottom: 10px;
|
||||
|
||||
& > .toggle-checkbox:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
& > .toggle-checkbox:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
& .toggle-checkbox {
|
||||
margin: 2px;
|
||||
|
||||
&:hover {
|
||||
& > box {
|
||||
background: darken($color: $color2, $amount: 15);
|
||||
}
|
||||
}
|
||||
|
||||
&:checked {
|
||||
& > box {
|
||||
background: darken($color: $color3, $amount: 12);
|
||||
}
|
||||
}
|
||||
|
||||
& > *:not(box) {
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
& > .toggle {
|
||||
background: darken($color: $foreground, $amount: 65);
|
||||
border-radius: 16px;
|
||||
padding: 16px;
|
||||
margin-left: -16px; // This covers the checkbox space, hiding the check thing
|
||||
|
||||
.icon {
|
||||
font-size: 14px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
.floating-notifications {
|
||||
& > .floating-notification {
|
||||
$background-color: darken($color: $color1, $amount: 40);
|
||||
background: $background-color;
|
||||
border-radius: 16px;
|
||||
margin: 14px;
|
||||
box-shadow: 0 0 8px 2px rgba($background, .9);
|
||||
|
||||
& > .top {
|
||||
border-top-left-radius: 15.4px;
|
||||
border-top-right-radius: 15.4px;
|
||||
padding: 6px 12px;
|
||||
background: lighten($color: $background-color, $amount: 5);
|
||||
border-bottom: .5px solid rgba($foreground, .2);
|
||||
|
||||
label {
|
||||
font-family: "Noto Sans Mono", monospace;
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 10px;
|
||||
|
||||
.image {
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
margin-right: 6px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.text-content {
|
||||
|
||||
label.summary {
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
label.body {
|
||||
font-size: 13.3px;
|
||||
}
|
||||
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
|
||||
$foreground: lighten($color: $foreground, $amount: 5);
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
transition: 120ms linear;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
label {
|
||||
color: lighten($foreground, 15)
|
||||
}
|
||||
|
||||
box.button-row {
|
||||
padding: 2px;
|
||||
$bg-color: darken($color: $foreground, $amount: 25);
|
||||
|
||||
& > button {
|
||||
background: rgba($bg-color, .8);
|
||||
border-radius: 1px;
|
||||
margin: 0 1px;
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: 8px;
|
||||
border-bottom-left-radius: 8px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-top-right-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $bg-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
box.vertical.button-row {
|
||||
padding: 2px;
|
||||
$bg-color: darken($color: $foreground, $amount: 25);
|
||||
|
||||
& > button {
|
||||
background: rgba($bg-color, .8);
|
||||
border-radius: 2px;
|
||||
margin: 1px 0;
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-left-radius: 8px;
|
||||
border-bottom-right-radius: 8px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: $bg-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button,
|
||||
.button {
|
||||
padding: 6px 10px;
|
||||
border-radius: 12px;
|
||||
background: none;
|
||||
}
|
||||
|
||||
button:hover,
|
||||
.button:hover {
|
||||
background: darken($color: $color2, $amount: 5);
|
||||
}
|
||||
|
||||
button:active,
|
||||
.button:active {
|
||||
background: darken($color: $color3, $amount: 10);
|
||||
}
|
||||
|
||||
button label {
|
||||
color: $foreground;
|
||||
}
|
||||
|
||||
menu {
|
||||
background: $background;
|
||||
border-radius: 14px;
|
||||
padding: 3px;
|
||||
|
||||
& > menuitem {
|
||||
padding: 8px 24px;
|
||||
border-radius: 5px;
|
||||
|
||||
&:hover {
|
||||
background: $color1;
|
||||
}
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: inherit;
|
||||
border-top-right-radius: inherit;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-bottom-left-radius: inherit;
|
||||
border-bottom-right-radius: inherit;
|
||||
}
|
||||
|
||||
label {
|
||||
font-weight: 600;
|
||||
color: $foreground;
|
||||
}
|
||||
}
|
||||
|
||||
& > separator {
|
||||
background: lighten($color: $background, $amount: 5);
|
||||
margin: .5px 10px;
|
||||
padding: 1px 0;
|
||||
border-radius: 1px;
|
||||
}
|
||||
}
|
||||
|
||||
trough {
|
||||
background: darken($color: $foreground, $amount: 25);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
trough highlight {
|
||||
background: $foreground;
|
||||
padding: 10px;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
scale {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
tooltip {
|
||||
& box {
|
||||
margin: 16px;
|
||||
margin-top: 0;
|
||||
border-radius: 12px;
|
||||
border: 1px solid darken($color: $color1, $amount: 1);
|
||||
background: $background;
|
||||
padding: 6px 8px;
|
||||
box-shadow: 0 3px 5px 1px rgba($color: #000000, $alpha: .8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.big-media {
|
||||
padding: 16px;
|
||||
margin: 6px 0;
|
||||
border-radius: 18px;
|
||||
|
||||
& > box > .album-image {
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 0;
|
||||
margin-right: 12px;
|
||||
border-radius: 11px;
|
||||
}
|
||||
|
||||
& > box > .right {
|
||||
|
||||
& > .media-info {
|
||||
label {
|
||||
font-family: "Cantarell", "Noto Sans CJK JP";
|
||||
}
|
||||
|
||||
& label.title {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
& label.artist {
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
& > .controls {
|
||||
padding: 0px;
|
||||
|
||||
& > button {
|
||||
padding: 4px 9px;
|
||||
|
||||
& > label {
|
||||
font-size: 13.3px;
|
||||
}
|
||||
}
|
||||
|
||||
& > button.repeat {
|
||||
padding-right: 11px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.album-bg {
|
||||
box-shadow: inset 0 0 0 100px rgba($background, .55);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
.powermenu-container {
|
||||
margin: 400px 100px;
|
||||
|
||||
& * {
|
||||
outline: initial;
|
||||
}
|
||||
& > button {
|
||||
padding: 96px;
|
||||
margin: 0 6px;
|
||||
border-radius: 6px;
|
||||
background: darken($color: $foreground, $amount: 35);
|
||||
|
||||
&:first-child {
|
||||
border-top-left-radius: 24px;
|
||||
border-bottom-left-radius: 24px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border-top-right-radius: 24px;
|
||||
border-bottom-right-radius: 24px;
|
||||
}
|
||||
|
||||
& label {
|
||||
font-size: 98px;
|
||||
}
|
||||
}
|
||||
|
||||
& button:hover {
|
||||
background: $color1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
|
||||
.volume-control {
|
||||
background: rgba($background, .6);
|
||||
padding: 6px;
|
||||
border-radius: 16px;
|
||||
|
||||
trough {
|
||||
background: rgba(lighten($color: $background, $amount: 8), .4);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
trough highlight {
|
||||
background: lighten($color: $color2, $amount: 40);
|
||||
padding: 10px;
|
||||
border-radius: inherit;
|
||||
}
|
||||
|
||||
scale {
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.volume-control .separator {
|
||||
border-top: .5px solid rgba(darken($color: $foreground, $amount: 25), .7);
|
||||
margin-bottom: 8px;
|
||||
margin-left: 6px;
|
||||
margin-right: 6px;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
.volume-control .slider {
|
||||
label {
|
||||
margin-left: 18px;
|
||||
color: $background;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
; All globally used variables should be stored here
|
||||
|
||||
|
||||
; State
|
||||
(defvar window_state_powermenu "closed")
|
||||
(defvar window_state_control-center "closed")
|
||||
(defvar window_state_floating-notifications "closed")
|
||||
(defvar window_state_bar "closed")
|
||||
(defvar window_state_volume-control "closed")
|
||||
(defvar window_state_calendar-window "closed")
|
||||
(defvar window_state_volume-popup "closed")
|
||||
(defvar window_state_floating-media "closed")
|
||||
|
||||
|
||||
; Listeners
|
||||
(deflisten json_notifications :initial "[]"
|
||||
`sh scripts/notification-handler.sh`)
|
||||
|
||||
(deflisten json_volume :initial `{ "output": 60, "source": 80 }`
|
||||
`sh scripts/get-volume-watch.sh`)
|
||||
|
||||
(deflisten literal_workspaces :initial ""
|
||||
`sh scripts/workspaces.sh`)
|
||||
|
||||
(deflisten json_media :initial "{}"
|
||||
`python3 scripts/mediaplayer.py`)
|
||||
|
||||
(deflisten active_window :initial `{ "title": "null", "class": "null" }`
|
||||
`sh scripts/active-window.sh`)
|
||||
|
||||
|
||||
; 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"
|
||||
:interval "24h"
|
||||
`cat /etc/hostname`)
|
||||
|
||||
(defpoll uptime_info :interval "50s"
|
||||
`uptime -p | sed -e 's/^up //'`)
|
||||
|
||||
(defpoll network_status :interval "2s"
|
||||
`nmcli n c`)
|
||||
|
||||
(defpoll bluetooth_powered :interval "2s"
|
||||
`bluetoothctl show | grep Powered | awk '{ print $2 }'`)
|
||||
|
||||
(defpoll notification_modes :interval "1s"
|
||||
`makoctl mode | xargs`)
|
||||
|
||||
(defpoll media_shuffle_status :interval "1.5s"
|
||||
:run-while { json_media.player != ""
|
||||
&& json_media.player != "null" }
|
||||
`playerctl shuffle`)
|
||||
|
||||
; Variables
|
||||
(defvar hold_volume_popup false)
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
(defwidget audio []
|
||||
(eventbox :onclick "sh scripts/eww-window.sh toggle volume-control"
|
||||
:class "audio-eventbox"
|
||||
(box :class "audio ${window_state_volume-control}"
|
||||
(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}%"))
|
||||
(eventbox :onscroll `[ {} == "up" ] && wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+ || wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-`
|
||||
(label :text "${ json_volume.source != 0 ? '' : '' } ${json_volume.source}%"))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
(defwidget battery [ ?device ]
|
||||
(box :class "battery"
|
||||
:visible { EWW_BATTERY != "" ? true : false }
|
||||
(label :text " ${EWW_BATTERY}%")
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
(defwidget cc-toggle []
|
||||
(eventbox :onclick "sh scripts/eww-window.sh toggle control-center"
|
||||
:onrightclick "makoctl mode -t dnd"
|
||||
:class "control-center-toggle ${ window_state_control-center == "open" ? "open" : "closed" }"
|
||||
(box :class "button"
|
||||
{ notification_modes =~ "dnd" ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,8 @@
|
||||
(defwidget clock []
|
||||
(box :class "clock"
|
||||
:tooltip "${day-name}, ${month-name} ${day}"
|
||||
(button :onclick "sh scripts/eww-window.sh toggle calendar-window"
|
||||
:class "${window_state_calendar-window == 'open' ? 'cal-open' : ''}"
|
||||
"${day-name} ${day}, ${time}")
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
(defwidget logo []
|
||||
(button :class "distro-logo"
|
||||
:onclick "hyprctl dispatch exec anyrun"
|
||||
" ")
|
||||
)
|
||||
@@ -0,0 +1,57 @@
|
||||
|
||||
(defvar media_reveal_controls false)
|
||||
|
||||
(defwidget media []
|
||||
(eventbox :onhover "${EWW_CMD} update media_reveal_controls=true"
|
||||
:onhoverlost "${EWW_CMD} update media_reveal_controls=false"
|
||||
:visible { json_media == "" ||
|
||||
(active_window.class =~ json_media.player &&
|
||||
active_window.title =~ json_media.title) ?
|
||||
false : true
|
||||
}
|
||||
:onclick "sh scripts/eww-window.sh toggle floating-media"
|
||||
:class "mediaplayer-eventbox"
|
||||
|
||||
(box :class "mediaplayer ${ media_reveal_controls && window_state_floating-media == "closed" ? 'revealed' : '' }"
|
||||
:space-evenly false
|
||||
|
||||
(eventbox :class "media"
|
||||
:tooltip "${json_media.title} - ${json_media.artist}"
|
||||
|
||||
(box :space-evenly false
|
||||
(label :class "player"
|
||||
:text { json_media.player == "spotify" ? " " : " " })
|
||||
|
||||
(label :class "media-title"
|
||||
:text "${json_media.title}"
|
||||
:limit-width 40)
|
||||
|
||||
(box :class "separator")
|
||||
|
||||
(label :class "media-artist"
|
||||
:text "${json_media.artist}"
|
||||
:limit-width 25)
|
||||
)
|
||||
)
|
||||
(revealer :class "media-controls-revealer"
|
||||
:reveal { media_reveal_controls ? "${ window_state_floating-media == 'closed' ? true : false }" : false }
|
||||
:transition "slideright"
|
||||
:duration "180ms"
|
||||
|
||||
(box :class "media-controls"
|
||||
(button :class "previous"
|
||||
:onclick "playerctl previous --player=${json_media.player}"
|
||||
"")
|
||||
|
||||
(button :class "toggle play-pause"
|
||||
:onclick "playerctl play-pause --player=${json_media.player}"
|
||||
{ json_media.status == "playing" ? "" : "" })
|
||||
|
||||
(button :class "next"
|
||||
:onclick "playerctl next --player=${json_media.player}"
|
||||
"")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
(defwidget network []
|
||||
(box :class "network"
|
||||
(button "${ network_status == 'full' ? ' ' : ' ' }")
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
(defwidget window []
|
||||
(box :class "window"
|
||||
:visible { active_window.class == "" || active_window.class == "null" ? false : true }
|
||||
:space-evenly false
|
||||
:orientation "horizontal"
|
||||
|
||||
(image :class "icon"
|
||||
:icon "${ active_window.initialClass =~ 'zen-(.*)$' ? 'zen-browser' : active_window.initialClass }"
|
||||
:icon-size "toolbar")
|
||||
|
||||
(box :class "info"
|
||||
:orientation { active_window.title == "" ? "horizontal" : "vertical" }
|
||||
:space-evenly false
|
||||
(label :class "window-class"
|
||||
:text "${active_window.class}"
|
||||
:xalign 0
|
||||
:yalign 0)
|
||||
(label :class "window-title"
|
||||
:text "${active_window.title}"
|
||||
:visible { active_window.title != "" ? true : false }
|
||||
:limit-width 45
|
||||
:tooltip "${active_window.title}"
|
||||
:xalign 0
|
||||
:yalign 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,6 @@
|
||||
|
||||
(defwidget workspaces []
|
||||
(eventbox :onscroll "[[ {} == up ]] && hyprctl dispatch workspace e+1 >> /dev/null || hyprctl dispatch workspace e-1 >> /dev/null"
|
||||
(literal :content literal_workspaces)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,89 @@
|
||||
(defwidget big-media [ show-album-bg show-album-image ?album-image-size ?style-background-color ?visible ]
|
||||
(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-background-color != '' ? 'background-color: ${style-background-color}' : '' }"
|
||||
:visible { visible ? true : false}
|
||||
:space-evenly false
|
||||
:orientation "vertical"
|
||||
|
||||
(box :orientation "horizontal"
|
||||
:space-evenly false
|
||||
:class "media"
|
||||
|
||||
(box :class "album-image"
|
||||
:width { album-image-size != "" ? album-image-size : 98 }
|
||||
:height { album-image-size != "" ? "${album-image-size - 11}" : 87 }
|
||||
:style "background-image: image(url('${json_media.artUrl}'));"
|
||||
:valign "center"
|
||||
:visible { show-album-image ? true : false })
|
||||
|
||||
(box :orientation "vertical"
|
||||
:space-evenly false
|
||||
:class "right"
|
||||
:hexpand true
|
||||
:valign "center"
|
||||
|
||||
(box :class "media-info"
|
||||
:space-evenly false
|
||||
:halign "fill"
|
||||
:orientation "vertical"
|
||||
|
||||
(label :class "title"
|
||||
:text "${json_media.title}"
|
||||
:xalign 0
|
||||
:wrap false
|
||||
:hexpand true
|
||||
:show-truncated true)
|
||||
(label :class "artist"
|
||||
:text "${json_media.artist}"
|
||||
:xalign 0
|
||||
:wrap false
|
||||
:hexpand true
|
||||
:show-truncated true)
|
||||
)
|
||||
|
||||
(box :class "controls"
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
|
||||
(box :class "button-row"
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:visible { json_media.url != "null" ? true : false }
|
||||
|
||||
(button :class "url"
|
||||
:onclick "wl-copy '${json_media.url}'"
|
||||
:style "padding-right: 13px;"
|
||||
:tooltip "Copy link to Clipboard"
|
||||
"")
|
||||
)
|
||||
|
||||
(box :class "button-row"
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
|
||||
(button :class "shuffle"
|
||||
:onclick "playerctl --player=${json_media.player} shuffle Toggle"
|
||||
:tooltip "Toggle shuffle"
|
||||
"")
|
||||
(button :class "previous"
|
||||
:onclick "playerctl --player=${json_media.player} previous"
|
||||
:tooltip "Previous"
|
||||
"")
|
||||
(button :class "play-pause"
|
||||
:onclick "playerctl --player=${json_media.player} play-pause"
|
||||
:tooltip { json_media.status == "playing" ? "Pause" : "Play" }
|
||||
{ json_media.status == "playing" ? "" : "" })
|
||||
(button :class "next"
|
||||
:onclick "playerctl --player=${json_media.player} next"
|
||||
:tooltip "Next"
|
||||
"")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,60 @@
|
||||
(defwidget notification [ ?application_name ?icon summary body ?image ?onclickclose ?onclick ]
|
||||
(eventbox :onclick "${onclick}"
|
||||
(box :class "notification"
|
||||
:orientation "vertical"
|
||||
:height 96
|
||||
:space-evenly false
|
||||
|
||||
(box :class "top"
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
|
||||
(box :class "app-info"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
:hexpand true
|
||||
:vexpand false
|
||||
|
||||
(image :class "app-icon"
|
||||
:visible { icon != "" ? true : false }
|
||||
:icon "${icon}"
|
||||
:icon-size "menu")
|
||||
(label :class "app-name"
|
||||
:text "${application_name}")
|
||||
)
|
||||
(button :class "close"
|
||||
:style "border-radius: 10px; padding: 6px; padding-left: 10px; padding-right: 10px;"
|
||||
:onclick "${onclickclose}"
|
||||
:visible false ; Temporary, will try doing something to remove history items
|
||||
"")
|
||||
)
|
||||
|
||||
(box :class "content"
|
||||
:space-evenly false
|
||||
(box :class "image"
|
||||
:width 96
|
||||
:height 96
|
||||
:visible { image != "" && image != "\{\}" ? true : false }
|
||||
:style { image != "" ? "background-image: image(url('${image}'));" : "" }
|
||||
)
|
||||
|
||||
(box :class "text"
|
||||
:orientation "vertical"
|
||||
:space-evenly false
|
||||
|
||||
(label :class "summary"
|
||||
:text "${summary}"
|
||||
:xalign 0
|
||||
:halign "start"
|
||||
:show-truncated true)
|
||||
|
||||
(label :class "body"
|
||||
:markup "${body}"
|
||||
:xalign 0
|
||||
:show-truncated false
|
||||
:wrap true)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,54 @@
|
||||
(defwidget notifications []
|
||||
(box :class "cc-notifications"
|
||||
:orientation "vertical"
|
||||
:space-evenly false
|
||||
|
||||
(scroll :class "vertical-scroll"
|
||||
:hscroll false
|
||||
:vscroll true
|
||||
:hexpand true
|
||||
:vexpand true
|
||||
:height 500
|
||||
:style "border-radius: 16px;"
|
||||
|
||||
(box :class "notifications"
|
||||
: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
|
||||
(button :class "clear-all"
|
||||
:onclick { arraylength(json_notifications) > 0 ? "pkill mako; hyprctl dispatch exec mako" : "" }
|
||||
" Clear")
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,60 @@
|
||||
(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)
|
||||
)
|
||||
(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"
|
||||
|
||||
(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,46 @@
|
||||
(defwidget top-bar []
|
||||
(box :class "top-bar"
|
||||
:orientation "horizontal"
|
||||
|
||||
(box :class "left"
|
||||
:orientation "vertical"
|
||||
:halign "start"
|
||||
:space-evenly false
|
||||
|
||||
(label :xalign 0
|
||||
:text " ${hostname}"
|
||||
:class "hostname")
|
||||
|
||||
(label :xalign 0
|
||||
:text " ${uptime_info}"
|
||||
:class "uptime")
|
||||
)
|
||||
|
||||
(box :orientation "horizontal"
|
||||
:class "button-row"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
|
||||
(button :class "lock"
|
||||
:onclick "hyprctl dispatch exec hyprlock"
|
||||
:tooltip "Lock"
|
||||
'')
|
||||
(button :class "color-picker"
|
||||
:onclick "hyprctl dispatch exec 'sh $HOME/.config/eww/scripts/color-picker.sh'"
|
||||
:tooltip "Pick a Color"
|
||||
'')
|
||||
(button :class "screenshot"
|
||||
:onclick "hyprctl dispatch exec 'hyprshot -m region -o $HOME/Screenshots'"
|
||||
:tooltip "Select to screenshot"
|
||||
'')
|
||||
(button :class "wallpaper"
|
||||
:onclick "hyprctl dispatch exec 'sh $HOME/.config/hypr/scripts/change-wallpaper.sh'"
|
||||
:tooltip "Select a wallpaper"
|
||||
'')
|
||||
(button :class "powermenu"
|
||||
:onclick "sh scripts/eww-window.sh close bar && sh scripts/eww-window.sh open powermenu"
|
||||
:tooltip "Choose power options"
|
||||
'')
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,18 @@
|
||||
(defwidget output-slider []
|
||||
(box :class "slider output-slider"
|
||||
:space-evenly true
|
||||
|
||||
(overlay
|
||||
(scale :min 0
|
||||
:max 101 ; dirty fix max 99% volume
|
||||
:value "${json_volume.output}"
|
||||
:orientation "horizontal"
|
||||
:draw-value false
|
||||
:flipped false
|
||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SINK@ $(awk -v n={} 'BEGIN { print (n / 100) }')")
|
||||
|
||||
(label :text ""
|
||||
:xalign 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,19 @@
|
||||
(defwidget source-slider []
|
||||
(box :class "slider source-slider"
|
||||
:space-evenly true
|
||||
|
||||
(overlay
|
||||
(scale :min 0
|
||||
:max 101 ; dirty fix 99% max volume
|
||||
:value "${json_volume.source}"
|
||||
:orientation "horizontal"
|
||||
:draw-value false
|
||||
:flipped false
|
||||
:onchange "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ $(awk -v n={} 'BEGIN { print (n / 100) }')"
|
||||
:class "output-volume-slider")
|
||||
|
||||
(label :text ""
|
||||
:xalign 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,49 @@
|
||||
(include "widgets/bar/workspaces.yuck")
|
||||
(include "widgets/bar/clock.yuck")
|
||||
(include "widgets/bar/cc-toggle.yuck")
|
||||
(include "widgets/bar/audio.yuck")
|
||||
(include "widgets/bar/media.yuck")
|
||||
(include "widgets/bar/logo.yuck")
|
||||
(include "widgets/bar/window.yuck")
|
||||
(include "widgets/bar/network.yuck")
|
||||
(include "widgets/bar/battery.yuck")
|
||||
|
||||
(defwindow bar
|
||||
:monitor 0
|
||||
:geometry (geometry :width "100%"
|
||||
:height "44px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive true
|
||||
:namespace "eww-bar"
|
||||
(centerbox :orientation "horizontal"
|
||||
(box :class "widgets-left"
|
||||
:halign "start"
|
||||
:space-evenly false
|
||||
(logo)
|
||||
(workspaces)
|
||||
(window)
|
||||
)
|
||||
(box :class "widgets-center"
|
||||
:halign "center"
|
||||
:space-evenly false
|
||||
(clock)
|
||||
(media)
|
||||
)
|
||||
(box :class "widgets-right"
|
||||
:halign "end"
|
||||
:space-evenly false
|
||||
(systray :spacing 0
|
||||
:orientation "horizontal"
|
||||
:space-evenly false
|
||||
:icon-size 14
|
||||
:prepend-new false
|
||||
:class "systray"
|
||||
)
|
||||
(audio)
|
||||
(battery)
|
||||
(network)
|
||||
(cc-toggle)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,20 @@
|
||||
(defwindow calendar-window
|
||||
:monitor 0
|
||||
:geometry (geometry :anchor "top center")
|
||||
:stacking "fg"
|
||||
:exclusive false
|
||||
:namespace "eww-calendar"
|
||||
|
||||
(box :class "calendar-box"
|
||||
:space-evenly false
|
||||
:orientation "vertical"
|
||||
|
||||
(label :class "calendar-header"
|
||||
:text "${month-name} ${day}, ${year}")
|
||||
(calendar :class "month-calendar"
|
||||
:show-details true
|
||||
:show-heading true
|
||||
:show-day-names true
|
||||
:show-week-numbers false)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,24 @@
|
||||
(include "widgets/control-center/top-bar.yuck")
|
||||
(include "widgets/control-center/notifications.yuck")
|
||||
(include "widgets/control-center/notification.yuck")
|
||||
(include "widgets/control-center/toggles.yuck")
|
||||
|
||||
(defwindow control-center []
|
||||
:monitor 0
|
||||
:geometry (geometry :width "500px"
|
||||
:anchor "top right")
|
||||
:stacking "overlay"
|
||||
:exclusive false
|
||||
:namespace "eww-cc"
|
||||
|
||||
(box :class "cc"
|
||||
:orientation "vertical"
|
||||
:space-evenly false
|
||||
(top-bar)
|
||||
(toggles)
|
||||
(big-media :show-album-bg true
|
||||
:show-album-image true
|
||||
:visible { json_media != "" ? true : false })
|
||||
(notifications)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
(defwindow floating-media []
|
||||
:monitor 0
|
||||
:geometry (geometry :anchor "top center"
|
||||
:width "400px")
|
||||
:exclusive false
|
||||
:stacking "fg"
|
||||
:focusable false
|
||||
:namespace "eww-media"
|
||||
(box :class "floating-media"
|
||||
:orientation "vertical"
|
||||
:space-evenly false
|
||||
(big-media :show-album-bg true
|
||||
:album-image-size 124
|
||||
:show-album-image true)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,33 @@
|
||||
(defwindow powermenu []
|
||||
:monitor 0
|
||||
:geometry (geometry :width "100%"
|
||||
:height "100%")
|
||||
|
||||
:stacking "overlay"
|
||||
:namespace "eww-powermenu"
|
||||
:focusable true
|
||||
:exclusive true
|
||||
|
||||
(eventbox :class "outside"
|
||||
:onclick "sh scripts/eww-window.sh close powermenu; sh scripts/eww-window.sh open bar"
|
||||
(box :space-evenly true
|
||||
:halign "center"
|
||||
:class "powermenu-container"
|
||||
(button :class "poweroff"
|
||||
:onclick "systemctl poweroff"
|
||||
"")
|
||||
(button :class "reboot"
|
||||
:onclick "systemctl reboot"
|
||||
"")
|
||||
(button :class "suspend"
|
||||
:onclick "systemctl suspend"
|
||||
"")
|
||||
(button :class "logout"
|
||||
:onclick "loginctl kill-user $(sh -c 'echo $USER')"
|
||||
"")
|
||||
;(button :class "close"
|
||||
; :onclick "sh scripts/eww-window.sh close powermenu; sh scripts/eww-window.sh open bar"
|
||||
;"")
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,63 @@
|
||||
(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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,37 @@
|
||||
(include "./widgets/volume-control/output-slider.yuck")
|
||||
(include "./widgets/volume-control/source-slider.yuck")
|
||||
|
||||
(defwindow volume-control []
|
||||
:monitor 0
|
||||
:namespace "eww-volume"
|
||||
:geometry (geometry :anchor "top right"
|
||||
:width "280px"
|
||||
:x "6px")
|
||||
:exclusive false
|
||||
:stacking "overlay"
|
||||
:focusable false
|
||||
|
||||
(box :class "volume-control"
|
||||
:space-evenly false
|
||||
:orientation "vertical"
|
||||
|
||||
(output-slider)
|
||||
(source-slider)
|
||||
|
||||
(box :class "separator")
|
||||
|
||||
(box :class "vertical button-row"
|
||||
:orientation "vertical"
|
||||
|
||||
(button :class "bluetooth-devices"
|
||||
:onclick "sh scripts/eww-window.sh close volume-control; hyprctl dispatch exec overskride"
|
||||
(label :text "Bluetooth devices"
|
||||
:xalign 0))
|
||||
|
||||
(button :class "more-devices"
|
||||
:onclick "sh scripts/eww-window.sh close volume-control; hyprctl dispatch exec pavucontrol"
|
||||
(label :text "More settings"
|
||||
:xalign 0))
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
(defwindow volume-popup []
|
||||
:monitor 0
|
||||
:stacking "overlay"
|
||||
:namespace "volume-popup"
|
||||
:focusable false
|
||||
:exclusive false
|
||||
:geometry (geometry :width 180
|
||||
:anchor "top center"
|
||||
:y "10px")
|
||||
|
||||
(box :class "volume-popup"
|
||||
(output-slider)
|
||||
(source-slider)
|
||||
)
|
||||
)
|
||||
@@ -21,7 +21,7 @@
|
||||
"key": " ",
|
||||
"shell": "/bin/sh",
|
||||
"param": "-c",
|
||||
"text": "DISTRO_NAME=$(uname -n); echo \"${DISTRO_NAME^} $(uname -r)\"",
|
||||
"text": "sh -c '. /etc/os-release; echo \"$PRETTY_NAME $(uname -r)\"'",
|
||||
"format": "{1}"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,14 +3,15 @@
|
||||
## AUTOSTART ##
|
||||
###############
|
||||
|
||||
exec-once = /usr/lib/hyprpolkitagent # Experimental Hyprland Polkit Agent
|
||||
exec-once = waybar # Status Bar
|
||||
exec-once = GTK_THEME=Adwaita swaync # Run Control Center with Adwaita theme to prevent issues
|
||||
exec-once = systemctl enable --user --now hyprpolkitagent.service # Hyprland Policy Kit
|
||||
exec-once = hyprpaper # Wallpaper
|
||||
exec-once = mako # Notification Daemon
|
||||
exec-once = eww daemon --no-daemonize # Eww service
|
||||
exec-once = sh $HOME/.config/eww/scripts/eww-window.sh open bar
|
||||
exec-once = hypridle # Idle daemon
|
||||
|
||||
# Re-run pywal
|
||||
exec-once = wal -R
|
||||
# Load pywal from cache || generate pywal colorscheme
|
||||
exec-once = sh -c "[[ -d $HOME/.cache/wal ]] && wal -R || wal -q -t --cols16 darken -i $(cat '$HOME/.config/hypr/hyprpaper.conf' | grep '$wallpaper =' | sed -e 's/^$wallpaper = //')"
|
||||
|
||||
# Clipboard manager
|
||||
exec-once = wl-paste --type text --watch cliphist store # Stores text
|
||||
|
||||
@@ -16,7 +16,6 @@ $screenshotSelect = hyprshot -m region -o $screenshotDir
|
||||
$media = spotify-launcher
|
||||
|
||||
|
||||
|
||||
# Main binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, K, exec, $terminal
|
||||
bind = $mainMod, Q, killactive
|
||||
@@ -25,15 +24,15 @@ bind = $mainMod, F, togglefloating
|
||||
bind = $mainMod, SPACE, exec, $menu
|
||||
bind = $mainMod, P, pseudo,
|
||||
bind = $mainMod, J, togglesplit
|
||||
bind = $mainMod, F11, fullscreen
|
||||
bind = $mainMod, N, exec, swaync-client -t
|
||||
bind = $mainMod, N, exec, sh $HOME/.config/eww/scripts/eww-window.sh toggle control-center
|
||||
bind = $mainMod, L, exec, $lockscreen
|
||||
bind = $mainMod, F11, fullscreen
|
||||
|
||||
# Media keys
|
||||
bind = , XF86AudioMedia, exec, $media
|
||||
bind = , XF86AudioLowerVolume, exec, pamixer -d 5 # Decrease volume
|
||||
bind = , XF86AudioRaiseVolume, exec, pamixer -i 5 # Increase volume
|
||||
bind = , XF86AudioMute, exec, pamixer --toggle-mute # Mute
|
||||
bind = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- # Decrease volume
|
||||
bind = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ # Increase volume
|
||||
bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle # Mute
|
||||
bind = , XF86AudioPrev, exec, playerctl previous # Previous media
|
||||
bind = , XF86AudioNext, exec, playerctl next # Next media
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause # Toggle Play/Pause media
|
||||
@@ -46,17 +45,19 @@ bind = , XF86MonBrightnessUp, exec, brightnessctl s +5% # Increase monitor brigh
|
||||
bind = , Print, exec, $screenshotSelect
|
||||
bind = $mainMod, Print, exec, $screenshotFull
|
||||
|
||||
# Open wofi clipboard
|
||||
# Open clipboard
|
||||
bind = $mainMod, V, exec, cliphist list | $dmenu | cliphist decode | xargs -r wl-copy
|
||||
|
||||
# Open wallpaper menu
|
||||
bind = $mainMod, W, exec, /usr/bin/env bash $HOME/.config/hypr/scripts/change-wallpaper.sh
|
||||
bind = $mainMod, W, exec, env bash $HOME/.config/hypr/scripts/change-wallpaper.sh
|
||||
|
||||
# Reloading Components
|
||||
# Waybar
|
||||
bind = $mainMod, F7, exec, pkill waybar && waybar
|
||||
# Reload binds
|
||||
# Eww
|
||||
bind = $mainMod, F7, exec, eww reload
|
||||
# Hyprpaper (Wallpaper)
|
||||
bind = $mainMod, F8, exec, pkill hyprpaper && hyprpaper
|
||||
# Dunst (Notification daemon)
|
||||
bind = $mainMod, F9, exec, pkill dunst && dunst
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
@@ -101,12 +102,8 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
bind = CTRL ALT, right, workspace, e+1
|
||||
bind = CTRL ALT, left, workspace, e-1
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
bind = CTRL $mainMod, right, workspace, e+1
|
||||
bind = CTRL $mainMod, left, workspace, e-1
|
||||
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
@@ -37,16 +37,16 @@ decoration {
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 3
|
||||
render_power = 5
|
||||
range = 1
|
||||
render_power = 2
|
||||
color = $background
|
||||
}
|
||||
|
||||
blur {
|
||||
enabled = true
|
||||
new_optimizations = true
|
||||
size = 7
|
||||
passes = 2
|
||||
size = 4
|
||||
passes = 5
|
||||
vibrancy = 0.9
|
||||
}
|
||||
}
|
||||
@@ -54,17 +54,32 @@ decoration {
|
||||
animations {
|
||||
enabled = true
|
||||
|
||||
# Beziers
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
bezier = amazingBezier, 0.25, 0.59, 0.1, 1.05
|
||||
bezier = layerBezier, 0.36, 0.58, 0.1, 1
|
||||
bezier = popinBezier, 0.5, .1, .05, 1.0
|
||||
bezier = layerBezier, 0.5, .1, .05, 1.0
|
||||
bezier = workspaceBezier, 0.16, 0.20, 0, 1
|
||||
|
||||
animation = windows, 1, 5, amazingBezier, slide
|
||||
|
||||
# Windows
|
||||
animation = windowsIn, 1, 6, myBezier, slide
|
||||
animation = windowsOut, 1, 5, amazingBezier, slide
|
||||
animation = layers, 1, 6, layerBezier, slide
|
||||
animation = windowsMove, 1, 4.5, amazingBezier
|
||||
|
||||
# Layers
|
||||
animation = layersIn, 1, 6, layerBezier, slide
|
||||
animation = layersOut, 1, 6, layerBezier, slide
|
||||
animation = border, 1, 10, default
|
||||
|
||||
# Workspaces
|
||||
animation = workspaces, 1, 3.5, workspaceBezier, slidefade 20%
|
||||
|
||||
# Fade
|
||||
animation = fade, 1, 4, myBezier
|
||||
animation = fadeLayersIn, 1, 3, layerBezier
|
||||
animation = fadeLayersOut, 1, 4, layerBezier
|
||||
|
||||
# Others
|
||||
animation = border, 1, 5.5, amazingBezier
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 3.5, default
|
||||
animation = fadeLayers, 1, 7, amazingBezier
|
||||
animation = workspaces, 1, 4, amazingBezier, slidefade 20%
|
||||
}
|
||||
|
||||
@@ -12,5 +12,6 @@ env = QT_QPA_PLATFORM, wayland
|
||||
env = QT_QPA_PLATFORMTHEME, qt5ct
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
|
||||
env = XDG_CURRENT_DESKTOP, Hyprland
|
||||
env = XDG_SESSION_TYPE, wayland
|
||||
env = ADW_DISABLE_PORTAL, 1
|
||||
env = MOZ_ENABLE_WAYLAND, 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#############################################
|
||||
|
||||
# Nvidia Settings
|
||||
# source = ~/.config/hypr/nvidia.conf
|
||||
source = ~/.config/hypr/nvidia.conf
|
||||
|
||||
# Environment
|
||||
source = ~/.config/hypr/environment.conf
|
||||
|
||||
@@ -19,15 +19,15 @@ general {
|
||||
background {
|
||||
monitor =
|
||||
path = $wallpaper
|
||||
blur_passes = 2
|
||||
blur_passes = 3
|
||||
color = $background
|
||||
}
|
||||
|
||||
# Time
|
||||
label {
|
||||
monitor =
|
||||
text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hour style
|
||||
# text = cmd[update:30000] echo -e "$(date +"%r")"
|
||||
text = cmd[update:30000] echo -e "$(date +"%R")" # 24-hours
|
||||
# text = cmd[update:30000] echo -e "$(date +"%I:%M %p")" # 12-hours (AM/PM)
|
||||
color = $foreground
|
||||
font_size = 120
|
||||
font_family = $clockFont
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
|
||||
$wallpaper = /home/joaov/wallpapers/Linux Anime Girl.png
|
||||
|
||||
splash = true
|
||||
preload = $wallpaper
|
||||
wallpaper = , $wallpaper
|
||||
@@ -1,26 +0,0 @@
|
||||
###########
|
||||
## INPUT ##
|
||||
###########
|
||||
|
||||
|
||||
input {
|
||||
kb_layout = br
|
||||
kb_variant = abnt2
|
||||
# kb_model =
|
||||
# kb_options =
|
||||
# kb_rules =
|
||||
|
||||
numlock_by_default = true
|
||||
follow_mouse = 1
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = true
|
||||
}
|
||||
@@ -13,5 +13,5 @@
|
||||
# arg4 -> variable refresh rate for games(optional);
|
||||
# arg5 -> 1: vrr enabled, 0: no vrr.
|
||||
|
||||
monitor = VGA-1, 1920x1080@60, 0x0, 1, vrr, 1
|
||||
monitor = HDMI-A-1, 1920x1080@75, 0x0, 1, vrr, 1
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#####################
|
||||
|
||||
env = LIBVA_DRIVER_NAME, nvidia
|
||||
env = XDG_SESSION_TYPE, wayland
|
||||
env = GBM_BACKEND, nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME, nvidia
|
||||
env = _VK_LAYER_NV_optimus, NVIDIA_only
|
||||
@@ -12,5 +11,5 @@ env = __NV_PRIME_RENDER_OFFLOAD, 1
|
||||
|
||||
cursor {
|
||||
# Set to true if you have issues
|
||||
no_hardware_cursors = false
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
@@ -15,38 +15,43 @@ windowrulev2 = float, class:org.gnome.Loupe
|
||||
windowrulev2 = float, class:mcpelauncher-webview
|
||||
windowrulev2 = float, class:org.gnome.Calculator
|
||||
windowrulev2 = float, class:io.mrarm.mcpelauncher-ui-qt
|
||||
windowrulev2 = float, class:Resources
|
||||
windowrulev2 = float, class:io.github.kaii_lb.Overskride
|
||||
|
||||
# Resize
|
||||
windowrulev2 = size 50% 50%, class:org.pulseaudio.pavucontrol
|
||||
windowrulev2 = size 50% 50%, class:blueberry.py
|
||||
windowrulev2 = size 50% 50%, class:io.github.kaii_lb.Overskride
|
||||
windowrulev2 = size 70% 70%, class:io.mrarm.mcpelauncher-ui-qt
|
||||
|
||||
# Moving
|
||||
windowrulev2 = move 49.27% 7.28%, class:org.pulseaudio.pavucontrol
|
||||
windowrulev2 = move 49.27% 7.28%, class:blueberry.py
|
||||
windowrulev2 = move 49.27% 7.28%, class:io.github.kaii_lb.Overskride
|
||||
windowrulev2 = movetoworkspace e, class:org.pulseaudio.pavucontrol
|
||||
|
||||
# Maximize
|
||||
windowrulev2 = tile, title:^(Resources)$
|
||||
|
||||
# Animations
|
||||
windowrulev2 = animation slide right, class:org.pulseaudio.pavucontrol
|
||||
windowrulev2 = animation slide right, class:blueberry.py
|
||||
windowrulev2 = animation slide right, class:io.github.kaii_lb.Overskride
|
||||
layerrule = animation slide right, swaync-control-center
|
||||
layerrule = animation fade, selection
|
||||
layerrule = animation fade, logout_dialog
|
||||
layerrule = animation fade, waybar
|
||||
layerrule = animation fade, hyprpaper
|
||||
layerrule = animation slide right, swaync-notification-window
|
||||
layerrule = animation fade, hyprpicker
|
||||
layerrule = animation fade, eww-calendar
|
||||
layerrule = animation fade, eww-volume
|
||||
layerrule = animation fade, eww-powermenu
|
||||
|
||||
# Opacity
|
||||
windowrulev2 = opacity .95 .95, class:kitty
|
||||
windowrulev2 = opacity .88 .88, class:spotify
|
||||
windowrulev2 = opacity .88 .88, class:hyprpolkitagent
|
||||
|
||||
# Blur
|
||||
# No blur
|
||||
windowrulev2 = noblur, class:^()$, title:^()$
|
||||
windowrulev2 = noblur, class:steam(.*)$
|
||||
|
||||
# Window Blur list
|
||||
blurls = logout_dialog
|
||||
@@ -54,9 +59,19 @@ blurls = kitty
|
||||
|
||||
# Layer Blur list
|
||||
layerrule = blur, waybar
|
||||
layerrule = ignorealpha .5, waybar
|
||||
# layerrule = blur, swaync-control-center
|
||||
# layerrule = ignorealpha .56, swaync-control-center
|
||||
layerrule = blur, eww-bar
|
||||
layerrule = blur, eww-calendar
|
||||
layerrule = blur, eww-cc
|
||||
layerrule = blur, eww-volume
|
||||
layerrule = blur, eww-powermenu
|
||||
layerrule = ignorealpha .6, eww-volume
|
||||
layerrule = ignorealpha .55, eww-bar
|
||||
layerrule = ignorealpha .5, eww-calendar
|
||||
layerrule = ignorealpha .7, eww-cc
|
||||
|
||||
# Workspace Rules
|
||||
workspace = 1, persistent:true
|
||||
workspace = 2, persistent:true
|
||||
|
||||
# Suppress maximize event from windows
|
||||
windowrulev2 = suppressevent maximize, class:.*
|
||||
|
||||
@@ -1,25 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# This script is made by retrozinndev (João Dias), This script
|
||||
# is licensed under the MIT License as in retrozinndev/Hyprland-Dots repository.
|
||||
# This script is made by retrozinndev (João Dias), It is licensed under
|
||||
# the MIT License as in retrozinndev/Hyprland-Dots repository.
|
||||
# GitHub: https://github.com/retrozinndev
|
||||
# Dotfiles: https://github.com/retrozinndev/Hyprland-Dots
|
||||
|
||||
# The script prompts the user with anyrun to choose an image file inside the defined
|
||||
# $WALLPAPER_DIR, after user selected a file, it automatically writes it to the
|
||||
# hyprpaper.conf file and hot reloads if hyprpaper is running.
|
||||
# The script prompts the user with anyrun or wofi to choose an image file inside
|
||||
# the defined $WALLPAPERS_DIR. If the user selects an entry, it automatically
|
||||
# writes changes to the hyprpaper.conf file and hot-reloads wallpaper if hyprpaper
|
||||
# is running.
|
||||
|
||||
|
||||
if [[ $WALLPAPER_DIR == "" ]]; then
|
||||
WALLPAPER_DIR="$HOME/wallpapers"
|
||||
if [[ $WALLPAPERS_DIR == "" ]]; then
|
||||
WALLPAPERS_DIR="$HOME/wallpapers"
|
||||
fi
|
||||
|
||||
HYPRPAPER_FILE="$HOME/.config/hypr/hyprpaper.conf"
|
||||
|
||||
WALLPAPER_SELECT_CMD="anyrun --plugins libstdin.so"
|
||||
if [[ -f /bin/anyrun ]]; then
|
||||
WALLPAPER_SELECT_CMD="anyrun --plugins libstdin.so"
|
||||
elif [[ -f /bin/wofi ]]; then
|
||||
WALLPAPER_SELECT_CMD="wofi --dmenu"
|
||||
else
|
||||
notify-send -u normal "Hyprpaper script" "Couldn't find anyrun or wofi for dmenu! Try installing one of these two before selecting wallpaper!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $(ls -A $WALLPAPER_DIR) ]]
|
||||
if [[ -z $(ls -A $WALLPAPERS_DIR) ]]
|
||||
then
|
||||
notify-send -u normal "Hyprpaper script" "Couldn't find any wallpaper inside \`~/wallpapers\`, try putting an image you like in there to choose it!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -44,17 +52,17 @@ Hot_reload_wallpaper() {
|
||||
|
||||
Reload_pywal() {
|
||||
echo "Reloading pywal colorscheme"
|
||||
wal -q -s -t -i "$SET_WALLPAPER_FULL"
|
||||
wal -q -t --cols16 darken -i "$SET_WALLPAPER_FULL"
|
||||
}
|
||||
|
||||
Reload_swaync() {
|
||||
echo "Reloading stylesheet for SwayNC"
|
||||
swaync-client -rs
|
||||
Reload_eww() {
|
||||
echo "Reloading Eww..."
|
||||
eww reload
|
||||
}
|
||||
|
||||
# Prompt wallpapers via dmenu
|
||||
SET_WALLPAPER_NAME="$(ls $WALLPAPER_DIR | $WALLPAPER_SELECT_CMD)"
|
||||
SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
|
||||
SET_WALLPAPER_NAME="$(ls $WALLPAPERS_DIR | $WALLPAPER_SELECT_CMD)"
|
||||
SET_WALLPAPER_FULL="$WALLPAPERS_DIR/$SET_WALLPAPER_NAME"
|
||||
|
||||
echo "Wallpaper: $SET_WALLPAPER_NAME"
|
||||
|
||||
@@ -62,11 +70,11 @@ echo "Wallpaper: $SET_WALLPAPER_NAME"
|
||||
if [[ $SET_WALLPAPER_NAME == "" ]] || [[ $SET_WALLPAPER_NAME == " " ]]
|
||||
then
|
||||
echo "No wallpaper has been selected by user!"
|
||||
if [ $RANDOM_WALLPAPER_WHEN_EMPTY = true ]
|
||||
if [[ $RANDOM_WALLPAPER_WHEN_EMPTY == true ]]
|
||||
then
|
||||
SET_WALLPAPER_NAME=$(ls $WALLPAPER_DIR | shuf -n 1)
|
||||
SET_WALLPAPER_NAME=$(ls $WALLPAPERS_DIR | shuf -n 1)
|
||||
echo "Selected random wallpaper from $HOME/wallpapers: $SET_WALLPAPER_NAME"
|
||||
SET_WALLPAPER_FULL="$WALLPAPER_DIR/$SET_WALLPAPER_NAME"
|
||||
SET_WALLPAPER_FULL="$WALLPAPERS_DIR/$SET_WALLPAPER_NAME"
|
||||
|
||||
else
|
||||
echo "Skipping hyprpaper changes and exiting."
|
||||
@@ -76,7 +84,7 @@ fi
|
||||
|
||||
Hot_reload_wallpaper
|
||||
Reload_pywal
|
||||
Reload_eww
|
||||
Update_wallpaper_settings
|
||||
Reload_swaync
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Imports
|
||||
include ../../.cache/wal/colors-kitty.conf
|
||||
|
||||
# Style
|
||||
font_family 0xProto Nerd Font
|
||||
cursor_trail 6
|
||||
|
||||
# General
|
||||
confirm_os_window_close 0
|
||||
# Dinamically update colorscheme with pywal16
|
||||
allow_remote_control true
|
||||
@@ -0,0 +1,44 @@
|
||||
# Lightweight Wayland Notification Daemon (mako) Configuration File
|
||||
# the man page of mako config file is a mess :skull:
|
||||
|
||||
# general
|
||||
max-history=14
|
||||
sort=-time
|
||||
actions=1
|
||||
history=1
|
||||
icons=1
|
||||
|
||||
# display
|
||||
layer=overlay
|
||||
anchor=top-right
|
||||
|
||||
# binding
|
||||
on-touch=invoke-default-action
|
||||
|
||||
# style
|
||||
font=Cantarell 12
|
||||
background-color=#1b2024
|
||||
padding=12
|
||||
width=420
|
||||
border-size=1
|
||||
border-color=#7e7e7ef0
|
||||
border-radius=14
|
||||
text-alignment=left
|
||||
margin=16
|
||||
max-icon-size=72
|
||||
|
||||
[urgency="low"]
|
||||
default-timeout=4000
|
||||
|
||||
[urgency="normal"]
|
||||
default-timeout=8000
|
||||
|
||||
[urgency="critical"]
|
||||
default-timeout=0
|
||||
|
||||
# modes
|
||||
[mode="dnd"]
|
||||
invisible=1
|
||||
|
||||
# vim: ft=cfg
|
||||
# nvim: ft=cfg
|
||||
|
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 2.1 MiB After Width: | Height: | Size: 2.1 MiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 759 KiB After Width: | Height: | Size: 759 KiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 780 KiB After Width: | Height: | Size: 780 KiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 2.3 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 1.8 MiB |
|
After Width: | Height: | Size: 2.8 MiB |
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.5 MiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 2.8 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 825 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
@@ -1,10 +0,0 @@
|
||||
|
||||
@import "../../.cache/wal/colors-swaync.css";
|
||||
|
||||
@define-color highlight @color1;
|
||||
@define-color bg-slider shade(@color1, .2);
|
||||
@define-color bg-button shade(@highlight, .72);
|
||||
@define-color background-alt shade(@color2, .6);
|
||||
@define-color hover shade(@highlight, .6);
|
||||
@define-color active @color8;
|
||||
@define-color text @foreground;
|
||||
@@ -1,278 +0,0 @@
|
||||
|
||||
/* Control Center Notifications */
|
||||
.control-center .notification-row .notification-background .notification {
|
||||
border-radius: 18px;
|
||||
background-color: shade(@color1, .7);
|
||||
border: .15em solid shade(@color1, .85);
|
||||
padding: 10px;
|
||||
margin-bottom: 11px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification:first-child {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification.critical {
|
||||
box-shadow: inset 0 0 0px 2px @color1;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content {
|
||||
margin: 8px;
|
||||
font-family: "Cantarell", "Noto Sans CJK"
|
||||
}
|
||||
.control-center .notification-row .notification-background .notification .notification-content .summary {
|
||||
font-family: "Cantarell", "Noto Sans CJK";
|
||||
color: @foreground;
|
||||
font-size: 1.2em;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content .time {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .notification-content .body {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification .image {
|
||||
box-shadow: 0 0 3px 0 black;
|
||||
}
|
||||
|
||||
.control-center .notification-row .notification-background .notification > *:last-child > * {
|
||||
min-height: 3.4em;
|
||||
}
|
||||
|
||||
.control-center .notification-row .close-button {
|
||||
margin-top: 12px;
|
||||
margin-right: 2px;
|
||||
border-radius: 6px;
|
||||
padding: 1px;
|
||||
background: @color1;
|
||||
}
|
||||
|
||||
/* Control Center stuff */
|
||||
|
||||
.control-center {
|
||||
box-shadow: 0 2 10px 1px black;
|
||||
border-radius: 16px;
|
||||
margin: 14px;
|
||||
background: @background;
|
||||
color: @text;
|
||||
padding: 28px;
|
||||
}
|
||||
|
||||
.widget-title > label {
|
||||
color: @foreground;
|
||||
font-size: 1.6em;
|
||||
font-weight: 600;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.widget-title button {
|
||||
border-radius: 8px;
|
||||
background: @bg-button;
|
||||
padding: 6px 8px;
|
||||
}
|
||||
|
||||
.widget-title button:hover {
|
||||
background-color: @hover;
|
||||
}
|
||||
|
||||
.widget-title button:active {
|
||||
background-color: @active;
|
||||
}
|
||||
|
||||
.widget-title button label {
|
||||
color: @foreground;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.widget-label {
|
||||
padding: .2rem;
|
||||
}
|
||||
|
||||
.widget-label > label {
|
||||
color: @foreground;
|
||||
font-weight: 600;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.widget-dnd {
|
||||
margin: 0px;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
.widget-dnd > switch {
|
||||
font-size: 8px;
|
||||
border-radius: 16px;
|
||||
background: @background;
|
||||
box-shadow: inset 0 0 0 1px gray;
|
||||
}
|
||||
|
||||
.widget-dnd > switch slider {
|
||||
background: @highlight;
|
||||
border-radius: 16px;
|
||||
margin: -2px;
|
||||
}
|
||||
|
||||
/* MPRIS */
|
||||
.widget-mpris {
|
||||
padding: 0px 0px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player {
|
||||
box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .3);
|
||||
padding: 24px;
|
||||
background-color: transparent;
|
||||
padding-bottom: 16px;
|
||||
border-radius: 16px;
|
||||
outline: none;
|
||||
padding: 18px;
|
||||
|
||||
border: none;
|
||||
margin: 0 0 0 0;
|
||||
}
|
||||
|
||||
/* mpris controls */
|
||||
.widget-mpris .widget-mpris-player > *:last-child > button {
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player > *:last-child > button:hover {
|
||||
background: @hover;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-player > *:last-child > button:active {
|
||||
background: @active;
|
||||
}
|
||||
|
||||
.widget-mpris > box > button {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.widget-mpris .image {
|
||||
padding-right: 0.5rem;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-title {
|
||||
font-family: "Cantarell", "Noto Sans";
|
||||
font-weight: 700;
|
||||
font-size: 1.2rem;
|
||||
text-shadow: 1px 1px 2px black;
|
||||
}
|
||||
|
||||
.widget-mpris .widget-mpris-subtitle {
|
||||
font-size: 0.8rem;
|
||||
text-shadow: 1px 1px 2px black;
|
||||
}
|
||||
|
||||
|
||||
.widget-menubar > box > .menu-button-bar > button > label {
|
||||
font-size: 3rem;
|
||||
padding: 0.5rem 2rem;
|
||||
}
|
||||
|
||||
.widget-menubar > box > .menu-button-bar > :last-child {
|
||||
color: #f38ba8;
|
||||
}
|
||||
|
||||
.widget-buttons-grid {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button {
|
||||
background: @bg-button;
|
||||
padding: 14px 12px;
|
||||
border-radius: 16px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button:hover {
|
||||
background: @hover;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button:active {
|
||||
background: @active;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button:checked {
|
||||
background: @color2;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button label {
|
||||
font-size: 1em;
|
||||
color: @foreground;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.horizontal trough { /* slider's background */
|
||||
background-color: shade(@color1, .4);
|
||||
margin: 0 4px;
|
||||
border-radius: 16px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.horizontal trough slider { /* slider's dot indicator */
|
||||
background: @foreground;
|
||||
box-shadow: inset 0 0 1px .5px @background-alt;
|
||||
min-width: 24px;
|
||||
min-height: 24px;
|
||||
margin: -4px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.horizontal trough slider:active {
|
||||
background: shade(@foreground, .75);
|
||||
}
|
||||
|
||||
.horizontal trough highlight {
|
||||
border-top-left-radius: 14px;
|
||||
border-bottom-left-radius: 14px;
|
||||
background: shade(@highlight, .9);
|
||||
}
|
||||
|
||||
.widget-volume {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
.widget-volume label {
|
||||
font-size: 1.5rem;
|
||||
color: @text;
|
||||
margin-left: 5px;
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.widget-volume .per-app-volume {
|
||||
margin-top: 4px;
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
background: shade(@background, .6);
|
||||
}
|
||||
|
||||
.widget-volume .per-app-volume > * {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.widget-volume .per-app-volume > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.widget-backlight {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.widget-backlight label {
|
||||
font-size: 1.5rem;
|
||||
margin-left: 7px;
|
||||
margin-right: 3px;
|
||||
color: @text;
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
|
||||
.floating-notifications .notification-row .notification-background {
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244;
|
||||
border-radius: 16px;
|
||||
margin: 12px;
|
||||
}
|
||||
|
||||
.floating-notifications .notification-row .notification {
|
||||
border-radius: 16px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.notification-row > * > * > * > * > *:first-child {
|
||||
min-height: 3.4em;
|
||||
border-top-left-radius: 32px;
|
||||
border-top-right-radius: 32px;
|
||||
}
|
||||
|
||||
.notification-row .notification.critical {
|
||||
box-shadow: none;
|
||||
box-shadow: inset 0 0 1px 1px @color1;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.notification-row .notification .image {
|
||||
margin-right: 6px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.floating-notifications .notification-row .notification-background .close-button {
|
||||
border-radius: 8px;
|
||||
margin-top: 4px;
|
||||
margin-right: 2px;
|
||||
padding: 2px;
|
||||
color: @foreground;
|
||||
background-color: shade(@color1, .7);
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification .notification-content .summary {
|
||||
font-size: 1.2em;
|
||||
margin-bottom: 2px;
|
||||
font-weight: 600;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification .notification-content .time {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
.notification-row .notification-background .notification .notification-content .body {
|
||||
color: @foreground;
|
||||
margin-bottom: .6em;
|
||||
}
|
||||
|
||||
.notification-row .notification .notification-action:hover {
|
||||
background-color: @hover;
|
||||
}
|
||||
|
||||
.notification-row .notification .notification-action:active {
|
||||
background-color: @active;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
/* General Notification Styles */
|
||||
.notification .notification-action {
|
||||
border-radius: 16px;
|
||||
color: @text;
|
||||
font-weight: 600;
|
||||
background-color: @bg-button;
|
||||
border: .6px solid @background;
|
||||
margin: .3em 0;
|
||||
}
|
||||
|
||||
.close-button:hover {
|
||||
background-color: @color1;
|
||||
}
|
||||
|
||||
.close-button:active {
|
||||
background-color: @color3;
|
||||
}
|
||||
|
||||
.notification.critical progress,
|
||||
.notification.low progress,
|
||||
.notification.normal progress {
|
||||
background-color: @color3;
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
{
|
||||
"$schema": "configSchema.json",
|
||||
"positionX": "right",
|
||||
"positionY": "top",
|
||||
"layer": "overlay",
|
||||
"control-center-layer": "overlay",
|
||||
"layer-shell": true,
|
||||
"cssPriority": "application",
|
||||
"control-center-margin-top": 0,
|
||||
"control-center-margin-bottom": 0,
|
||||
"control-center-margin-right": 0,
|
||||
"control-center-margin-left": 0,
|
||||
"notification-2fa-action": true,
|
||||
"notification-inline-replies": false,
|
||||
"notification-icon-size": 64,
|
||||
"notification-body-image-height": 100,
|
||||
"notification-body-image-width": 200,
|
||||
"timeout": 5,
|
||||
"timeout-low": 3,
|
||||
"timeout-critical": 0,
|
||||
"fit-to-screen": false,
|
||||
"relative-timestamps": true,
|
||||
"control-center-width": 450,
|
||||
"control-center-height": 900,
|
||||
"notification-window-width": 500,
|
||||
"keyboard-shortcuts": true,
|
||||
"image-visibility": "when-available",
|
||||
"transition-time": 120,
|
||||
"hide-on-clear": false,
|
||||
"hide-on-action": true,
|
||||
"script-fail-notify": true,
|
||||
"scripts": {
|
||||
"example-script": {
|
||||
"exec": "echo 'Do something...'",
|
||||
"urgency": "Normal"
|
||||
},
|
||||
"example-action-script": {
|
||||
"exec": "echo 'Do something actionable!'",
|
||||
"urgency": "Normal",
|
||||
"run-on": "action"
|
||||
}
|
||||
},
|
||||
"notification-visibility": {
|
||||
"spotify": {
|
||||
"state": "muted",
|
||||
"app-name": "Spotify"
|
||||
}
|
||||
},
|
||||
"widgets": [
|
||||
"title",
|
||||
"notifications",
|
||||
"mpris",
|
||||
"volume",
|
||||
"backlight",
|
||||
"buttons-grid",
|
||||
"inhibitors"
|
||||
],
|
||||
"widget-config": {
|
||||
"title": {
|
||||
"text": "Notifications",
|
||||
"clear-all-button": true,
|
||||
"button-text": "Clear"
|
||||
},
|
||||
"inhibitors": {
|
||||
"text": "Inhibitors"
|
||||
},
|
||||
"dnd": {
|
||||
"text": "Do Not Disturb"
|
||||
},
|
||||
"label": {
|
||||
"max-lines": 5,
|
||||
"text": "Label Text"
|
||||
},
|
||||
"mpris": {
|
||||
"image-size": 80,
|
||||
"image-radius": 16,
|
||||
"blur": true
|
||||
},
|
||||
"volume": {
|
||||
"label": " ",
|
||||
"show-per-app": true,
|
||||
"show-per-app-icon": true,
|
||||
"collapse-button-label": " ",
|
||||
"expand-button-label": " "
|
||||
},
|
||||
"backlight": {
|
||||
"label": " ",
|
||||
"device": "scrollock",
|
||||
"subsystem": "leds"
|
||||
},
|
||||
"buttons-grid": {
|
||||
"actions": [
|
||||
{
|
||||
"label": " Internet",
|
||||
"type": "toggle",
|
||||
"active": false,
|
||||
"command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/internet-toggle.sh; Toggle_state'",
|
||||
"update-command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/internet-toggle.sh; Update_state'"
|
||||
},
|
||||
{
|
||||
"label": " Bluetooth",
|
||||
"type": "toggle",
|
||||
"active": false,
|
||||
"command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/bluetooth-toggle.sh; Toggle_state'",
|
||||
"update-command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/bluetooth-toggle.sh; Update_state'"
|
||||
},
|
||||
{
|
||||
"label": " DND",
|
||||
"type": "toggle",
|
||||
"command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/dnd-toggle.sh; Toggle_state'",
|
||||
"update-command": "sh -c 'source $HOME/.config/swaync/scripts/control-center/dnd-toggle.sh; Update_state'"
|
||||
},
|
||||
{
|
||||
"label": " Wallpaper",
|
||||
"type": "normal",
|
||||
"command": "bash -c 'swaync-client -cp; bash $HOME/.config/hypr/scripts/change-wallpaper.sh'"
|
||||
},
|
||||
{
|
||||
"label": " Screenshot",
|
||||
"type": "normal",
|
||||
"command": "sh -c 'swaync-client -cp; hyprshot -m region -o $HOME/Screenshots'"
|
||||
},
|
||||
{
|
||||
"label": " Logout",
|
||||
"type": "normal",
|
||||
"command": "wlogout -b 5"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,621 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "SwayNotificationCenter JSON schema",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
"description": "Pointer to the schema against which this document should be validated."
|
||||
},
|
||||
"positionX": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of control center and notification window",
|
||||
"default": "right",
|
||||
"enum": ["right", "left", "center"]
|
||||
},
|
||||
"layer": {
|
||||
"type": "string",
|
||||
"description": "Layer of notification window",
|
||||
"default": "overlay",
|
||||
"enum": ["background", "bottom", "top", "overlay"]
|
||||
},
|
||||
"layer-shell": {
|
||||
"type": "boolean",
|
||||
"description": "Wether or not the windows should be opened as layer-shell surfaces. Note: Requires swaync restart to apply",
|
||||
"default": true
|
||||
},
|
||||
"cssPriority": {
|
||||
"type": "string",
|
||||
"description": "Which GTK priority to use when loading the default and user CSS files. Pick \"user\" to override XDG_CONFIG_HOME/gtk-3.0/gtk.css",
|
||||
"default": "application",
|
||||
"enum": ["application", "user"]
|
||||
},
|
||||
"positionY": {
|
||||
"type": "string",
|
||||
"description": "Vertical position of control center and notification window",
|
||||
"default": "top",
|
||||
"enum": ["top", "center", "bottom"]
|
||||
},
|
||||
"control-center-positionX": {
|
||||
"type": "string",
|
||||
"description": "Optional: Horizontal position of the control center. Supersedes positionX if not set to `none`",
|
||||
"default": "none",
|
||||
"enum": ["right", "left", "center", "none"]
|
||||
},
|
||||
"control-center-positionY": {
|
||||
"type": "string",
|
||||
"description": "Optional: Vertical position of the control center. Supersedes positionY if not set to `none`",
|
||||
"default": "none",
|
||||
"enum": ["top", "bottom", "none"]
|
||||
},
|
||||
"control-center-margin-top": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the top of the control center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-bottom": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the bottom of the control center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-right": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the right of the control center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-margin-left": {
|
||||
"type": "integer",
|
||||
"description": "The margin (in pixels) at the left of the control center. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"control-center-layer": {
|
||||
"type": "string",
|
||||
"description": "Layer of control center window",
|
||||
"default": "none",
|
||||
"enum": ["background", "bottom", "top", "overlay", "none"]
|
||||
},
|
||||
"control-center-exclusive-zone": {
|
||||
"type": "boolean",
|
||||
"description": "Whether or not the control center should follow the compositors exclusive zones. An example would be setting it to \"false\" to cover your panel/dock.",
|
||||
"default": true
|
||||
},
|
||||
"notification-2fa-action": {
|
||||
"type": "boolean",
|
||||
"description": "If each notification should display a 'COPY \"1234\"' action",
|
||||
"default": true
|
||||
},
|
||||
"notification-inline-replies": {
|
||||
"type": "boolean",
|
||||
"description": "If notifications should display a text field to reply if the sender requests it. NOTE: Replying in popup notifications is only available if the compositor supports GTK Layer-Shell ON_DEMAND keyboard interactivity.",
|
||||
"default": false
|
||||
},
|
||||
"notification-icon-size": {
|
||||
"type": "integer",
|
||||
"description": "The notification icon size (in pixels). The app icon size is 1/3",
|
||||
"default": 64,
|
||||
"minimum": 16
|
||||
},
|
||||
"notification-body-image-height": {
|
||||
"type": "integer",
|
||||
"description": "The notification body image height (in pixels)",
|
||||
"default": 100,
|
||||
"minimum": 100
|
||||
},
|
||||
"notification-body-image-width": {
|
||||
"type": "integer",
|
||||
"description": "The notification body image width (in pixels)",
|
||||
"default": 200,
|
||||
"minimum": 200
|
||||
},
|
||||
"timeout": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with normal priority",
|
||||
"default": 10
|
||||
},
|
||||
"timeout-low": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with low priority",
|
||||
"default": 5
|
||||
},
|
||||
"timeout-critical": {
|
||||
"type": "integer",
|
||||
"description": "The notification timeout for notifications with critical priority. 0 to disable",
|
||||
"default": 0
|
||||
},
|
||||
"notification-window-width": {
|
||||
"type": "integer",
|
||||
"description": "Width of the notification in pixels",
|
||||
"default": 500
|
||||
},
|
||||
"fit-to-screen": {
|
||||
"type": "boolean",
|
||||
"description": "If the control center should expand to both edges of the screen",
|
||||
"default": true
|
||||
},
|
||||
"relative-timestamps": {
|
||||
"type": "boolean",
|
||||
"description": "Display notification timestamps relative to now e.g. \"26 minutes ago\". If false, a local iso8601-formatted absolute timestamp is displayed.",
|
||||
"default": true
|
||||
},
|
||||
"control-center-height": {
|
||||
"type": "integer",
|
||||
"description": "Height of the control center in pixels. Ignored when 'fit-to-screen' is set to 'true'",
|
||||
"default": 600,
|
||||
"minimum": 300
|
||||
},
|
||||
"control-center-width": {
|
||||
"type": "integer",
|
||||
"description": "Width of the control center in pixels",
|
||||
"default": 500,
|
||||
"minimum": 300
|
||||
},
|
||||
"keyboard-shortcuts": {
|
||||
"type": "boolean",
|
||||
"description": "If control center should use keyboard shortcuts",
|
||||
"default": true
|
||||
},
|
||||
"image-visibility": {
|
||||
"type": "string",
|
||||
"description": "The notification image visibility when no icon is available.",
|
||||
"default": "when-available",
|
||||
"enum": ["always", "when-available", "never"]
|
||||
},
|
||||
"transition-time": {
|
||||
"type": "integer",
|
||||
"description": "The notification animation duration. 0 to disable",
|
||||
"default": 200
|
||||
},
|
||||
"hide-on-clear": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center after pressing \"Clear All\"",
|
||||
"default": false
|
||||
},
|
||||
"hide-on-action": {
|
||||
"type": "boolean",
|
||||
"description": "Hides the control center when clicking on notification action",
|
||||
"default": true
|
||||
},
|
||||
"script-fail-notify": {
|
||||
"type": "boolean",
|
||||
"description": "Sends a notification if a script fails to run",
|
||||
"default": true
|
||||
},
|
||||
"scripts": {
|
||||
"type": "object",
|
||||
"description": "Which scripts to check and potentially run for every notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for exec) use regex. If all properties match the given notification, the script will be run. Only the first matching script will be run.",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^.{1,}$": {
|
||||
"type": "object",
|
||||
"description": "Your script object.",
|
||||
"required": ["exec"],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"exec": {
|
||||
"type": "string",
|
||||
"description": "The script to run. Can also run regular shell commands."
|
||||
},
|
||||
"app-name": {
|
||||
"type": "string",
|
||||
"description": "The app-name. Uses Regex."
|
||||
},
|
||||
"desktop-entry": {
|
||||
"type": "string",
|
||||
"description": "The desktop-entry. Uses Regex."
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "The summary of the notification. Uses Regex."
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "The body of the notification. Uses Regex."
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string",
|
||||
"description": "The urgency of the notification.",
|
||||
"default": "Normal",
|
||||
"enum": ["Low", "Normal", "Critical"]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"description": "Which category the notification belongs to. Uses Regex."
|
||||
},
|
||||
"run-on": {
|
||||
"type": "string",
|
||||
"description": "Whether to run the script on an action being activated, or when the notification is received.",
|
||||
"enum": ["action", "receive"],
|
||||
"default": "receive"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"notification-visibility": {
|
||||
"type": "object",
|
||||
"description": "Set the visibility of each incoming notification. If the notification doesn't include one of the properties, that property will be ignored. All properties (except for state) use regex. If all properties match the given notification, the notification will be follow the provided state. Only the first matching object will be used.",
|
||||
"minProperties": 1,
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^.{1,}$": {
|
||||
"type": "object",
|
||||
"description": "Your script object.",
|
||||
"required": ["state"],
|
||||
"minProperties": 2,
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"state": {
|
||||
"type": "string",
|
||||
"description": "The notification visibility state.",
|
||||
"default": "enabled",
|
||||
"enum": ["ignored", "muted", "enabled", "transient"]
|
||||
},
|
||||
"app-name": {
|
||||
"type": "string",
|
||||
"description": "The app-name. Uses Regex."
|
||||
},
|
||||
"desktop-entry": {
|
||||
"type": "string",
|
||||
"description": "The desktop-entry. Uses Regex."
|
||||
},
|
||||
"summary": {
|
||||
"type": "string",
|
||||
"description": "The summary of the notification. Uses Regex."
|
||||
},
|
||||
"body": {
|
||||
"type": "string",
|
||||
"description": "The body of the notification. Uses Regex."
|
||||
},
|
||||
"urgency": {
|
||||
"type": "string",
|
||||
"description": "The urgency of the notification.",
|
||||
"default": "Normal",
|
||||
"enum": ["Low", "Normal", "Critical"]
|
||||
},
|
||||
"override-urgency": {
|
||||
"type": "string",
|
||||
"description": "The new urgency of the notification (optional)",
|
||||
"default": "unset",
|
||||
"enum": ["unset", "low", "normal", "critical"]
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"description": "Which category the notification belongs to. Uses Regex."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"widgets": {
|
||||
"type": "array",
|
||||
"description": "Which order and which widgets to display. If the \"notifications\" widget isn't specified, it will be placed at the bottom.",
|
||||
"default": ["inhibitors", "title", "dnd", "notifications"],
|
||||
"items": {
|
||||
"type": "string",
|
||||
"$comment": "Sadly can't use regex and enums at the same time. Fix in the future?",
|
||||
"pattern": "^[a-zA-Z0-9_-]{1,}(#[a-zA-Z0-9_-]{1,}){0,1}?$"
|
||||
}
|
||||
},
|
||||
"widget-config": {
|
||||
"type": "object",
|
||||
"description": "Configure specific widget properties.",
|
||||
"additionalProperties": false,
|
||||
"$comment": "New widgets go here in \"patternProperties\" ↓",
|
||||
"patternProperties": {
|
||||
"^title(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$comment": "References the widget structure from \"widgets\" below",
|
||||
"$ref": "#/widgets/title"
|
||||
},
|
||||
"^dnd(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/dnd"
|
||||
},
|
||||
"^label(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/label"
|
||||
},
|
||||
"^mpris(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/mpris"
|
||||
},
|
||||
"^buttons-grid(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/buttons-grid"
|
||||
},
|
||||
"^menubar(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/menubar"
|
||||
},
|
||||
"^volume(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/volume"
|
||||
},
|
||||
"^backlight(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$ref": "#/widgets/backlight"
|
||||
},
|
||||
"^inhibitors(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"$comment": "References the widget structure from \"widgets\" below",
|
||||
"$ref": "#/widgets/inhibitors"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"widgets": {
|
||||
"$comment": "New widgets go here",
|
||||
"title": {
|
||||
"type": "object",
|
||||
"description": "Control Center Title Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Notifications"
|
||||
},
|
||||
"clear-all-button": {
|
||||
"type": "boolean",
|
||||
"description": "Wether to display a \"Clear All\" button",
|
||||
"default": true
|
||||
},
|
||||
"button-text": {
|
||||
"type": "string",
|
||||
"description": "\"Clear All\" button text",
|
||||
"default": "Clear All"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dnd": {
|
||||
"type": "object",
|
||||
"description": "Control Center Do Not Disturb Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Do Not Disturb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"label": {
|
||||
"type": "object",
|
||||
"description": "A generic widget that allows the user to add custom text",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The text content of the widget",
|
||||
"default": "Label Text"
|
||||
},
|
||||
"max-lines": {
|
||||
"type": "integer",
|
||||
"description": "The maximum lines",
|
||||
"default": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"mpris": {
|
||||
"type": "object",
|
||||
"description": "A widget that displays multiple music players",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"image-size": {
|
||||
"type": "integer",
|
||||
"description": "The size of the album art",
|
||||
"default": 96
|
||||
},
|
||||
"image-radius": {
|
||||
"type": "integer",
|
||||
"description": "The border radius of the album art. Will be overriden by setting the border-radius in the style.css for the \".widget-mpris-album-art\" class",
|
||||
"default": 12
|
||||
},
|
||||
"blur": {
|
||||
"type": "boolean",
|
||||
"description": "Apply the artwork as the MPRIS background and blur it",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"buttons-grid": {
|
||||
"type": "object",
|
||||
"description": "A widget to add a grid of buttons that execute shell commands",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"description": "A list of actions containing a label and a command",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text to be displayed in button",
|
||||
"default": "label"
|
||||
},
|
||||
"command": {
|
||||
"type": "string",
|
||||
"description": "Command to be executed on click",
|
||||
"default": ""
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Type of the button; toggle buttons receive the .active css class and an env variable 'SWAYNC_TOGGLE_STATE' is set. See example in the default config.json",
|
||||
"default": "normal",
|
||||
"enum": ["normal", "toggle"]
|
||||
},
|
||||
"update-command": {
|
||||
"type": "string",
|
||||
"description": "Command to be executed on visibility change of cc to update the active state of the toggle button (should echo true or false)",
|
||||
"default": ""
|
||||
},
|
||||
"active": {
|
||||
"type": "boolean",
|
||||
"description": "Wether the toggle button is active as default or not",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"menubar": {
|
||||
"type": "object",
|
||||
"description": "A bar that contains action-buttons and buttons to open a dropdown with action-buttons",
|
||||
"additionalProperties": false,
|
||||
"patternProperties": {
|
||||
"^menu(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"type": "object",
|
||||
"description": "A button that opens a dropdown with action-buttons",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text to be displayed in button",
|
||||
"default": "Menu"
|
||||
},
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of the button in the bar",
|
||||
"default": "right",
|
||||
"enum": ["right", "left"]
|
||||
},
|
||||
"animation-type": {
|
||||
"type": "string",
|
||||
"default": "slide_down",
|
||||
"description": "Animation type for menu",
|
||||
"enum": ["slide_down", "slide_up", "none"]
|
||||
},
|
||||
"animation-duration":{
|
||||
"type": "integer",
|
||||
"default": 250,
|
||||
"description": "Duration of animation in milliseconds"
|
||||
},
|
||||
"actions": {
|
||||
"$ref" : "#/widgets/buttons-grid/properties/actions"
|
||||
}
|
||||
}
|
||||
},
|
||||
"^buttons(#[a-zA-Z0-9_-]{1,}){0,1}?$": {
|
||||
"type": "object",
|
||||
"description": "A list of action-buttons to be displayed in the topbar",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Horizontal position of the button in the bar",
|
||||
"default": "right",
|
||||
"enum": ["right", "left"]
|
||||
},
|
||||
"actions": {
|
||||
"$ref" : "#/widgets/buttons-grid/properties/actions"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"volume": {
|
||||
"type": "object",
|
||||
"description": "Slider to control pulse volume",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text displayed in front of the volume slider",
|
||||
"default": "Volume"
|
||||
},
|
||||
"show-per-app": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Show per app volume control"
|
||||
},
|
||||
"show-per-app-icon": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"description": "Show application icon in per app control"
|
||||
},
|
||||
"show-per-app-label": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Show application name in per app control"
|
||||
},
|
||||
"empty-list-label": {
|
||||
"type": "string",
|
||||
"default": "No active sink input",
|
||||
"description": "Text displayed when there are not active sink inputs"
|
||||
},
|
||||
"expand-button-label": {
|
||||
"type": "string",
|
||||
"default": "⇧",
|
||||
"description": "Label displayed on button to show per app volume control"
|
||||
},
|
||||
"collapse-button-label": {
|
||||
"type": "string",
|
||||
"default": "⇩",
|
||||
"description": "Label displayed on button to hide per app volume control"
|
||||
},
|
||||
"icon-size": {
|
||||
"type": "integer",
|
||||
"default": 24,
|
||||
"description": "Size of the application icon in per app volume control"
|
||||
},
|
||||
"animation-type": {
|
||||
"type": "string",
|
||||
"default": "slide_down",
|
||||
"description": "Animation type for menu",
|
||||
"enum": ["slide_down", "slide_up", "none"]
|
||||
},
|
||||
"animation-duration":{
|
||||
"type": "integer",
|
||||
"default": 250,
|
||||
"description": "Duration of animation in milliseconds"
|
||||
}
|
||||
}
|
||||
},
|
||||
"backlight": {
|
||||
"type": "object",
|
||||
"description": "Slider to control monitor brightness",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Text displayed in front of the backlight slider",
|
||||
"default": "Brightness"
|
||||
},
|
||||
"device": {
|
||||
"type": "string",
|
||||
"description": "Name of monitor (find possible devices using `ls /sys/class/backlight` or `ls /sys/class/leds`)",
|
||||
"default": "intel_backlight"
|
||||
},
|
||||
"subsystem": {
|
||||
"type": "string",
|
||||
"description": "Kernel subsystem for brightness control",
|
||||
"default": "backlight",
|
||||
"enum": ["backlight", "leds"]
|
||||
},
|
||||
"min": {
|
||||
"type": "integer",
|
||||
"default": 0,
|
||||
"description": "Lowest possible value for brightness"
|
||||
}
|
||||
}
|
||||
},
|
||||
"inhibitors": {
|
||||
"type": "object",
|
||||
"description": "Control Center Inhibitors Widget",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"description": "The title of the widget",
|
||||
"default": "Inhibitors"
|
||||
},
|
||||
"clear-all-button": {
|
||||
"type": "boolean",
|
||||
"description": "Wether to display a \"Clear All\" button",
|
||||
"default": true
|
||||
},
|
||||
"button-text": {
|
||||
"type": "string",
|
||||
"description": "\"Clear All\" button text",
|
||||
"default": "Clear All"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Update_state() {
|
||||
if [[ $(bluetoothctl show | grep "Powered" | sed "s/Powered: //" | xargs) == "yes" ]]
|
||||
then
|
||||
echo true
|
||||
else
|
||||
echo false
|
||||
fi
|
||||
}
|
||||
|
||||
Toggle_state() {
|
||||
if [[ $SWAYNC_TOGGLE_STATE == "true" ]]
|
||||
then
|
||||
bluetoothctl power on
|
||||
else
|
||||
bluetoothctl power off
|
||||
fi
|
||||
}
|
||||