From 5d78ad3d43b5b41e3e8bd0b8c00a46e28b138fe2 Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Sun, 29 Dec 2024 22:28:52 +0200 Subject: [PATCH] bin: refactor and reformat --- bin/arch-upd | 2 +- bin/ipinfo | 1 - bin/issue | 2 +- bin/npm-install-globals | 2 +- bin/today | 2 +- bin/wofi-power-menu | 20 ++++++++++---------- config/hypr/hyprland.conf | 3 ++- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/bin/arch-upd b/bin/arch-upd index 551e147..0642107 100755 --- a/bin/arch-upd +++ b/bin/arch-upd @@ -1,4 +1,4 @@ #!/usr/bin/env bash sudo pacman -Syyuu --noconfirm paru -Sua --noconfirm -sudo pacman -Rs $(pacman -Qdtq | sed 's/\n/ /g') --noconfirm +sudo pacman -Rs "$(pacman -Qdtq | sed 's/\n/ /g')" --noconfirm diff --git a/bin/ipinfo b/bin/ipinfo index 07bce68..b8eae7d 100755 --- a/bin/ipinfo +++ b/bin/ipinfo @@ -1,3 +1,2 @@ #!/usr/bin/env bash - curl -s ipinfo.io | jq "del(.readme) | del(.loc) | ." diff --git a/bin/issue b/bin/issue index 5a137a3..9323a08 100755 --- a/bin/issue +++ b/bin/issue @@ -1,6 +1,6 @@ #!/usr/bin/env bash if [ -n "$1" ]; then - exec gh issue edit "$@" + exec gh issue edit "$@" fi exec gh issue create diff --git a/bin/npm-install-globals b/bin/npm-install-globals index 726dfe5..9c30daf 100755 --- a/bin/npm-install-globals +++ b/bin/npm-install-globals @@ -1,2 +1,2 @@ #!/usr/bin/env bash -exec npm i -g yaml-language-server vscode-langservers-extracted typescript-language-server bash-language-server svelte-language-server +exec npm i -g yaml-language-server vscode-langservers-extracted typescript-language-server bash-language-server diff --git a/bin/today b/bin/today index e0c32d1..81dc2de 100755 --- a/bin/today +++ b/bin/today @@ -1,4 +1,4 @@ #!/usr/bin/env bash -p=$HOME/Documents/Syncthing/logseq/journals +p=$HOME/Documents/Obsidian/journal d=$(date +%Y-%m-%d) [ -d "$p" ] && exec nvim "$p/$d.md" diff --git a/bin/wofi-power-menu b/bin/wofi-power-menu index f751cea..ec66790 100755 --- a/bin/wofi-power-menu +++ b/bin/wofi-power-menu @@ -2,19 +2,19 @@ entries="⏻ poweroff\n⇠ logout\n⏾ suspend\n⭮ reboot" selected=$(echo -e "$entries" | - wofi --dmenu --cache-file /dev/null | - awk '{print tolower($2)}') + wofi --dmenu --cache-file /dev/null | + awk '{print tolower($2)}') shall_continue() { - entries="Yes\nNo" - selected=$(echo -e "$entries" | - wofi --dmenu --cache-file /dev/null | - awk '{print tolower($1)}') + entries="Yes\nNo" + selected=$(echo -e "$entries" | + wofi --dmenu --cache-file /dev/null | + awk '{print tolower($1)}') - case $selected in - yes) exec "$@" ;; - no) exit 0 ;; - esac + case $selected in + yes) exec "$@" ;; + no) exit 0 ;; + esac } case $selected in diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index 8192e13..2af1db2 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -165,7 +165,8 @@ windowrulev2 = rounding 0, floating:0, onworkspace:f[1] bind = $mod, f, fullscreen bind = $mod Ctrl, f, togglefloating - bind = , Print, exec, grim -g "$(slurp)" - | wl-copy + bind = , Print, exec, hyprshot -m region + bind = , SHIFT Print, exec, hyprshot -m output # programs {{{ bind = $mod SHIFT, w, exec, brave