[Fish] remove ytdl abbr

This commit is contained in:
Lucien Cartier-Tilet 2020-11-29 13:47:28 +01:00
parent 32d9f690e9
commit 20affaec43
Signed by: phundrak
GPG Key ID: BD7789E705CB8DCA

View File

@ -224,18 +224,18 @@ The code below ensures the ~PATH~ is updated only at login, and every location i
:END: :END:
Here I have some abbreviations which are quite useful when performing some system monitoring. With =df=, we can get an overview of our filesystem usage, while with =diskspace= we get some more precise information. =meminfo= is a call to =free= with sane defaults, and similar to =meminfo=, we also have =gpumeminfo= so we can get a quick look at the memory-related logs of our X session. I also declared =cpuinfo= an alias of =lscpu= in order to keep consistent with =meminfo=. =pscpu= gives us information on what the CPU is running right now, and =pscpu10= limits that to the top 10 threads. Similarly, =psmem= gives us information on the memory usage of the current threads, and =psmem10= only the ten most important threads in terms of memory usage. Here I have some abbreviations which are quite useful when performing some system monitoring. With =df=, we can get an overview of our filesystem usage, while with =diskspace= we get some more precise information. =meminfo= is a call to =free= with sane defaults, and similar to =meminfo=, we also have =gpumeminfo= so we can get a quick look at the memory-related logs of our X session. I also declared =cpuinfo= an alias of =lscpu= in order to keep consistent with =meminfo=. =pscpu= gives us information on what the CPU is running right now, and =pscpu10= limits that to the top 10 threads. Similarly, =psmem= gives us information on the memory usage of the current threads, and =psmem10= only the ten most important threads in terms of memory usage.
#+NAME: mgmt-abbr #+NAME: mgmt-abbr
| abbreviation | command | | abbreviation | command |
|--------------+---------------------------------------------------| |--------------+--------------------------------------------|
| df | df -H | | df | df -H |
| diskspace | sudo df -h \vert grep -E "sd\vert{}lv\vert{}Size" | | diskspace | sudo df -h \vert grep -E "sd\vert{}lv\vert{}Size" |
| du | du -ch | | du | du -ch |
| meminfo | free -m -l -t | | meminfo | free -m -l -t |
| gpumeminfo | grep -i --color memory /var/log/Xorg.0.log | | gpumeminfo | grep -i --color memory /var/log/Xorg.0.log |
| cpuinfo | lscpu | | cpuinfo | lscpu |
| pscpu | ps auxf \vert sort -nr -k 3 | | pscpu | ps auxf \vert sort -nr -k 3 |
| pscpu10 | ps auxf \vert sort -nr -k 3 \vert head -10 | | pscpu10 | ps auxf \vert sort -nr -k 3 \vert head -10 |
| psmem | ps auxf \vert sort -nr -k 4 | | psmem | ps auxf \vert sort -nr -k 4 |
| psmem10 | ps auxf \vert sort -nr -k 4 \vert head -10 | | psmem10 | ps auxf \vert sort -nr -k 4 \vert head -10 |
#+begin_SRC fish #+begin_SRC fish
<<generate-abbr(table=mgmt-abbr)>> <<generate-abbr(table=mgmt-abbr)>>
@ -464,11 +464,6 @@ When I want to download a song from YouTube, I'll just use the command ~flac vid
abbr flac 'youtube-dl -x --audio-format flac --audio-quality 0 -o "~/Music/%(uploader)s/%(title)s.%(ext)s"' abbr flac 'youtube-dl -x --audio-format flac --audio-quality 0 -o "~/Music/%(uploader)s/%(title)s.%(ext)s"'
#+END_SRC #+END_SRC
I download a LOT of videos from YouTube, generally educative videos that I do not want to lose to YouTube one day who will decide that such channel is unworthy of their platform, or if the original author decides to delete their videos or whatever. So, I use the abbreviation ~ytdl~ to download either one video, or a whole YouTube channel.
#+BEGIN_SRC fish
abbr ytdl 'youtube-dl -f best -ciw -o "~/Videos/YouTube/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"'
#+END_SRC
Some sane default options for ~sxiv~, a simple X image Viewer. This includes playing GIFs and not displaying the filename below. Sxiv will also open in fullscreen and will fit the displayed image to the frame. I also abbreviated ~feh~ to sxiv, old habits die hard. Some sane default options for ~sxiv~, a simple X image Viewer. This includes playing GIFs and not displaying the filename below. Sxiv will also open in fullscreen and will fit the displayed image to the frame. I also abbreviated ~feh~ to sxiv, old habits die hard.
#+BEGIN_SRC fish #+BEGIN_SRC fish
abbr sxiv 'sxiv -abfs f' abbr sxiv 'sxiv -abfs f'