-
Notifications
You must be signed in to change notification settings - Fork 5
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
1 parent
c04c780
commit bf0628d
Showing
12 changed files
with
94 additions
and
62 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
#!/usr/bin/env bash | ||
|
||
declare -A sessions | ||
while IFS= read -r line; do | ||
tmux_file="$line/.tmux" | ||
session_name=$(grep -oP '(?<=SESSION_NAME=")[^"]*' "$tmux_file") | ||
sessions["$session_name"]=$line | ||
done < <(find ~/Documents ~/Desktop -maxdepth 2 -type f -name ".tmux" -exec dirname {} \;) | ||
|
||
sessions["System Configuration"]="$HOME/.local/share/Singularis/" | ||
|
||
rofi() { | ||
/usr/bin/rofi -markup-rows -kb-row-down Down -kb-custom-1 Ctrl+n -no-fixed-num-lines "$@" | ||
} | ||
|
||
selected=$(printf "%s\n" "${!sessions[@]}" | rofi -i -dmenu -window-title "Select Session") | ||
if [[ $# -eq 1 ]]; then | ||
selected=$1 | ||
else | ||
selected=$(find ~/Documents ~/Desktop/*/Projects -mindepth 1 -maxdepth 1 -type d | fzf) | ||
fi | ||
|
||
if [[ -z $selected ]]; then | ||
exit 0 | ||
fi | ||
|
||
cd "${sessions[$selected]}" || exit | ||
source .tmux | ||
selected_name=$(basename "$selected" | tr . _) | ||
tmux_running=$(pgrep tmux) | ||
|
||
cd "$selected" | ||
|
||
if [[ -f "$selected/.tmux" ]]; then | ||
source .tmux | ||
current_session=$(tmux display-message -p '#S') | ||
tmux kill-window -t "$current_session:Project Search" 2> /dev/null | ||
else | ||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then | ||
tmux new-session -s "$selected_name" -c "$selected" | ||
exit 0 | ||
fi | ||
|
||
if ! tmux has-session -t="$selected_name" 2> /dev/null; then | ||
tmux new-session -ds "$selected_name" -c "$selected" | ||
fi | ||
|
||
tmux switch-client -t "$selected_name" | ||
fi |
Binary file modified
BIN
+735 Bytes
(100%)
aspects/dotfiles/files/.local/share/autojump/autojump.txt
Binary file not shown.
Binary file modified
BIN
+427 Bytes
(100%)
aspects/dotfiles/files/.local/share/autojump/autojump.txt.bak
Binary file not shown.
Binary file not shown.
Binary file not shown.
19 changes: 19 additions & 0 deletions
19
aspects/systemd/files/.config/systemd/user/[email protected]
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,19 @@ | ||
# This file was created and is maintained by Git. | ||
# Any edits made in this file might be replaced in the future | ||
# by a Git command. | ||
|
||
[Unit] | ||
Description=Optimize Git repositories data | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart="/usr/lib/git-core/git" --exec-path="/usr/lib/git-core" for-each-repo --config=maintenance.repo maintenance run --schedule=%i | ||
LockPersonality=yes | ||
MemoryDenyWriteExecute=yes | ||
NoNewPrivileges=yes | ||
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_VSOCK | ||
RestrictNamespaces=yes | ||
RestrictRealtime=yes | ||
RestrictSUIDSGID=yes | ||
SystemCallArchitectures=native | ||
SystemCallFilter=@system-service |
13 changes: 13 additions & 0 deletions
13
aspects/systemd/files/.config/systemd/user/[email protected]
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,13 @@ | ||
# This file was created and is maintained by Git. | ||
# Any edits made in this file might be replaced in the future | ||
# by a Git command. | ||
|
||
[Unit] | ||
Description=Optimize Git repositories data | ||
|
||
[Timer] | ||
OnCalendar=Tue..Sun *-*-* 0:08:00 | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |
13 changes: 13 additions & 0 deletions
13
aspects/systemd/files/.config/systemd/user/[email protected]
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,13 @@ | ||
# This file was created and is maintained by Git. | ||
# Any edits made in this file might be replaced in the future | ||
# by a Git command. | ||
|
||
[Unit] | ||
Description=Optimize Git repositories data | ||
|
||
[Timer] | ||
OnCalendar=*-*-* 1..23:08:00 | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |
13 changes: 13 additions & 0 deletions
13
aspects/systemd/files/.config/systemd/user/[email protected]
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,13 @@ | ||
# This file was created and is maintained by Git. | ||
# Any edits made in this file might be replaced in the future | ||
# by a Git command. | ||
|
||
[Unit] | ||
Description=Optimize Git repositories data | ||
|
||
[Timer] | ||
OnCalendar=Mon 0:08:00 | ||
Persistent=true | ||
|
||
[Install] | ||
WantedBy=timers.target |