<commit_before># linux-mint-dev-box

A basic Linux Mint setup for software development

![screenshot](screenshot.png)

## Set Dvorak Layout for Login

See http://unix.stackexchange.com/a/136383, but use the following keymap:

`/usr/bin/setxkbmap dvorak`

System Settings > Keyboard > Layouts > Options > Switching to another layout: Choose "Menu"


## Install NVIDIA Drivers

Read https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa.
Replace `nvidia-XXX` below with the version recommended on that page.

```
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install -y nvidia-prime nvidia-settings nvidia-XXX
```


## Install Broadcom WiFi Drivers

```
sudo apt-get install bcmwl-kernel-source
```


## Fix APM issues

IFF Mint hangs with a black screen on shutdown and/or suspend, try these steps.

https://forums.linuxmint.com/viewtopic.php?t=184734


## Update Mint

Menu > Administration > Update Manager

* Setup local mirrors, then refresh cache
* Update everything, until there is nothing more to update


## Hijack Caps Lock

System Settings > Keyboard > Layouts > Options > Caps Lock key behavior: Choose "Make Caps Lock an additional Ctrl"


## Mac-Style "Super" Shortcuts

To use the <super> (Windows or Command) key for Mac-style shortcuts:

1. If using a Windows keyboard, System Settings > Keyboard > Layouts > Options > Alt/Win Key behavior: Choose "Alt is swapped with Win"
2. System Settings > Keyboard > Shortcuts
  * General
    * Toggle Scale: Ctrl-Down
    * Toggle Expo: Ctrl-Up
    * Cycle through open windows: Super-Tab
    * Cycle backwards through open windows: Shift-Super-Tab
    * Cycle through open windows of the same application: Super-grave
    * Cycle backwards through open windows of the same application: Shift-Super-tilde
  * Windows
    * Minimize window: Super-m
    * Show desktop: Super-F3
  * Workspaces
    * Switch to left workspace: Ctrl-Left
    * Switch to right workspace: Ctrl-Right
    * Direct Navigation
      * Switch to workspace 1: Ctrl-1
      * Switch to workspace 2: Ctrl-2
      * etc., as needed
  * System
    * Log out: Shift-Super-q
    * Shut down: Ctrl-Alt-Super-Eject (use Delete or similar if no eject button on keyboard)
    * Lock Screen: Ctrl-Shift-Eject (use Delete or similar if no eject button on keyboard)
    * Suspend: Alt-Super-Eject (use Delete or similar if no eject button on keyboard)
    * Screenshots and Recording
      * Take a screenshot: Shift-Super-numbersign
      * Take a screenshot of a window: Shift-Super-dollar
  * Custom Shortcuts > Add custom shortcut
    * Name: Force quit
    * Command: /usr/bin/xkill
    * Keyboard bindings: Alt-Super-Escape

`xkill` is a litte different than Force Quit (Mac) or Task Manager (Windows): it provides a graphical 'X' cursor which you then use to left-click on the window you wish to force-quit. It can be canceled with any mouse click other than left.


2. Install AutoKey
```
sudo apt-get install autokey-gtk
```
3. Open AutoKey, then Edit > Preferences > Choose "Automatically start AutoKey at login"
4. (optional) Delete the pre-installed sample scripts in autokey.
5. File > Quit AutoKey (don't just close the window). Make sure there is no AutoKey tray icon.
6. Copy my autokeys to your autokey config:
```
mkdir ~/.config/autokeys/data/superb
cp autokey/*.py ~/.config/autokey/data/superb/
cp autokey/.* ~/.config/autokey/data/superb/
```
7. Open AutoKey again. Test your new hot keys. Close the window to hide AutoKey while it runs in the background.

Many thanks to <NAME> for publishing his
[autokey dotfiles](https://github.com/metakermit/dotfiles/tree/master/autokey),
from which these were derived.

cf. [Mac keyboard shortcuts](https://support.apple.com/en-us/HT201236),
[AutoKey Special Keys](https://github.com/autokey/autokey/wiki/Special-Keys)


## Install Terminator

```
sudo apt-get install terminator
sudo apt-get remove gnome-terminal
```

Terminator > Preferences > Profiles > Scrolling<commit_msg>hotkey updates<commit_after># linux-mint-dev-box

A basic Linux Mint setup for software development

![screenshot](screenshot.png)

## Set Dvorak Layout for Login

See http://unix.stackexchange.com/a/136383, but use the following keymap:

`/usr/bin/setxkbmap dvorak`

System Settings > Keyboard > Layouts > Options > Switching to another layout: Choose "Menu"


## Install NVIDIA Drivers

Read https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa.
Replace `nvidia-XXX` below with the version recommended on that page.

```
sudo add-apt-repository -y ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install -y nvidia-prime nvidia-settings nvidia-XXX
```


## Install Broadcom WiFi Drivers

```
sudo apt-get install bcmwl-kernel-source
```


## Fix APM issues

IFF Mint hangs with a black screen on shutdown and/or suspend, try these steps.

https://forums.linuxmint.com/viewtopic.php?t=184734


## Update Mint

Menu > Administration > Update Manager

* Setup local mirrors, then refresh cache
* Update everything, until there is nothing more to update


## Hijack Caps Lock

System Settings > Keyboard > Layouts > Options > Caps Lock key behavior: Choose "Make Caps Lock an additional Ctrl"


## Mac-Style "Super" Shortcuts

TODO: This process can be automated with `dconf-editor`.

To use the <super> (Windows or Command) key for Mac-style shortcuts:

1. If using a Windows keyboard, System Settings > Keyboard > Layouts > Options > Alt/Win Key behavior: Choose "Alt is swapped with Win"
2. System Settings > Keyboard > Shortcuts
  * General
    * Toggle Scale: Ctrl-Down
    * Toggle Expo: Ctrl-Up
    * Cycle through open windows: Super-Tab
    * Cycle backwards through open windows: Shift-Super-Tab
    * Cycle through open windows of the same application: Super-grave
    * Cycle backwards through open windows of the same application: Shift-Super-tilde
  * Windows
    * Minimize window: Super-m
    * Show desktop: Super-F3
    * Tiling and Snapping
      * Push tile left: Ctrl-Alt-Left
      * Push tile right: Ctrl-Alt-Right
      * Push tile up: Ctrl-Alt-Up
      * Push tile down: Ctrl-Alt-Down
  * Workspaces
    * Switch to left workspace: Ctrl-Left
    * Switch to right workspace: Ctrl-Right
    * Direct Navigation
      * Switch to workspace 1: Ctrl-1
      * Switch to workspace 2: Ctrl-2
      * etc., as needed
  * System
    * Log out: Shift-Super-q
    * Shut down: Ctrl-Alt-Super-Eject (use Delete or similar if no eject button on keyboard)
    * Lock Screen: Ctrl-Shift-Eject (use Delete or similar if no eject button on keyboard)
    * Suspend: Alt-Super-Eject (use Delete or similar if no eject button on keyboard)
    * Screenshots and Recording
      * Take a screenshot: Shift-Super-numbersign
      * Take a screenshot of a window: Shift-Super-dollar
  * Custom Shortcuts > Add custom shortcut
    * Name: Force quit
    * Command: /usr/bin/xkill
    * Keyboard bindings: Alt-Super-Escape

`xkill` is a litte different than Force Quit (Mac) or Task Manager (Windows): it provides a graphical 'X' cursor which you then use to left-click on the window you wish to force-quit. It can be canceled with any mouse click other than left.


2. Install AutoKey

TODO: Replace with `sxhkd` (a window-manager agnostic solution that is actively maintained) and `xdotool` (for simulating pass-through shortcuts).

```
sudo apt-get install autokey-gtk
```
3. Open AutoKey, then Edit > Preferences > Choose "Automatically start AutoKey at login"
4. (optional) Delete the pre-installed sample scripts in autokey.
5. File > Quit AutoKey (don't just close the window). Make sure there is no AutoKey tray icon.
6. Copy my autokeys to your autokey config:
```
mkdir ~/.config/autokeys/data/superb
cp autokey/*.py ~/.config/autokey/data/superb/
cp autokey/.* ~/.config/autokey/data/superb/
```
7. Open AutoKey again. Test your new hot keys. Close the window to hide AutoKey while it runs in the background.

Many thanks to <NAME> for publishing his
[autokey dotfiles](https://github.com/metakermit/dotfiles/tree/master/autokey),
from which these were derived.

cf. [Mac keyboard shortcuts](https://support.apple.com/en-us/HT201236),
[AutoKey Special Keys](https://github.com/autokey/autokey/wiki/Special-Keys)


## Install Terminator

```
sudo apt-get install terminator
sudo apt-get remove gnome-terminal
```

Terminator > Preferences > Profiles > Scrolling
{'fraction_non_alphanumeric': 0.0911042213212497, 'fraction_numerical': 0.007393274505127593, 'mean_word_length': 3.6959686450167974, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 53, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3031251', 'n_tokens_mistral': 2685, 'n_tokens_neox': 2438, 'n_words': 983}