Browse Source

Merge pull request #103 from SherLock707/development

Development: Replaced dunst with Swaync
pull/106/head
Ja.KooLit 2 years ago committed by GitHub
parent
commit
453d8b3f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      config/hypr/configs/Execs.conf
  2. 3
      config/hypr/configs/Keybinds.conf
  3. 4
      config/hypr/scripts/AirplaneMode.sh
  4. 2
      config/hypr/scripts/Brightness.sh
  5. 2
      config/hypr/scripts/BrightnessKbd.sh
  6. 4
      config/hypr/scripts/ChangeBlur.sh
  7. 4
      config/hypr/scripts/ChangeLayout.sh
  8. 4
      config/hypr/scripts/GameMode.sh
  9. 6
      config/hypr/scripts/PywalSwaync.sh
  10. 5
      config/hypr/scripts/Refresh.sh
  11. 4
      config/hypr/scripts/RofiBeats.sh
  12. 4
      config/hypr/scripts/ScreenShot.sh
  13. 14
      config/hypr/scripts/Volume.sh
  14. 78
      config/swaync/config.json
  15. 296
      config/swaync/style.css
  16. 1
      config/waybar/configs/[TOP] Default
  17. 23
      config/waybar/modules
  18. 1
      config/waybar/style/Rose Pine.css

3
config/hypr/configs/Execs.conf

@ -22,7 +22,8 @@ exec-once = $scriptsDir/Polkit.sh
# starup apps
exec-once = waybar &
exec-once = dunst &
# exec-once = dunst &
exec-once swaync &
#exec-once = blueman-applet &
exec-once = nm-applet --indicator &
#exec-once = rog-control-center &

3
config/hypr/configs/Keybinds.conf

@ -179,3 +179,6 @@ bind = $mainMod SHIFT, S, exec, grim -g "$(slurp)" - | swappy -f -
# to unbind
#bind = $mainMod ALT, P, submap, reset
#submap = reset
#Swaync notification panel
bind = $mainMod, N, exec, swaync-client -t -sw

4
config/hypr/scripts/AirplaneMode.sh

@ -5,8 +5,8 @@ dunst_notif="$HOME/.config/dunst/images/bell.png"
wifi="$(nmcli r wifi | awk 'FNR = 2 {print $1}')"
if [ "$wifi" == "enabled" ]; then
rfkill block all &
dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: active'
notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: active'
else
rfkill unblock all &
dunstify -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive'
notify-send -e -u normal -i "$dunst_notif" -t 1000 'airplane mode: inactive'
fi

2
config/hypr/scripts/Brightness.sh

@ -26,7 +26,7 @@ get_icon() {
# Notify
notify_user() {
dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%"
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%"
}
# Change brightness

2
config/hypr/scripts/BrightnessKbd.sh

@ -24,7 +24,7 @@ get_icon() {
}
# Notify
notify_user() {
dunstify -h string:x-dunst-stack-tag:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%"
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%"
}
# Change brightness

4
config/hypr/scripts/ChangeBlur.sh

@ -7,9 +7,9 @@ STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int")
if [ "${STATE}" == "2" ]; then
hyprctl keyword decoration:blur:size 2
hyprctl keyword decoration:blur:passes 1
dunstify -u low -i "$dunst_notif" "Less blur"
notify-send -e -u low -i "$dunst_notif" "Less blur"
else
hyprctl keyword decoration:blur:size 5
hyprctl keyword decoration:blur:passes 2
dunstify -u low -i "$dunst_notif" "Normal blur"
notify-send -e -u low -i "$dunst_notif" "Normal blur"
fi

4
config/hypr/scripts/ChangeLayout.sh

@ -12,7 +12,7 @@ case $LAYOUT in
hyprctl keyword bind SUPER,J,cyclenext
hyprctl keyword bind SUPER,K,cyclenext,prev
hyprctl keyword bind SUPER,O,togglesplit
dunstify -u low -i "$dunst_notif" "Dwindle Layout"
notify-send -e -u low -i "$dunst_notif" "Dwindle Layout"
;;
"dwindle")
hyprctl keyword general:layout master
@ -21,7 +21,7 @@ case $LAYOUT in
hyprctl keyword unbind SUPER,O
hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
dunstify -u low -i "$dunst_notif" "Master Layout"
notify-send -e -u low -i "$dunst_notif" "Master Layout"
;;
*) ;;

4
config/hypr/scripts/GameMode.sh

@ -15,7 +15,7 @@ if [ "$HYPRGAMEMODE" = 1 ] ; then
keyword general:border_size 1;\
keyword decoration:rounding 0"
swww kill
dunstify -u low -i "$dunst_notif" "gamemode enabled. All animations off"
notify-send -e -u low -i "$dunst_notif" "gamemode enabled. All animations off"
exit
else
swww init && swww img "$HOME/.config/rofi/.current_wallpaper"
@ -23,7 +23,7 @@ else
${SCRIPTSDIR}/PywalSwww.sh
sleep 0.5
${SCRIPTSDIR}/Refresh.sh
dunstify -u normal -i "$dunst_notif" "gamemode disabled. All animations normal"
notify-send -e -u normal -i "$dunst_notif" "gamemode disabled. All animations normal"
exit
fi
hyprctl reload

6
config/hypr/scripts/PywalSwaync.sh

@ -0,0 +1,6 @@
#!/bin/sh
pkill swaync
sleep 0.3
swaync > /dev/null 2>&1 &

5
config/hypr/scripts/Refresh.sh

@ -16,7 +16,10 @@ waybar &
sleep 0.1
# Relaunch dunst with pywal-borders
${SCRIPTSDIR}/PywalDunst.sh &
# ${SCRIPTSDIR}/PywalDunst.sh &
# Relaunch swaync with pywal-borders
${SCRIPTSDIR}/PywalSwaync.sh
# Relaunching rainbow borders
sleep 1

4
config/hypr/scripts/RofiBeats.sh

@ -21,7 +21,7 @@ declare -A menu_options=(
# Function for displaying notifications
notification() {
dunstify -u normal -i "$iDIR/music.png" "Playing now: $@"
notify-send -u normal -i "$iDIR/music.png" "Playing now: $@"
}
# Main function
@ -45,4 +45,4 @@ main() {
}
# Check if an online music process is running and send a notification, otherwise run the main function
pkill -f http && dunstify -u low -i "$iDIR/music.png" "Online Music stopped" || main
pkill -f http && notify-send -u low -i "$iDIR/music.png" "Online Music stopped" || main

4
config/hypr/scripts/ScreenShot.sh

@ -7,7 +7,7 @@ dir="$(xdg-user-dir)/Pictures/Screenshots"
file="Screenshot_${time}_${RANDOM}.png"
# notify and view screenshot
notify_cmd_shot="dunstify -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png"
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png"
notify_view() {
${notify_cmd_shot} "Copied to clipboard."
## viewnior ${dir}/"$file"
@ -21,7 +21,7 @@ notify_view() {
# countdown
countdown() {
for sec in $(seq $1 -1 1); do
dunstify -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
sleep 1
done
}

14
config/hypr/scripts/Volume.sh

@ -29,9 +29,9 @@ get_icon() {
# Notify
notify_user() {
if [[ "$(get_volume)" == "Muted" ]]; then
dunstify -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: Muted"
notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted"
else
dunstify -h int:value:"$(get_volume | sed 's/%//')" -h string:x-dunst-stack-tag:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)"
notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)"
fi
}
@ -54,18 +54,18 @@ dec_volume() {
# Toggle Mute
toggle_mute() {
if [ "$(pamixer --get-mute)" == "false" ]; then
pamixer -m && dunstify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
elif [ "$(pamixer --get-mute)" == "true" ]; then
pamixer -u && dunstify -u low -i "$(get_icon)" "Volume Switched ON"
pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON"
fi
}
# Toggle Mic
toggle_mic() {
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
pamixer --default-source -m && dunstify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
pamixer -u --default-source u && dunstify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
fi
}
# Get Mic Icon
@ -92,7 +92,7 @@ get_mic_volume() {
notify_mic_user() {
volume=$(get_mic_volume)
icon=$(get_mic_icon)
dunstify -h int:value:"$volume" -h "string:x-dunst-stack-tag:volume_notif" -u low -i "$icon" "Mic-Level: $volume"
notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" "Mic-Level: $volume"
}
# Increase MIC Volume

78
config/swaync/config.json

@ -0,0 +1,78 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"layer": "overlay",
"control-center-layer": "top",
"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": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"control-center-width": 500,
"control-center-height": 600,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"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": {
"example-name": {
"state": "muted",
"urgency": "Low",
"app-name": "mpv"
}
},
"widgets": [
"inhibitors",
"title",
"dnd",
"notifications"
],
"widget-config": {
"inhibitors": {
"text": "Inhibitors",
"button-text": "Clear All",
"clear-all-button": true
},
"title": {
"text": "Notifications",
"clear-all-button": true,
"button-text": "Clear All"
},
"dnd": {
"text": "Do Not Disturb"
},
"label": {
"max-lines": 5,
"text": "Label Text"
},
"mpris": {
"image-size": 96,
"image-radius": 12
}
}
}

296
config/swaync/style.css

@ -0,0 +1,296 @@
@import '../../.cache/wal/colors-waybar.css';
@define-color foreground rgb(248, 248, 242);
@define-color background @color1;
/* @define-color background rgb(40, 42, 54); */
@define-color background-alpha rgba(40, 42, 54, 0.8);
@define-color accent @color2;
/* @define-color accent rgba(189, 147, 249, 0.8); */
@define-color current-line rgb(68, 71, 90);
@define-color comment rgb(98, 114, 164);
* {
all: unset;
font-size: 18px;
/* font-family: "JetBrainsMono Nerd Font"; */
transition: 200ms;
}
.floating-notifications.background .notification-row .notification-background {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
/* background-color: #1e1e2e; */
background-color: rgba(30, 30, 46, 0.9);
color: #cdd6f4;
padding: 3;
border: 1px solid @accent;
}
.floating-notifications.background .notification-row .notification-background .notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .summary {
color: #cdd6f4;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .time {
color: #a6adc8;
}
.floating-notifications.background .notification-row .notification-background .notification .notification-content .body {
color: #cdd6f4;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.notification-action {
border-radius: 5px;
background: linear-gradient(
45deg,
rgba(164, 89, 235, 0.8),
@accent
);
border: 1px;
margin: 5px;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.floating-notifications.background .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.floating-notifications.background .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #f38ba8;
}
.floating-notifications.background .notification-row .notification-background .close-button:hover {
background-color: #eba0ac;
color: #1e1e2e;
}
.floating-notifications.background .notification-row .notification-background .close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center {
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.8), inset 0 0 0 1px #313244;
border-radius: 12.6px;
margin: 18px;
/* background-color: #1e1e2e; */
background-color: rgba(49, 50, 68, 0.9);
color: #cdd6f4;
padding: 14px;
border: 1px solid @accent;
}
.control-center .widget-title {
color: #cdd6f4;
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #585b70;
color: #cdd6f4;
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #1e1e2e;
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #cdd6f4;
background-color: #313244;
box-shadow: inset 0 0 0 1px #45475a;
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center .notification-row .notification-background .notification.critical {
box-shadow: inset 0 0 7px 0 #f38ba8;
}
.control-center .notification-row .notification-background .notification .notification-content {
margin: 7px;
}
.control-center .notification-row .notification-background .notification .notification-content .summary {
color: #cdd6f4;
}
.control-center .notification-row .notification-background .notification .notification-content .time {
color: #a6adc8;
}
.control-center .notification-row .notification-background .notification .notification-content .body {
color: #cdd6f4;
}
.control-center .notification-row .notification-background .notification > *:last-child > * {
min-height: 3.4em;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
border-radius: 7px;
color: #cdd6f4;
background-color: #11111b;
box-shadow: inset 0 0 0 1px #45475a;
margin: 7px;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #313244;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #1e1e2e;
background-color: #eba0ac;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background .close-button:active {
background-color: #f38ba8;
color: #1e1e2e;
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #7f849c;
color: #cdd6f4;
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #45475a;
background-color: #74c7ec;
color: #cdd6f4;
}
progressbar,
progress,
trough {
border-radius: 12.6px;
}
progressbar {
box-shadow: inset 0 0 0 1px #45475a;
}
.notification.critical progress {
background-color: #f38ba8;
}
.notification.low progress,
.notification.normal progress {
background-color: #89b4fa;
}
trough {
background-color: #313244;
}
.control-center trough {
background-color: #45475a;
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.control-center-dnd:checked {
background: #313244;
}
.control-center-dnd slider {
background: #45475a;
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #313244;
border: 1px solid #45475a;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #313244;
}
.widget-dnd > switch slider {
background: #45475a;
border-radius: 8px;
border: 1px solid #6c7086;
}

1
config/waybar/configs/[TOP] Default

@ -45,6 +45,7 @@
"modules-right": [
"network#speed",
"custom/separator#dot-line",
"custom/swaync",
"tray",
"mpris",
"custom/separator#dot-line",

23
config/waybar/modules

@ -1,4 +1,4 @@
//* ---- 💫 https://github.com/JaKooLit 💫 ---- *//
git@github.com:SherLock707/Hyprland-Dots.git//* ---- 💫 https://github.com/JaKooLit 💫 ---- *//
{
// HYPRLAND WORKSPACES. CHOOSE as desired and place on waybar configs
@ -714,7 +714,26 @@
"interval" : 86400, // once every day
"tooltip": true,
},
"custom/swaync": {
"tooltip": false,
"format": "{icon} {}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "sleep 0.1 && swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true,
},
}

1
config/waybar/style/Rose Pine.css

@ -128,6 +128,7 @@ tooltip {
#custom-power,
#custom-speaker,
#custom-updater,
#custom-swaync,
#custom-weather,
#custom-weather.clearNight,
#custom-weather.cloudyFoggyDay,

Loading…
Cancel
Save