diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..c59e353 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,26 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Overview + +This is a dotfiles/config repository for Arch Linux (Manjaro) using `yay` as the package manager. Configs are installed by symlinking or sourcing from `~/scripts/` into their standard locations. The repo targets Wayland-based desktops (Hyprland and Sway) with an i3 fallback for X11. + +## Repository Structure + +- **Window managers**: `hyprland/`, `sway/`, `i3/` - config files for each WM +- **Waybar**: `waybar/` - separate config JSONs per WM (`waybar_hyprland_config.json`, `waybar_sway_config.json`) plus shared `waybar_style.css` +- **Shell**: `bashrc`, `zshrc` - sourced from the user's dotfiles, not used directly +- **Terminal**: `alacritty.toml` (imported via alacritty's import system), `kitty.conf` +- **Scripts**: `sh/` - shell utilities added to PATH (`sharefile`, `getfile`, `waybar-history`) +- **Submodule**: `hatsune-miku-windows-linux-cursors` - cursor theme (init with `git submodule update --init --recursive`) +- **Packages**: `packages.txt` - list of packages installed via `yay -S` + +## Key Conventions + +- Configs are symlinked into `~/.config/` (see README.md for exact symlink commands per component) +- Shell configs (`bashrc`, `zshrc`) are sourced, not symlinked +- `alacritty.toml` uses alacritty's import mechanism rather than symlinking +- Hyprland is the primary/active WM (most recent changes) +- `$mod` in WM configs refers to the Super/Windows key +- Keybindings use vim-style hjkl navigation across all WMs and tmux diff --git a/alacritty.toml b/alacritty.toml index 031e8bf..bf8c7d3 100644 --- a/alacritty.toml +++ b/alacritty.toml @@ -1,23 +1,3 @@ -# $HOME/.config/alacritty/alacritty.toml -# by Rito Ghosh 2023-10-06 - -# Alacritty now uses TOML formatting for its config files. -# This is a simple example. - -# There are the specification here: https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd -# It is not obvious how it translates to TOML. But it is extremely straightforward. - -# example: WINDOW, COLORS, etc. are tables, and should be represented as [window], [colors], respectively. -# specifics of variables go under them. e.g.- look under "dynamic_padding" under- -# https://github.com/alacritty/alacritty/blob/master/extra/man/alacritty.5.scd#window -# write `dynamic_padding = true` (without backticks -`) under the table [window] -# for variables with multiple values, use "dotted keys". Like setting `padding.x = 5` under [window]. -# This is simple. If not clear, do several trials and errors. - -# Below is my initial set-up. The TOML homepage (https://toml.io/en/v1.0.0) was very helpful in figuring this out. -# I put the file alacritty.toml in $HOME/.config/alacritty. However it can be kept anywhere among the places mentioned in -# https://github.com/alacritty/alacritty/tree/master#configuration - [window] opacity = 0.5 diff --git a/hyprland/hyprland.conf b/hyprland/hyprland.conf index e8c2304..1111f0c 100644 --- a/hyprland/hyprland.conf +++ b/hyprland/hyprland.conf @@ -22,6 +22,7 @@ $menu = wofi --show run env = XCURSOR_THEME,Miku Cursor env = XCURSOR_SIZE,48 +env = HYPRCURSOR_SIZE,48 ################# ### AUTOSTART ### @@ -30,7 +31,7 @@ env = XCURSOR_SIZE,48 exec-once = fcitx5 exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = nm-applet -exec-once = clipit +exec-once = wl-paste --watch cliphist store exec-once = dunst exec-once = hypridle # replaces xautolock; configure lock in hypridle.conf exec-once = waterfox @@ -222,6 +223,8 @@ bind = $mod, G, layoutmsg, orientationleft # tile horizontally bind = $mod, V, layoutmsg, orientationbottom # tile vertically bind = $mod, E, layoutmsg, togglesplit +bind = $mod, w, exec, hyprctl dispatch togglegroup + # --- STICKY (pin floating window) --- bind = $mod SHIFT, S, pin @@ -305,6 +308,25 @@ windowrule { tile = on } +windowrule { + name = pavucontrol + match:class = ^(pavucontrol)$ + float = on +} + +windowrule { + name = Lxappearance + match:class = ^(Lxappearance)$ + float = on +} + +windowrule { + name = PiP + match:title = ^(Picture-in-Picture)$ + float = off + bordersize = 0 +} + ############################## ### WORKSPACE NAMES / ICONS ## diff --git a/i3/i3config b/i3/i3config index 52b8529..391e62a 100644 --- a/i3/i3config +++ b/i3/i3config @@ -30,8 +30,6 @@ exec --no-startup-id waterfox exec --no-startup-id steam exec --no-startup-id surfshark -exec_always --no-startup-id ff-theme-util -exec_always --no-startup-id fix_xcursor # PACTL BINDINGS --------------------------------------- @@ -195,7 +193,7 @@ bindsym $mod+Shift+8 move container to workspace $ws8; bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r exec swaymsg reload +bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" diff --git a/packages.txt b/packages.txt index eb9cca3..651b1eb 100644 --- a/packages.txt +++ b/packages.txt @@ -49,6 +49,12 @@ yay alacritty kitty +tmux +ranger +mocp +dunst +cliphist +inotify-tools pavucontrol pipewire diff --git a/sway/swayconfig b/sway/swayconfig index 1450c4f..1dd82fc 100644 --- a/sway/swayconfig +++ b/sway/swayconfig @@ -13,7 +13,6 @@ set $ws8 8:æ # DEFAULT STARTUP -------------------------------------- # Keyboard: caps:swapescape via sway input (replaces setxkbmap) -exec_always export XKB_DEFAULT_OPTIONS="caps:escape" input * { xkb_options caps:swapescape xkb_layout gb @@ -37,7 +36,6 @@ exec --no-startup-id surfshark # PACTL BINDINGS --------------------------------------- -set $refresh_i3status killall -SIGUSR1 i3status bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle @@ -72,7 +70,7 @@ bindsym $mod+Return exec kitty # kill focused window bindsym $mod+Shift+q kill # start program launcher -bindsym $mod+d exec --no-startup-id wofi --show drun --style ~/scripts/wofi_style.css +bindsym $mod+d exec --no-startup-id wofi --show drun --style ~/scripts/wofi/wofi_style.css bindsym $mod+Ctrl+m exec pavucontrol @@ -178,14 +176,14 @@ bindsym $mod+Ctrl+7 move container to workspace $ws7 bindsym $mod+Ctrl+8 move container to workspace $ws8 # Move to workspace with focused container -bindsym $mod+Shift+1 move container to workspace $ws1; -bindsym $mod+Shift+2 move container to workspace $ws2; -bindsym $mod+Shift+3 move container to workspace $ws3; -bindsym $mod+Shift+4 move container to workspace $ws4; -bindsym $mod+Shift+5 move container to workspace $ws5; -bindsym $mod+Shift+6 move container to workspace $ws6; -bindsym $mod+Shift+7 move container to workspace $ws7; -bindsym $mod+Shift+8 move container to workspace $ws8; +bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 # reload the configuration file bindsym $mod+Shift+c reload @@ -202,7 +200,7 @@ set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot mode "$mode_system" { bindsym l exec swaylock -f, mode "default" bindsym s exec systemctl suspend, mode "default" - bindsym u exec dm-tool switch-to-greeter, mode "default" + bindsym u exec swaymsg exit, mode "default" bindsym e exit bindsym h exec systemctl hibernate, mode "default" bindsym r exec systemctl reboot @@ -312,7 +310,7 @@ for_window [class="Xfburn"] floating enable for_window [urgent=latest] focus # AESTETICS ---------------------------------------------------------------- -exec_always waybar -c ~/scripts/waybar/waybar_config -s ~/scripts/waybar/waybar_style.css +exec_always waybar -c ~/scripts/waybar/waybar_sway_config.json -s ~/scripts/waybar/waybar_style.css # Theme colors # class border backgr. text indic. child_border diff --git a/tmux.conf b/tmux.conf index 30481cf..37773ef 100644 --- a/tmux.conf +++ b/tmux.conf @@ -49,8 +49,8 @@ bind R source-file ~/.tmux.conf \; display-message "Config reloaded" # Mouse on/off set -g mouse on -# Split window -bind-key C-v split-window -h +# Split window (g=horizontal, v=vertical — matches WM configs) +bind-key g split-window -h bind-key v split-window -v # Rotate Window diff --git a/waybar/waybar_hyprland_config.json b/waybar/waybar_hyprland_config.json index 4be9981..b40690d 100644 --- a/waybar/waybar_hyprland_config.json +++ b/waybar/waybar_hyprland_config.json @@ -105,7 +105,7 @@ "clock": { "format": "{:%Y-%m-%d %H:%M}", - "interval": 1, + "interval": 60, "tooltip": false }, diff --git a/waybar/waybar_sway_config.json b/waybar/waybar_sway_config.json index 7422a83..e844c38 100644 --- a/waybar/waybar_sway_config.json +++ b/waybar/waybar_sway_config.json @@ -106,7 +106,7 @@ "clock": { "format": "{:%Y-%m-%d %H:%M}", - "interval": 1, + "interval": 60, "tooltip": false }, diff --git a/zshrc b/zshrc index 89a0343..ce6dad2 100644 --- a/zshrc +++ b/zshrc @@ -1,85 +1,12 @@ alias vim=nvim alias python=ipython - - -# If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH - -# Path to your Oh My Zsh installation. export ZSH="$HOME/.oh-my-zsh" - -# Set name of the theme to load --- if set to "random", it will -# load a random theme each time Oh My Zsh is loaded, in which case, -# to know which specific one was loaded, run: echo $RANDOM_THEME -# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes ZSH_THEME="re5et" -# Set list of themes to pick from when loading at random -# Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in $ZSH/themes/ -# If set to an empty array, this variable will have no effect. -# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) - -# Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" - -# Uncomment the following line to use hyphen-insensitive completion. -# Case-sensitive completion must be off. _ and - will be interchangeable. -# HYPHEN_INSENSITIVE="true" - -# Uncomment one of the following lines to change the auto-update behavior -# zstyle ':omz:update' mode disabled # disable automatic updates -# zstyle ':omz:update' mode auto # update automatically without asking -# zstyle ':omz:update' mode reminder # just remind me to update when it's time - -# Uncomment the following line to change how often to auto-update (in days). -# zstyle ':omz:update' frequency 13 - -# Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS="true" - -# Uncomment the following line to disable colors in ls. -# DISABLE_LS_COLORS="true" - -# Uncomment the following line to disable auto-setting terminal title. -# DISABLE_AUTO_TITLE="true" - -# Uncomment the following line to enable command auto-correction. -# ENABLE_CORRECTION="true" - -# Uncomment the following line to display red dots whilst waiting for completion. -# You can also set it to another string to have that shown instead of the default red dots. -# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" -# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) -# COMPLETION_WAITING_DOTS="true" - -# Uncomment the following line if you want to disable marking untracked files -# under VCS as dirty. This makes repository status check for large repositories -# much, much faster. -# DISABLE_UNTRACKED_FILES_DIRTY="true" - -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. -# HIST_STAMPS="mm/dd/yyyy" - -# Would you like to use another custom folder than $ZSH/custom? -# ZSH_CUSTOM=/path/to/new-custom-folder - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. plugins=( git - aliases - docker-compose docker python @@ -87,45 +14,13 @@ plugins=( npm golang rust - - sudo extract history command-not-found archlinux - zsh-autosuggestions zsh-syntax-highlighting ) source $ZSH/oh-my-zsh.sh - -# User configuration - -# export MANPATH="/usr/local/man:$MANPATH" - -# You may need to manually set your language environment -# export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -# if [[ -n $SSH_CONNECTION ]]; then -# export EDITOR='vim' -# else -# export EDITOR='nvim' -# fi - -# Compilation flags -# export ARCHFLAGS="-arch $(uname -m)" - -# Set personal aliases, overriding those provided by Oh My Zsh libs, -# plugins, and themes. Aliases can be placed here, though Oh My Zsh -# users are encouraged to define aliases within a top-level file in -# the $ZSH_CUSTOM folder, with .zsh extension. Examples: -# - $ZSH_CUSTOM/aliases.zsh -# - $ZSH_CUSTOM/macos.zsh -# For a full list of active aliases, run `alias`. -# -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh"