We will use bash "substring"-variable-expansion on an indexed array to store a range of array elements in a variable, which we need to be able to save rules with custom actions.
https://stackoverflow.com/a/20160875
The video I was watching:
Underscore (Goto80 & Fabio Dondero)
https://www.youtube.com/watch?v=ha-DX3Pb5gY
...
https://www.youtube.com/watch?v=ZqQxMiWfX0M
add this to .bashrc :
con() {
# con OLD NEW
# replaces OLD with NEW in the current directory
# and tries to cd into it.
cd "${PWD/$1/$2}" || return 1
}
cwd='\w'
echo "${cwd@P}"
same thing as:
echo "${PWD/~/'~'}"
the latter has some minor cornercase flaws:
(if ~ = /home/bud ; PWD = /home/bud1/bin ; "${PWD/~/'~'}" = ~1/bin.
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
https://fossbytes.com/gnu-bash-4-4-released-new-features-changes/
...
https://www.youtube.com/watch?v=V9KSqH-M3YY
Sorry for spamming with a bunch of random sublime videos like this, but this one i think will be a good enough start for a new series.
Introduction to the strange world of sublime.
https://github.com/budlabs/budlime
...
https://www.youtube.com/watch?v=uJrQkzAncZ0
https://github.com/budlabs/i3ass/wiki/i3zen
big cringe (4 year old 100mb gif demo): https://www.reddit.com/r/unixporn/comments/6xbdtk/oci3_i3zen/
...
https://www.youtube.com/watch?v=GPTypUssFbs
In this video I use my tool [i3viswiz](https://github.com/budRich/i3ass/tree/master/i3viswiz) to check if a certain window (thunar in this case) is visible when another certain window ([mpv](https://mpv.io) in this case) is closed.
The files used in this video can be found on github:
https://github.com/budlabs/youtube/tree/master/letslinux/033-focus-if-visible
I use the python listener script that we built in a previous video, and if you haven't watched that I strongly recommend you do, so you know how to set it up.
Below is a link to the first video where I use i3listen.py:
https://youtu.be/7RNgpvBMua0
At the end of the video I briefly mention flashfocus, you can find it on fennerm's github:
https://github.com/fennerm/flashfocus
### video info:
color scheme: Eighties by Chris Kempson
terminal font: Fixedsys/Inconsolata
terminal emulator: URxvt
figlet font: 3d.flf, by xero
filemanager: Thunar
sublime font: Hack
icon theme: DamaDamas
gtk theme: Numix (eighties)
# related videos
que files in mpv:
https://youtu.be/-vbr3-mHoRs
best i3 img viewer:
https://youtu.be/VAAV3cQsqAE
Automatic script creation:
https://youtu.be/QGUmMtEnIkI
i3fyra:
https://youtu.be/t4Tve-xpwus
polybar, dynamic title:
https://youtu.be/3vQtovcQElY
In the video I use my scripts: i3viswiz and i3fyra, they are available in the i3ass suit:
https://github.com/budRich/i3ass
Add these lines to the windownotify method in i3listen.py:
python
if event.change == "close":
if event.container.window_class == 'mpv':
if event.container.focused == True:
call('focusvisible -c Thunar'.split(' '))
lolban is the output of figlet piped through lolcat. I have a video where i show how it works. That video is called: Let's Linux #009: Automatic script creation, and can be found here: https://youtu.be/QGUmMtEnIkI
The figlet font used with lolban is created by xero. It is called: 3d.flf
And can be found on github:
https://github.com/xero/figlet-fonts
...
https://www.youtube.com/watch?v=0ZkcMAhk-9k