From 7e73e9859922a857d295691beed2680e7a0dda2c Mon Sep 17 00:00:00 2001 From: Tran Hau Date: Wed, 20 May 2020 16:50:13 +0700 Subject: [PATCH] small --- Applications/README.md | 16 ++++++++++++---- Applications/openvpn.md | 25 ++++++++++--------------- Applications/xinput.md | 30 ++++++++++++++++++++++++++++++ Misc/disable-laptop-keyboard.md | 17 ----------------- 4 files changed, 52 insertions(+), 36 deletions(-) create mode 100644 Applications/xinput.md delete mode 100644 Misc/disable-laptop-keyboard.md diff --git a/Applications/README.md b/Applications/README.md index 9ffc66b..78243f2 100644 --- a/Applications/README.md +++ b/Applications/README.md @@ -8,6 +8,10 @@ [Neovim](neovim.md): `vim` fork. +--- + +[rsync](rsync.md) + [exa](exa.md): `ls` replacement. [bat](bat.md): `cat` with colors. @@ -20,20 +24,18 @@ [tldr](https://github.com/tldr-pages/tldr): simple `man`. +--- + [Ncat](ncat.md): Netcat implementation from Nmap project. [HTTPie](https://httpie.org/): call API. -[rsync](rsync.md) - [Rclone](https://rclone.org/): `rsync` for cloud storage. [Prettier](https://prettier.io/): format code. --- -[Flatpak and Snap](flatpak-snap.md) - [systemd-boot](systemd-boot.md) [blueman](https://github.com/blueman-project/blueman): Bluetooth Manager. @@ -42,6 +44,12 @@ [OpenVPN](openvpn.md) +[Xinput](xinput.md) + +--- + +[Flatpak and Snap](flatpak-snap.md) + [Instaloader](instaloader.md) [Steam](steam.md) diff --git a/Applications/openvpn.md b/Applications/openvpn.md index 3d77acc..daded57 100644 --- a/Applications/openvpn.md +++ b/Applications/openvpn.md @@ -1,23 +1,16 @@ # OpenVPN -Assume you use Archlinux. - -Read [OpenVPN](https://wiki.archlinux.org/index.php/OpenVPN). - -Read [The update-systemd-resolved custom script](https://wiki.archlinux.org/index.php/OpenVPN#The_update-systemd-resolved_custom_script). - Read [update-systemd-resolved](https://github.com/jonathanio/update-systemd-resolved). -Read [Connecting To Access Server With Linux](https://openvpn.net/vpn-server-resources/connecting-to-access-server-with-linux/). +| Distribution | Package | +| ------------ | --------------------------------------- | +| Archlinux | `openvpn-update-systemd-resolved` (AUR) | +| Ubuntu | `openvpn-systemd-resolved` | -Install [openvpn-update-systemd-resolved](https://aur.archlinux.org/packages/openvpn-update-systemd-resolved/). - -Start/enable service: +Start and enable service: ```sh -systemctl start systemd-resolved.service - -systemctl enable systemd-resolved.service +systemctl enable --now systemd-resolved.service ``` Edit `client.ovpn`: @@ -29,8 +22,10 @@ down /etc/openvpn/scripts/update-systemd-resolved down-pre ``` -Connect: +Connect with factor authentication and start as a dameon: ```sh -sudo openvpn --config /path/to/client.ovpn --auth-user-pass --auth-retry interact +sudo openvpn --config /path/to/client.ovpn \ + --auth-user-pass --auth-retry interact \ + --daemon ``` diff --git a/Applications/xinput.md b/Applications/xinput.md new file mode 100644 index 0000000..ccbef36 --- /dev/null +++ b/Applications/xinput.md @@ -0,0 +1,30 @@ +# Xinput + +| Distribution | Package | +| ------------ | ------------- | +| Archlinux | `xorg-xinput` | +| Ubuntu | `xinput` | + +List devices: + +```sh +xinput list +``` + +Usually laptop's keyboard is: + +```txt +AT Translated Set 2 keyboard id=15 [slave keyboard (3)] +``` + +Disable laptop's keyboard: + +```sh +xinput float "AT Translated Set 2 keyboard" +``` + +Re-enable laptop's keyboard, `3` is from `slave keyboard (3)`: + +```sh +xinput reattach "AT Translated Set 2 keyboard" 3 +``` diff --git a/Misc/disable-laptop-keyboard.md b/Misc/disable-laptop-keyboard.md deleted file mode 100644 index 8d77144..0000000 --- a/Misc/disable-laptop-keyboard.md +++ /dev/null @@ -1,17 +0,0 @@ -# Disable laptop keyboard - -Why? Because I want to place my mechanical keyboard over my laptop keyboard. - -Read [Xinput](https://wiki.archlinux.org/index.php/Xinput) carefully. - -Disable: - -```sh -xinput float "AT Translated Set 2 keyboard" -``` - -Enable: - -```sh -xinput reattach "AT Translated Set 2 keyboard" 3 -```