From 9a878b2b6f94f955ca6caf9b44fb947635da67f1 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Tue, 1 Jul 2025 15:29:27 +0900 Subject: Add snippet.sh --- public/.local/bin/audio_control.sh | 5 +++++ public/.local/bin/dmenu-webshortcuts.sh | 3 ++- public/.local/bin/laptop-xrandr.sh | 16 ++++++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'public/.local/bin') diff --git a/public/.local/bin/audio_control.sh b/public/.local/bin/audio_control.sh index a257120..b930a88 100755 --- a/public/.local/bin/audio_control.sh +++ b/public/.local/bin/audio_control.sh @@ -1,5 +1,10 @@ #!/bin/bash +# TODO: +# Create dmenu script that allows changing the default sink and source. +# pactl list sources short +# pactl list sinks short + delta=${2:-10} signal=10 diff --git a/public/.local/bin/dmenu-webshortcuts.sh b/public/.local/bin/dmenu-webshortcuts.sh index 5ab4f82..411525d 100755 --- a/public/.local/bin/dmenu-webshortcuts.sh +++ b/public/.local/bin/dmenu-webshortcuts.sh @@ -53,6 +53,7 @@ case "$keyword" in "python") xdg-open "https://docs.python.org/3/search.html?q=${search_term// /+}" ;; "pypi") xdg-open "https://pypi.org/search/?q=${search_term// /+}&o=" ;; "npm") xdg-open "https://www.npmjs.com/search?q=${search_term// /+}" ;; + "mdn") xdg-open "https://developer.mozilla.org/en-US/search?q=${search_term// /+}" ;; # Media "yt") xdg-open "https://www.youtube.com/results?search_query=$search_term" ;; @@ -83,7 +84,7 @@ case "$keyword" in "rae") xdg-open "https://dle.rae.es/?w=$search_term" ;; # Mitsuo - "pw") xdg-open "http://wiki.pulse15/index.php?search=${search_term// /+}" ;; + "pw") xdg-open "http://wiki.localhost/index.php?search=${search_term// /+}" ;; "factorio") xdg-open "https://wiki.factorio.com/${search_term// /_}" ;; "dst") xdg-open "https://dontstarve.wiki.gg/wiki/${search_term// /_}" ;; "mc") xdg-open "https://minecraft.wiki/w/${search_term// /_}" ;; diff --git a/public/.local/bin/laptop-xrandr.sh b/public/.local/bin/laptop-xrandr.sh index 5d8d422..cd3a66f 100755 --- a/public/.local/bin/laptop-xrandr.sh +++ b/public/.local/bin/laptop-xrandr.sh @@ -22,5 +22,17 @@ simple_2_monitor() { #simple_2_monitor #xrandr --auto --output HDMI-A-0 --mode 1920x1080 --right-of eDP -# Only HDMI output 4k -xrandr --output eDP --off --output HDMI-A-0 --mode 3840x2160 +only_hdmi_4k() { + xrandr --output eDP --off --output HDMI-A-0 --mode 3840x2160 +} + +only_hdmi_2k() { + xrandr --output eDP --off --output HDMI-A-0 --mode 1920x1080 +} + +case $1 in + 4k) only_hdmi_4k ;; + 2k) only_hdmi_2k ;; + reset) xrandr ;; + *) only_hdmi_4k +esac -- cgit v1.2.3