mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
Updated tmux-sessionator and added some espanso symbols
This commit is contained in:
@@ -12,5 +12,6 @@ imports:
|
|||||||
- "./email.yml"
|
- "./email.yml"
|
||||||
- "./housecallpro.yml"
|
- "./housecallpro.yml"
|
||||||
- "./links.yml"
|
- "./links.yml"
|
||||||
|
- './symbols.yml'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
7
espanso/espanso/match/symbols.yml
Normal file
7
espanso/espanso/match/symbols.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
matches:
|
||||||
|
- trigger: ':deg:'
|
||||||
|
replace: '°'
|
||||||
|
- trigger: ':cmd:'
|
||||||
|
replace: '⌘'
|
||||||
|
- trigger: ':shift:'
|
||||||
|
replace: '⇧'
|
||||||
@@ -1,3 +1,9 @@
|
|||||||
MeasureQuick
|
MeasureQuick
|
||||||
Housh
|
Housh
|
||||||
sealtite
|
sealtite
|
||||||
|
Subcool
|
||||||
|
OEM
|
||||||
|
NEC
|
||||||
|
AHJ
|
||||||
|
CFM
|
||||||
|
Hydronic
|
||||||
|
|||||||
Binary file not shown.
@@ -2,44 +2,44 @@
|
|||||||
|
|
||||||
# Adapted from: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
|
# Adapted from: https://github.com/ThePrimeagen/.dotfiles/blob/master/bin/.local/scripts/tmux-sessionizer
|
||||||
|
|
||||||
declare -a findPaths=("$HOME")
|
DEBUG=
|
||||||
|
|
||||||
function fpath_prepend() {
|
declare -a paths=()
|
||||||
|
|
||||||
|
function debug_print {
|
||||||
|
if [ -n "$DEBUG" ]; then
|
||||||
|
echo "DEBUG: $1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function path_prepend() {
|
||||||
declare arg
|
declare arg
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
test -d $arg || continue
|
debug_print "arg: $arg"
|
||||||
findPaths=("$arg" "$findPaths")
|
# Check that arg is a directory but not a symlink
|
||||||
|
# Bc on some of my machines ~/projects is a symlink to $REPOS
|
||||||
|
test -d $arg && ! test -L $arg || continue
|
||||||
|
paths=($arg $paths)
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#################### MAIN ####################
|
||||||
|
|
||||||
if [[ $# -eq 1 ]]; then
|
if [[ $# -eq 1 ]]; then
|
||||||
selected=$1
|
selected=$1
|
||||||
else
|
else
|
||||||
|
path_prepend "$HOME" \
|
||||||
|
"$HOME/projects" \
|
||||||
|
"$REPOS/local" \
|
||||||
|
$(find $REPOS/github.com -mindepth 1 -maxdepth 1 -type d -print | sort)
|
||||||
|
|
||||||
fpath_prepend "$REPOS" \
|
debug_print "paths: $paths"
|
||||||
"$LOCAL_REPOS" \
|
if [ -n "$DEBUG" ]; then
|
||||||
"$GHREPOS" \
|
debug_print "Exiting because in debug mode."
|
||||||
"$GHREPOS"
|
exit 0
|
||||||
|
else
|
||||||
# Some of my machines, projects is a symlink to $REPOS, so ignore it.
|
selected=$(find "${(@)paths}" -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||||
# On other machines, it is local versions of projects, so add it.
|
|
||||||
if [[ ! -L "$HOME/projects" ]]; then
|
|
||||||
findPaths+="$HOME/projects"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -d "$REPOS/github.com" ]]; then
|
|
||||||
for dir in $(find "$REPOS/github.com" -mindepth 1 -maxdepth 1 -type d); do
|
|
||||||
# prepends to the array.
|
|
||||||
findPaths=($dir $findPaths)
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -d "$REPOS/local" ]]; then
|
|
||||||
# prepends to the array.
|
|
||||||
findPaths=("$REPOS/local" $findPaths)
|
|
||||||
fi
|
|
||||||
|
|
||||||
selected=$(find -L "${(@)findPaths}" -mindepth 1 -maxdepth 1 -type d | fzf)
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $selected ]]; then
|
if [[ -z $selected ]]; then
|
||||||
@@ -54,8 +54,9 @@ if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create a session if it doesn't exist.
|
||||||
if ! tmux has-session -t $selected_name 2> /dev/null; then
|
if ! tmux has-session -t $selected_name 2> /dev/null; then
|
||||||
tmux new-session -ds $selected_name -c $selected_name
|
tmux new-session -ds $selected_name -c $selected
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmux switch-client -t $selected_name
|
tmux switch-client -t $selected_name
|
||||||
|
|||||||
Reference in New Issue
Block a user