Merge dcc41c4a44
into 0698e8f4b1
commit
0dae5073a4
|
@ -27,6 +27,9 @@ Config options:
|
|||
- `set -g @continuum-boot-options 'alacritty'` - start [alacritty](https://github.com/alacritty/alacritty) instead of `Terminal.app`
|
||||
- `set -g @continuum-boot-options 'alacritty,fullscreen'` - start `alacritty`
|
||||
in fullscreen
|
||||
- `set -g @continuum-boot-options 'warp'` - start [warp](https://github.com/warpdotdev/Warp) instead of `Terminal.app`
|
||||
- `set -g @continuum-boot-options 'warp,fullscreen'` - start `warp`
|
||||
in fullscreen
|
||||
|
||||
Note: The first time you reboot your machine and activate this feature you may be prompted about a script requiring
|
||||
access to a system program (i.e. - System Events). If this happens tmux will not start automatically and you will need
|
||||
|
|
|
@ -7,7 +7,7 @@ start_terminal_and_run_tmux() {
|
|||
osascript <<-EOF
|
||||
tell application "alacritty"
|
||||
activate
|
||||
delay 0.5
|
||||
delay 1
|
||||
tell application "System Events" to tell process "alacritty"
|
||||
set frontmost to true
|
||||
keystroke "tmux"
|
||||
|
@ -40,8 +40,11 @@ resize_window_to_full_screen() {
|
|||
resize_to_true_full_screen() {
|
||||
osascript <<-EOF
|
||||
tell application "Alacritty"
|
||||
# wait for alacritty to start
|
||||
delay 1
|
||||
activate
|
||||
delay 0.5
|
||||
# short wait for alacritty to gain focus
|
||||
delay 0.1
|
||||
tell application "System Events" to tell process "Alacritty"
|
||||
if front window exists then
|
||||
tell front window
|
||||
|
|
|
@ -43,6 +43,8 @@ get_strategy() {
|
|||
echo "kitty"
|
||||
elif [[ "$options" =~ "alacritty" ]]; then
|
||||
echo "alacritty"
|
||||
elif [[ "$options" =~ "warp" ]]; then
|
||||
echo "warp"
|
||||
else
|
||||
# Terminal.app is the default console app
|
||||
echo "terminal"
|
||||
|
|
|
@ -7,7 +7,7 @@ start_terminal_and_run_tmux() {
|
|||
osascript <<-EOF
|
||||
tell application "kitty"
|
||||
activate
|
||||
delay 5
|
||||
delay 1
|
||||
tell application "System Events" to tell process "kitty"
|
||||
set frontmost to true
|
||||
keystroke "tmux"
|
||||
|
@ -40,8 +40,11 @@ resize_window_to_full_screen() {
|
|||
resize_to_true_full_screen() {
|
||||
osascript <<-EOF
|
||||
tell application "kitty"
|
||||
activate
|
||||
# wait for kitty to start
|
||||
delay 1
|
||||
activate
|
||||
# short wait for kitty to gain focus
|
||||
delay 0.1
|
||||
tell application "System Events" to tell process "kitty"
|
||||
keystroke "f" using {control down, command down}
|
||||
end tell
|
||||
|
|
|
@ -0,0 +1,65 @@
|
|||
# Maintainer: Dimitar Nizamov @dimitur2204
|
||||
# Contact maintainer for any change to this file.
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# for "true full screen" call the script with "fullscreen" as the first argument
|
||||
TRUE_FULL_SCREEN="$1"
|
||||
|
||||
start_terminal_and_run_tmux() {
|
||||
osascript <<-EOF
|
||||
tell application "Warp"
|
||||
activate
|
||||
delay 1
|
||||
tell application "System Events" to tell process "Warp"
|
||||
set frontmost to true
|
||||
keystroke "tmux"
|
||||
key code 36
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
resize_window_to_full_screen() {
|
||||
osascript <<-EOF
|
||||
tell application "Warp"
|
||||
activate
|
||||
tell application "System Events"
|
||||
if (every window of process "Warp") is {} then
|
||||
keystroke "n" using command down
|
||||
end if
|
||||
|
||||
tell application "Finder"
|
||||
set desktopSize to bounds of window of desktop
|
||||
end tell
|
||||
|
||||
set position of front window of process "Warp" to {0, 0}
|
||||
set size of front window of process "Warp" to {item 3 of desktopSize, item 4 of desktopSize}
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
resize_to_true_full_screen() {
|
||||
osascript <<-EOF
|
||||
tell application "Warp"
|
||||
# wait for Warp to start
|
||||
delay 1
|
||||
activate
|
||||
# short wait for Warp to gain focus
|
||||
delay 0.1
|
||||
tell application "System Events" to tell process "Warp"
|
||||
keystroke "f" using {control down, command down}
|
||||
end tell
|
||||
end tell
|
||||
EOF
|
||||
}
|
||||
|
||||
main() {
|
||||
start_terminal_and_run_tmux
|
||||
if [ "$TRUE_FULL_SCREEN" == "fullscreen" ]; then
|
||||
resize_to_true_full_screen
|
||||
else
|
||||
resize_window_to_full_screen
|
||||
fi
|
||||
}
|
||||
main
|
Loading…
Reference in New Issue