mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-10-30 07:36:36 +00:00
Compare commits
No commits in common. "e9179dc509e2d8b0cf669a16f7a82adb79ed5f6a" and "ae439adcc43e0dfd608001b5696dbcc23ba7ee11" have entirely different histories.
e9179dc509
...
ae439adcc4
5 changed files with 11 additions and 145 deletions
|
|
@ -13,26 +13,6 @@ icon = "weather-clear-night"
|
||||||
actions = { "" = "hyprctl hyprsunset temperature 2700" }
|
actions = { "" = "hyprctl hyprsunset temperature 2700" }
|
||||||
|
|
||||||
[[entries]]
|
[[entries]]
|
||||||
text = "Idle timeouts (hypridle)"
|
text = "Zoom Toggle"
|
||||||
icon = ""
|
|
||||||
async = "printf 'Idle timeouts (hypridle): %s' $(toggle-idle check && echo 'ON' || echo 'OFF')"
|
|
||||||
|
|
||||||
[entries.actions]
|
|
||||||
"toggle" = "toggle-idle"
|
|
||||||
"start" = "toggle-idle on"
|
|
||||||
"stop" = "toggle-idle off"
|
|
||||||
|
|
||||||
[[entries]]
|
|
||||||
text = "Notifications (swaync)"
|
|
||||||
icon = ""
|
|
||||||
async = "printf 'Notifications (swaync): %s' $(toggle-notifications check && echo 'ON' || echo 'OFF')"
|
|
||||||
|
|
||||||
[entries.actions]
|
|
||||||
"toggle" = "toggle-notifications"
|
|
||||||
"start" = "toggle-notifications on"
|
|
||||||
"stop" = "toggle-notifications off"
|
|
||||||
|
|
||||||
[[entries]]
|
|
||||||
text = "Cursor zoom"
|
|
||||||
icon = "zoom-in"
|
icon = "zoom-in"
|
||||||
actions = { "toggle" = "hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float) | if . > 1 then 1 else 1.5 end')" }
|
actions = { "" = "hyprctl -q keyword cursor:zoom_factor $(hyprctl getoption cursor:zoom_factor -j | jq '(.float) | if . > 1 then 1 else 1.5 end')" }
|
||||||
|
|
|
||||||
|
|
@ -156,24 +156,3 @@ clipboard = [
|
||||||
{ action = "toggle_images", global = true, label = "toggle images", bind = "ctrl i", after = "AsyncClearReload" },
|
{ action = "toggle_images", global = true, label = "toggle images", bind = "ctrl i", after = "AsyncClearReload" },
|
||||||
{ action = "edit", bind = "ctrl o" },
|
{ action = "edit", bind = "ctrl o" },
|
||||||
]
|
]
|
||||||
|
|
||||||
"menus:system" = [
|
|
||||||
{ action = "lock", bind = "Return" },
|
|
||||||
{ action = "suspend", bind = "Return" },
|
|
||||||
{ action = "relaunch", bind = "Return" },
|
|
||||||
{ action = "restart", bind = "Return" },
|
|
||||||
{ action = "shutdown", bind = "Return" },
|
|
||||||
]
|
|
||||||
|
|
||||||
"menus:screenshots" = [
|
|
||||||
{ action = "to_clipboard", default = true, bind = "Return" },
|
|
||||||
{ action = "to_file", bind = "f" },
|
|
||||||
{ action = "to_swappy", bind = "e" },
|
|
||||||
{ action = "cp_use", default = true, bind = "Return" },
|
|
||||||
]
|
|
||||||
|
|
||||||
"menus:hyprland" = [
|
|
||||||
{ action = "toggle", default = true, bind = "Return" },
|
|
||||||
{ action = "start", bind = "u" },
|
|
||||||
{ action = "stop", bind = "d" },
|
|
||||||
]
|
|
||||||
|
|
|
||||||
|
|
@ -1,59 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $0 [on|off|toggle|check]" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
serv="hypridle.service"
|
serv="hypridle.service"
|
||||||
|
|
||||||
# Returns 0 if the service is active (idle timeouts enabled), 1 otherwise
|
if systemctl --user is-active --quiet "$serv"; then
|
||||||
idle_enabled() {
|
|
||||||
systemctl --user is-active --quiet "$serv"
|
|
||||||
}
|
|
||||||
|
|
||||||
mode="toggle"
|
|
||||||
|
|
||||||
if [ "$#" -ge 1 ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Invalid usage" >&2
|
|
||||||
usage
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--help)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
on | off | toggle)
|
|
||||||
mode="$1"
|
|
||||||
;;
|
|
||||||
check)
|
|
||||||
if idle_enabled; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid argument" >&2
|
|
||||||
usage
|
|
||||||
exit 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine new mode if toggling
|
|
||||||
if [ "$mode" = "toggle" ]; then
|
|
||||||
mode="$(idle_enabled && echo 'off' || echo 'on')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Apply the mode
|
|
||||||
if [ "$mode" = "off" ]; then
|
|
||||||
systemctl --user stop "$serv"
|
systemctl --user stop "$serv"
|
||||||
notify-send "Idle-Toggle" "Idle timeouts disabled" -h string:x-canonical-private-synchronous:idle-toggle
|
notify-send "Idle-Toggle" "Idle timeouts disabled"
|
||||||
else
|
else
|
||||||
systemctl --user start "$serv"
|
systemctl --user start "$serv"
|
||||||
notify-send "Idle-Toggle" "Idle timeouts enabled" -h string:x-canonical-private-synchronous:idle-toggle
|
notify-send "Idle-Toggle" "Idle timeouts enabled"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,56 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
usage() {
|
if [ "$(dunstctl is-paused)" = "false" ]; then
|
||||||
echo "$0 [on/off/toggle/check]" >&2
|
|
||||||
}
|
|
||||||
|
|
||||||
# Returns 0 if notifications are enabled, 1 if DND is active
|
|
||||||
notifs_enabled() {
|
|
||||||
[ "$(swaync-client --get-dnd)" = "false" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
mode="toggle"
|
|
||||||
|
|
||||||
if [ "$#" -ge 1 ]; then
|
|
||||||
if [ "$#" -gt 1 ]; then
|
|
||||||
echo "Invalid usage" >&2
|
|
||||||
usage
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
--help)
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
on | off | toggle)
|
|
||||||
mode="$1"
|
|
||||||
;;
|
|
||||||
check)
|
|
||||||
if notifs_enabled; then
|
|
||||||
exit 0
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Invalid argument" >&2
|
|
||||||
usage
|
|
||||||
exit 2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$mode" = "toggle" ]; then
|
|
||||||
mode="$(notifs_enabled && echo 'off' || echo 'on')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$mode" = "off" ]; then
|
|
||||||
notify-send "Notifications" "Pausing notifications..." -h string:x-canonical-private-synchronous:notif-pause
|
notify-send "Notifications" "Pausing notifications..." -h string:x-canonical-private-synchronous:notif-pause
|
||||||
sleep 2
|
sleep 2
|
||||||
swaync-client --dnd-on >/dev/null
|
dunstctl set-paused true
|
||||||
else
|
else
|
||||||
swaync-client --dnd-off >/dev/null
|
dunstctl set-paused false
|
||||||
notify-send "Notifications" "Notifications enabled" -h string:x-canonical-private-synchronous:notif-pause
|
notify-send "Notifications" "Notifications enabled" -h string:x-canonical-private-synchronous:notif-pause
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -99,12 +99,12 @@ paru -S --noconfirm --needed hyprland xdg-desktop-portal-hyprland
|
||||||
# Audio
|
# Audio
|
||||||
paru -S --noconfirm --needed \
|
paru -S --noconfirm --needed \
|
||||||
pipewire wireplumber pipewire-alsa pipewire-pulse pipewire-jack \
|
pipewire wireplumber pipewire-alsa pipewire-pulse pipewire-jack \
|
||||||
alsa-utils alsa-firmware alsa-plugins rtkit pulsemixer wiremix
|
alsa-utils alsa-firmware alsa-plugins rtkit pulsemixer
|
||||||
|
|
||||||
# Other Utilities
|
# Other Utilities
|
||||||
paru -S --noconfirm --needed \
|
paru -S --noconfirm --needed \
|
||||||
nm-connection-editor network-manager-applet ffmpegthumbnailer hyfetch fastfetch \
|
nm-connection-editor network-manager-applet ffmpegthumbnailer hyfetch fastfetch \
|
||||||
tesseract tesseract-data-eng nvtop lazydocker lazygit
|
tesseract tesseract-data-eng nvtop
|
||||||
|
|
||||||
# Themes (Qt theme, GTK theme, icons theme, cursor theme)
|
# Themes (Qt theme, GTK theme, icons theme, cursor theme)
|
||||||
paru -S --noconfirm --needed \
|
paru -S --noconfirm --needed \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue