diff --git a/README.md b/README.md index 4a3bbc5..b2044bf 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,62 @@ # Linux Scripts and Configs -A collection of Linux scripts and configs for use across multiple machines. +Dotfiles and scripts for Arch Linux (Manjaro), targeting Wayland (Hyprland / Sway) with an i3 fallback. -## Installation +## Setup -### Submodules +```bash +git clone --recurse-submodules ~/scripts +``` -After cloning, pull submodules with: +If already cloned without submodules: ```bash git submodule update --init --recursive ``` -### Packages - -Install all packages using `yay`: +Install all packages: ```bash yay -S $(grep -v '^\s*$' ~/scripts/packages.txt | tr '\n' ' ') ``` -### alacritty configuration +## Linking Configs -Add this to the `.config/alacritty/alacritty.toml` +Pick a window manager section below, then add the shared configs. -``` -import = [ - "~/scripts/alacritty.toml" -] +### Hyprland + +```bash +ln -sf ~/scripts/hyprland/hyprland.conf ~/.config/hypr/hyprland.conf +ln -sf ~/scripts/waybar/waybar_hyprland_config.json ~/.config/waybar/config +ln -sf ~/scripts/waybar/waybar_style.css ~/.config/waybar/style.css +ln -sf ~/scripts/wofi/wofi_style.css ~/.config/wofi/style.css ``` -### tmux Configuration +### Sway -This config uses tmux plugin manager to add session save / reloading with tmux-ressurect. -Before using the config, please download the plugin manager with: - -``` -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +```bash +ln -sf ~/scripts/sway/swayconfig ~/.config/sway/config +ln -sf ~/scripts/waybar/waybar_sway_config.json ~/.config/waybar/config +ln -sf ~/scripts/waybar/waybar_style.css ~/.config/waybar/style.css +ln -sf ~/scripts/wofi/wofi_style.css ~/.config/wofi/style.css ``` -Then to use the config file, add to `~/.tmux.conf`: +### i3 -``` -source ~/scripts/tmux.conf +```bash +ln -sf ~/scripts/i3/i3config ~/.config/i3/config +ln -sf ~/scripts/i3/i3blocks.conf ~/.config/i3blocks/config +ln -sf ~/scripts/i3/i3status.conf ~/.config/i3status/config ``` -### Bash/Zsh Configuration +### Cursor + +```bash +ln -sf ~/scripts/hatsune-miku-windows-linux-cursors/miku-cursor-linux ~/.local/share/icons/"Miku Cursor" +``` + +### Shell Add to `~/.bashrc` or `~/.zshrc`: @@ -54,7 +65,31 @@ source ~/scripts/bashrc # or zshrc export PATH="~/scripts/sh:$PATH" ``` -### Vim Configuration +### Terminals + +**Alacritty** - add to `~/.config/alacritty/alacritty.toml`: + +```toml +import = ["~/scripts/alacritty.toml"] +``` + +**Kitty** - kitty.conf is used directly by the WM configs. + +### tmux + +Install the plugin manager first: + +```bash +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm +``` + +Add to `~/.tmux.conf`: + +``` +source ~/scripts/tmux.conf +``` + +### Vim Add to `~/.vimrc`: @@ -62,142 +97,78 @@ Add to `~/.vimrc`: source ~/scripts/vimrc ``` -### i3 Configuration - -```bash -ln -sf ~/scripts/i3/i3config ~/.config/i3/config -ln -sf ~/scripts/i3/i3blocks.conf ~/.config/i3blocks/config -ln -sf ~/scripts/i3/i3status.conf ~/.config/i3status/config -``` - -### Hyprland Configuration - -```bash -ln -sf ~/scripts/hyprland/hyprland.conf ~/.config/hypr/hyprland.conf -ln -sf ~/scripts/waybar/waybar_hyprland_config.json ~/.config/waybar/config -ln -sf ~/scripts/waybar/waybar_style.css ~/.config/waybar/style.css -``` - -### Sway Configuration - -```bash -ln -sf ~/scripts/sway/swayconfig ~/.config/sway/config -ln -sf ~/scripts/waybar/waybar_sway_config.json ~/.config/waybar/config -ln -sf ~/scripts/waybar/waybar_style.css ~/.config/waybar/style.css -``` - -### Wofi Configuration - -```bash -ln -sf ~/scripts/wofi/wofi_style.css ~/.config/wofi/style.css -``` - -### Hatsune Miku Cursor - -```bash -ln -sf ~/scripts/hatsune-miku-windows-linux-cursors/miku-cursor-linux ~/.local/share/icons/"Miku Cursor" -``` - ## Keybindings -### tmux Keybindings +All window managers and tmux use vim-style hjkl navigation. `$mod` is the Super key. -| Keybinding | Description | -| ----------------------------------------------------------------------- | --------------------------------------------- | -| M-f | Prefix key (similar to $mod in i3) | -| Prefix + Space | Send prefix | -| Prefix + Ctrl + s | Save session | -| Prefix + Ctrl + r | Restore session | -| Prefix + ? | List keys | -| Prefix + [ | Enter copy mode | -| Prefix + ] | Paste buffer | -| Prefix + r | Refresh client | -| Prefix + R | Reload tmux configuration | -| Prefix + g | Split window horizontally | -| Prefix + v | Split window vertically | -| Prefix + h/j/k/l | Select pane (left/down/up/right) | -| Prefix + H/J/K/L | Resize pane (left/down/up/right) | -| Prefix + w | Choose window | -| Prefix + 1-0 | Select window 1-10 | -| M-1 to M-0 | Create new window 1-10 | -| Prefix + !-) | Move current pane to window 1-10 | -| Prefix + q | Kill selected pane | +### Shared across WMs -### Hyprland Keybindings +| Key | Action | +| --- | --- | +| `$mod + Return` | Terminal (kitty) | +| `$mod + Shift + q` | Kill window | +| `$mod + d` | Launcher (wofi / dmenu) | +| `$mod + h/j/k/l` | Focus left/down/up/right | +| `$mod + Shift + h/j/k/l` | Move window left/down/up/right | +| `$mod + g` / `$mod + v` | Split horizontal / vertical | +| `$mod + f` | Fullscreen | +| `$mod + Shift + Space` | Toggle floating | +| `$mod + 1-8` | Switch workspace | +| `$mod + Shift + 1-8` | Move window to workspace | +| `$mod + Ctrl + 1-8` | Move window silently | +| `$mod + -` | Scratchpad show | +| `$mod + Shift + -` | Move to scratchpad | +| `$mod + b` | Previous workspace | +| `$mod + 9` | Lock screen | +| `$mod + 0` | System menu (lock/suspend/reboot/shutdown) | +| `$mod + r` | Resize mode (hjkl) | +| `$mod + m` | Toggle bar | +| `$mod + Shift + c` | Reload config | +| `$mod + Ctrl + m` | PulseAudio control | +| `$mod + F2` | Browser (Waterfox) | +| `$mod + F3` | File manager (ranger) | +| `$mod + F5` | Music (mocp) | +| `Print` | Screenshot | -| Keybinding | Description | -| ------------------------------------------------------------------------------------------- | ---------------------------------------- | -| $mod + Return | Start terminal (kitty) | -| $mod + Shift + q | Kill focused window | -| $mod + d | Launch wofi | -| $mod + Ctrl + m | Launch PulseAudio control | -| $mod + F2 | Launch Waterfox browser | -| $mod + F3 | Launch file manager (ranger) | -| $mod + Shift + F3 | Launch PCManFM | -| $mod + F5 | Launch mocp music player | -| $mod + Shift + d | Restart dunst | -| Print | Screenshot (flameshot gui) | -| $mod + Print | Screenshot region to clipboard | -| $mod + Shift + Print | Screenshot region to file | -| $mod + Ctrl + x | Kill window (hyprctl kill) | -| $mod + 9 | Lock screen (hyprlock) | -| $mod + m | Toggle waybar visibility | -| $mod + Shift + c | Reload Hyprland config | -| $mod + Shift + e | Exit Hyprland | -| $mod + 0 | Enter system submap (lock/suspend/etc.) | -| $mod + h/j/k/l | Move focus (left/down/up/right) | -| $mod + Shift + h/j/k/l | Move window (left/down/up/right) | -| $mod + f | Toggle fullscreen | -| $mod + g/v | Tile horizontally/vertically | -| $mod + e | Toggle split | -| $mod + Shift + Space | Toggle floating | -| $mod + Shift + s | Pin floating window | -| $mod + - | Toggle scratchpad | -| $mod + Shift + - | Move to scratchpad | -| $mod + b | Switch to previous workspace | -| $mod + Ctrl + / | Previous/next workspace | -| $mod + 1-8 | Switch to workspace 1-8 | -| $mod + Shift + 1-8 | Move window to workspace 1-8 | -| $mod + Ctrl + 1-8 | Move window to workspace silently | -| $mod + r | Enter resize submap (hjkl to resize) | +### System menu (`$mod + 0`) -#### System submap ($mod + 0) +| Key | Action | +| --- | --- | +| `l` | Lock | +| `s` | Suspend | +| `h` | Hibernate | +| `r` | Reboot | +| `Shift + s` | Power off | +| `e` | Exit session | +| `Return` / `Esc` | Cancel | -| Key | Action | -| --------------------------------- | --------- | -| l | Lock | -| s | Suspend | -| h | Hibernate | -| r | Reboot | -| Shift + s | Power off | -| e | Exit | -| Return/Esc | Cancel | +### tmux -### i3 Keybindings +Prefix is Ctrl + f. -| Keybinding | Description | -| ---------------------------------------------------------------------------------------- | --------------------------------- | -| $mod + Return | Start a terminal (Alacritty) | -| $mod + Shift + q | Kill focused window | -| $mod + d | Start program launcher (dmenu) | -| $mod + z | Launch categorized menu | -| $mod + Ctrl + m | Launch PulseAudio control | -| $mod + F2 | Launch Firefox browser | -| $mod + F3 | Launch PCManFM file manager | -| $mod + h/j/k/l | Change focus (left/down/up/right) | -| $mod + Shift + h/j/k/l | Move focused window | -| $mod + g/v | Split horizontally/vertically | -| $mod + f | Toggle fullscreen | -| $mod + 1-8 | Switch to workspace 1-8 | -| $mod + Shift + 1-8 | Move container to workspace 1-8 | -| $mod + Shift + c | Reload the configuration file | -| $mod + Shift + r | Restart i3 | +| Key | Action | +| --- | --- | +| `Prefix + g` | Split horizontal | +| `Prefix + v` | Split vertical | +| `Prefix + h/j/k/l` | Select pane | +| `Prefix + Ctrl + H/J/K/L` | Resize pane | +| `Prefix + 1-0` | Select window 1-10 | +| `Alt + 1-0` | Create window 1-10 | +| `Prefix + !/@ etc.` | Move pane to window 1-10 | +| `Prefix + w` | Choose window | +| `Prefix + q` | Kill pane | +| `Prefix + [` / `]` | Copy mode / Paste | +| `Prefix + r` | Refresh | +| `Prefix + R` | Reload config | +| `Prefix + Ctrl + s` | Save session (resurrect) | +| `Prefix + Ctrl + r` | Restore session (resurrect) | -## Additional Scripts +## Scripts -### File Sharing Scripts +All in `sh/`, added to `$PATH` via the shell config above. -- `sharefile {filename}`: Upload file to 0x0.st and return unique identifier -- `getfile {id}`: Retrieve file from 0x0.st - -Note: These scripts interact with https://0x0.st for file sharing. +| Script | Description | +| --- | --- | +| `sharefile ` | Upload a file to 0x0.st | +| `getfile ` | Download a file from 0x0.st | +| `waybar-history` | Stream the last zsh history entry to waybar |