updates
This commit is contained in:
@@ -220,17 +220,27 @@ bindsym $mod+Escape exec swaylock -f -c 000000
|
||||
## Session // Sleep // <><Shift> s ##
|
||||
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 ##
|
||||
bindsym $mod+Shift+o exec /home/raga/repos/linux/sway-new-config/mouse-toggle.sh toggle
|
||||
set $osrs_scripts /home/raga/repos/linux/sway-new-config
|
||||
set $osrs_mode OSRS
|
||||
|
||||
## Mouse // Start Autoclicker // <><Shift> a ##
|
||||
bindsym $mod+Shift+a exec kitty -e /home/raga/repos/linux/sway-new-config/autoclicker.sh
|
||||
bindsym f12 mode "$osrs_mode"
|
||||
|
||||
## Mouse // Stop Autoclicker // <> Escape ##
|
||||
#bindsym Escape exec /home/raga/repos/linux/sway-new-config/autoclicker-stop.sh
|
||||
mode "$osrs_mode" {
|
||||
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)
|
||||
|
||||
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
|
||||
# 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 = "net"
|
||||
format = " $icon {$signal_strength $ssid $frequency|Wired connection} via $device "
|
||||
format = " $icon {$signal_strength $ssid $frequency|Wired} @ $device "
|
||||
interval = 1
|
||||
|
||||
[[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
|
||||
Reference in New Issue
Block a user