You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+54-6Lines changed: 54 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,18 +287,66 @@ plz go ~/work/godot/ # cd's to ~/work/godot/ and lists the contents
287
287
```
288
288
289
289
#### Real-world example
290
-
Here is a real-world example of how I load my development environment for a <a href="https://godotengine.org/">Godot</a> project. In my global <code>.pls.yml</code> I have setup the following alias:
290
+
Here are some real-world examples that show how I use `pls`.
291
+
292
+
##### Easy git clones
293
+
294
+
Using the alias below, I can easily clone any of my repositories by just running `pls clone <repo-name>`.
No more remembering the full git SSH URL, or having to copy-paste it from the browser!
303
+
Expanding this further, I use the following alias to quickly clone repositories by other users than myself:
304
+
305
+
```yml
306
+
- alias: clone-x
307
+
command: |
308
+
git clone git@github.com:$1/$2.git
309
+
```
310
+
##### Launching my TMUX sessions
311
+
312
+
After using `z` to jump to a project directory, I can quickly launch a default tmux session for that project by running `pls dev`:
313
+
314
+
```yml
315
+
- alias: dev
316
+
command: |
317
+
~/startup/default
318
+
```
319
+
320
+
This runs a tmux startup script defined in my [.dotfiles repository](https://github.com/codevogel/.dotfiles/blob/main/tmux/startup/default), which launches a tmux session with a few default windows, one running neovim, one running `lazygit`, and one running a shell.
321
+
322
+
##### Running and disowning processes
323
+
324
+
Sometimes I want to launch a GUI application from the terminal. But closing that very terminal would also close the application. We can use `disown` to prevent this from happening. But typing out the correct sequence of commands can become tedious. So, I created the following alias:
325
+
326
+
```yml
327
+
- alias: se
328
+
command: |
329
+
$1 &
298
330
disown
299
331
exit
300
332
```
301
-
Now, whenever I sit down to work on my game, I just run `plz godot` and my project loads up, along with launching a new terminal with `nvim` open in the project directory.
333
+
334
+
Now, when I run `plz se <executable>`, it launched the executable, disowns it from the terminal, and closes the terminal.
335
+
336
+
##### Switching keyboard layouts
337
+
338
+
I usually type on a Sofle Choc, a split keyboard, which has CTRL and CAPS LOCK swapped in it's firmware. When I want to use my laptop keyboard, for example when I'm on the go, I need to swap these keys in software instead. I created the following alias to make this easy:
339
+
340
+
```yml
341
+
- alias: keeb-split
342
+
command: |
343
+
sudo cat /etc/default/keyboard-split | sudo tee /etc/default/keyboard > /dev/null
344
+
sudo dpkg-reconfigure keyboard-configuration
345
+
- alias: keeb-laptop
346
+
command: |
347
+
sudo cat /etc/default/keyboard-laptop | sudo tee /etc/default/keyboard > /dev/null
0 commit comments