Skip to content

Commit

Permalink
swap CTRL with ALT
Browse files Browse the repository at this point in the history
  • Loading branch information
karan-ydv committed May 8, 2024
1 parent fe9b375 commit 171d931
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
1 change: 0 additions & 1 deletion content/notes/database_strage_engines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions content/notes/save_youtube_playlist.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions content/notes/swap_ctrl_with_alt.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 171d931

Please sign in to comment.