-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
105 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 7 additions & 4 deletions
11
modules/yqrashawn/home-manager/dotfiles/kitty-startup-session.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
new_tab nix | ||
cd ~/.nixpkgs | ||
new_tab ssh | ||
launch ssh mini | ||
launch ssh mini | ||
|
||
launch zsh | ||
new_tab misc | ||
new_tab misc | ||
|
||
new_tab pext | ||
cd ~/workspace/home/pext |
36 changes: 36 additions & 0 deletions
36
modules/yqrashawn/home-manager/dotfiles/local-bins/aerofocus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Check if an application name is provided as an argument | ||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <Application Name>" | ||
exit 1 | ||
fi | ||
|
||
# Assign the first argument to a variable | ||
app_name="$1" | ||
|
||
# Input data | ||
data=$(aerospace list-windows --all --json) | ||
current_window_id=$(aerospace list-windows --focused --json | jq 'first | .["window-id"]') | ||
|
||
# Extract the window ID for the specified application | ||
# window_id=$(echo "$data" | awk -F '|' -v app="$app_name" '$2 ~ app {gsub(/ /, "", $1); print $1}') | ||
|
||
# # Check if a window ID was found | ||
# if [ -n "$window_id" ]; then | ||
# echo $window_id | ||
# # aerospace focus --window-id "$window_id" | ||
# else | ||
# exit 1 | ||
# fi | ||
|
||
window_id=$(echo "$data" | jq --arg app "Emacs" --arg current_window_id $current_window_id ' | ||
map(select(.["app-name"] == $app and .["window-title"] != "" and .["window-id"] != $current_window_id)) | last | .["window-id"] | ||
') | ||
|
||
|
||
if [ "$window_id" -gt 0 ]; then | ||
aerospace focus --window-id "$window_id" | ||
else | ||
exit 0 | ||
fi |