An open API service indexing awesome lists of open source software.

https://github.com/asapdotid/mac-config

MacOS custom bash script for aliases for ZSH
https://github.com/asapdotid/mac-config

aliases bash macos shell web zsh

Last synced: about 2 months ago
JSON representation

MacOS custom bash script for aliases for ZSH

Awesome Lists containing this project

README

          

# Custom config for support bash or zsh 💻

1. Aliasas
1. Function

## Requirements

- Exa (`brew install exa`)

Clone this repository to `user configuration` directory to your home directory: `$HOME/.config`

```bash
# Install configs
$ git clone https://github.com/asapdotid/mac-config.git "${HOME}"/.config/asapmac
```

Add script to load `functions` and `aliases` to ZSH or BASH config `(.zshrc or bashrc)` on the bottom.

```bash
source $HOME/.config/asapmac/.aliases
source $HOME/.config/asapmac/.functions
```

## Note:

> Change your environment variables config on `.env`

example:

```bash
EDITOR='vim'
```

or

```bash
EDITOR='nvim'
```

Now you can use aliases for your command don't forget before use it, please to reload config `source ~/.zshrc`

# Yabai and skhd configs

My personal yabai and skhd configs

See my [dotfiles](https://gitlab.com/julian-heng/dotfiles.git) repo for my other configs

NOTE: yabai requires System Integrity Protection to be disabled to work properly. See [here](https://github.com/koekeishiya/yabai/wiki/Disabling-System-Integrity-Protection) for more information.

## Installing for yabai

```sh
# Remove previous links
$ rm -f "${HOME}"/.{yabai,skhd}rc

$ ln -s "${HOME}/.config/asapmac/yabai/yabairc" "${HOME}/.yabairc"
$ ln -s "${HOME}/.config/asapmac/yabai/skhdrc" "${HOME}/.skhdrc"
```

## Keyboard shortcuts

### Yabai

#### Changing focus

alt + hjkl

#### Resize windows

| Action | Key Combination |
| ------------ | ----------------------------------------------- |
| Resize left | ctrl + alt + h |
| Resize down | ctrl + alt + j |
| Resize up | ctrl + alt + k |
| Resize right | ctrl + alt + l |
| Equalise | ctrl + alt + 0 |

#### Move windows

shift + alt + hjkl

#### Move windows to workspace

| Action | Key Combination |
| --------------------------- | -------------------------------------------------- |
| Send to last active desktop | shift + alt + m |
| Send to previous workplace | shift + alt + p |
| Send to next workplace | shift + alt + n |
| Send to workplace | shift + alt + num |

#### Rotate windows

| Action | Key Combination |
| -------------------- | ------------------------------------------------ |
| Rotate clockwise | shift + alt + r |
| Rotate anticlockwise | alt + r |
| Flip on x-axis | shift + alt + x |
| Flip on y-axis | shift + alt + y |

#### Window actions

| Action | Key Combination |
| ----------------- | ------------------------------------------------ |
| Fullscreen | alt + f |
| Native fullscreen | shift + alt + f |
| Center window | shift + alt + c |

#### Insertion point

| Action | Key Combination |
| ---------------------------- | ------------------------------------------------------------------ |
| Insert left | shift + ctrl + alt + h |
| Insert down | shift + ctrl + alt + j |
| Insert up | shift + ctrl + alt + k |
| Insert right | shift + ctrl + alt + l |
| Cancel insert (chunkwm only) | shift + ctrl + alt + x |

#### Misc

| Action | Key Combination |
| --------------- | ------------------------------------------------------------------ |
| Toggle float | shift + alt + space |
| Toggle gaps | ctrl + alt + g |
| Restart chunkwm | ctrl + shift + alt + r |

### Non-chunkwm

#### Show information

##### Description

Uses `osascript` to show information like CPU, memory, battery, etc. The CPU script requires [osx-cpu-temp](https://github.com/lavoiesl/osx-cpu-temp) installed. The song script supports iTunes and cmus.

Click [here](scripts) to view the script folder

Note: May have to change the location of the scripts in skhdrc

##### Key Combination

fn + alt + num

##### Screenshots



```
fn + alt - 1 : /path/to/script
fn + alt - 2 : /path/to/script
fn + alt - 3 : /path/to/script
...
```

#### Opening applications

#### Launch iTerm2

##### Description

Launches iTerm2 using like in i3-wm.

Click [here](scripts/open_iterm2.sh) to view the script

##### Key Combination

cmd + return

```
cmd - return : /path/to/launch/terminal
```

Refrence :

- [Yabai Config](https://github.com/Julian-Heng/chunkwm-yabai-config)
- [Emoji Log](https://github.com/ahmadawais/Emoji-Log)

If any issue please contact me [@asapdotid](mailto:asapdotid@gmail.com) :point_left: