diff --git a/know-how/software/linux/_posts/2017-01-20-system-wide-key-remapping-in-ubuntu.md b/know-how/software/linux/_posts/2017-01-20-system-wide-key-remapping-in-ubuntu.md new file mode 100644 index 0000000..03db874 --- /dev/null +++ b/know-how/software/linux/_posts/2017-01-20-system-wide-key-remapping-in-ubuntu.md @@ -0,0 +1,51 @@ +--- +title: System wide key remapping in Ubuntu +layout: default +created: 2017-01-20 11:14:41 +0100 +updated: 2017-01-20 11:14:41 +0100 +toc: false +tags: + - know-how + - software + - linux + - keyboard + - remapping + - keycode +--- +On my [hp Spectre x360]({% post_url 2016-07-26-hp-spectre-x360 %}), the Ins key is only +reachable via the Fn key as in Fn+PrtScr. + +So I wanted to swap both keys. System-wide - so not only in X (using `xev`). + +I finally found [this](http://superuser.com/questions/290115/how-to-change-console-keymap-in-linux) +which suggested the following procedure: + +1. Dump the current keyboard layout: + + sudo dumpkeys > backup.kmap + +1. Check the keycodes you want to change (Ins = 110, PrtScr = 99): + + sudo showkey + + (When you're done, wait 10 seconds for it to exit automatically.) + +1. Copy the dumped keyboard layout: + + cp backup.kmap ins-prt-swap.kmap + +1. Edit it to swap all occurrences of `99` to `110` and vice versa, e.g. change: + + keycode 99 = ... + ... + keycode 110 = Insert..... + + to + + keycode 110 = ... + ... + keycode 99 = Insert..... + +1. The suggested `sudo setcon --save` didn't work for me, but Ubuntu loads the active keymap from + the file `/etc/console-setup/cached.kmap.gz`. So I gzipped my `ins-prt-swap.kmap` and copied the + resulting `ins-prt-swap.kmap.gz` to `/etc/console-setup/cached.kmap.gz`. diff --git a/know-how/software/linux/_posts/2017-04-10-move-window-minimise-maximise-close-buttons.md b/know-how/software/linux/_posts/2017-04-10-move-window-minimise-maximise-close-buttons.md new file mode 100644 index 0000000..5cf5a28 --- /dev/null +++ b/know-how/software/linux/_posts/2017-04-10-move-window-minimise-maximise-close-buttons.md @@ -0,0 +1,45 @@ +--- +title: Move window's minimise/maximise/close buttons +layout: default +created: 2017-04-10 20:18:32 +0200 +updated: 2017-04-10 20:18:32 +0200 +toc: false +tags: + - know-how + - software + - linux + - gnome + - gtk + - windows + - buttons +--- +There are two locations where you can define the button's location: **dconf** and **gconf**. + +The dconf-method works for most of Gnome Shell and Unity. However, e.g. Chrome is using the "old" +gconf-setting. + + +dconf +===== + +Install and run `dconf-editor`. + +Go to `org` → `gnome` → `desktop` → `wm` → `preferences` and find the setting **`button-layout`**. +The default value is: `appmenu:close`. To just add the minimise/maximise buttons (e.g. in Gnome Shell), +change it to: `appmenu:minimize,maximize,close`. + +To just move the close button to the left, use: `close,appmenu:`. (The `:` separates the buttons on +the left and those on the right.) + +You can also mix it up, e.g. `close,appmenu:minimize,maximize`. + + +gconf +===== + +Install and run `gconf-editor`. + +Go to `apps` → `metacity` → `general` and find **`button_layout`**. +Here, the default value is `:minimize,maximize,close`. + +To get everything to the left, use `close,minimize,maximize:`.