Skip to content

abdelrahmann22/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

231 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyprland Dotfiles

Modern Hyprland configuration with automatic monitor management, lid switch handling, and beautiful theming.

Screenshot 1 Screenshot 2

Features

  • Hyprland: Dynamic tiling Wayland compositor
  • Kanshi: Automatic monitor configuration management
  • Waybar: Feature-rich status bar
  • Rofi: Application launcher and window switcher
  • Matugen: Material Design color theming
  • Lid Switch Handling: Automatic profile switching when closing/opening laptop lid
  • Multi-Monitor Support: Seamless dual monitor setup with automatic positioning

System Requirements

  • OS: Fedora 43 (primary), also supports Arch and Debian-based distros
  • Display Server: Wayland
  • Shell: Bash/Zsh

Installation

Quick Install (Fedora 43)

git clone https://github.com/yourusername/dotfiles.git ~/dotfiles
cd ~/dotfiles
chmod +x install.sh
./install.sh

The script will:

  1. Detect your system and package manager
  2. Ask if you want to install required packages
  3. Enable necessary COPR repositories (Fedora)
  4. Install Hyprland and all dependencies
  5. Link configuration files to ~/.config
  6. Configure systemd-logind for lid switch handling
  7. Make all scripts executable
  8. Enable kanshi service

Manual Installation

If you want to skip automatic package installation:

./install.sh --skip-packages

Then install packages manually:

Fedora:

sudo dnf copr enable solopasha/hyprland -y
sudo dnf install hyprland awww hypridle hyprlock waybar mako kanshi rofi kitty \
                 cava fastfetch matugen cliphist waypaper playerctl blueman wl-clipboard \
                 grim slurp hyprshot hyprpicker pavucontrol network-manager-applet

Arch:

sudo pacman -S hyprland swww hypridle hyprlock waybar mako kanshi rofi kitty \
               cava fastfetch playerctl blueman wl-clipboard grim slurp pavucontrol
yay -S matugen cliphist waypaper hyprshot hyprpicker

Configuration

Monitor Setup

Edit ~/.config/kanshi/config to configure your monitors:

profile dual-monitor {
    output eDP-1 {
        enable
        mode 1920x1080@60
        position 1920,0
        scale 1.25
    }
    output HDMI-A-1 {
        enable
        mode 1920x1080@100
        position 0,0
        scale 1
    }
}

Lid Switch

The lid switch is automatically configured to:

  • Switch to lid-closed profile when lid is closed
  • Switch to dual-monitor profile when lid is opened
  • Detect lid state on login/restart

Configuration is in:

  • ~/.config/hypr/config/keybinds.conf - Lid switch bindings
  • ~/.config/hypr/scripts/check-lid-state.sh - Startup lid detection
  • /etc/systemd/logind.conf.d/lid-switch.conf - System configuration

Keybindings

Main modifier: SUPER (Windows key)

Keybinding Action
SUPER + Q Open terminal (kitty)
SUPER + C Close window
SUPER + M Exit Hyprland
SUPER + E File manager
SUPER + R Application search (rofi)
SUPER + F Fullscreen (maximized)
SUPER + SHIFT + F Fullscreen (real)
SUPER + V Toggle floating
SUPER + H/J/K/L Move focus (vim keys)
SUPER + 1-9 Switch workspace
SUPER + SHIFT + 1-9 Move window to workspace
SUPER + SHIFT + S Screenshot menu (with annotation)
SUPER + CTRL + S Quick screenshot region (with annotation)
SUPER + SHIFT + W Wallpaper picker
SUPER + SHIFT + V Clipboard manager
SUPER + SHIFT + E Emoji picker
SUPER + SHIFT + U Update center
SUPER + TAB Window switcher
SUPER + ESC Lock screen

See ~/.config/hypr/config/keybinds.conf for all keybindings.

Screenshots & Annotation

This setup includes a powerful screenshot system with Satty annotation enabled by default for all screenshots.

Taking Screenshots

All screenshots automatically open in satty for annotation before saving:

  • SUPER + SHIFT + S: Opens screenshot menu with options:

    • 󰍹 Fullscreen (with annotation)
    • 󰖯 Window (with annotation)
    • 󱣴 Region (with annotation)
  • SUPER + CTRL + S: Quick region screenshot (opens satty)

Workflow

  1. Press screenshot keybinding
  2. Screenshot is captured and saved as Screenshot_YYYYMMDD_HHMMSS.png
  3. Satty automatically opens in a centered floating window with the screenshot
  4. Annotate or edit as needed
  5. Press Enter to save (overwrites the original file with your annotated version)

Satty Annotation Tools

After taking a screenshot, satty opens with:

  • Drawing tools: Line, Arrow, Rectangle, Text, Marker, Blur, Crop, Pointer
  • Keybindings:
    • l: Line tool
    • a: Arrow tool
    • r: Rectangle tool
    • t: Text tool
    • m: Marker tool
    • b: Blur tool
    • c: Crop tool
    • p: Pointer tool
    • z: Undo
    • y: Redo
    • Enter: Save
    • Ctrl+C: Copy to clipboard
    • Esc: Cancel

Screenshots are saved to ~/Pictures/Screenshots/Screenshot_YYYYMMDD_HHMMSS.png

Configure Satty

Edit ~/.config/satty/config.toml to customize:

  • Default colors
  • Font family and size
  • Line width
  • Output filename pattern
  • Keybindings

System Updates

A beautiful shell-based update center for Fedora with support for DNF and Flatpak updates.

Features

  • Color-coded TUI with progress display
  • Updates DNF packages (dnf update --refresh -y)
  • Updates Flatpak applications
  • Automatic cleanup with dnf autoremove
  • Shows update counts before starting
  • Completion summary

Access Update Center

  • SUPER + SHIFT + U: Open update center
  • Waybar update icon (left-click): Open update center
  • Waybar update icon (right-click): Open GNOME Software

Update Process

  1. Press SUPER + SHIFT + U or click waybar update icon
  2. Script checks for available updates (DNF + Flatpak)
  3. If updates available, runs full system update
  4. Performs automatic cleanup
  5. Shows completion summary

The update center opens in a floating kitty window with a beautiful UI showing:

  • Update counts
  • Progress bars
  • Success/error messages
  • Completion status

Theming

Edit ~/.config/satty/config.toml to customize:

  • Default colors
  • Font family and size
  • Line width
  • Output filename pattern
  • Keybindings

Theming

The setup uses Matugen for material design color theming based on your wallpaper.

Change Theme

  1. Press SUPER + SHIFT + W to open waypaper
  2. Select a wallpaper
  3. Matugen will automatically generate colors and reload applications

Manually Apply Theme

matugen image /path/to/wallpaper.jpg
~/.config/matugen/scripts/reload-apps.sh

Components

Core

  • Hyprland: Window manager
  • Hyprpaper: Wallpaper daemon
  • Hypridle: Idle daemon
  • Hyprlock: Lock screen
  • Kanshi: Monitor configuration manager

UI

  • Waybar: Status bar
  • Mako: Notification daemon
  • Rofi: Application launcher
  • Kitty: Terminal emulator

Utilities

  • Cava: Audio visualizer
  • Fastfetch: System info
  • Matugen: Color theme generator
  • Cliphist: Clipboard manager
  • Waypaper: Wallpaper picker
  • Playerctl: Media control
  • Grim/Slurp: Screenshot tools
  • Hyprshot: Screenshot utility
  • Satty: Screenshot annotation tool
  • Hyprpicker: Color picker

Directory Structure

dotfiles/
├── config/
│   ├── hypr/              # Hyprland configuration
│   │   ├── config/        # Split configs (keybinds, monitors, etc)
│   │   └── scripts/       # Helper scripts
│   ├── kanshi/            # Monitor management
│   ├── waybar/            # Status bar
│   ├── rofi/              # Application launcher
│   ├── kitty/             # Terminal
│   ├── mako/              # Notifications
│   ├── matugen/           # Theme generator
│   │   ├── templates/     # Theme templates
│   │   └── scripts/       # Theme application scripts
│   ├── systemd/           # Systemd user services
│   │   └── user/          # User service files (kanshi)
│   ├── satty/             # Screenshot annotation
│   ├── nvim/              # Neovim (if using)
│   ├── cava/              # Audio visualizer
│   └── waypaper/          # Wallpaper picker
├── install.sh             # Installation script
└── README.md              # This file

Systemd Services

The dotfiles include a custom kanshi service file with:

  • Wayland display detection and wait logic
  • Automatic restart on failure
  • Integration with graphical session

The service is automatically installed to ~/.config/systemd/user/kanshi.service and enabled by the install script.

Troubleshooting

Lid switch not working

  1. Check systemd-logind configuration:
cat /etc/systemd/logind.conf.d/lid-switch.conf
  1. Verify Hyprland detects lid switch:
hyprctl devices | grep -i switch
  1. Check lid state:
cat /proc/acpi/button/lid/LID0/state
  1. Restart systemd-logind:
sudo systemctl restart systemd-logind

Monitor configuration not applying

  1. Check Kanshi service status:
systemctl --user status kanshi.service
  1. Check Kanshi profile status:
kanshictl status
  1. Manually switch profile:
kanshictl switch dual-monitor
  1. Reload Kanshi:
kanshictl reload
  1. Restart Kanshi service:
systemctl --user restart kanshi.service
  1. Check Kanshi logs:
journalctl --user -u kanshi -f

Waybar not showing

  1. Restart Waybar:
~/.config/waybar/scripts/launch-waybar.sh
  1. Check for errors:
killall waybar && waybar

Credits

License

This configuration is free to use and modify. See individual component licenses for their respective terms.

Releases

No releases published

Packages

 
 
 

Contributors