Fix tmuxswitcher
This commit is contained in:
parent
14de7c3ec5
commit
b3460e92ce
9 changed files with 40 additions and 60 deletions
|
@ -1,5 +1,5 @@
|
||||||
gesture swipe left 3 bspc desktop -f next
|
# TODO: sway gestures?
|
||||||
gesture swipe right 3 bspc desktop -f prev
|
gesture swipe left 3 swaymsg workspace back_and_forth
|
||||||
|
|
||||||
gesture swipe right 2 swaymsg seat seat0 cursor press BTN_EXTRA && swaymsg seat seat0 cursor release BTN_EXTRA
|
gesture swipe right 2 swaymsg seat seat0 cursor press BTN_EXTRA && swaymsg seat seat0 cursor release BTN_EXTRA
|
||||||
gesture swipe left 2 swaymsg seat seat0 cursor press BTN_SIDE && swaymsg seat seat0 cursor release BTN_SIDE
|
gesture swipe left 2 swaymsg seat seat0 cursor press BTN_SIDE && swaymsg seat seat0 cursor release BTN_SIDE
|
||||||
|
|
|
@ -17,6 +17,17 @@ focus_follows_mouse no
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
repeat_delay 200
|
repeat_delay 200
|
||||||
repeat_rate 60
|
repeat_rate 60
|
||||||
|
# I have a keyboard that takes care of this on my workstation, so we only enable
|
||||||
|
# this on laptops
|
||||||
|
# xkb_options ctrl:nocaps
|
||||||
|
}
|
||||||
|
|
||||||
|
input type:touchpad {
|
||||||
|
dwt enabled
|
||||||
|
tap enabled
|
||||||
|
natural_scroll enabled
|
||||||
|
middle_emulation enabled
|
||||||
|
pointer_accel 0.33
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym $mod+control+space exec makoctl dismiss
|
bindsym $mod+control+space exec makoctl dismiss
|
||||||
|
@ -151,4 +162,8 @@ bar {
|
||||||
swaybar_command waybar
|
swaybar_command waybar
|
||||||
}
|
}
|
||||||
|
|
||||||
include $ENV_PATH/sway/config.d/main
|
# TODO: exec_always?
|
||||||
|
exec gammastep -t 6500:3500 -l 39.0:-94.5
|
||||||
|
exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
|
||||||
|
|
||||||
|
include $HOME/.env/sway/config.d/main
|
||||||
|
|
|
@ -166,3 +166,7 @@ end
|
||||||
# grep aliases
|
# grep aliases
|
||||||
alias rg "rg --text"
|
alias rg "rg --text"
|
||||||
alias grep "rg"
|
alias grep "rg"
|
||||||
|
|
||||||
|
alias vim nvim
|
||||||
|
alias vi nvim
|
||||||
|
|
||||||
|
|
|
@ -17,27 +17,15 @@ set -Ux TERMINAL kitty
|
||||||
set -Ux BROWSER firefox-developer-edition
|
set -Ux BROWSER firefox-developer-edition
|
||||||
set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
|
set -Ux ERL_AFLAGS "-kernel shell_history enabled -kernel shell_history_file_bytes 1024000" # iex history
|
||||||
set -Ux LESS "-r"
|
set -Ux LESS "-r"
|
||||||
|
set -Ux LS_COLORS 'ow=01;36;40' # more sane ls colors
|
||||||
# set our EDITOR to neovim if we've got it
|
set -Ux EDITOR nvim
|
||||||
set -Ux EDITOR vim
|
set -Ux MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!'
|
||||||
if has_command nvim
|
|
||||||
set -Ux EDITOR nvim
|
|
||||||
set -Ux MANPAGER 'env MANWIDTH="" nvim --cmd "let g:prosession_on_startup=0" +Man!'
|
|
||||||
end
|
|
||||||
alias ovim 'command vim' # always have an alias to normal vim just in case
|
|
||||||
alias vim $EDITOR
|
|
||||||
alias vi $EDITOR
|
|
||||||
|
|
||||||
# more sane ls colors
|
|
||||||
set -Ux LS_COLORS 'ow=01;36;40'
|
|
||||||
|
|
||||||
has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
|
has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git'
|
||||||
|
|
||||||
test -f ~/.fzf/shell/key-bindings.fish && source ~/.fzf/shell/key-bindings.fish
|
test -f ~/.fzf/shell/key-bindings.fish && source ~/.fzf/shell/key-bindings.fish
|
||||||
|
|
||||||
function fish_greeting
|
function fish_greeting; fortune; end
|
||||||
fortune
|
|
||||||
end
|
|
||||||
|
|
||||||
# we assume the user uses "$HOME" to just store their mess of dotfiles and other
|
# we assume the user uses "$HOME" to just store their mess of dotfiles and other
|
||||||
# nonsense that clutters it up and that they have a preferred starting
|
# nonsense that clutters it up and that they have a preferred starting
|
||||||
|
@ -53,21 +41,14 @@ else if test -f /opt/asdf-vm/asdf.fish
|
||||||
source /opt/asdf-vm/asdf.fish
|
source /opt/asdf-vm/asdf.fish
|
||||||
end
|
end
|
||||||
|
|
||||||
# load a per-device config last so anything can be overridden
|
if set -q $__HM_SESS_VARS_SOURCED; and test -f $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
exec bash -c "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh; exec fish"
|
||||||
|
end
|
||||||
|
|
||||||
|
# load a per-device, secret config last so anything can be overridden
|
||||||
for cf in config.fish .hidden/config.fish
|
for cf in config.fish .hidden/config.fish
|
||||||
set f $ENV_PATH/$cf
|
set f $ENV_PATH/$cf
|
||||||
test -f $f && source $f
|
test -f $f && source $f
|
||||||
end
|
end
|
||||||
|
|
||||||
mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH
|
mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH
|
||||||
|
|
||||||
# start a tmux session by default if possible and we're not already in
|
|
||||||
# a terminal multiplexer
|
|
||||||
if has_command tmux && string match -v -q '*tmux*' $TERM && string match -v -q '*screen*' $TERM
|
|
||||||
tmux start-server
|
|
||||||
tmux attach -t default || tmux new -s default
|
|
||||||
end
|
|
||||||
|
|
||||||
if set -q $__HM_SESS_VARS_SOURCED; and test -f $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
exec bash -c "source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh; exec fish"
|
|
||||||
end
|
|
||||||
|
|
|
@ -9,6 +9,8 @@ fi
|
||||||
dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd)
|
dfp=$(cd "$(dirname "${BASH_SOURCE[0]}" )/../../" && pwd)
|
||||||
source "${dfp}/bin/lib/setup_helpers.bash"
|
source "${dfp}/bin/lib/setup_helpers.bash"
|
||||||
|
|
||||||
|
cp "$dfp/apps/de/sway/dm-entry" "/usr/share/wayland-sessions/lsway.desktop"
|
||||||
|
|
||||||
links=(
|
links=(
|
||||||
# display manager files
|
# display manager files
|
||||||
"apps/de/sway/init" "/usr/bin/sway-lytedev"
|
"apps/de/sway/init" "/usr/bin/sway-lytedev"
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
fmt='#{session_id}:|#S|(#{session_attached} attached)'
|
fmt='#{session_id}:|#S|(#{session_attached} attached)'
|
||||||
{ tmux display-message -p -F "$fmt" && tmux list-sessions -F "$fmt"; } \
|
t="tmux switch-client -t"
|
||||||
|
[ -z "$TMUX" ] && t="tmux attach-session -t"
|
||||||
|
|
||||||
|
sess="$({ tmux display-message -p -F "$fmt" && tmux list-sessions -F "$fmt"; } \
|
||||||
| awk '!seen[$1]++' \
|
| awk '!seen[$1]++' \
|
||||||
| column -t -s'|' \
|
| column -t -s'|' \
|
||||||
| fzf -q '$' --reverse --prompt 'switch session: ' -1 \
|
| fzf -q '$' --reverse --prompt 'switch session: ' -1 \
|
||||||
| cut -d':' -f1 \
|
| cut -d':' -f1)"
|
||||||
| xargs tmux switch-client -t
|
|
||||||
|
$t $sess
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
nvim \
|
|
||||||
-c 'let nosession=1' \
|
|
||||||
-c 'silent setlocal nobuflisted buftype=nofile bufhidden=wipe noswapfile' \
|
|
||||||
"$@" \
|
|
||||||
-
|
|
5
env/desktop/sway/config.d/main
vendored
5
env/desktop/sway/config.d/main
vendored
|
@ -1,5 +0,0 @@
|
||||||
exec swayidle -w \
|
|
||||||
timeout 300 'swaylock -f -c 000000' \
|
|
||||||
timeout 600 'swaymsg "output * dpms off"' \
|
|
||||||
resume 'swaymsg "output * dpms on"' \
|
|
||||||
before-sleep 'swaylock -f -c 000000'
|
|
14
env/laptop/sway/config.d/main
vendored
14
env/laptop/sway/config.d/main
vendored
|
@ -1,19 +1,5 @@
|
||||||
output eDP-1 res 1600x900 pos 0 0
|
|
||||||
|
|
||||||
exec libinput-gestures -c $HOME/.config/dotfiles/apps/de/libinput/sway-gestures.conf
|
exec libinput-gestures -c $HOME/.config/dotfiles/apps/de/libinput/sway-gestures.conf
|
||||||
exec gammastep -t 6500:3500 -l 39.0:-94.5
|
|
||||||
exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
|
|
||||||
|
|
||||||
bindswitch lid:toggle exec swaylock
|
bindswitch lid:toggle exec swaylock
|
||||||
|
|
||||||
input type:touchpad {
|
|
||||||
dwt enabled
|
|
||||||
tap enabled
|
|
||||||
natural_scroll enabled
|
|
||||||
middle_emulation enabled
|
|
||||||
pointer_accel 0.33
|
|
||||||
}
|
|
||||||
|
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_options ctrl:nocaps
|
xkb_options ctrl:nocaps
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue