diff options
| author | kkard2 <[email protected]> | 2025-10-30 14:08:15 +0100 |
|---|---|---|
| committer | kkard2 <[email protected]> | 2026-03-07 14:21:55 +0100 |
| commit | 3ec7bf19b2be910ee28a89da9487c9725d86fe24 (patch) | |
| tree | e5b6807a8ea281745a439a2128212e160520ae60 /_linux | |
| parent | a1b2c814e43161401889d7e0abdea2f46c7ed0ef (diff) | |
i use linux btw
Diffstat (limited to '_linux')
| -rw-r--r-- | _linux/hypr/hyprland.conf | 6 | ||||
| -rw-r--r-- | _linux/i3/config | 3 | ||||
| -rwxr-xr-x | _linux/scripts/flash_kb.sh | 55 | ||||
| -rwxr-xr-x | _linux/scripts/mcsr.sh | 23 | ||||
| -rwxr-xr-x | _linux/sxhkd/boateye.sh | 29 | ||||
| -rw-r--r-- | _linux/sxhkd/sxhkdrc | 18 |
6 files changed, 112 insertions, 22 deletions
diff --git a/_linux/hypr/hyprland.conf b/_linux/hypr/hyprland.conf index df146d5..9b3aa03 100644 --- a/_linux/hypr/hyprland.conf +++ b/_linux/hypr/hyprland.conf @@ -13,9 +13,9 @@ exec-once = copyq exec-once = /home/kkard2/soft/espanso-thing # Set programs that you use -$terminal = kitty -$fileManager = dolphin -$menu = wofi --show drun +$terminal = st -f "Noto Sans Mono:style=Regular:size=12" -e tmux +$fileManager = thunar +$menu = dmenu_run # Some default env vars. env = XCURSOR_SIZE,24 diff --git a/_linux/i3/config b/_linux/i3/config index eddc6a3..0f9a639 100644 --- a/_linux/i3/config +++ b/_linux/i3/config @@ -113,9 +113,6 @@ bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+space floating toggle -# boateye mentioned? (i'm still not hitting it) -bindsym $mod+g fullscreen toggle; floating toggle ; resize set 384 16384 ; move position center - # change focus between tiling / floating windows # bindsym $mod+space focus mode_toggle diff --git a/_linux/scripts/flash_kb.sh b/_linux/scripts/flash_kb.sh new file mode 100755 index 0000000..57d5a92 --- /dev/null +++ b/_linux/scripts/flash_kb.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +set -euo pipefail + +FIRMWARE="$1" + +if [[ ! -f "$FIRMWARE" ]]; then + echo "❌ Firmware file not found: $FIRMWARE" + exit 1 +fi + +# Ask for sudo upfront +sudo -v +# Keep-alive: update existing sudo timestamp until script finishes +while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & + +declare -A LABELS=( ["left"]="GLV80LHBOOT" ["right"]="GLV80RHBOOT" ) +declare -A MOUNTPOINTS=( ["left"]="/mnt/kb_left" ["right"]="/mnt/kb_right" ) + +flash_half() { + local side="$1" + local label="${LABELS[$side]}" + local mount_point="${MOUNTPOINTS[$side]}" + + echo "" + echo "⚙️ Waiting for $side half ($label) to appear in bootloader mode..." + + # Wait until device with correct label appears + while true; do + DEV=$(lsblk -o NAME,LABEL,PATH -nr | awk -v lbl="$label" '$2 == lbl {print $3}' || true) + if [[ -n "$DEV" ]]; then + echo "✅ Found $side half at $DEV" + break + fi + sleep 1 + done + + sudo mkdir -p "$mount_point" + echo "📦 Mounting $DEV to $mount_point..." + sudo mount "$DEV" "$mount_point" + + echo "📤 Copying firmware..." + sudo cp "$FIRMWARE" "$mount_point"/ + sync + + echo "💾 Unmounting..." + sudo umount "$mount_point" + + echo "✅ $side half flashed successfully!" +} + +flash_half "left" +flash_half "right" + +echo "" +echo "🎉 Both halves flashed successfully!" diff --git a/_linux/scripts/mcsr.sh b/_linux/scripts/mcsr.sh new file mode 100755 index 0000000..89d2136 --- /dev/null +++ b/_linux/scripts/mcsr.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +pids=() + +cleanup() { + for pid in "${pids[@]}"; do + if kill -0 "$pid" 2>/dev/null; then + kill "$pid" + fi + done + exit 1 +} + +trap cleanup SIGINT SIGTERM + +sxhkd & +pids+=($!) +xeyesee & +pids+=($!) +nbb & +pids+=($!) + +wait diff --git a/_linux/sxhkd/boateye.sh b/_linux/sxhkd/boateye.sh new file mode 100755 index 0000000..070e432 --- /dev/null +++ b/_linux/sxhkd/boateye.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +zoom_w=300 +zoom_h=16384 +zoom_x=750 +zoom_y=$(( (900 - zoom_h) / 2 )) + +normal_w=1600 +normal_h=900 +normal_x=0 +normal_y=0 + +normal_multiplier=0.25 +zoom_multiplier=0.03125 +device_id="E-Signal USB Gaming Mouse" + +# Get active window info +eval "$(xdotool getactivewindow getwindowgeometry --shell)" +title="$(xdotool getactivewindow getwindowname)" + +if [[ "$title" == *"Minecraft"* && "$HEIGHT" -eq "$normal_h" ]]; then + wmctrl -r ":ACTIVE:" -e "0,${zoom_x},${zoom_y},${zoom_w},${zoom_h}" + xinput set-prop "$device_id" 'Coordinate Transformation Matrix' \ + $zoom_multiplier 0 0 0 $zoom_multiplier 0 0 0 1 +else + wmctrl -r ":ACTIVE:" -e "0,${normal_x},${normal_y},${normal_w},${normal_h}" + xinput set-prop "$device_id" 'Coordinate Transformation Matrix' \ + $normal_multiplier 0 0 0 $normal_multiplier 0 0 0 1 +fi diff --git a/_linux/sxhkd/sxhkdrc b/_linux/sxhkd/sxhkdrc index 5035c74..1898bac 100644 --- a/_linux/sxhkd/sxhkdrc +++ b/_linux/sxhkd/sxhkdrc @@ -1,16 +1,2 @@ -super + shift + s - flameshot gui -super + w - firefox - -super + ctrl + Up - pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status -super + ctrl + Down - pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status -super + shift + m - pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -super + ctrl + space - playerctl play-pause - -super + v - copyq toggle +m + ~/.config/sxhkd/boateye.sh |
