From b0ece0c86c2923097a95cca16e158c632597ab04 Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Fri, 29 Dec 2023 23:44:32 +0800 Subject: [PATCH] home: scripts: simplify --- .../home-manager/applications/hyprland/hypr/keybinds.conf | 6 ++---- .../desktop/home/scripts/bin/minecraft-inputfix | 7 ------- .../desktop/home/scripts/bin/wrapped-brightnessctl | 2 +- 3 files changed, 3 insertions(+), 12 deletions(-) delete mode 100755 users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/minecraft-inputfix diff --git a/users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf b/users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf index 5f98883..f4b2248 100644 --- a/users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf +++ b/users/guanranwang/home-manager/applications/hyprland/hypr/keybinds.conf @@ -4,13 +4,11 @@ # # bind vars -$lock = ~/.local/bin/wrapped-swaylock-effects $wp = ~/.local/bin/wrapped-swww $dwp = ~/.local/bin/wrapped-mpvpaper $changevolume = ~/.local/bin/wrapped-pamixer # use swayosd instead $changebrightness = ~/.local/bin/wrapped-brightnessctl $screenshot = ~/.local/bin/screenshot -$inputfix = ~/.local/bin/minecraft-inputfix $video_path = ~/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/workshop/content/431960 # binds @@ -20,8 +18,8 @@ bind = SUPER, E, exec, xdg-open ~ bind = SUPER, W, exec, xdg-open https: # why is this working bind = CONTROL SHIFT, Escape, exec, gnome-system-monitor -bind = ALT, R, exec, $inputfix -bind = SUPER, Backspace, exec, $lock +bind = ALT, R, exec, zenity --width 500 --entry | wl-copy +bind = SUPER, Backspace, exec, swaylock bind = SUPER, F, fullscreen, 0 bind = SUPER SHIFT, F, fullscreen, 1 diff --git a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/minecraft-inputfix b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/minecraft-inputfix deleted file mode 100755 index 674f2e7..0000000 --- a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/minecraft-inputfix +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -ydotool key 20:1 20:0 # press t -echo $(zenity --width 500 --entry) | wl-copy -ydotool key 29:1 47:1 # press ctrl + v -sleep 0.1 -ydotool key 29:0 47:0 28:1 28:0 # release ctrl + v, press return diff --git a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/wrapped-brightnessctl b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/wrapped-brightnessctl index 669b1ac..ef97c0a 100755 --- a/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/wrapped-brightnessctl +++ b/users/guanranwang/nixos/profiles/device-type/desktop/home/scripts/bin/wrapped-brightnessctl @@ -3,7 +3,7 @@ # Original Script: https://github.com/ericmurphyxyz/dotfiles/blob/master/.local/bin/changebrightness send_notification() { - brightness=$((($(brightnessctl get) / 240))) + brightness=$(($(brightnessctl get) / 240)) dunstify -a "changebrightness" -u low -r 9991 -h int:value:"$brightness" -i "brightness-$1" "Brightness: $brightness%" -t 2000 }