Commit graph

24 commits

Author SHA1 Message Date
1bc80ccef3 Update t script
Stop automatically running `.tmux` files as I don't always want
everything to run when opening a project. This also simplifies the code
within the script.

This also refactors the logic for creating and switching sessions as it
didn't work 100% of the time. This is nearer to Jess Archer's version of
the script with less error output and changes needed for shellcheck.
2024-10-28 16:29:22 +00:00
80927b1df2 Add deliver script
Based on Jess Archer's script, this executes a command within a
specified Docker Compose service or, if no matching one is not found,
will execute it locally.
2024-10-25 22:06:26 +01:00
9fbe7c1fec Revert "Remove tmux"
This reverts commit a7556575ac.
2024-09-25 21:33:55 +01:00
2265173564 Include the tfw sub-directories 2024-09-23 10:47:00 +01:00
f5c7b2ae10 Re-add Documents 2024-09-13 20:19:00 +01:00
a7556575ac Remove tmux
After using it as a daily driver from the last week or so, I'm switching
to Zellij.

https://zellij.dev
2024-09-04 08:00:59 +01:00
edfa2b7c22 Only show the names of the directories
Remove the ~/Code prefix from the list of items.
2024-09-04 07:55:50 +01:00
56ce8ba735 Add create-zellij-session script
Based on t.nix, this creates or attaches to a Zellij session based on a
given directory.
2024-08-31 17:17:32 +01:00
a1ef2d1402 Update path to jq 2024-08-20 21:51:15 +01:00
4d4d65d812 Refactor: inject the username into the source path 2024-08-20 21:01:50 +01:00
ce5b4fa0a1 Create export-video-list script
Create a `export-video-list` script that exports all the video files on
my external hard drive to a JSON file so I can easily see what videos I
have without needing to get and plug in the drive.

I can easily view it using `bat` or `jq` and combine it with `grep` to
search for a specific video - e.g. `cat ~/video.json | grep -i nix`
(`-i` makes the search case-insensitive).
2024-08-20 19:48:57 +01:00
13c83fb8b4 Hide error about nested tmux sessions 2024-08-20 17:07:04 +01:00
b36ca8086e Add timer script for desktop machines
Based on https://github.com/sdaschner/dotfiles/blob/master/bin/timer and
https://github.com/sdaschner/dotfiles/blob/master/bin/_timer.

Seen in https://youtu.be/8CZIv3MJvic?si=PiVPM_vwuUKI7ak3&t=1460.
2024-08-20 14:34:32 +01:00
1d59baa998 t: sort and reverse directories 2024-08-13 12:04:43 +01:00
4b7bae5c97 Don't include results from /tmp 2024-08-13 12:04:43 +01:00
6082de62b0 Look for .ignored/run when running commands
Make the `run` command cleverer by also searching for a `.ignored/run`
file, following the convention of always ignoring a `.ignored` directory
from Git.

This allows me to have a local `run` file that doesn't need to be
committed and pushed to the repo (e.g. it's too specific to me), and
being able to keep it outside of the root of the project directory where
it could be committed accidentally.

A similar approach was done by Andreas Möller using Makefiles in this
article:

https://localheinz.com/articles/2020/05/07/using-makefiles-in-projects-where-i-can-not-use-them

With this function, the `.ignored/run` file is executed if it's found
and exits with the status code of the command.

If not, it will fall back to using `./run` as before.

I considered reversing these and checking for `./run` first as there
could be a performance benefit but, if neither file is found, I want the
error to show `./run` and not `.ignored/run` as that's the main use
case.
2024-07-31 16:40:25 +01:00
c2ead888dd Add notetaker script
Add a script to quickly and easily create and edit a daily note.
2024-07-23 15:19:47 +01:00
a2ed026258 Use $REPOS variable consistently in scripts 2024-07-10 13:44:09 +01:00
0610b0e865 t: search in ~/Documents 2024-07-09 07:07:51 +01:00
75731bda19 t: extract a function that finds and executes
...`.tmux` files
2024-07-09 07:07:44 +01:00
d1080e0cbc t: ignore the _archive directory 2024-07-08 18:43:32 +01:00
d769885d8f Flatten Code directories 2024-07-06 02:21:40 +01:00
fc8f930aef t: work for .ignored/.tmux files too 2024-07-05 19:43:55 +01:00
a36dd7baf4 Move t into its own file 2024-06-17 17:59:35 +01:00