From 171d93169582b75df247e4b9b53cceabc064413d Mon Sep 17 00:00:00 2001 From: Karan Yadav Date: Wed, 8 May 2024 12:39:58 +0530 Subject: [PATCH] swap CTRL with ALT --- content/notes/database_strage_engines.md | 1 - content/notes/save_youtube_playlist.md | 7 ++--- content/notes/swap_ctrl_with_alt.md | 39 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 content/notes/swap_ctrl_with_alt.md diff --git a/content/notes/database_strage_engines.md b/content/notes/database_strage_engines.md index 7bb2f34..bc322b2 100644 --- a/content/notes/database_strage_engines.md +++ b/content/notes/database_strage_engines.md @@ -5,7 +5,6 @@ author = "" authorTwitter = "" #do not include @ cover = "" tags = ["databases", "indexes"] -keywords = ["http", "web servers", "middlewares"] description = "Important things to remember from the chapter 'Storage and Retrieval' of Designing Data-Intensive Applications book." showFullContent = false readingTime = false diff --git a/content/notes/save_youtube_playlist.md b/content/notes/save_youtube_playlist.md index 08868f9..d60a678 100644 --- a/content/notes/save_youtube_playlist.md +++ b/content/notes/save_youtube_playlist.md @@ -4,17 +4,16 @@ date = "" author = "" authorTwitter = "" #do not include @ cover = "" -tags = ["databases", "indexes"] -keywords = ["http", "web servers", "middlewares"] +tags = ["cli", "linux", "tricks"] description = "How to download youtube playlists with yt-dlp" showFullContent = false readingTime = false hideComments = false color = "orange" #color from the theme settings -Toc = true +Toc = false +++ -This seems pretty straightforward but it took about half an hour to figure out reading through documentation and mistral chat. I tried a bunch of format but audio wasn't working. After some time I landed at this. It also let's you save private membership videos with browser cookies. +This seems pretty straightforward but it took about half an hour to figure out reading through documentation and mistral chat. I tried a bunch of formats but audio wasn't working. After some time I landed at this, it also let's you save private membership videos with browser cookies. ``` yt-dlp -f "bestvideo[height<=1080]+bestaudio" --merge-output-format mp4 https://www.youtube.com/playlist\?list\=PL6W8uoQQ2c61X_9e6Net0WdYZidm7zooW --cookies-from-browser brave:Default diff --git a/content/notes/swap_ctrl_with_alt.md b/content/notes/swap_ctrl_with_alt.md new file mode 100644 index 0000000..2ef4769 --- /dev/null +++ b/content/notes/swap_ctrl_with_alt.md @@ -0,0 +1,39 @@ ++++ +title = "Swap CTRL and ALT keys on arch linux" +date = "" +author = "" +authorTwitter = "" #do not include @ +cover = "" +tags = ["linux", "keyboard shortcuts", "touch typing"] +description = "How to CTRL and ALT keys using " +showFullContent = false +readingTime = false +hideComments = false +color = "orange" #color from the theme settings +Toc = false ++++ + +Using macos keyboard for the first time after windows/linux is not frictional at first but after you get used to it you realize that it does one thing better. In macos most keyboard shortcuts use CMD instead of CTRL key which is better placed. CMD can be pressed by your thumbs without moving your fingers from touch typing position. I don't know you you're supposed to press CTRL with touch typing but I had the habit of using my thumbs. + +Recently I moved back to a linux laptop and decided to swap CTRL with ALT keys along with CAPS and the ESC key for vim. +Apparently there's no way to do this in XFCE using UI, you have to use some additional tools. Xmodmap comes up first in search results, I set it up with the following init file. + +```bash {title=".Xmodmap"} +clear control +clear mod1 +clear Lock +keycode 37 = Alt_L +keycode 64 = Control_L +keycode 105 = Alt_R +keycode 108 = Control_R +keycode 66 = Escape +keycode 9 = Caps_Lock +add control = Control_L +add control = Control_R +add mod1 = Alt_L +add mod1 = Alt_R +``` + +This requires some change in navigation shortcuts such as ALT + TAB, it can be changed to CTRL + TAB for macos like navigation. + +Now the using CTRL + C and CTRL + V is much easier and quicker.