fix
This commit is contained in:
parent
a6721b9de2
commit
cd4e91381b
@ -73,10 +73,3 @@ fi
|
||||
|
||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||
export PATH="$PNPM_HOME:$PATH"
|
||||
if [ -e /home/jim/.nix-profile/etc/profile.d/nix.sh ]; then . /home/jim/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
|
||||
|
||||
PATH="/home/jim/perl5/bin${PATH:+:${PATH}}"; export PATH;
|
||||
PERL5LIB="/home/jim/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
|
||||
PERL_LOCAL_LIB_ROOT="/home/jim/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
|
||||
PERL_MB_OPT="--install_base \"/home/jim/perl5\""; export PERL_MB_OPT;
|
||||
PERL_MM_OPT="INSTALL_BASE=/home/jim/perl5"; export PERL_MM_OPT;
|
||||
|
@ -35,7 +35,7 @@ set $settings gnome-control-center
|
||||
set $toggle_layout ~/.config/sway/toggle_layout.sh
|
||||
set $toggle_gaps ~/.config/sway/toggle_gaps.sh
|
||||
set $web_search $wofi_scripts/web-search.sh
|
||||
|
||||
set $select_window ~/.config/sway/select_window.sh
|
||||
|
||||
# Input configuration
|
||||
input * {
|
||||
@ -217,7 +217,7 @@ output * bg `find ~/.customization/background -type f | shuf -n 1` fill
|
||||
bindsym $mod+s exec $screenshot
|
||||
|
||||
|
||||
bindsym $mod+Tab exec $wofi_scripts/sway-select-window.sh
|
||||
bindsym $mod+Tab exec $select_window
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
|
19
configs/sway/select_window.sh
Executable file
19
configs/sway/select_window.sh
Executable file
@ -0,0 +1,19 @@
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
# ------Get available windows:
|
||||
windows=$(swaymsg -t get_tree | jq -r '
|
||||
recurse(.nodes[]?) |
|
||||
recurse(.floating_nodes[]?) |
|
||||
select(.type=="con"), select(.type=="floating_con") |
|
||||
(.id | tostring) + " " + .app_id + ": " + .name')
|
||||
|
||||
# ------Limit wofi's height with the number of opened windows:
|
||||
height=$(echo "$windows" | wc -l)
|
||||
height=$(($height + 2))
|
||||
|
||||
# ------Select window with wofi:
|
||||
selected=$(echo "$windows" | wofi -d --lines $height -i -p "Switch to:" | awk '{print $1}')
|
||||
|
||||
# ------Tell sway to focus said window:
|
||||
swaymsg [con_id="$selected"] focus
|
Loading…
Reference in New Issue
Block a user