pub / dotfiles

Configuration of software on my computer
git clone https://src.jayvii.de/pub/dotfiles.git
Home | Log | Files | Exports | Refs | RSS

commit d69723798b95937d44e4f3f02a723f60b8e2b620
parent 131e4f560cea932b35b763c0a3088e8f70ba01f7
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Fri, 21 Jun 2024 16:14:24 +0200

feat: update wayfire configuration

Diffstat:
Mwayfire/.config/waybar/config | 11++++++++---
Awayfire/.config/waybar/donotdisturb_status.sh | 12++++++++++++
Awayfire/.config/waybar/donotdisturb_toggle.sh | 8++++++++
Awayfire/.config/waybar/snip.sh | 17+++++++++++++++++
Mwayfire/.config/waybar/style.css | 7+++++++
5 files changed, 52 insertions(+), 3 deletions(-)

diff --git a/wayfire/.config/waybar/config b/wayfire/.config/waybar/config @@ -9,7 +9,7 @@ // Choose the order of the modules "modules-left":["custom/launcher", "wlr/workspaces", "wlr/taskbar"], - "modules-right":["custom/snip", "pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "network", "tray", "clock", "custom/power"], + "modules-right":["custom/donotdisturb", "custom/snip", "pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "network", "tray", "clock", "custom/power"], // Modules configuration @@ -122,6 +122,11 @@ }, "custom/snip":{ "format": "✂", - "on-click": "slurp | grim -g - ~/Bilder/Screenshots/$(date '+%Y_%m_%d_%H_%M_%S').png" - } + "on-click": "~/.config/waybar/snip.sh 'selection'" + }, + "custom/donotdisturb":{ + "format": "{}", + "exec": "~/.config/waybar/donotdisturb_status.sh", + "on-click": "~/.config/waybar/donotdisturb_toggle.sh" + } diff --git a/wayfire/.config/waybar/donotdisturb_status.sh b/wayfire/.config/waybar/donotdisturb_status.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +TIMEOUT=1 + +while [ ! -z $(pidof waybar) ]; do + if [ $(makoctl mode) != "default" ]; then + echo '🔕' + else + echo '🔔' + fi + sleep $TIMEOUT +done diff --git a/wayfire/.config/waybar/donotdisturb_toggle.sh b/wayfire/.config/waybar/donotdisturb_toggle.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +if [ $(makoctl mode) != "default" ]; then + makoctl set-mode default +else + makoctl set-mode do-not-disturb +fi + diff --git a/wayfire/.config/waybar/snip.sh b/wayfire/.config/waybar/snip.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +SCREENSHOT="$HOME/Bilder/Screenshots/$(date +%Y-%m-%d_%H_%M_%S).png" + +# Make screenshot either on selection of whole screen +if [[ "$1" == "selection" ]]; then + grim -g "$(slurp -b "#FFFFFF30" -c "#58364e" -d )" "$SCREENSHOT" +else + grim "$SCREENSHOT" +fi + +# copy screenshot path to clipboard +wl-copy < "$SCREENSHOT" + +# send notification to user +notify-send "Screenshot!" "$SCREENSHOT" + diff --git a/wayfire/.config/waybar/style.css b/wayfire/.config/waybar/style.css @@ -69,6 +69,7 @@ window#waybar.hidden { #custom-layout, #custom-updater, #custom-snip, +#custom-donotdisturb, #taskbar, #tray, #mode, @@ -227,6 +228,12 @@ label:focus { font-size: 20px; } +#custom-donotdisturb { + background-color: #171717; + color: skyblue; +} + + #taskbar{ background-color: #171717;