updates
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
cs2_benchmarks/
|
||||||
|
mobos/
|
||||||
@@ -17,3 +17,4 @@ WantedBy=multi-user.target
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -83,8 +83,3 @@ echo "To set CPU to performance mode:"
|
|||||||
echo " echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
|
echo " echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor"
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "${GREEN}Now run your benchmark!${NC}"
|
echo -e "${GREEN}Now run your benchmark!${NC}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -220,17 +220,27 @@ bindsym $mod+Escape exec swaylock -f -c 000000
|
|||||||
## Session // Sleep // <><Shift> s ##
|
## Session // Sleep // <><Shift> s ##
|
||||||
bindsym $mod+Shift+s exec systemctl suspend
|
bindsym $mod+Shift+s exec systemctl suspend
|
||||||
|
|
||||||
## Mouse // Toggle Position // <> q ##
|
###############################################################################
|
||||||
#bindsym q exec /home/raga/repos/linux/sway-new-config/mouse-toggle.sh
|
# Custom scripts (OSRS mode)
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
## Mouse // Enable/Disable Toggle // <><Shift> o ##
|
set $osrs_scripts /home/raga/repos/linux/sway-new-config
|
||||||
bindsym $mod+Shift+o exec /home/raga/repos/linux/sway-new-config/mouse-toggle.sh toggle
|
set $osrs_mode OSRS
|
||||||
|
|
||||||
## Mouse // Start Autoclicker // <><Shift> a ##
|
bindsym f12 mode "$osrs_mode"
|
||||||
bindsym $mod+Shift+a exec kitty -e /home/raga/repos/linux/sway-new-config/autoclicker.sh
|
|
||||||
|
|
||||||
## Mouse // Stop Autoclicker // <> Escape ##
|
mode "$osrs_mode" {
|
||||||
#bindsym Escape exec /home/raga/repos/linux/sway-new-config/autoclicker-stop.sh
|
bindsym q exec $osrs_scripts/osrs-drop.sh
|
||||||
|
bindsym w exec $osrs_scripts/osrs-click.sh
|
||||||
|
bindsym o exec $osrs_scripts/mouse-toggle.sh toggle
|
||||||
|
bindsym a exec kitty -e $osrs_scripts/autoclicker.sh
|
||||||
|
#bindsym Escape exec $osrs_scripts/autoclicker-stop.sh
|
||||||
|
|
||||||
|
## Resize // Exit OSRS Mode // Escape or Enter ##
|
||||||
|
bindsym Return mode "default"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
bindsym f12 mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# System Management (Arch Linux alternatives)
|
# System Management (Arch Linux alternatives)
|
||||||
|
|||||||
5
home_dotfiles/.config/sway/get-focused-window.sh
Executable file
5
home_dotfiles/.config/sway/get-focused-window.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
FOCUSED=$(swaymsg -t get_tree | jq '.. | select(.type?) | select(.focused==true) | .name')
|
||||||
|
|
||||||
|
echo "$FOCUSED"
|
||||||
@@ -1,9 +1,24 @@
|
|||||||
# Advanced i3status-rust configuration
|
# Advanced i3status-rust configuration
|
||||||
# Based on the i3xrocks blocks from your i3 setup
|
# Based on the i3xrocks blocks from your i3 setup
|
||||||
|
|
||||||
|
[[block]]
|
||||||
|
block = "custom"
|
||||||
|
command = "~/.config/sway/osrs-mode-status.sh"
|
||||||
|
format = " $text "
|
||||||
|
interval = 1
|
||||||
|
click = [
|
||||||
|
{button = "left", cmd = "~/.config/sway/osrs-mode-toggle.sh", update = true}
|
||||||
|
]
|
||||||
|
|
||||||
|
#[[block]]
|
||||||
|
#block = "custom"
|
||||||
|
#command = "~/.config/sway/get-focused-window.sh"
|
||||||
|
#format = " $text "
|
||||||
|
#interval = 5
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
block = "net"
|
block = "net"
|
||||||
format = " $icon {$signal_strength $ssid $frequency|Wired connection} via $device "
|
format = " $icon {$signal_strength $ssid $frequency|Wired} @ $device "
|
||||||
interval = 1
|
interval = 1
|
||||||
|
|
||||||
[[block]]
|
[[block]]
|
||||||
|
|||||||
10
home_dotfiles/.config/sway/osrs-mode-status.sh
Executable file
10
home_dotfiles/.config/sway/osrs-mode-status.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
MODE=$(swaymsg -r -t get_binding_state 2>/dev/null | jq -r '.name // "default"')
|
||||||
|
ICON=""
|
||||||
|
|
||||||
|
if [ "$MODE" = "OSRS" ]; then
|
||||||
|
echo "$ICON ON"
|
||||||
|
else
|
||||||
|
echo "$ICON OFF"
|
||||||
|
fi
|
||||||
10
home_dotfiles/.config/sway/osrs-mode-toggle.sh
Executable file
10
home_dotfiles/.config/sway/osrs-mode-toggle.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
MODE_NAME="OSRS"
|
||||||
|
CURRENT=$(swaymsg -r -t get_binding_state 2>/dev/null | jq -r '.name // "default"')
|
||||||
|
|
||||||
|
if [ "$CURRENT" = "$MODE_NAME" ]; then
|
||||||
|
swaymsg mode default >/dev/null
|
||||||
|
else
|
||||||
|
swaymsg mode "$MODE_NAME" >/dev/null
|
||||||
|
fi
|
||||||
4
home_dotfiles/.profile
Normal file
4
home_dotfiles/.profile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
if [ -d "$HOME/.local/bin" ]; then
|
||||||
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
export PATH
|
||||||
@@ -52,6 +52,16 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Copy .profile to home directory
|
||||||
|
echo ""
|
||||||
|
print_status "Installing .profile configuration..."
|
||||||
|
if cp "$SCRIPT_DIR/.profile" ~/.profile; then
|
||||||
|
print_success ".profile installed to ~/.profile"
|
||||||
|
else
|
||||||
|
print_error "Failed to copy .profile"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Copy .aliases to home directory
|
# Copy .aliases to home directory
|
||||||
echo ""
|
echo ""
|
||||||
print_status "Installing .aliases configuration..."
|
print_status "Installing .aliases configuration..."
|
||||||
|
|||||||
0
install-arch-sway-requirements.sh
Normal file → Executable file
0
install-arch-sway-requirements.sh
Normal file → Executable file
@@ -47,6 +47,19 @@ echo "Installing i3status-rust config..."
|
|||||||
cp $SCRIPT_DIR/home_dotfiles/.config/sway/i3status-rust.toml ~/.config/sway/i3status-rust.toml
|
cp $SCRIPT_DIR/home_dotfiles/.config/sway/i3status-rust.toml ~/.config/sway/i3status-rust.toml
|
||||||
echo "✓ i3status-rust config installed to ~/.config/sway/i3status-rust.toml"
|
echo "✓ i3status-rust config installed to ~/.config/sway/i3status-rust.toml"
|
||||||
|
|
||||||
|
# === OSRS MODE SCRIPTS ===
|
||||||
|
echo ""
|
||||||
|
echo "Installing OSRS mode helper scripts..."
|
||||||
|
for script in osrs-mode-status.sh osrs-mode-toggle.sh get-focused-window.sh; do
|
||||||
|
if [ -f "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ]; then
|
||||||
|
cp "$SCRIPT_DIR/home_dotfiles/.config/sway/$script" ~/.config/sway/$script
|
||||||
|
chmod +x ~/.config/sway/$script
|
||||||
|
echo "✓ Installed ~/.config/sway/$script"
|
||||||
|
else
|
||||||
|
echo "⚠ $script not found, skipping..."
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# === WEATHER SCRIPT ===
|
# === WEATHER SCRIPT ===
|
||||||
# Comment out this section if you don't want the weather script
|
# Comment out this section if you don't want the weather script
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
3
osrs-click.sh
Executable file
3
osrs-click.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ydotool click 0xC0 # Left click
|
||||||
93
osrs-drop.sh
Executable file
93
osrs-drop.sh
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Mouse toggle script for Sway
|
||||||
|
# Toggles mouse position 60 (MOVE_DISTANCE) pixels upwards on each execution
|
||||||
|
# Requires ydotool and ydotoold daemon running
|
||||||
|
|
||||||
|
# Configuration
|
||||||
|
|
||||||
|
MOVE_DISTANCE=70
|
||||||
|
BOTTOM_MARGIN=190
|
||||||
|
|
||||||
|
RANDOM_DELAY_MIN=0
|
||||||
|
RANDOM_DELAY_MAX=0.25
|
||||||
|
RANDOM_DELAY=$(awk -v min=$RANDOM_DELAY_MIN -v max=$RANDOM_DELAY_MAX 'BEGIN { srand(); printf "%.2f\n", min + rand() * (max - min) }')
|
||||||
|
#WL_FIND_CURSOR_BIN="${WL_FIND_CURSOR_BIN:-wl-find-cursor}"
|
||||||
|
WL_FIND_CURSOR_BIN="/home/raga/repos/linux/wl-find-cursor/wl-find-cursor"
|
||||||
|
|
||||||
|
ENABLED_FILE="/tmp/osrs_drop__enabled"
|
||||||
|
LOCK_FILE="/tmp/osrs_drop__lock"
|
||||||
|
|
||||||
|
# Verify dependencies
|
||||||
|
if ! command -v ydotool &> /dev/null; then
|
||||||
|
echo "Error: ydotool is not installed. Install it with: sudo pacman -S ydotool"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! command -v bc &> /dev/null; then
|
||||||
|
echo "Error: bc is not installed. Install it with: sudo pacman -S bc"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! command -v jq &> /dev/null; then
|
||||||
|
echo "Error: jq is not installed. Install it with: sudo pacman -S jq"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if ! command -v "$WL_FIND_CURSOR_BIN" &> /dev/null; then
|
||||||
|
echo "Error: wl-find-cursor is not installed or not in PATH (looked for '$WL_FIND_CURSOR_BIN')."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify lock file
|
||||||
|
if [ -f "$LOCK_FILE" ]; then
|
||||||
|
echo "Script is already running, skipping..."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo $$ > "$LOCK_FILE"
|
||||||
|
trap 'rm -f "$LOCK_FILE"' EXIT
|
||||||
|
|
||||||
|
# Check if script should toggle on/off or execute
|
||||||
|
if [ "$1" = "toggle" ]; then
|
||||||
|
if [ -f "$ENABLED_FILE" ]; then
|
||||||
|
rm "$ENABLED_FILE"
|
||||||
|
echo "Mouse toggle script DISABLED"
|
||||||
|
else
|
||||||
|
echo "enabled" > "$ENABLED_FILE"
|
||||||
|
echo "Mouse toggle script ENABLED"
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify script is enabled
|
||||||
|
if [ ! -f "$ENABLED_FILE" ]; then
|
||||||
|
echo "Mouse toggle script is DISABLED. Use '$0 toggle' to enable."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify ydotoold daemon is running
|
||||||
|
if ! pgrep -x "ydotoold" > /dev/null; then
|
||||||
|
echo "Starting ydotoold daemon..."
|
||||||
|
sudo ydotoold &
|
||||||
|
sleep 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
CURSOR_POS=$("$WL_FIND_CURSOR_BIN" -p)
|
||||||
|
if [ -z "$CURSOR_POS" ]; then
|
||||||
|
echo "Error: Unable to determine cursor position."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
read -r CURSOR_X CURSOR_Y <<< "$CURSOR_POS"
|
||||||
|
|
||||||
|
BOTTOM_LIMIT=$(swaymsg -r -t get_outputs | jq --argjson cx "$CURSOR_X" --argjson cy "$CURSOR_Y" --argjson margin "$BOTTOM_MARGIN" '
|
||||||
|
.[] | select(.active == true) |
|
||||||
|
select($cx >= .rect.x and $cx < (.rect.x + .rect.width) and
|
||||||
|
$cy >= .rect.y and $cy < (.rect.y + .rect.height)) |
|
||||||
|
(.rect.y + .rect.height - $margin)
|
||||||
|
' | head -n 1)
|
||||||
|
|
||||||
|
if [ -n "$BOTTOM_LIMIT" ]; then
|
||||||
|
if [ "$(printf "%.0f" "$CURSOR_Y")" -ge "$(printf "%.0f" "$BOTTOM_LIMIT")" ]; then
|
||||||
|
echo "Cursor is already within ${BOTTOM_MARGIN}px of the bottom, skipping move."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
ydotool mousemove -- 0 $MOVE_DISTANCE
|
||||||
Reference in New Issue
Block a user