Merge pull request #40 from tomasriveral/desktop

Weekly sync: desktop → main
This commit is contained in:
github-actions[bot] authored and GitHub committed 2026-08-26 14:42:32 +00:00
commit bc5f00cf1d
25 files changed
+2140 -990

No files matched your search

+645 -186
View File
@@ -1,235 +1,694 @@
⚠️ Documentation outdated. I recently rewrote the entire config using the [dendritic pattern](https://github.com/mightyiam/dendritic/). One of these days, I will update the README.
# NixOS Configuration
![NixOS configuration](/assets/example.png)
## Installation Guide
This repository contains my personal NixOS configuration.
⚠️ **Important Notes**
Before applying this configuration on another system, make sure to:
- Update the `hostName` (in `configuration.nix` and `home.nix`).
The configuration uses the **[dendritic pattern](https://github.com/mightyiam/dendritic)**. Instead of keeping one large system configuration, functionality is split into smaller, composable modules. This makes it easier to reuse pieces of the configuration across hosts and to keep application, hardware, utility, and host-specific configuration separate.
Requirements: `git` installed. Then run:
```bash
cd
git clone https://github.com/Totorile1/nixos.git
cd nixos
sudo cp /etc/nixos/hardware-configuration.nix ./hosts/laptop/hardware-configuration
sudo nixos-rebuild switch --flake ~/nixos/#laptop
```
### Things That Don't Work Reliably and need manual setup
- Librewolf's extension settings
- Librewolf's bookmarks
- Thunderbird's email servers and settings and birdtray's settings[^1]
- Inkscape's settings
[^1]: You must change in Advanced settings Thunderbird command line to the result of `where thunderbird`.
See the [dendritic pattern repository](https://github.com/mightyiam/dendritic) for an explanation of the approach.
---
## Configuration Structure
## Installation
This configuration is primarily designed for my own machines, so some parts are host- and hardware-specific.
### Requirements
* NixOS
* Git
* Nix flakes enabled
Clone the repository:
```bash
cd ~
git clone https://github.com/tomasriveral/nixos.git
cd nixos
```
The available hosts are:
```text
hosts/
├── laptop.nix
└── desktop.nix
```
Build and switch to a host with:
```bash
sudo nixos-rebuild switch --flake ~/nixos#laptop
```
or:
```bash
sudo nixos-rebuild switch --flake ~/nixos#desktop
```
For a temporary test generation:
```bash
sudo nixos-rebuild test --flake ~/nixos#laptop
```
### Hardware configuration
Hardware-specific configuration is kept under:
```text
modules/hardware/
```
This includes:
* bootloader configuration
* disks and filesystems
* battery and power management
* Bluetooth
* NVIDIA
* performance settings
* udev rules
* hardware utilities
Declarative disk configuration is located in:
```text
modules/hardware/disko/
```
When deploying this configuration to a new machine, review the host and hardware modules rather than assuming the existing hardware configuration is appropriate.
---
# Repository Structure
```text
nixos/
├── assets/ # Images, icons, wallpapers, sounds
├── hosts/laptop/ # Host-specific NixOS config
├── assets/ # Wallpapers, images, sounds and other static assets
├── docs/ # Additional documentation
│ └── printing.md
│
├── modules/
│ ├── home-manager/ # User-level configurations (apps, shell, WM, plugins)
│ ├── nixos/ # System-level modules (daemons, services, udev, ly)
│ ├── qt/ # qt modules (qtbatticon)
│ └── scripts/ # Custom scripts called from keybinds or tools
│ ├── applications/ # Application and desktop application configuration
│ ├── hardware/ # Hardware, boot, disk, battery, GPU and device configuration
│ ├── other/ # Fonts, cursor, printer, desktop entries, user configuration, etc.
│ ├── packages/ # Custom packages and scripts
│ └── utilities/ # Reusable utilities and supporting services
│
├── hosts/
│ ├── laptop.nix # Laptop-specific configuration
│ └── desktop.nix # Desktop-specific configuration
│
├── other/
│ ├── kblayouts/ # Framework 16 RGB macropad layout
│ └── quickshell/ # QML configuration for topbar, notifications, screenshot, etc.
│ ├── hyprland/ # Hyprland configuration
│ │ ├── hyprland.conf # Previous hyprlang configuration
│ │ ├── hyprland.lua # Current Lua configuration
│ │ └── README.md
│ ├── kblayouts/ # Keyboard and Framework macropad layouts
│ ├── mullvad/ # Mullvad configuration
│ └── quickshell/ # Quickshell configuration
│
├── secrets/ # agenix-encrypted secrets
├── flake.nix
├── flake.lock
└── README.md
```
> other/quickshell is the older quickshell configuration.
---
# Modules
## Applications
`modules/applications/` contains configuration for applications and desktop components.
Some examples:
* `anki.nix`
* `browser.nix`
* `caelestia.nix`
* `git.nix`
* `gtk.nix`
* `hypridle.nix`
* `hyprland.nix`
* `kitty.nix`
* `neovim.nix`
* `obsidian.nix`
* `rofi.nix`
* `thunderbird.nix`
* `waybar.nix`
* `wlogout.nix`
* `zsh.nix`
## Hardware
`modules/hardware/` contains machine-level configuration such as:
* battery and power management
* Bluetooth
* bootloader
* disks
* hardware detection/configuration
* NVIDIA
* performance tuning
* udev rules
## Other
`modules/other/` contains configuration that does not fit directly into applications or hardware, such as:
* cursors
* desktop entries
* fonts
* I/O configuration
* printers
* user configuration
## Packages
`modules/packages/` contains custom packages and scripts used throughout the configuration.
Examples include:
* `custom-bottom`
* `custom-browserprofiles`
* `custom-colorpicker`
* `custom-cowsay`
* `custom-syllabes`
* `custom-tomato`
* `custom-weather`
* manually derived packages
Many of these packages are called directly by Hyprland keybindings.
## Utilities
`modules/utilities/` contains reusable system utilities and services, including:
* agenix
* audio/media configuration
* automatic cleanup
* automatic updates
* communication and notifications
* development tools
* documentation tools
* Git backup
* LaTeX
* networking
* Nix utilities
* office tools
* Ollama
* RSS tools
---
## Applications & Tools
# Hosts
### Shell & Terminal
- [`zsh`](https://www.zsh.org/) with [`oh-my-zsh`](https://ohmyz.sh/) for shell customization
- [`kitty`](https://sw.kovidgoyal.net/kitty/) terminal
Host-specific configuration is kept under:
### Window Management
- [`hyprland`](https://github.com/hyprwm/Hyprland) (tiling window manager)
- [`ly`](https://github.com/fairyglade/ly) login manager
- [`swaylock`](https://github.com/swaywm/swaylock) screen locking
- [`hypridle`](https://github.com/hyprwm/Hyprland/wiki/HyprIdle) for idle mode
```text
hosts/
```
### Browsing & Productivity
- [`librewolf`](https://librewolf-community.gitlab.io/) browser
- Extensions: [AdNauseam](https://github.com/dhowe/AdNauseam), [Enhancer for YouTube](https://github.com/ParticleCore/yt-enhancer), [TrackMeNot](https://www.tornhq.com/tmn/), [SponsorBlock](https://sponsor.ajay.app/)
- Privacy options mostly enabled; some disabled to avoid conflicts with AdNauseam
- [`thunderbird`](https://www.thunderbird.net/) email client
- [`obsidian`](https://obsidian.md/) notes and knowledge management
- [`libreoffice`](https://www.libreoffice.org/) full-featured office suite
Currently:
### Utilities
- [`cliphist`](https://github.com/skywind3000/cliphist) clipboard manager
- [`zoxide`](https://github.com/ajeetdsouza/zoxide) faster directory navigation
- [`fastfetch`](https://github.com/LinusDierheimer/fastfetch) system info
- [`gnome-calculator`](https://wiki.gnome.org/Apps/Calculator)
- [`gnome-characters`](https://wiki.gnome.org/Apps/Characters)
- [`gnome-disk-utility`](https://wiki.gnome.org/Apps/Disks)
- [`gnome-font-viewer`](https://wiki.gnome.org/Apps/FontViewer)
- [`nautilus`](https://wiki.gnome.org/Apps/Nautilus) file manager
- [`okular`](https://okular.kde.org/) document & image viewer
- [`vlc`](https://www.videolan.org/vlc/) media player
- [`krita`](https://krita.org/) and [`inkscape`](https://inkscape.org/) for image editing and drawing
- [`anki`](https://apps.ankiweb.net/) flashcards for learning
- [`texlive`](https://www.tug.org/texlive/) LaTeX distribution
- [`biber`](https://ctan.org/pkg/biber) bibliography for LaTeX
- [`eza`](https://github.com/eza-community/eza) replacement for `ls`
```text
hosts/
├── laptop.nix
└── desktop.nix
```
### System & Hardware
- [`bottom`](https://github.com/ClementTsang/bottom) system monitor
- [`tomato-c`](https://github.com/erikras/tomato-c) Pomodoro timer
- [`framework-tool-tui`](https://github.com/romanl/fx16-tui) Framework 16 laptop settings
**Daemons:** `upower`, `pipewire`, `pulseaudio`, `brightnessctl`, `playerctl`, `blueman`, `udiskie`, `networkmanager-applet`, `swww` wallpaper daemon
### Screenshots, Notifications, Bar and much more!
- [caelestia-shell](https://github.com/caelestia-dots/shell)
The host files combine the nixos and home-manager modules needed for each machine.
---
## Keybindings
# Hyprland
### Window Management
| Key | Action |
|-----|--------|
| `$mod + W` | Toggle floating |
| `$mod + G` | Toggle group |
| `Alt + Return` | Fullscreen |
| `$mod + Arrow keys` / `Alt + Tab` | Move focus |
| `$mod + Shift + Ctrl + Arrow keys` | Move window |
| `$mod + Shift + Arrow keys` | Resize window |
Hyprland is configured using its **Lua configuration API**.
### Workspaces
| Key | Action |
|-----|--------|
| `$mod + 1..0` | Switch workspace |
| `$mod + Shift + 1..0` | Move window to workspace |
| `$mod + Ctrl + Arrow keys` | Cycle workspaces |
| `$mod + Mouse wheel` | Scroll workspace |
| `$mod + S` / `Alt + $mod + S` | Special workspace |
The current configuration is:
### Layout
| Key | Action |
|-----|--------|
| `$mod + A` | Scroll layout column left |
| `$mod + D` | Scroll layout column right |
```text
other/hyprland/hyprland.lua
```
### Applications
| Key | Action |
|-----|--------|
| `$mod + T` | Terminal |
| `$mod + E` | File manager |
| `$mod + F` | Browser |
| `$mod + N` | Notes |
| `$mod + Shift + A` | App launcher |
| `$mod + Alt + A` | Toggle sidebar |
| `$mod + Q` | Kill apps (Steam/Pomodoro to special workspace) |
| `$mod + L` | Lock screen |
| `$mod + Shift + S` | Screenshot a window|
| `F11` | Screenshot the whole screen|
The previous hyprlang configuration remains here:
### Multimedia & System
| Key | Action |
|-----|--------|
| F1 | Mute audio |
| F2 / F3 | Volume down / up |
| F4 / F5 / F6 | Media prev / play / next |
| F7 / F8 | Brightness down / up |
| `$mod + mouse` | Move / resize window |
```text
other/hyprland/hyprland.conf
```
Host specific hyprland settings are generated by `/modules/applications/hyprland.nix` as `host.lua` which is imported by `hyprland.lua`.
## Workspace layouts
The current layout configuration is:
| Workspace | Layout |
| --------- | ----------- |
| `1` | `master` |
| `2` | `scrolling` 0.45 width |
| `other` | `dwindle` |
## Wallpapers
The wallpapers are stored in:
```text
assets/
├── wallpaper1.jpg
├── wallpaper2.jpg
├── wallpaper3.jpg
├── wallpaper4.jpg
└── wallpaper5.jpg
```
The active wallpaper is selected based on the workspace:
| Workspace | Wallpaper |
| --------- | ---------------- |
| `1` | `wallpaper1.jpg` |
| `2` | `wallpaper2.jpg` |
| `3` | `wallpaper3.jpg` |
| `4` | `wallpaper4.jpg` |
| `5` | `wallpaper5.jpg` |
| `6` | `wallpaper1.jpg` |
| `7` | `wallpaper2.jpg` |
| `8` | `wallpaper3.jpg` |
| `9` | `wallpaper4.jpg` |
| `10` | `wallpaper5.jpg` |
The Lua configuration contains placeholders for these paths, which are replaced by Nix during configuration generation.
The five wallpapers are paintings from Thomas Cole's *The Course of Empire* series.
---
### Framework 16 RGB Macropad
# Hyprland Keybindings
The **Framework 16 RGB macropad** is a 4×6 programmable key grid. Each key triggers one of the keybindings above via a macro.
`SUPER` is the primary modifier.
If you **don’t have the physical macropad**, the table below shows which keybinding each macro triggers so you can run it from the keyboard instead:
## Window management
| Macropad Key | Linked Action (Hyprland keybinding) |
| ------------ | -------------------------------------------- |
| Row 1, Col 1 | Kill all apps except focused (`Ctrl+$mod+6`) |
| Row 1, Col 2 | Performance mode (`Ctrl+Alt+7`) |
| Row 1, Col 3 | Do not disturb (`Ctrl+$mod+4` |
| Row 1, Col 4 | Notification center (`Ctrl+Alt+1`) |
| Row 2, Col 1 | Pulseaudio control (`Ctrl+$mod+3`) |
| Row 2, Col 2 | Change audio output (`Ctrl+Alt+Shift+0`) |
| Row 2, Col 3 | Special characters (`Ctrl+$mod+3`) |
| Row 2, Col 4 | Color picker (`Ctrl+Alt+8`) |
| Row 3, Col 1 | Pomodoro timer (`Ctrl+Alt+0`) |
| Row 4, Col 1 | Launch Anki (`Ctrl+Alt+9`) |
| Key | Action |
| ----------------------------------- | ----------------- |
| `SUPER + W` | Toggle floating |
| `SUPER + G` | Toggle group |
| `ALT + Return` | Toggle fullscreen |
| `SUPER + Arrow keys` | Move focus |
| `SUPER + CTRL + A` | Swap column left |
| `SUPER + CTRL + D` | Swap column right |
| `SUPER + SHIFT + CTRL + Arrow keys` | Move window |
| `SUPER + SHIFT + Arrow keys` | Resize window |
| `SUPER + Z` | Drag window |
| `SUPER + X` | Resize window |
| `SUPER + mouse:272` | Drag window |
| `SUPER + mouse:273` | Resize window |
> Positions are labeled as `[row, column]` starting from top-left `[1,1]`.
> Each macro calls a script or application from this configuration.
## Workspaces
### Neovim keybinds
| Key | Action |
| ---------------------- | --------------------------------------- |
| `SUPER + 1..9` | Focus workspace 1–9 |
| `SUPER + 0` | Focus workspace 10 |
| `SUPER + SHIFT + 1..9` | Move window to workspace 1–9 |
| `SUPER + SHIFT + 0` | Move window to workspace 10 |
| `SUPER + CTRL + Right` | Move to relative workspace `+1` |
| `SUPER + CTRL + Left` | Move to relative workspace `-1` |
| `SUPER + CTRL + Down` | Focus an empty workspace |
| `SUPER + mouse_down` | Next workspace |
| `SUPER + mouse_up` | Previous workspace |
| `SUPER + S` | Toggle special workspace |
| `SUPER + ALT + S` | Move active window to special workspace |
| Key | Action |
|-------------|-----------------------|
| `<Space>` | `<leader>` |
| `§` | Cheatsheet |
| `<leader>1` | Open fold |
| `<leader>2` | Close fold |
| `<leader>e4` | Previous error |
| `<leader>e5` | Next error |
| `<leader>e1` | See error message |
| `<leader>e3` | See list of errors |
| `<leader>e2` | Show correction |
| `<leader>e<Tab>` | Stop grammar LSP |
| `<leader>f1` | Telescope files |
| `<leader>f2` | Telescope grep |
| `<leader>f3` | Telescope buffers |
| `<leader>f4` | Telescope help |
| `<leader>g1` | Hover documentation |
| `<leader>g2` | Go to definition |
| `<leader>g3` | Go to declaration |
| `<leader>g4` | Go to implementation |
| `<leader>g5` | Show references |
| `<leader><leader>` | Launch runner (terminal) |
| `<leader>r1` | Run fugit |
| `t` | Count syllabes (french) |
## Scrolling layout
All moving macros with `<Space>`, `g`, and the recording with `q` are disabled.
---
| Key | Action |
| ----------- | --------------------------- |
| `SUPER + A` | Move scrolling layout left |
| `SUPER + D` | Move scrolling layout right |
## Aliases
## Custom window management
| Alias | Command |
| ------ | ----------------------------------------------------------------- |
| `snrt` | `git add -A && sudo nixos-rebuild test --flake ~/nixos/#laptop` |
| `snrs` | `git add -A && sudo nixos-rebuild switch --flake ~/nixos/#laptop` |
### `SUPER + Q`
A custom Lua function checks the active window.
* Steam → move it to the special workspace
* `custom-pomodoro` → move it to the special workspace
* anything else → close the window
### `SUPER + CTRL + 6`
Closes every window on the current workspace except the currently focused window.
---
## Useful Information
- If you have an error similar to `Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")` see `./modules/other/desktopEntries.nix`
- `ls` is an alias for `eza`. If you want more info than the normal `ls` run `eza`, `l`, `ll` or `la`
- `qtbatticon` is a custom battery icon tray, because `cbatticon` and `batticonplus` did not work. Click on it to get more info about the battery.
- `man` and `manix` use `fzf` for fuzzy search of pages.
- `pkgs-unstable` can be used for unstable nixpkgs packages.
- Nix garbage collection runs weekly, deleting generations older than 7 days.
- Non-free packages (e.g., Obsidian) are allowed.
- `neovim` plugins configured in `./modules/home-manager/neovim.nix`
- `oh-my-zsh` plugins configured in `./modules/home-manager/oh-my-zsh.nix`
- `ripgrep` default flags: `-S -. -p -n`
- Wallpapers change per workspace (5 paintings from Thomas Cole’s *The Course of Empire*).
- LibreWolf search engines: `@q` (Quant), `@hm` (Home-manager), `@np` (nixpkgs), `@nw` (Nixwiki), `@map` (OpenStreetMap).
- `ccat` colors `cat` output when not redirected; disables coloring if output is redirected (e.g., `>>`) to avoid breaking pipelines.
- Anki addons: `./modules/nixos/anki.nix`
- TLP config: `./modules/nixos/battery.nix`
- Framework 16 RGB macropad layout: `./other/kblayouts/framework_laptop_16_rgb_macropad.layout.json`
# Applications
| Key | Action |
| ------------------- | ------------------------ |
| `SUPER + T` | Kitty |
| `SUPER + E` | Dolphin |
| `SUPER + F` | Browser profile selector |
| `SUPER + N` | Obsidian vault selector |
| `SUPER + SHIFT + A` | Application launcher |
| `SUPER + Backspace` | Session drawer |
| `CTRL + ALT + W` | Sidebar |
| `SUPER + L` | Lock screen |
| `SUPER + SHIFT + S` | Screenshot picker |
| `F11` | Screenshot |
| `SUPER + V` | Clipboard history
Additional bindings launch or control:
* Hyprland keybinding viewer
* Pavucontrol
* GNOME Characters
* Anki
* custom performance mode
* custom tomato/pomodoro
* custom bottom launcher
* custom audio-output selector
* Caelestia shell
---
# Multimedia and Hardware Keys
| Key | Action |
| ---- | -------------------- |
| `F1` | Mute audio |
| `F2` | Volume down |
| `F3` | Volume up |
| `F4` | Previous media track |
| `F5` | Play/pause |
| `F6` | Next media track |
| `F7` | Brightness down |
| `F8` | Brightness up |
Volume and brightness bindings repeat while held.
---
# Gestures
The current Hyprland configuration includes:
| Gesture | Action |
| ----------------------- | ------------- |
| Three-finger horizontal | `scroll_move` (only for scrolling layout) |
| Two-finger pinch | Cursor zoom |
---
# Framework 16 RGB Macropad
The Framework 16 RGB Macropad layout is stored at:
```text
other/kblayouts/framework_laptop_16_rgb_macropad.layout.json
```
The macropad is used as a collection of physical shortcuts for actions that already have Hyprland keybindings.
The macros in the layout generate combinations involving `CTRL`, `ALT`, `SUPER`, and `SHIFT`. The important part is the **logical mapping** between each physical macropad position and its Hyprland shortcut.
> Positions are documented as `[row, column]`, starting from the top-left.
| Macropad Key | Linked Action |
| ------------ | ------------------------------------------------- |
| Row 1, Col 1 | Kill all apps except focused (`CTRL + SUPER + 6`) |
| Row 1, Col 2 | Performance mode (`CTRL + ALT + 7`) |
| Row 1, Col 3 | Do not disturb (`CTRL + SUPER + 4`) |
| Row 1, Col 4 | Notification center (`CTRL + ALT + 1`) |
| Row 2, Col 1 | PulseAudio control (`CTRL + SUPER + 3`) |
| Row 2, Col 2 | Change audio output (`CTRL + ALT + SHIFT + 0`) |
| Row 2, Col 3 | Special characters (`CTRL + SUPER + 5`) |
| Row 2, Col 4 | Color picker (`CTRL + ALT + 8`) |
| Row 3, Col 1 | Pomodoro timer (`CTRL + ALT + 0`) |
| Row 4, Col 1 | Launch Anki (`CTRL + ALT + 9`) |
The physical layout file contains additional transparent/unused positions, but the bindings above are the active shortcuts documented for the macropad.
---
# Neovim
Neovim is configured in:
```text
modules/applications/neovim.nix
```
The configuration includes LSP support, Telescope, Git tooling, grammar tooling and custom commands.
`<Space>` is the leader key.
| Key | Action |
| ------------------ | ---------------------- |
| `§` | Cheatsheet |
| `<leader>1` | Open fold |
| `<leader>2` | Close fold |
| `<leader>e1` | Show error message |
| `<leader>e2` | Show correction |
| `<leader>e3` | Show diagnostics |
| `<leader>e4` | Previous error |
| `<leader>e5` | Next error |
| `<leader>e<Tab>` | Stop grammar LSP |
| `<leader>f1` | Telescope files |
| `<leader>f2` | Telescope grep |
| `<leader>f3` | Telescope buffers |
| `<leader>f4` | Telescope help |
| `<leader>g1` | Hover documentation |
| `<leader>g2` | Go to definition |
| `<leader>g3` | Go to declaration |
| `<leader>g4` | Go to implementation |
| `<leader>g5` | Show references |
| `<leader><leader>` | Launch runner |
| `<leader>r1` | Run Fugitive |
| `t` | Count French syllables |
Some movement macros involving `<Space>`, `g`, and recording with `q` are intentionally disabled.
---
# Shell
The shell is based on **zsh**.
Relevant configuration is primarily found in:
```text
modules/applications/zsh.nix
```
and related application modules.
`oh-my-zsh` is used for shell customization.
`deja` is used for shell completion.
Useful command-line tools include:
* `eza`
* `zoxide`
* `ripgrep`
* `fzf`
* `fastfetch`
* `man`
* `manix`
`ls` is replaced by `eza`.
Common aliases include:
```text
l
ll
la
```
---
# Git and Nix Workflow
The configuration includes tooling for Git, Nix development, backups and cherry-picking.
Relevant modules include:
```text
modules/utilities/gitBackup.nix
modules/utilities/nixGitCherryPicker.nix
modules/utilities/nixUtils.nix
```
Two useful rebuild aliases are:
```bash
snrt
```
which runs:
```bash
git add -A && sudo nixos-rebuild test --flake ~/nixos/#laptop
```
and:
```bash
snrs
```
which runs:
```bash
git add -A && sudo nixos-rebuild switch --flake ~/nixos/#laptop
```
These aliases currently target the laptop host.
---
# Secrets
Secrets are managed using **agenix**.
The relevant files are:
```text
secrets/
├── ntfy.age
└── secrets.nix
```
Encrypted secrets should remain encrypted in Git. Decrypted secret contents and private keys should not be committed.
* To edit a secret use `agenix -e <secret_file>.age -i /etc/ssh/ssh_host_ed25519_key`.
* To decrypt a secret use `sudo agenix -d <secret_file>.age -i /etc/ssh/ssh_host_ed25519_key`.
---
# Quickshell
The legacy Quickshell configuration lives under:
```text
other/quickshell/
```
---
# Custom Packages
Custom scripts and packages are located in:
```text
modules/packages/
```
Examples include:
* `custom-colorpicker`
* `custom-cowsay`
* `custom-syllabes`
* `custom-tomato`
* `custom-weather`
* `vivifyManuallyDerived`
* `dejaManuallyDerived`
Or imported in flake.nix from other repos.
Examples include:
* `custom-browserprofiles` Fzf selector between different LibreWolf profiles, private window and the tor browser.
* `custom-syllabes` A syllab counter when I write french poetry. (note: algorithmic syllab counting is pretty difficult in french, so this small scripts makes a lot of errors)
* `ngcp` (see the [GitHub repo](https://github.com/tomasriveral/Nix-Git-Cherry-Picker)) is what i use to manage between my `laptop` and `desktop` git branch.
* `nixpkgs-notifier` (see the [GitHub repo](https://github.com/tomasriveral/nixpkgs-notifier)) notifies my when PRs get merged to nixos-unstable.
---
# Applications and Desktop Environment
The configuration currently contains modules for applications and components such as:
* Hyprland
* Kitty
* Dolphin
* LibreWolf/browser tooling
* Thunderbird
* Obsidian
* Neovim
* Caelestia
* Quickshell
* Hypridle
* Rofi
* Waybar
* Wlogout
* Git
* SSH
* Mullvad
* Bluetooth
* audio/media tools
* office tools
* LaTeX
* development tools
* Ollama
The exact set of enabled software depends on the host configuration and imported modules.
---
# Things That Still Require Manual Setup
Not everything used by the desktop environment is completely declarative.
Some application state may need to be configured manually after installation:
* LibreWolf extension settings
* LibreWolf bookmarks
* Thunderbird account/server settings
* Birdtray settings
* Inkscape settings
* other application-specific user data
* git configuration
---
# Useful Information
* Wallpapers are five paintings from Thomas Cole's *The Course of Empire*.
* `qtbatticon` is a custom battery tray indicator.
* `man` and `manix` use `fzf` for fuzzy searching.
* `pkgs-unstable` is available for packages that need to come from unstable nixpkgs.
* `pkgs-master` can be enabled in flake.nix. Attention, all the packages will need to be compiled on the machine.
* `pkgs-local` can be enable in flake.nix. Attention, all the packages will need to be compiled on the machine.
* Automatic Nix garbage collection removes old generations according to the configured cleanup policy.
* Non-free packages are enabled where required.
* Neovim plugins are configured in `modules/applications/neovim.nix`.
* `oh-my-zsh` configuration is kept with the shell/application modules.
* The Framework 16 RGB Macropad layout is stored in `other/kblayouts/framework_laptop_16_rgb_macropad.layout.json`.
* Anki-related configuration is distributed across the relevant application/package modules.
* Battery and power-related configuration is under `modules/hardware/`.
* Custom commands used by Hyprland are generally provided by `modules/packages/`.
---
# Documentation
Additional documentation is kept close to the corresponding configuration where practical.
Important documentation files include:
```text
docs/printing.md
modules/applications/README.md
modules/hardware/disko/README.md
modules/packages/README.md
modules/utilities/README.md
other/hyprland/README.md
other/mullvad/README.md
other/quickshell/README.md
```
+2
View File
@@ -3,6 +3,8 @@ _: {
programs.git = {
enable = true;
/*
for some reason this doesnt work really well. So it's best to setup git imperatively
push.autoSetupRemote to true
settings = {
init.defaultBranch = "main";
};
+67 -485
View File
@@ -1,4 +1,4 @@
{self, ...}: {
_: {
flake.nixosModules.hyprland = {
pkgs,
pkgs-unstable,
@@ -11,9 +11,6 @@
capitaine-cursors-themed # cursor theme
papirus-icon-theme
papirus-folders
self.packages.${pkgs.system}.custom-wallpaper
self.packages.${pkgs.system}.custom-dontkillsteam # kill app (if not steam or tomato-c
self.packages.${pkgs.system}.custom-killall # kill all windows except focused window
xdg-utils
];
# enable hyprland WM
@@ -37,491 +34,76 @@
# Enable the X11 windowing system.
services.xserver.enable = true;
};
flake.homeModules.hyprland-laptop = _: {
wayland.windowManager.hyprland.settings = {
exec-once = [
"qtbatticon" # custom battery tray
"nixpkgs-notifier listen" # tracks PR merge in nixos-unstable
];
monitor = [
"eDP-1, highres@highrr, 0x0, 1"
];
};
flake.homeModules.hyprland-laptop = {
home.file.".config/hypr/host.lua" = {
text = ''
hl.on("hyprland.start", function()
hl.exec_cmd("qtbatticon")
hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen")
end)
hl.monitor({
output = "eDP-1",
mode = "highres@highrr",
position = "0x0",
scale = 1,
})
'';
enable = true;
force = true;
};
flake.homeModules.hyprland-desktop = _: {
wayland.windowManager.hyprland.settings = {
monitor = [
", highres@highrr, auto, 0.75"
];
exec-once = [
"if [ -e \"/home/tomasr/icloudSync.sh\" ]; then /home/tomasr/icloudSync.sh; else notify-send \"icloudSync.sh doesn't exist\" \"See ~/nixos/modules/applications/hyprland.nix for more information\"; fi"
# my icloud account uses an email that I don't want to make public. So the script isnt pushed to github. The script looks like:
/*
#!/etc/profiles/per-user/tomasr/bin/zsh
if ! icloudpd --auth-only --username tomas.rivera_2009@icloud.com --dry-run; then
notify-send "icloudpd is not logged in" "Please run icloudpd icloudpd --username my@email.address --password my_password --auth-only"
exit 1
fi
icloudpd --directory ~/hdd/kdrive/Photo/IPhone/icloudpd-backup --username tomas.rivera_2009@icloud.com --watch-with-interval 3600 --no-progress-bar
*/
];
};
};
flake.homeModules.hyprland-desktop = {
home.file.".config/hypr/host.lua" = {
text = ''
hl.monitor({
output = "",
mode = "preferred",
position = "auto",
scale = 0.75,
})
'';
enable = true;
force = true;
};
flake.homeModules.hyprland = {pkgs-unstable, ...}: let
wallpaper = ../../assets/wallpaper1.jpg;
in {
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
#hint Electron apps to use on wayland;
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland.plugins = [
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors
];
wayland.windowManager.hyprland.configType = "hyprlang";
wayland.windowManager.hyprland.settings = {
"$mod" = "SUPER";
"$term" = "kitty";
"$editor" = "nvim";
"$notes" = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults";
"$file" = "dolphin";
"$browser" = "kitty --class \"custom-browserprofiles\" --name \"Select browser profile\" --hold custom-browserprofiles";
# ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█
# █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█
animations = {
enabled = true;
bezier = [
"wind, 0.05, 0.9, 0.1, 1.05"
"winIn, 0.1, 1.1, 0.1, 1.1"
"winOut, 0.3, -0.3, 0, 1"
"liner, 1, 1, 1, 1"
];
animation = [
"windows, 1, 6, wind, slide"
"windowsIn, 1, 6, winIn, slide"
"windowsOut, 1, 5, winOut, slide"
"windowsMove, 1, 5, wind, slide"
"border, 1, 1, liner"
"borderangle, 1, 30, liner, loop"
"fade, 1, 10, default"
"workspaces, 1, 5, wind"
];
};
};
flake.homeModules.hyprland = {pkgs-unstable, ... }:
let
wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg;
# █▀▀ █▄░█ █░█
# ██▄ █░▀█ ▀▄▀
hyprlandLua = builtins.replaceStrings
[
"WALLPAPER1/PATH/PLACEHOLDER"
"WALLPAPER2/PATH/PLACEHOLDER"
"WALLPAPER3/PATH/PLACEHOLDER"
"WALLPAPER4/PATH/PLACEHOLDER"
"WALLPAPER5/PATH/PLACEHOLDER"
]
[
(toString wallpaper1)
(toString wallpaper2)
(toString wallpaper3)
(toString wallpaper4)
(toString wallpaper5)
]
(builtins.readFile ../../other/hyprland/hyprland.lua);
in
{
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = [
"PATH, $PATH:$scrPath"
"XDG_CURRENT_DESKTOP,Hyprland"
"XDG_SESSION_TYPE,wayland"
"XDG_SESSION_DESKTOP,Hyprland"
"QT_QPA_PLATFORM,wayland;xcb"
"QT_QPAPLATFORMTHEME,qt6ct"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"MOZ_ENABLE_WAYLAND,1"
"GDK_SCALE,1"
#refer to https://wiki.hypr.land/Nix/Hyprland-on-Home-Manager/
wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.package = pkgs-unstable.hyprland;
#hint Electron apps to use on wayland;
home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland.plugins = [
#pkgs-unstable.hyprlandPlugins.hyprspace # currently broken
#pkgs-unstable.hyprlandPlugins.hypr-dynamic-cursors
];
# █ █▄░█ █▀█ █░█ ▀█▀
# █ █░▀█ █▀▀ █▄█ ░█░
input = {
kb_layout = ["ch"];
follow_mouse = 1;
sensitivity = 0;
force_no_accel = 1;
};
# █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ █▀
# █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ ▄█
# caelestia shell drawers toggle dashboard
# caelestia shell drawers toggle utilities
bind = [
#hyprland/utility keybindings
"$mod, W, togglefloating"
"$mod, G, togglegroup"
"Alt, Return, fullscreen"
"$mod, Left, movefocus, l"
"$mod, Right, movefocus, r"
"$mod, Up, movefocus, u"
"$mod, Down, movefocus, d"
"Alt, Tab, movefocus, d"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod+Ctrl, Right, workspace, r+1"
"$mod+Ctrl, Left, workspace, r-1"
"$mod+Ctrl, Doown, workspace, empty"
"$mod+Shift, 1, movetoworkspace, 1"
"$mod+Shift, 2, movetoworkspace, 2"
"$mod+Shift, 3, movetoworkspace, 3"
"$mod+Shift, 4, movetoworkspace, 4"
"$mod+Shift, 5, movetoworkspace, 5"
"$mod+Shift, 6, movetoworkspace, 6"
"$mod+Shift, 7, movetoworkspace, 7"
"$mod+Shift, 8, movetoworkspace, 8"
"$mod+Shift, 9, movetoworkspace, 9"
"$mod+Shift, 0, movetoworkspace, 10"
"$mod+Ctrl+Alt, Right, movetoworkspace, r+1"
"$mod+Ctrl+Alt, Left, movetoworkspace, r-1"
#"$mod, Backspace, exec, wlogout -b 4 -T 600 -B 600"
"$mod, Backspace, exec, caelestia shell drawers toggle session"
"$mod+Shift+Ctrl, Left, movewindow, l"
"$mod+Shift+Ctrl, Right, movewindow, r"
"$mod+Shift+Ctrl, Up, movewindow, u"
"$mod+Shift+Ctrl, Down, movewindow, d"
"$mod, mouse_down, workspace, e+1"
"$mod, mouse_up, workspace, e-1"
"$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy" # copy paste
"$mod, B, exec, hyprkeys -bkr | rofi -dmenu"
#"$mod, A, tagwindow, noborder" # used to not apply image border
"$mod, S, togglespecialworkspace,"
"Alt+$mod, S, movetoworkspace, special"
# for the scrolling layout
"$mod, A, layoutmsg, move -col"
"$mod, D, layoutmsg, move +col"
#apps keybindings
"$mod, T, exec, $term"
"$mod, E, exec, $file"
"$mod, F, exec, $browser"
"$mod, N, exec, $notes"
#"$mod+Shift, A, exec, rofi -show drun"
"$mod+Shift, A, exec, caelestia shell drawers toggle launcher"
"$mod, Q, exec, custom-dontkillsteam"
#"Ctrl+Alt, W, exec, pkill waybar || waybar"
"Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar"
#"$mod, L, exec, swaylock -eFLK -i ${wallpaper}"
"$mod, L, exec, caelestia shell lock lock"
#"$mod, F11, exec, hyprshot -m window"
", F11, exec, caelestia screenshot"
#"$mod_SHIFT, S, exec, hyprshot -m region --clipboard only"
# "$mod_SHIFT, S, exec, qs ipc call screenshot toggle"
"$mod_SHIFT, S, exec, caelestia shell picker open"
# framework 16 rgb macropad
"Ctrl+$mod, 6, exec, custom-killall" # pos 1 1 killall apps except focused one
"Ctrl+Alt, 7, exec, custom-performance" # pos 2 1 start performance mode
#"Ctrl+Alt, 7, exec, caelestia shell gameMode toggle"
# reloads the autostart programs # pos 3 1
# we passed to caelestia-shell and stoped using that
/*
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
"Ctrl+$mod, 4, exec, kitty -e 'custom-launch'"
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
"Ctrl+$mod, 4, exec, sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
#"Ctrl+Alt, 1, exec, swaync-client -t" # pos 4 1 notification center
"Ctrl+Alt, 1, exec, qs ipc call notifications toggle"
*/
# pos 4 1 notification center.
"Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar"
"Ctrl+Alt, 1, exec, [[ -f ~/.cache/hypr-battery-saver ]] || swaync-client -t"
"Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd"
"Ctrl+$mod, 3, exec, pavucontrol" # pos 1 2 audiocontrol
"Ctrl+Shift+Alt, 0, exec, kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\"" # pos 2 2 change audio output fzf
"Ctrl+$mod, 5, exec, gnome-characters" # pos 3 2 special chars
"Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store" # pos 4 2 colorpicker
"Ctrl+Alt, 0, exec, custom-tomato" # pos 1 3 pomodoro app
"Ctrl+Alt, 2, exec, custom-bottom" # pos 2 3 btm (like htop but cleaner)
"Ctrl+Alt, 9, exec, anki"
# if hyprexpo plugin enabled bind = $mainMod, Space, hyprexpo:expo, toggle
# maybe exec sudo framework-tools-tui
#plugins keybindings
#"$mod, SPACE, overview:toggle, "
];
binde = [
"$mod+Shift, Right, resizeactive, 30 0"
"$mod+Shift, Left, resizeactive, -30, 0"
"$mod+Shift, Up, resizeactive, 0 -30"
"$mod+Shift, Down, resizeactive,m 0 30"
];
bindl = [
", F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle" #toggle audio mute
", F5, exec, playerctl play-pause" # media F4-F6
", F4, exec, playerctl previous"
", F6, exec, playerctl next"
];
bindel = [
", F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%" # decrease volume
", F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%" # increase volume
", F7, exec, brightnessctl s 10%-" # decrease brightness
", F8, exec, brightnessctl s +10%" # increase brightness
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod, Z, movewindow"
"$mod, X, resizewindow"
];
# █░░ ▄▀█ █░█ █▄░█ █▀▀ █░█
# █▄▄ █▀█ █▄█ █░▀█ █▄▄ █▀█
exec-once = [
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
"dbus-update-activation-environment --systemd --all" # for XDPH
"systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # for XDPH
"systemctl --user start xdg-desktop-portal-wlr.service"
"blueman-applet" # systray app for Bluetooth
"udiskie --no-automount --smart-tray" # front-end that allows to manage removable media
"nm-applet --indicator" # systray app for Network/wifi
#setups clipboard
"rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store"
#"wl-paste --type text --watch cliphist store" # clipboard store text data
#"wl-paste --type image --watch cliphist store" # clipboard store image data
"custom-batterynotify"
"custom-batterywarning"
#"birdtray" # thunderbird tray app # curently broken
#wallpapers/b
"awww img ${wallpaper}"
"awww-daemon"
"sleep 1 && custom-wallpaper"
"custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it
#"waybar"
"custom-gitnotify"
#"custom-obsidianbackup" # backups the obsidian notes to kdrive and to a timed hidden dir (~/.Notes.backup/)
#"QS-notifycache" # builds the cache that will be used for the notification history
"sleep 4 & caelestia-shell" #works better if it sleeps a bit before
"sleep 20 && ngcp pull --automatic" # see github.com/tomasriveral/nix-git-cherry-picker
"rm ~/.cache/hypr-battery-saver"
"rm ~/.cache/hypr-battery-saver.brightness"
/*
We stopped using that ######################### maybe we should desactivate those scripts
# login autostart
#######################
"[workspace 1 silent] sleep 1 && kitty -o font_size=16 -e sh -c 'custom-weather'"
"[workspace 1 silent] sleep 1 && kitty -o font_size=11 -e sh -c 'custom-cowsay'"
"[workspace 1 silent] kitty -e 'custom-launch'"
"[workspace 1 silent] sleep 1 && kitty -o font_size=5 -e btm --theme gruvbox --disable-click --disable_advanced_kill --enable_cache_memory -g -R -T "
"[workspace 1 silent] sleep 1 && kitty -o font_size=1 -e sh -c 'cmatrix -br'"
######################
######################
*/
];
splash = true; # remove default background on startup
# gestures (also keybindings)
gesture = [
"3, right, move, +col"
"3, left, move, -col"
];
# █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀
# █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█
dwindle = {
preserve_split = true;
};
scrolling = {
column_width = 0.45;
};
# █▀▄▀█ █ █▀ █▀▀
# █░▀░█ █ ▄█ █▄▄
misc = {
vrr = 0;
force_default_wallpaper = 0;
};
xwayland = {
force_zero_scaling = true;
};
# █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█
# █░▀░█ █▄█ █#░▀█ █ ░█░ █▄█ █▀▄
monitor = [
#",preferred, auto, auto"
"HDMI-A-1, highres2highrr, auto-left, 1"
];
# _______ ___ __ __ _______ ___ __ _ _______
#| || | | | | || || | | | | || |
#| _ || | | | | || ___|| | | |_| || _____|
#| |_| || | | |_| || | __ | | | || |_____
#| ___|| |___ | || || || | | _ ||_____ |
#| | | || || |_| || | | | | | _____| |
#|___| |_______||_______||_______||___| |_| |__||_______|
#
"plugin:dynamic-cursors" = {
enabled = true;
threshold = 2;
mode = "rotate";
rotate = {
# length in px of the simulated stick used to rotate the cursor
# most realistic if this is your actual cursor size
length = 20;
offset = 0;
};
shake = {
enabled = true;
# use nearest-neighbour (pixelated) scaling when shaking
# may look weird when effects are enabled
nearest = true;
threshold = 4;
# magnification level immediately after shake start
base = 4.0;
# magnification increase per second when continuing to shake
speed = 4.0;
# how much the speed is influenced by the current shake intensitiy
influence = 0.0;
# maximal magnification the cursor can reach
# values below 1 disable the limit (e.g. 0)
limit = 0.0;
# time in millseconds the cursor will stay magnified after a shake has ended
timeout = 2000;
# show cursor behaviour `tilt`, `rotate`, etc. while shaking
effects = true;
# enable ipc events for shake
ipc = false;
};
};
"plugin:overview" = {
disableGestures = true;
showEmptyWorkspace = true;
workspaceActiveBorder = "rgb(ab7746)";
disableBlur = true;
};
#####################################################
#####################################################
# theme
decoration = {
dim_special = 0.3;
rounding = 18;
blur = {
special = true;
enabled = true;
size = 4;
passes = 2;
new_optimizations = true;
ignore_opacity = true;
};
};
general = {
gaps_in = 5;
gaps_out = 15;
border_size = 4;
"col.active_border" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
"col.inactive_border" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
layout = "dwindle";
resize_on_border = true;
};
group = {
"col.border_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
"col.border_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
"col.border_locked_active" = "rgba(ca6702ff) rgba(ecd3a0ff) 45deg";
"col.border_locked_inactive" = "rgba(f1dca7d9) rgba(ffe1a8d9) 45deg";
};
####################################################
##################################################
# /$$ /$$ /$$
#| $$ /$ | $$ | $$
#| $$ /$$$| $$ /$$$$$$ /$$$$$$ | $$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$
#| $$/$$ $$ $$ /$$__ $$ /$$__ $$| $$ /$$/ /$$_____/ /$$__ $$ |____ $$ /$$_____/ /$$__ $$
#| $$$$_ $$$$| $$ \ $$| $$ \__/| $$$$$$/ | $$$$$$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$$$
#| $$$/ \ $$$| $$ | $$| $$ | $$_ $$ \____ $$| $$ | $$ /$$__ $$| $$ | $$_____/
#| $$/ \ $$| $$$$$$/| $$ | $$ \ $$ /$$$$$$$/| $$$$$$$/| $$$$$$$| $$$$$$$| $$$$$$$
#|__/ \__/ \______/ |__/ |__/ \__/|_______/ | $$____/ \_______/ \_______/ \_______/
# | $$
# | $$
# |__/
# see https://wiki.hypr.land/Configuring/Workspace-Rules/
workspace = [
"1, layout:master"
"2, layout:scrolling, layoutopt:direction:right"
"name:special, layout:scrolling"
# used for smart gaps along some windowrules
#"w[tv1], gapsout:1, gapsin:1"
#"f[1], gapsout:1, gapsin:1"
];
# █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█   █▀█ █░█ █░░ █▀▀ █▀
# ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀   █▀▄ █▄█ █▄▄ ██▄ ▄█
windowrule = [
"opacity 0.90 0.90, match:class ^(firefox)$"
"opacity 0.90 0.90, match:class ^(Brave-browser)$"
"opacity 0.80 0.80, match:class ^(code-oss)$"
"opacity 0.80 0.80, match:class ^(Code)$"
"opacity 0.80 0.80, match:class ^(code-url-handler)$"
"opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$"
"opacity 0.75 0.75, match:class ^(kitty)$"
"opacity 0.80 0.80, match:class ^(org.kde.dolphin)$"
"opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$"
"opacity 0.80 0.80, float on, match:class ^(nwg-look)$"
"opacity 0.80 0.80, float on, match:class ^(qt5ct)$"
"opacity 0.80 0.80, float on, match:class ^(qt6ct)$"
"opacity 0.80 0.80, float on, match:class ^(kvantummanager)$"
"opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$"
"opacity 0.80 0.70, float on, match:class ^(blueman-manager)$"
"opacity 0.80 0.70, float on, match:class ^(nm-applet)$"
"opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$"
"opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$"
"opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$"
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$"
"opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$"
"opacity 0.70 0.70, match:class ^([Ss]team)$"
"opacity 0.70 0.70, match:class ^(steamwebhelper)$"
"opacity 0.70 0.70, match:class ^(Spotify)$"
"opacity 0.70 0.70, match:initial_title ^(Spotify Free)$"
"opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$"
"opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$"
"opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$"
"opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$"
"opacity 0.80 0.80, match:class ^(gnome-boxes)$"
"opacity 0.80 0.80, match:class ^(discord)$"
"opacity 0.80 0.80, match:class ^(WebCord)$"
"opacity 0.80 0.80, match:class ^(ArmCord)$"
"opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$"
"opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$"
"opacity 0.80 0.80, float on, match:class ^(yad)$"
"opacity 0.80 0.80, float on, match:class ^(Signal)$"
"opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$"
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$"
"opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$"
"opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$"
"opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$"
"opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$"
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$"
"float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$"
"float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$"
"float on, match:class ^(firefox)$, match:title ^(Library)$"
"float on, match:class ^(kitty)$, match:title ^(top)$"
"float on, match:class ^(kitty)$, match:title ^(btop)$"
"float on, match:class ^(kitty)$, match:title ^(htop)$"
"float on, match:class ^(vlc)$"
"float on, match:class ^(eog)$"
"float on, size 400 225, match:class ^(custom-browserprofiles)$"
"float on, size 1050 200, match:class ^(custom-changeAudioOutput)$"
"float on, size 400 175, match:class ^(custom-obsidianvaults)$"
"float on, size 600 600, match:initial_class ^(custom-pomodoro)$"
"float on, size 1500 800, match:initial_class ^(custom-bottom)$"
# smart gaps/border is ugly with caelestia-shell
#"border_size 2, match:float 0, match:workspace w[tv1]"
#"rounding 1, match:float 0, match:workspace w[tv1]"
#"border_size 2, match:float 0, match:workspace f[1]"
#"rounding 1, match:float 0, match:workspace f[1]"
];
# add a float for tomato when in kitty
#"plugin:imgborders:noimgborders, tag:noborder"
layerrule = [
"blur on, ignore_alpha 0, match:namespace rofi"
"blur on, ignore_alpha 0, match:namespace notifications"
"blur on, ignore_alpha 0, match:namespace swaync-notification-window"
"blur on, ignore_alpha 0, match:namespace swaync-control-center"
"blur on, match:namespace logout_dialog"
];
};
wayland.windowManager.hyprland.configType = "lua";
wayland.windowManager.hyprland.extraConfig = hyprlandLua;
};
}
-99
View File
@@ -1,99 +0,0 @@
_: {
# for some reason perSystem can't expose pkgs-unstable so we need to expose it here
# -----------------------------------------------------
# Here are a bunch of scripts that interact with hyprland
# Some are still used. Some are broken. Some are deprecated. But I do still keep them in case I want to go back to old tools
# -----------------------------------------------------
perSystem = {pkgs, ...}: let
wallpaper1 = ../../assets/wallpaper1.jpg;
wallpaper2 = ../../assets/wallpaper2.jpg;
wallpaper3 = ../../assets/wallpaper3.jpg;
wallpaper4 = ../../assets/wallpaper4.jpg;
wallpaper5 = ../../assets/wallpaper5.jpg;
in {
# kills the app, but when it's steam or custom-pomodoro
packages.custom-dontkillsteam = pkgs.writeShellApplication {
name = "custom-dontkillsteam";
runtimeInputs = with pkgs; [
hyprland
jq
];
text = ''
class=$(hyprctl activewindow -j | jq -r ".class")
if [[ "$class" == "Steam" || "$class" == "custom-pomodoro" ]]; then
hyprctl dispatch movetoworkspacesilent special
else
hyprctl dispatch killactive ""
fi
'';
};
packages.custom-killall = pkgs.writeShellApplication {
name = "custom-killall";
runtimeInputs = [
pkgs.hyprland # for some reason pkgs-unstable doesn't work here
pkgs.jq
];
text = ''
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
hyprctl clients -j |
jq -r ".[]
| select(.workspace.id==''${active_workspace_id})
| select(.focusHistoryID!=0)
| .pid" |
xargs -r kill
'';
};
packages.custom-wallpaper = pkgs.writeShellApplication {
name = "custom-wallpaper";
runtimeInputs = with pkgs; [
socat
awww
];
text = ''
handle() {
case $1 in
workspace*)
str=$1
i=$((''${#str}-1))
workspace="''${str:$i:1}"
case $workspace in
1 | 6)
awww img -t none ${wallpaper1}
;;
2 | 7)
awww img -t none ${wallpaper2}
;;
3 | 8)
awww img -t none ${wallpaper3}
;;
4 | 9)
awww img -t none ${wallpaper4}
;;
5 | 10 | 0)
awww img -t none ${wallpaper5}
;;
esac
;;
esac
}
socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock | while read -r line; do handle "$line"; done
'';
};
packages.custom-launch = pkgs.writeShellApplication {
# used for the terminal autostart. Needs to get cleared and recall fastfetch so that the bar from oh-my-zsh get resized
# unused
name = "custom-launch";
runtimeInputs = with pkgs; [
zsh
];
text = ''
sleep 2
clear
zsh
'';
};
};
}
-1
View File
@@ -14,7 +14,6 @@
flake.nixosModules.kdrive-desktop = {pkgs-unstable, ...}: {
environment.systemPackages = with pkgs-unstable; [
rclone
icloudpd
self.packages.${pkgs-unstable.system}.custom-checkKdrive
self.packages.${pkgs-unstable.system}.custom-synckdrive-desktop
];
-15
View File
@@ -1,15 +0,0 @@
_: {
flake.nixosModules.mullvad = {pkgs-unstable, ...}: {
services.mullvad-vpn = {
enable = true;
package = pkgs-unstable.mullvad-vpn;
};
};
flake.homeModules.mullvad = {pkgs-unstable, ...}: {
programs.mullvad-vpn = {
# gui
enable = true;
package = pkgs-unstable.mullvad-vpn;
};
};
}
+10 -6
View File
@@ -8,7 +8,7 @@
force = true;
text = ''
{
"directory": ["~/kdrive/Notes/"],
"directory": ["~/Documents/Notes/"],
"render": true,
"jumpToEndOfFileOnLaunch": true,
"editor": "neovim",
@@ -16,13 +16,17 @@
"dateEntry": "# %Y %m %d %a",
"newLineOnOpening": true,
"backup": {
"enable": false,
"enable": true,
"directory": {
"~/Documents/Notes/": "~/kdrive/Notes/",
"~/test/": "~/backupTest/"
"~/Documents/Notes/": "~/kdrive/Notes/"
},
"interval": "daily",
"rsyncArgs": ["-Lqah", "--update"]
"rsyncArgs": ["-Lqah", "--update"],
"git": {
"enable": true,
"name": "Tomas Rivera",
"email": "tomas.riveral@icloud.com"
}
}
}
'';
@@ -47,7 +51,7 @@
"backup": {
"enable": false,
"directory": {
"~/Documents/Notes/": "~/kdrive/Notes/",
"~/Documents/Notes/": "~/hdd/kdrive/Notes/",
"~/test/": "~/backupTest/"
},
"interval": "daily",
+7
View File
@@ -36,6 +36,7 @@ _: {
home.packages = [
#self.packages.${pkgs.system}.dejaManuallyDerived
pkgs-unstable.deja
pkgs-unstable.trash-cli
];
programs.zsh = {
@@ -88,6 +89,12 @@ _: {
nnvim = "nvim";
nvvim = "nvim";
nviim = "nvim";
hledger-ui = "puffin";
rm = "trash-put";
rml = "trash-list";
rmr = "trash-restore";
rme = "trash-empty";
rmx = "trash-rm";
};
};
};
-179
View File
@@ -336,184 +336,5 @@
install -m755 qtbatticon $out/bin/
'';
};
# This was replaced by caelestia shell's Game Mode
packages.custom-performance = pkgs.writeShellApplication {
name = "custom-performance";
runtimeInputs = with pkgs; [
hyprland
brightnessctl
swaynotificationcenter
self.packages.${pkgs.system}.custom-wallpaper
libnotify
inputs.caelestia-shell.packages.${pkgs.system}.default
];
text = ''
STATE="$HOME/.cache/hypr-battery-saver"
enable() {
mkdir -p "$(dirname "$STATE")"
echo "Enabling battery saver mode..."
# Save brightness
brightnessctl get > "''${STATE}.brightness" 2>/dev/null || true
# Kill heavy UI components
pkill -f caelestia-shell || true
pkill -f caelestia || true
pkill shell || true
pkill -f custom-wallpaper || true
# Start lightweight notifications
pkill swaync || true
swaync & disown
# Start lightweight waybar
pkill waybar || true
waybar & disown
# Lower refresh rate (BIGGEST win)
hyprctl keyword monitor "eDP-1,2560x1600@60,0x0,1"
# Core performance toggles
hyprctl --batch "\
keyword animations:enabled 0;\
keyword animation borderangle,0;\
keyword decoration:shadow:enabled 0;\
keyword decoration:blur:enabled 0;\
keyword decoration:rounding 0;\
keyword decoration:fullscreen_opacity 1;\
keyword general:gaps_in 0;\
keyword general:gaps_out 0;\
keyword general:border_size 1;\
keyword decoration:active_opacity 1;\
keyword decoration:inactive_opacity 1;\
keyword misc:vfr true"
# Lower brightness
brightnessctl set 5% 2>/dev/null || true
touch "$STATE"
notify-send "Battery Saver" "Enabled"
}
disable() {
echo "Disabling battery saver mode..."
# Restore refresh rate
hyprctl keyword monitor "eDP-1,2560x1600@165,0x0,1"
# Restore Caelestia
pkill swaync || true
pkill waybar || true
caelestia shell -d >/dev/null 2>&1 &
disown
# Restart wallpaper
custom-wallpaper >/dev/null 2>&1 &
disown
# Restore full UI via reload (safe here on exit)
hyprctl reload
# Restore brightness
if [[ -f "''${STATE}.brightness" ]]; then
brightnessctl set "$(cat "''${STATE}.brightness")" 2>/dev/null || true
fi
rm -f "$STATE" "''${STATE}.brightness"
notify-send "Battery Saver" "Disabled"
}
if [[ -f "$STATE" ]]; then
disable
else
enable
fi
'';
};
# Old script that was used for the battery. Might not work.
packages.custom-olddeprecatedbatterynotify = pkgs.writeShellApplication {
name = "custom-olddeprecatedbatterynotify";
runtimeInputs = with pkgs; [
libnotify # provides notify-send
systemd # provides systemctl
];
text = ''
set -euo pipefail
LOW="''${BATTERY_LOW_THRESHOLD:-20}"
CRITICAL="''${BATTERY_CRITICAL_THRESHOLD:-5}"
FULL="''${BATTERY_FULL_THRESHOLD:-95}"
INTERVAL="''${BATTERY_INTERVAL:-30}"
ACTION="''${BATTERY_CRITICAL_ACTION:-systemctl suspend}"
notify() {
notify-send -a "Battery" -u "$1" "$2" "$3"
}
get_info() {
total=0
count=0
for bat in /sys/class/power_supply/BAT*; do
[ -f "$bat/capacity" ] || continue
capacity=$(<"$bat/capacity")
status=$(<"$bat/status")
total=$((total + capacity))
count=$((count + 1))
done
[ "$count" -gt 0 ] || exit 0
percentage=$((total / count))
}
last_state=""
while true; do
get_info
if [[ "$status" == "Discharging" && "$percentage" -le "$CRITICAL" ]]; then
notify critical "Battery Critically Low" "$percentage% — suspending."
$ACTION
elif [[ "$status" == "Discharging" && "$percentage" -le "$LOW" ]]; then
if [[ "$last_state" != "low" ]]; then
notify normal "Battery Low" "$percentage% remaining."
last_state="low"
fi
elif [[ "$status" != "Discharging" && "$percentage" -ge "$FULL" ]]; then
if [[ "$last_state" != "full" ]]; then
notify normal "Battery Full" "$percentage% — unplug charger."
last_state="full"
fi
else
last_state=""
fi
sleep "$INTERVAL"
done
'';
};
};
flake.homeModules.cbatticon = _: {
# don't works. some GTK error. I let it here if someday, someone is interest in this shit.
# ChatGPT half baked a replacement that works on my system.
# see qtbatticon
services.cbatticon = {
enable = true;
lowLevelPercent = 20;
criticalLevelPercent = 5;
batteryId = "BAT1";
hideNotification = true; # we use another script for battery notifications
updateIntervalSeconds = 10;
};
};
}
+16 -2
View File
@@ -1,10 +1,24 @@
_: {
flake.nixosModules.hardwareUtils-laptop = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
flake.nixosModules.hardwareUtils-laptop = {pkgs-unstable, ...}: {
environment.systemPackages = with pkgs-unstable; [
# used for the framework 16 laptop
framework-tool
framework-tool-tui
vial # Open-source GUI and QMK fork for configuring your keyboard in real time
netwatch
(diskwatch.override {
withSmartmontools = true;
})
syswatch
];
};
flake.nixosModules.hardwareUtils-desktop = {pkgs-unstable, ...}: {
environment.systemPackages = with pkgs-unstable; [
netwatch
(diskwatch.override {
withSmartmontools = true;
})
syswatch
];
};
}
+2 -2
View File
@@ -29,6 +29,7 @@
fonts
games
hardware-configuration-desktop
hardwareUtils-desktop
hdd
hledger
hledger-desktop
@@ -38,7 +39,6 @@
latex
ly
mathematics
#mullvad #temporarly broken
networking
nixUtils
notifications
@@ -51,6 +51,7 @@
rss
udev
user
vpn
];
};
flake.homeModules.desktop = {...}: {
@@ -68,7 +69,6 @@
hyprland-desktop
kitty
librewolf
#mullvad #temporarly broken
neovim
nix-git-cherry-picker-desktop
desktop-notewrapper
+2 -2
View File
@@ -27,6 +27,7 @@
documentation
disk
disk-laptop
epfl
fonts
gitBackup
hardware-configuration-laptop
@@ -39,7 +40,6 @@
latex
ly
mathematics
#mullvad #temporarly broken
networking
nixUtils-laptop
nixUtils
@@ -51,6 +51,7 @@
rss
udev
user
vpn
];
};
flake.homeModules.laptop = {...}: {
@@ -69,7 +70,6 @@
hyprland-laptop
kitty
librewolf
#mullvad #temporarly broken
neovim
nix-git-cherry-picker-laptop
laptop-notewrapper
+12
View File
@@ -44,6 +44,18 @@ _: {
command = "${pkgs-unstable.nixos-rebuild}/bin/nixos-rebuild";
options = ["NOPASSWD"];
}
{
command = "/run/current-system/sw/bin/open";
options = ["NOPASSWD"];
}
{
command = "${pkgs.openconnect}/bin/openconnect";
options = ["NOPASSWD"];
}
{
command = "${pkgs-unstable.openconnect}/bin/openconnect";
options = ["NOPASSWD"];
}
];
}
];
+6
View File
@@ -13,5 +13,11 @@
group = "users";
mode = "0400";
};
age.secrets.epfl = {
file = ../../secrets/epfl.age;
owner = "tomasr";
group = "users";
mode = "0400";
};
};
}
@@ -4,8 +4,8 @@
libnotify # Library that sends desktop notifications to a notification daemon
socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and awww to change wallpapers dinamically)
# battery notifications
self.packages.${pkgs.system}.custom-batterynotify
self.packages.${pkgs.system}.custom-batterywarning
/*self.packages.${pkgs.system}.custom-batterynotify
self.packages.${pkgs.system}.custom-batterywarning*/
self.packages.${pkgs.system}.custom-gitnotify # checks if git is set up
self.packages.${pkgs.system}.custom-checkKdrive # check if kdrive is set up with rclone
zoom-us
+7
View File
@@ -0,0 +1,7 @@
_: {
flake.nixosModules.epfl = {pkgs, ...}: {
environment.systemPackages = with pkgs; [
openconnect
];
};
}
+1
View File
@@ -45,6 +45,7 @@
nix-index
statix
self.packages.${pkgs-unstable.system}.custom-trimmer
nix-update # nix-update <package> --build --test --format # the review will be done by nixpkgs-review-gha
];
};
perSystem = {pkgs, ...}: {
+2 -3
View File
@@ -1,7 +1,7 @@
{self, ...}: {
flake.nixosModules.otherUtils =
# try to keep packages here at a minium. Preferably use a dedicated file
{pkgs, ...}: {
{pkgs, pkgs-unstable, ...}: {
environment.systemPackages = with pkgs; [
gnome-calculator
snapshot
@@ -18,8 +18,7 @@
usbutils # used for lsusb
self.packages.${pkgs.system}.custom-tomato
self.packages.${pkgs.system}.custom-syllabes
# Electron 39 EOL. https://github.com/bitwarden/clients/pull/20448 should move it to 41. For the moment use the browser extension
#pkgs-unstable.bitwarden-desktop
pkgs-unstable.bitwarden-desktop
fluffychat # matrix client
];
};
+100
View File
@@ -0,0 +1,100 @@
# config for openconnect is in ./epfl.nix
{self, ...}: {
flake.nixosModules.vpn = {pkgs,...}: {
services.mullvad-vpn = {
enable = true;
};
environment.systemPackages = [
self.packages.${pkgs.system}.custom-vpn-picker
];
age.secrets.epfl = {
file = ../../secrets/epfl.age;
};
};
perSystem = {pkgs, ...}: {
packages.custom-vpn-picker = pkgs.writeShellApplication {
name = "custom-vpn-picker";
runtimeInputs = with pkgs; [
fzf
mullvad-compass
mullvad
openconnect
gawk
wl-clipboard
cliphist
];
text = ''
mullvad_connect () {
mullvad disconnect
mullvad relay set location "$1"
mullvad connect
}
profiles=(
"mullvad-best"
"mullvad-zurich"
"mullvad-tirana"
"mullvad-bogota"
"epfl"
"disconnect"
)
selected=$(printf "%s\n" "''${profiles[@]}" |
fzf --height 8 --reverse --prompt="Select vpn:")
[[ -z "$selected" ]] && exit 0
if [[ "$selected" == "mullvad-best" ]]; then
mullvad_connect "$(
mullvad-compass |
awk '/Best server:/ {
getline
split($1, a, "-")
print a[1]
}'
)"
elif [[ "$selected" == "mullvad-zurich" ]]; then
mullvad_connect ch
elif [[ "$selected" == "mullvad-tirana" ]]; then
mullvad_connect al
elif [[ "$selected" == "mullvad-bogota" ]]; then
mullvad_connect co
elif [[ "$selected" == "epfl" ]]; then
# shellcheck disable=SC1091
source /run/agenix/epfl
# Put password in clipboard so it can be pasted into openconnect.
printf '%s' "$EPFL_VPN_PASSWORD" | wl-copy
sudo openconnect \
--background \
--pid-file="$HOME/.local/state/epfl-openconnect.pid" \
--server="$EPFL_VPN_SERVER" \
--user="$EPFL_VPN_USER"
# Remove the password from cliphist and clear the current clipboard.
cliphist delete-query "$EPFL_VPN_PASSWORD" || true
wl-copy --clear
elif [[ "$selected" == "disconnect" ]]; then
if [[ -f "$HOME/.local/state/epfl-openconnect.pid" ]]; then
sudo kill "$(cat "$HOME/.local/state/epfl-openconnect.pid")" 2>/dev/null || true
fi
mullvad disconnect
rm "$HOME/.local/state/epfl-openconnect.pid"
fi
pkill -f "kitty.*Select vpn option" || true
exit
'';
};
};
}
+1
View File
@@ -0,0 +1 @@
Migrating from hyprlang to lua is really difficult with home-manager. I tried to do it, but a some point half my keybinds stopped working and the nix language made everything much more difficult to debug. So what we will do is have a hyprland.lua which will import a host.lua (for laptop/desktop specific configuration). Both of them will be copied by home-manager. For the migration from .conf to .lua we will use some publicly available [website](https://eiontusk.github.io/hyprlang2lua/).
+299
View File
@@ -0,0 +1,299 @@
exec-once = /nix/store/8kih8alkk4qzgjchg5501r1c3a8a71aw-dbus-1.16.2/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target
$browser=kitty --class "custom-browserprofiles" --name "Select browser profile" --hold custom-browserprofiles
$editor=nvim
$file=dolphin
$mod=SUPER
$notes=kitty --class "custom-obsidianvaults" --name "Select Obsidian vault" --hold custom-obsidianvaults
$term=kitty
animations {
bezier=wind, 0.05, 0.9, 0.1, 1.05
bezier=winIn, 0.1, 1.1, 0.1, 1.1
bezier=winOut, 0.3, -0.3, 0, 1
bezier=liner, 1, 1, 1, 1
animation=windows, 1, 6, wind, slide
animation=windowsIn, 1, 6, winIn, slide
animation=windowsOut, 1, 5, winOut, slide
animation=windowsMove, 1, 5, wind, slide
animation=border, 1, 1, liner
animation=borderangle, 1, 30, liner, loop
animation=fade, 1, 10, default
animation=workspaces, 1, 5, wind
enabled=true
}
bind=$mod, W, togglefloating
bind=$mod, G, togglegroup
bind=Alt, Return, fullscreen
bind=$mod, Left, movefocus, l
bind=$mod, Right, movefocus, r
bind=$mod, Up, movefocus, u
bind=$mod, Down, movefocus, d
bind=Alt, Tab, movefocus, d
bind=$mod, 1, workspace, 1
bind=$mod, 2, workspace, 2
bind=$mod, 3, workspace, 3
bind=$mod, 4, workspace, 4
bind=$mod, 5, workspace, 5
bind=$mod, 6, workspace, 6
bind=$mod, 7, workspace, 7
bind=$mod, 8, workspace, 8
bind=$mod, 9, workspace, 9
bind=$mod, 0, workspace, 10
bind=$mod+Ctrl, Right, workspace, r+1
bind=$mod+Ctrl, Left, workspace, r-1
bind=$mod+Ctrl, Doown, workspace, empty
bind=$mod+Shift, 1, movetoworkspace, 1
bind=$mod+Shift, 2, movetoworkspace, 2
bind=$mod+Shift, 3, movetoworkspace, 3
bind=$mod+Shift, 4, movetoworkspace, 4
bind=$mod+Shift, 5, movetoworkspace, 5
bind=$mod+Shift, 6, movetoworkspace, 6
bind=$mod+Shift, 7, movetoworkspace, 7
bind=$mod+Shift, 8, movetoworkspace, 8
bind=$mod+Shift, 9, movetoworkspace, 9
bind=$mod+Shift, 0, movetoworkspace, 10
bind=$mod+Ctrl+Alt, Right, movetoworkspace, r+1
bind=$mod+Ctrl+Alt, Left, movetoworkspace, r-1
bind=$mod, Backspace, exec, caelestia shell drawers toggle session
bind=$mod+Shift+Ctrl, Left, movewindow, l
bind=$mod+Shift+Ctrl, Right, movewindow, r
bind=$mod+Shift+Ctrl, Up, movewindow, u
bind=$mod+Shift+Ctrl, Down, movewindow, d
bind=$mod, mouse_down, workspace, e+1
bind=$mod, mouse_up, workspace, e-1
bind=$mod, V, exec, cliphist list | rofi -dmenu| cliphist decode | wl-copy
bind=$mod, B, exec, hyprkeys -bkr | rofi -dmenu
bind=$mod, S, togglespecialworkspace,
bind=Alt+$mod, S, movetoworkspace, special
bind=$mod, A, layoutmsg, move -col
bind=$mod, D, layoutmsg, move +col
bind=$mod, T, exec, $term
bind=$mod, E, exec, $file
bind=$mod, F, exec, $browser
bind=$mod, N, exec, $notes
bind=$mod+Shift, A, exec, caelestia shell drawers toggle launcher
bind=$mod, Q, exec, custom-dontkillsteam
bind=Ctrl+Alt, W, exec, caelestia shell drawers toggle sidebar
bind=$mod, L, exec, caelestia shell lock lock
bind=, F11, exec, caelestia screenshot
bind=$mod_SHIFT, S, exec, caelestia shell picker open
bind=Ctrl+$mod, 6, exec, custom-killall
bind=Ctrl+Alt, 7, exec, custom-performance
bind=Ctrl+Alt, 1, exec, caelestia shell drawers toggle sidebar
bind=Ctrl+$mod, 4, exec, caelestia shell notifs toggleDnd
bind=Ctrl+$mod, 3, exec, pavucontrol
bind=Ctrl+Shift+Alt, 0, exec, kitty --hold --class "custom-changeAudioOutput" --name "Select audio output" zsh -c "custom-changeAudioOutput"
bind=Ctrl+$mod, 5, exec, gnome-characters
bind=Ctrl+Alt, 8, exec, hyprpicker | tee >(wl-copy) | cliphist store
bind=Ctrl+Alt, 0, exec, custom-tomato
bind=Ctrl+Alt, 2, exec, custom-bottom
bind=Ctrl+Alt, 9, exec, anki
binde=$mod+Shift, Right, resizeactive, 30 0
binde=$mod+Shift, Left, resizeactive, -30, 0
binde=$mod+Shift, Up, resizeactive, 0 -30
binde=$mod+Shift, Down, resizeactive,m 0 30
bindel=, F2, exec, pactl set-sink-volume @DEFAULT_SINK@ -10%
bindel=, F3, exec, pactl set-sink-volume @DEFAULT_SINK@ +10%
bindel=, F7, exec, brightnessctl s 10%-
bindel=, F8, exec, brightnessctl s +10%
bindl=, F1, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle
bindl=, F5, exec, playerctl play-pause
bindl=, F4, exec, playerctl previous
bindl=, F6, exec, playerctl next
bindm=$mod, mouse:272, movewindow
bindm=$mod, mouse:273, resizewindow
bindm=$mod, Z, movewindow
bindm=$mod, X, resizewindow
decoration {
blur {
enabled=true
ignore_opacity=true
new_optimizations=true
passes=2
size=4
special=true
}
dim_special=0.300000
rounding=18
}
dwindle {
preserve_split=true
}
env=PATH, $PATH:$scrPath
env=XDG_CURRENT_DESKTOP,Hyprland
env=XDG_SESSION_TYPE,wayland
env=XDG_SESSION_DESKTOP,Hyprland
env=QT_QPA_PLATFORM,wayland;xcb
env=QT_QPAPLATFORMTHEME,qt6ct
env=QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env=MOZ_ENABLE_WAYLAND,1
env=GDK_SCALE,1
exec-once=qtbatticon
exec-once=source /run/agenix/ntfy && nixpkgs-notifier listen
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=dbus-update-activation-environment --systemd --all
exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=systemctl --user start xdg-desktop-portal-wlr.service
exec-once=blueman-applet
exec-once=udiskie --no-automount --smart-tray
exec-once=nm-applet --indicator
exec-once=rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store
exec-once=custom-batterynotify
exec-once=custom-batterywarning
exec-once=awww img /nix/store/30py8zav0pbsbcvcll5017hwz07fxmr0-wallpaper1.jpg
exec-once=awww-daemon
exec-once=sleep 1 && custom-wallpaper
exec-once=custom-checkKdrive && custom-mountkdrive
exec-once=custom-gitnotify
exec-once=sleep 4 & caelestia-shell
exec-once=sleep 20 && ngcp pull --automatic
general {
border_size=4
col.active_border=rgba(ca6702ff) rgba(ecd3a0ff) 45deg
col.inactive_border=rgba(f1dca7d9) rgba(ffe1a8d9) 45deg
gaps_in=5
gaps_out=15
layout=dwindle
resize_on_border=true
}
gesture=3, right, move, +col
gesture=3, left, move, -col
group {
col.border_active=rgba(ca6702ff) rgba(ecd3a0ff) 45deg
col.border_inactive=rgba(f1dca7d9) rgba(ffe1a8d9) 45deg
col.border_locked_active=rgba(ca6702ff) rgba(ecd3a0ff) 45deg
col.border_locked_inactive=rgba(f1dca7d9) rgba(ffe1a8d9) 45deg
}
input {
kb_layout=ch
follow_mouse=1
force_no_accel=1
sensitivity=0
}
layerrule=blur on, ignore_alpha 0, match:namespace rofi
layerrule=blur on, ignore_alpha 0, match:namespace notifications
layerrule=blur on, ignore_alpha 0, match:namespace swaync-notification-window
layerrule=blur on, ignore_alpha 0, match:namespace swaync-control-center
layerrule=blur on, match:namespace logout_dialog
misc {
force_default_wallpaper=0
vrr=0
}
monitor=eDP-1, highres@highrr, 0x0, 1
monitor=HDMI-A-1, highres2highrr, auto-left, 1
plugin:dynamic-cursors {
rotate {
length=20
offset=0
}
shake {
base=4.000000
effects=true
enabled=true
influence=0.000000
ipc=false
limit=0.000000
nearest=true
speed=4.000000
threshold=4
timeout=2000
}
enabled=true
mode=rotate
threshold=2
}
plugin:overview {
disableBlur=true
disableGestures=true
showEmptyWorkspace=true
workspaceActiveBorder=rgb(ab7746)
}
scrolling {
column_width=0.450000
}
windowrule=opacity 0.90 0.90, match:class ^(firefox)$
windowrule=opacity 0.90 0.90, match:class ^(Brave-browser)$
windowrule=opacity 0.80 0.80, match:class ^(code-oss)$
windowrule=opacity 0.80 0.80, match:class ^(Code)$
windowrule=opacity 0.80 0.80, match:class ^(code-url-handler)$
windowrule=opacity 0.80 0.80, match:class ^(code-insiders-url-handler)$
windowrule=opacity 0.75 0.75, match:class ^(kitty)$
windowrule=opacity 0.80 0.80, match:class ^(org.kde.dolphin)$
windowrule=opacity 0.80 0.80, float on, match:class ^(org.kde.ark)$
windowrule=opacity 0.80 0.80, float on, match:class ^(nwg-look)$
windowrule=opacity 0.80 0.80, float on, match:class ^(qt5ct)$
windowrule=opacity 0.80 0.80, float on, match:class ^(qt6ct)$
windowrule=opacity 0.80 0.80, float on, match:class ^(kvantummanager)$
windowrule=opacity 0.80 0.70, float on, match:class ^(org.pulseaudio.pavucontrol)$
windowrule=opacity 0.80 0.70, float on, match:class ^(blueman-manager)$
windowrule=opacity 0.80 0.70, float on, match:class ^(nm-applet)$
windowrule=opacity 0.80 0.70, float on, match:class ^(nm-connection-editor)$
windowrule=opacity 0.80 0.70, float on, match:class ^(org.kde.polkit-kde-authentication-agent-1)$
windowrule=opacity 0.80 0.70, match:class ^(polkit-gnome-authentication-agent-1)$
windowrule=opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.gtk)$
windowrule=opacity 0.80 0.70, match:class ^(org.freedesktop.impl.portal.desktop.hyprland)$
windowrule=opacity 0.70 0.70, match:class ^([Ss]team)$
windowrule=opacity 0.70 0.70, match:class ^(steamwebhelper)$
windowrule=opacity 0.70 0.70, match:class ^(Spotify)$
windowrule=opacity 0.70 0.70, match:initial_title ^(Spotify Free)$
windowrule=opacity 0.90 0.90, float on, match:class ^(com.github.rafostar.Clapper)$
windowrule=opacity 0.80 0.80, match:class ^(com.github.tchx84.Flatseal)$
windowrule=opacity 0.80 0.80, match:class ^(hu.kramo.Cartridges)$
windowrule=opacity 0.80 0.80, match:class ^(com.obsproject.Studio)$
windowrule=opacity 0.80 0.80, match:class ^(gnome-boxes)$
windowrule=opacity 0.80 0.80, match:class ^(discord)$
windowrule=opacity 0.80 0.80, match:class ^(WebCord)$
windowrule=opacity 0.80 0.80, match:class ^(ArmCord)$
windowrule=opacity 0.80 0.80, float on, match:class ^(app.drey.Warp)$
windowrule=opacity 0.80 0.80, float on, match:class ^(net.davidotek.pupgui2)$
windowrule=opacity 0.80 0.80, float on, match:class ^(yad)$
windowrule=opacity 0.80 0.80, float on, match:class ^(Signal)$
windowrule=opacity 0.80 0.80, float on, match:class ^(io.github.alainm23.planify)$
windowrule=opacity 0.80 0.80, float on, match:class ^(io.gitlab.theevilskeleton.Upscaler)$
windowrule=opacity 0.80 0.80, float on, match:class ^(com.github.unrud.VideoDownloader)$
windowrule=opacity 0.80 0.80, float on, match:class ^(io.gitlab.adhami3310.Impression)$
windowrule=opacity 0.80 0.80, float on, match:class ^(io.missioncenter.MissionCenter)$
windowrule=opacity 0.80 0.80, match:class ^(io.github.flattool.Warehouse)$
windowrule=float on, match:class ^(org.kde.dolphin)$, match:title ^(Progress Dialog — Dolphin)$
windowrule=float on, match:class ^(org.kde.dolphin)$, match:title ^(Copying — Dolphin)$
windowrule=float on, match:class ^(firefox)$, match:title ^(Picture-in-Picture)$
windowrule=float on, match:class ^(firefox)$, match:title ^(Library)$
windowrule=float on, match:class ^(kitty)$, match:title ^(top)$
windowrule=float on, match:class ^(kitty)$, match:title ^(btop)$
windowrule=float on, match:class ^(kitty)$, match:title ^(htop)$
windowrule=float on, match:class ^(vlc)$
windowrule=float on, match:class ^(eog)$
windowrule=float on, size 400 225, match:class ^(custom-browserprofiles)$
windowrule=float on, size 1050 200, match:class ^(custom-changeAudioOutput)$
windowrule=float on, size 400 175, match:class ^(custom-obsidianvaults)$
windowrule=float on, size 600 600, match:initial_class ^(custom-pomodoro)$
windowrule=float on, size 1500 800, match:initial_class ^(custom-bottom)$
workspace=1, layout:master
workspace=2, layout:scrolling, layoutopt:direction:right
workspace=name:special, layout:scrolling
xwayland {
force_zero_scaling=true
}
splash=true
+948
View File
@@ -0,0 +1,948 @@
local browser = "kitty --class \"custom-browserprofiles\" --name \"Select browser profile\" --hold custom-browserprofiles"
local editor = "nvim"
local file = "dolphin"
local mod = "SUPER"
local notes = "kitty --class \"custom-obsidianvaults\" --name \"Select Obsidian vault\" --hold custom-obsidianvaults"
local term = "kitty"
local function close_or_move_special()
local window = hl.get_active_window()
if not window then
return
end
local class = window.class or window.initial_class
if class == "Steam" or class == "custom-pomodoro" then
hl.dispatch(hl.dsp.window.move({ workspace = "special" }))
else
hl.dispatch(hl.dsp.window.close({ window = window }))
end
end
local function close_other_windows()
local active = hl.get_active_window()
local workspace = hl.get_active_workspace()
if not active or not workspace then
return
end
for _, window in pairs(hl.get_windows()) do
if window.workspace
and window.workspace.id == workspace.id
and window.address ~= active.address
then
hl.dispatch(hl.dsp.window.close({ window = window }))
end
end
end
local wallpapers_enabled = true
local wallpapers = {
[1] = "WALLPAPER1/PATH/PLACEHOLDER",
[2] = "WALLPAPER2/PATH/PLACEHOLDER",
[3] = "WALLPAPER3/PATH/PLACEHOLDER",
[4] = "WALLPAPER4/PATH/PLACEHOLDER",
[5] = "WALLPAPER5/PATH/PLACEHOLDER",
[6] = "WALLPAPER1/PATH/PLACEHOLDER",
[7] = "WALLPAPER2/PATH/PLACEHOLDER",
[8] = "WALLPAPER3/PATH/PLACEHOLDER",
[9] = "WALLPAPER4/PATH/PLACEHOLDER",
[10] = "WALLPAPER5/PATH/PLACEHOLDER",
}
local function set_wallpaper(workspace)
if not wallpapers_enabled then
return
end
local wallpaper = wallpapers[workspace.id]
if wallpaper then
hl.exec_cmd("awww img -t none " .. wallpaper)
end
end
hl.on("workspace.active", set_wallpaper)
local performance_mode = false
local saved_brightness = nil
local function get_brightness()
local handle = io.popen("brightnessctl get 2>/dev/null")
if not handle then
return nil
end
local value = handle:read("*a")
handle:close()
if not value then
return nil
end
value = value:gsub("%s+$", "")
return tonumber(value)
end
local function set_performance_mode()
if performance_mode then
hl.monitor({
output = "eDP-1",
mode = "2560x1600@165",
position = "0x0",
scale = 1,
})
hl.exec_cmd("pkill swaync || true")
hl.exec_cmd("pkill waybar || true")
hl.exec_cmd("caelestia shell -d")
if saved_brightness then
hl.exec_cmd("brightnessctl set " .. saved_brightness)
end
saved_brightness = nil
wallpapers_enabled = true
performance_mode = false
hl.exec_cmd("hyprctl reload")
local workspace = hl.get_active_workspace()
if workspace then
set_wallpaper(workspace)
end
hl.notification.create({
text = "Battery Saver",
subtext = "Disabled",
timeout = 3000,
})
return
end
-- Save current brightness.
saved_brightness = get_brightness()
-- Lower refresh rate.
hl.monitor({
output = "eDP-1",
mode = "2560x1600@60",
position = "0x0",
scale = 1,
})
-- Stop heavy UI components.
hl.exec_cmd("pkill -f caelestia-shell || true")
hl.exec_cmd("pkill -f caelestia || true")
-- Start lightweight notification daemon.
hl.exec_cmd("pkill swaync || true")
hl.exec_cmd("swaync")
-- Start lightweight status bar.
hl.exec_cmd("pkill waybar || true")
hl.exec_cmd("waybar")
-- Disable expensive Hyprland effects.
hl.config({
animations = {
enabled = false,
},
decoration = {
shadow = {
enabled = false,
},
blur = {
enabled = false,
},
rounding = 0,
fullscreen_opacity = 1,
active_opacity = 1,
inactive_opacity = 1,
},
general = {
gaps_in = 0,
gaps_out = 0,
border_size = 1,
},
misc = {
vfr = 1,
},
})
-- Lower brightness.
hl.exec_cmd("brightnessctl set 5%")
-- Disable workspace wallpaper switching.
wallpapers_enabled = false
performance_mode = true
hl.notification.create({
text = "Battery Saver",
subtext = "Enabled",
timeout = 3000,
})
end
hl.curve("wind", { type = "bezier", points = { { 0.05, 0.9 }, { 0.1, 1.05 } } })
hl.curve("winIn", { type = "bezier", points = { { 0.1, 1.1 }, { 0.1, 1.1 } } })
hl.curve("winOut", { type = "bezier", points = { { 0.3, -0.3 }, { 0, 1 } } })
hl.curve("liner", { type = "bezier", points = { { 1, 1 }, { 1, 1 } } })
hl.animation({
leaf = "windows",
enabled = true,
speed = 6,
bezier = "wind",
style = "slide",
})
hl.animation({
leaf = "windowsIn",
enabled = true,
speed = 6,
bezier = "winIn",
style = "slide",
})
hl.animation({
leaf = "windowsOut",
enabled = true,
speed = 5,
bezier = "winOut",
style = "slide",
})
hl.animation({
leaf = "windowsMove",
enabled = true,
speed = 5,
bezier = "wind",
style = "slide",
})
hl.animation({
leaf = "border",
enabled = true,
speed = 1,
bezier = "liner",
})
hl.animation({
leaf = "borderangle",
enabled = true,
speed = 30,
bezier = "liner",
style = "loop",
})
hl.animation({
leaf = "fade",
enabled = true,
speed = 10,
bezier = "default",
})
hl.animation({
leaf = "workspaces",
enabled = true,
speed = 5,
bezier = "wind",
})
hl.bind(mod .. " + W", hl.dsp.window.float({ action = "toggle" }))
hl.bind(mod .. " + G", hl.dsp.group.toggle())
hl.bind("ALT + Return", hl.dsp.window.fullscreen({ mode = "fullscreen", action = "toggle" }))
hl.bind(mod .. " + Left", hl.dsp.focus({ direction = "left" }))
hl.bind(mod .. " + Right", hl.dsp.focus({ direction = "right" }))
hl.bind(mod .. " + CTRL + D", hl.dsp.layout("swapcol r"))
hl.bind(mod .. " + CTRL + A", hl.dsp.layout("swapcol l"))
hl.bind(mod .. " + Up", hl.dsp.focus({ direction = "up" }))
hl.bind(mod .. " + Down", hl.dsp.focus({ direction = "down" }))
hl.bind("ALT + Tab", hl.dsp.focus({ direction = "down" }))
hl.bind(mod .. " + 1", hl.dsp.focus({ workspace = 1 }))
hl.bind(mod .. " + 2", hl.dsp.focus({ workspace = 2 }))
hl.bind(mod .. " + 3", hl.dsp.focus({ workspace = 3 }))
hl.bind(mod .. " + 4", hl.dsp.focus({ workspace = 4 }))
hl.bind(mod .. " + 5", hl.dsp.focus({ workspace = 5 }))
hl.bind(mod .. " + 6", hl.dsp.focus({ workspace = 6 }))
hl.bind(mod .. " + 7", hl.dsp.focus({ workspace = 7 }))
hl.bind(mod .. " + 8", hl.dsp.focus({ workspace = 8 }))
hl.bind(mod .. " + 9", hl.dsp.focus({ workspace = 9 }))
hl.bind(mod .. " + 0", hl.dsp.focus({ workspace = 10 }))
hl.bind(mod .. " + CTRL + Right", hl.dsp.focus({ workspace = "r+1" }))
hl.bind(mod .. " + CTRL + Left", hl.dsp.focus({ workspace = "r-1" }))
hl.bind(mod .. " + CTRL + Down", hl.dsp.focus({ workspace = "empty" }))
hl.bind(mod .. " + SHIFT + 1", hl.dsp.window.move({ workspace = 1 }))
hl.bind(mod .. " + SHIFT + 2", hl.dsp.window.move({ workspace = 2 }))
hl.bind(mod .. " + SHIFT + 3", hl.dsp.window.move({ workspace = 3 }))
hl.bind(mod .. " + SHIFT + 4", hl.dsp.window.move({ workspace = 4 }))
hl.bind(mod .. " + SHIFT + 5", hl.dsp.window.move({ workspace = 5 }))
hl.bind(mod .. " + SHIFT + 6", hl.dsp.window.move({ workspace = 6 }))
hl.bind(mod .. " + SHIFT + 7", hl.dsp.window.move({ workspace = 7 }))
hl.bind(mod .. " + SHIFT + 8", hl.dsp.window.move({ workspace = 8 }))
hl.bind(mod .. " + SHIFT + 9", hl.dsp.window.move({ workspace = 9 }))
hl.bind(mod .. " + SHIFT + 0", hl.dsp.window.move({ workspace = 10 }))
hl.bind(mod .. " + CTRL + ALT + Right", hl.dsp.window.move({ workspace = "r+1" }))
hl.bind(mod .." + CTRL + ALT + Left", hl.dsp.window.move({ workspace = "r-1" }))
hl.bind(mod .. " + Backspace", hl.dsp.exec_cmd("caelestia shell drawers toggle session"))
hl.bind(mod .. " + SHIFT + CTRL + Left", hl.dsp.window.move({ direction = "l" }))
hl.bind(mod .. " + SHIFT + CTRL + Right", hl.dsp.window.move({ direction = "r" }))
hl.bind(mod .. " + SHIFT + CTRL + Up", hl.dsp.window.move({ direction = "u" }))
hl.bind(mod .. " + SHIFT + CTRL + Down", hl.dsp.window.move({ direction = "d" }))
hl.bind(mod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
hl.bind(mod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
hl.bind(mod .. " + V", hl.dsp.exec_cmd("cliphist list | rofi -dmenu| cliphist decode | wl-copy"))
hl.bind(mod .. " + B", hl.dsp.exec_cmd("hyprkeys -bkr | rofi -dmenu"))
hl.bind(mod .. " + S", hl.dsp.workspace.toggle_special(""))
hl.bind(mod .. " + ALT + S", hl.dsp.window.move({ workspace = "special" }))
hl.bind(mod .. " + A", hl.dsp.layout("move -col"))
hl.bind(mod .. " + D", hl.dsp.layout("move +col"))
hl.bind(mod .. " + T", hl.dsp.exec_cmd(term))
hl.bind(mod .. " + E", hl.dsp.exec_cmd(file))
hl.bind(mod .. " + F", hl.dsp.exec_cmd(browser))
hl.bind(mod .. " + N", hl.dsp.exec_cmd("kitty --hold --class \"custom-vpn-picker\" --name \"Select vpn option\" custom-vpn-picker"))
hl.bind(mod .. " + SHIFT + A", hl.dsp.exec_cmd("caelestia shell drawers toggle launcher"))
hl.bind(mod .. " + Q", close_or_move_special)
local function toggle_sidebar()
if performance_mode then
hl.exec_cmd("swaync-client -t")
else
hl.exec_cmd("caelestia shell drawers toggle sidebar")
end
end
hl.bind("CTRL + ALT + W", toggle_sidebar)
hl.bind(mod .. " + L", hl.dsp.exec_cmd("caelestia shell lock lock"))
hl.bind("F11", hl.dsp.exec_cmd("caelestia screenshot"))
hl.bind(mod .. " + SHIFT + S", hl.dsp.exec_cmd("caelestia shell picker open"))
hl.bind(mod .. " + CTRL + 6", close_other_windows)
hl.bind("CTRL + ALT + 7", set_performance_mode)
hl.bind("CTRL + ALT + 1", hl.dsp.exec_cmd("caelestia shell drawers toggle sidebar"))
hl.bind(mod .. " + CTRL + 4", hl.dsp.exec_cmd("caelestia shell notifs toggleDnd"))
hl.bind(mod .. " + CTRL + 3", hl.dsp.exec_cmd("pavucontrol"))
hl.bind("CTRL + SHIFT + ALT + 0", hl.dsp.exec_cmd("kitty --hold --class \"custom-changeAudioOutput\" --name \"Select audio output\" zsh -c \"custom-changeAudioOutput\""))
hl.bind(mod .. " + CTRL + 5", hl.dsp.exec_cmd("gnome-characters"))
hl.bind("CTRL + ALT + 8", hl.dsp.exec_cmd("hyprpicker | tee >(wl-copy) | cliphist store"))
hl.bind("CTRL + ALT + 0", hl.dsp.exec_cmd("custom-tomato"))
hl.bind("CTRL + ALT + 2", hl.dsp.exec_cmd("custom-bottom"))
hl.bind("CTRL + ALT + 9", hl.dsp.exec_cmd("anki"))
hl.bind(mod .. " + SHIFT + Right", hl.dsp.window.resize({ x = 30, y = 0, relative = true }), { repeating = true })
-- TODO: manual review on line 93 — resizeactive: expected 'X Y' or 'X% Y%', got "-30"
-- hl.bind("SUPER + SHIFT + Left", hl.dsp.resizeactive(-30, 0), { repeating = true })
hl.bind(mod .. " + SHIFT + Up", hl.dsp.window.resize({ x = 0, y = -30, relative = true }), { repeating = true })
-- TODO: manual review on line 95 — resizeactive: expected 'X Y' or 'X% Y%', got "m 0 30"
-- hl.bind("SUPER + SHIFT + Down", hl.dsp.resizeactive("m 0 30"), { repeating = true })
hl.bind("F2", hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ -10%"), { locked = true, repeating = true })
hl.bind("F3", hl.dsp.exec_cmd("pactl set-sink-volume @DEFAULT_SINK@ +10%"), { locked = true, repeating = true })
hl.bind("F7", hl.dsp.exec_cmd("brightnessctl s 10%-"), { locked = true, repeating = true })
hl.bind("F8", hl.dsp.exec_cmd("brightnessctl s +10%"), { locked = true, repeating = true })
hl.bind("F1", hl.dsp.exec_cmd("pactl set-sink-mute @DEFAULT_SINK@ toggle"), { locked = true })
hl.bind("F5", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
hl.bind("F4", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
hl.bind("F6", hl.dsp.exec_cmd("playerctl next"), { locked = true })
hl.bind(mod .. " + mouse:272", hl.dsp.window.drag())
hl.bind(mod .. " + mouse:273", hl.dsp.window.resize())
hl.bind(mod .. " + Z", hl.dsp.window.drag())
hl.bind(mod .. " + X", hl.dsp.window.resize())
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
hl.env("XDG_SESSION_TYPE", "wayland")
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
hl.env("QT_QPAPLATFORMTHEME", "qt6ct")
hl.env("QT_WAYLAND_DISABLE_WINDOWDECORATION", "1")
hl.env("MOZ_ENABLE_WAYLAND", "1")
hl.env("GDK_SCALE", "1")
hl.gesture({
fingers = 3,
direction = "horizontal",
action = "scroll_move",
})
hl.gesture({
fingers = 2,
direction = "pinch",
action = "cursor_zoom",
mode = "live",
})
--hl.layer_rule({
-- match = { namespace = "ignore_alpha 0" },
-- TODO: manual review — unmapped layer rule: "blur on"
-- TODO: manual review — unmapped layer rule: "blur on"
-- TODO: manual review — unmapped layer rule: "blur on"
-- TODO: manual review — unmapped layer rule: "blur on"
--})
--hl.layer_rule({
-- match = { namespace = "match:namespace logout_dialog" },
-- TODO: manual review — unmapped layer rule: "blur on"
--)
hl.monitor({
output = "eDP-1",
mode = "highres@highrr",
position = "0x0",
scale = "1",
})
hl.monitor({
output = "HDMI-A-1",
mode = "highres2highrr",
position = "auto-left",
scale = "1",
})
-- TODO: manual review — plugin section 'dynamic-cursors'. The new Lua API exposes plugins via hl.plugin.<name>(...) — wire up per the plugin's docs.
--[[
rotate { ... }
shake { ... }
enabled = true
mode = rotate
threshold = 2
]]
-- TODO: manual review — plugin section 'overview'. The new Lua API exposes plugins via hl.plugin.<name>(...) — wire up per the plugin's docs.
--[[
disableBlur = true
disableGestures = true
showEmptyWorkspace = true
workspaceActiveBorder = rgb(ab7746)
]]
hl.window_rule({
match = {
class = "^(firefox)$",
},
opacity = "0.90 0.90",
})
hl.window_rule({
match = {
class = "^(Brave-browser)$",
},
opacity = "0.90 0.90",
})
hl.window_rule({
match = {
class = "^(code-oss)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(Code)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(code-url-handler)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(code-insiders-url-handler)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(kitty)$",
},
opacity = "0.75 0.75",
})
hl.window_rule({
match = {
class = "^(org.kde.dolphin)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(org.kde.ark)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(nwg-look)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(qt5ct)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(qt6ct)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(kvantummanager)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(org.pulseaudio.pavucontrol)$",
},
opacity = "0.80 0.70",
float = true,
})
hl.window_rule({
match = {
class = "^(blueman-manager)$",
},
opacity = "0.80 0.70",
float = true,
})
hl.window_rule({
match = {
class = "^(nm-applet)$",
},
opacity = "0.80 0.70",
float = true,
})
hl.window_rule({
match = {
class = "^(nm-connection-editor)$",
},
opacity = "0.80 0.70",
float = true,
})
hl.window_rule({
match = {
class = "^(org.kde.polkit-kde-authentication-agent-1)$",
},
opacity = "0.80 0.70",
float = true,
})
hl.window_rule({
match = {
class = "^(polkit-gnome-authentication-agent-1)$",
},
opacity = "0.80 0.70",
})
hl.window_rule({
match = {
class = "^(org.freedesktop.impl.portal.desktop.gtk)$",
},
opacity = "0.80 0.70",
})
hl.window_rule({
match = {
class = "^(org.freedesktop.impl.portal.desktop.hyprland)$",
},
opacity = "0.80 0.70",
})
hl.window_rule({
match = {
class = "^([Ss]team)$",
},
opacity = "0.70 0.70",
})
hl.window_rule({
match = {
class = "^(steamwebhelper)$",
},
opacity = "0.70 0.70",
})
hl.window_rule({
match = {
class = "^(Spotify)$",
},
opacity = "0.70 0.70",
})
hl.window_rule({
match = {
initial_title = "^(Spotify Free)$",
},
opacity = "0.70 0.70",
})
hl.window_rule({
match = {
class = "^(com.github.rafostar.Clapper)$",
},
opacity = "0.90 0.90",
float = true,
})
hl.window_rule({
match = {
class = "^(com.github.tchx84.Flatseal)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(hu.kramo.Cartridges)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(com.obsproject.Studio)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(gnome-boxes)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(discord)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(WebCord)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(ArmCord)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(app.drey.Warp)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(net.davidotek.pupgui2)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(yad)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(Signal)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(io.github.alainm23.planify)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(io.gitlab.theevilskeleton.Upscaler)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(com.github.unrud.VideoDownloader)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(io.gitlab.adhami3310.Impression)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(io.missioncenter.MissionCenter)$",
},
opacity = "0.80 0.80",
float = true,
})
hl.window_rule({
match = {
class = "^(io.github.flattool.Warehouse)$",
},
opacity = "0.80 0.80",
})
hl.window_rule({
match = {
class = "^(org.kde.dolphin)$",
title = "^(Progress Dialog — Dolphin)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(org.kde.dolphin)$",
title = "^(Copying — Dolphin)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(firefox)$",
title = "^(Picture-in-Picture)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(firefox)$",
title = "^(Library)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(kitty)$",
title = "^(top)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(kitty)$",
title = "^(btop)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(kitty)$",
title = "^(htop)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(vlc)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(eog)$",
},
float = true,
})
hl.window_rule({
match = {
class = "^(custom-browserprofiles)$",
},
float = true,
size = "400 225",
})
hl.window_rule({
match = {
class = "^(custom-vpn-picker)$",
},
float = true,
size = "350 250",
})
hl.window_rule({
match = {
class = "^(custom-changeAudioOutput)$",
},
float = true,
size = "1050 200",
})
hl.window_rule({
match = {
class = "^(custom-obsidianvaults)$",
},
float = true,
size = "400 175",
})
hl.window_rule({
match = {
initial_class = "^(custom-pomodoro)$",
},
float = true,
size = "600 600",
})
hl.window_rule({
match = {
initial_class = "^(custom-bottom)$",
},
float = true,
size = "1500 800",
})
hl.workspace_rule({
workspace = "1",
layout = "master",
})
hl.workspace_rule({
workspace = "2",
layout = "scrolling",
})
hl.workspace_rule({
workspace = "special",
layout = "scrolling",
})
-- TODO: manual review — top-level key 'splash = true' has no enclosing section
hl.config({
animations = {
enabled = true,
},
decoration = {
blur = {
enabled = true,
ignore_opacity = true,
new_optimizations = true,
passes = 2,
size = 4,
special = true,
},
dim_special = 0.300000,
rounding = 18,
},
dwindle = {
preserve_split = true,
},
general = {
border_size = 4,
col = {
active_border = { colors = { "rgba(ca6702ff)", "rgba(ecd3a0ff)" }, angle = 45 },
inactive_border = { colors = { "rgba(f1dca7d9)", "rgba(ffe1a8d9)" }, angle = 45 },
},
gaps_in = 5,
gaps_out = 15,
layout = "dwindle",
resize_on_border = true,
},
group = {
col = {
border_active = { colors = { "rgba(ca6702ff)", "rgba(ecd3a0ff)" }, angle = 45 },
border_inactive = { colors = { "rgba(f1dca7d9)", "rgba(ffe1a8d9)" }, angle = 45 },
border_locked_active = { colors = { "rgba(ca6702ff)", "rgba(ecd3a0ff)" }, angle = 45 },
border_locked_inactive = { colors = { "rgba(f1dca7d9)", "rgba(ffe1a8d9)" }, angle = 45 },
},
},
input = {
kb_layout = "ch",
follow_mouse = 1,
force_no_accel = 1,
sensitivity = 0,
},
misc = {
force_default_wallpaper = 0,
vrr = 0,
},
scrolling = {
column_width = 0.450000,
},
xwayland = {
force_zero_scaling = true,
},
})
hl.on("hyprland.start", function()
hl.exec_cmd("/nix/store/8kih8alkk4qzgjchg5501r1c3a8a71aw-dbus-1.16.2/bin/dbus-update-activation-environment --systemd DISPLAY HYPRLAND_INSTANCE_SIGNATURE WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE && systemctl --user stop hyprland-session.target && systemctl --user start hyprland-session.target")
hl.exec_cmd("source /run/agenix/ntfy && nixpkgs-notifier listen")
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("dbus-update-activation-environment --systemd --all")
hl.exec_cmd("systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP")
hl.exec_cmd("systemctl --user start xdg-desktop-portal-wlr.service")
hl.exec_cmd("blueman-applet")
hl.exec_cmd("udiskie --no-automount --smart-tray")
hl.exec_cmd("nm-applet --indicator")
hl.exec_cmd("rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store")
-- hl.exec_cmd("custom-batterynotify")
-- hl.exec_cmd("custom-batterywarning")
hl.exec_cmd("awww img WALLPAPER/PATH/PLACEHOLDER")
hl.exec_cmd("awww-daemon")
hl.exec_cmd("custom-checkKdrive && custom-mountkdrive")
hl.exec_cmd("custom-gitnotify")
hl.exec_cmd("sleep 4 & caelestia-shell")
hl.exec_cmd("sleep 20 && ngcp pull --automatic")
end)
-- host specific config
require("host")
+7
View File
@@ -0,0 +1,7 @@
age-encryption.org/v1
-> X25519 XuDyuQL0WjW/IvtzxswKnOfXlJa42Itdu+inNPsiNhw
3z2v3GbNdMvX9QtgAMrWZB/5Y1HatgpoXGQUMnW91+M
-> ssh-ed25519 +tvThg i3NM64rsEgRRgah4PKWdrl4i0pmP6X2bgr2Etzm33Ag
OwUETps78LPyjIAcJo8eC9eh0m9qtRUh399xGzMCTwQ
--- 7LnVrVnmfA8YubysLVeGyRGlLI+ef0VxnIHRi6rRAlc
W¾TîópF’X±áì‘làBTœÝ"^ï”�-þµ‹à¤û§÷Ÿ(üÛ'™ghÕóÎôGÜqx5FË~6Èï6DÎí¬gŒz…¾w·nñSÏHtß…ÌÂÓT«Úè›æŒÅó¤˜sød@°1!P""WHA$Ÿ�›,d68Ñ“õˆ�k“tù\qXÞHŽ®R=�vÕîŸZ
+4
View File
@@ -6,4 +6,8 @@ in {
backupAgeKey
laptopHostKey
];
"epfl.age".publicKeys = [
backupAgeKey
laptopHostKey
];
}
-8
View File
@@ -1,8 +0,0 @@
I am testing the tool ngcp i created. If this file disapears. It means I coded it wrong.
The problem before was that it did:
1. cherry pick
2. push
I didn't pulled changed before cherry picking