feat: replace waybar/mako/anyrun/wlogout/swaylock with noctolia-shell, remove hyprland (#240)
8
Justfile
@@ -121,14 +121,6 @@ local mode="default":
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch (hostname) {{mode}}
|
||||
|
||||
# Deploy the hyprland nixosConfiguration by hostname match
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
hypr mode="default":
|
||||
#!/usr/bin/env nu
|
||||
use {{utils_nu}} *;
|
||||
nixos-switch $"(hostname)-hyprland" {{mode}}
|
||||
|
||||
# Deploy the niri nixosConfiguration by hostname match
|
||||
[linux]
|
||||
[group('desktop')]
|
||||
|
||||
36
README.md
@@ -23,7 +23,7 @@
|
||||
|
||||
This repository is home to the nix code that builds my systems:
|
||||
|
||||
1. NixOS Desktops: NixOS with home-manager, hyprland, agenix, etc.
|
||||
1. NixOS Desktops: NixOS with home-manager, niri, agenix, etc.
|
||||
2. macOS Desktops: nix-darwin with home-manager, share the same home-manager configuration with
|
||||
NixOS Desktops.
|
||||
3. NixOS Servers: virtual machines running on Proxmox/KubeVirt, with various services, such as
|
||||
@@ -55,12 +55,10 @@ You don't have to go through the pain I've experienced again! Check out my
|
||||
## Components
|
||||
|
||||
| | NixOS(Wayland) |
|
||||
| --------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Window Manager** | [Hyprland][Hyprland] / [Niri][Niri] |
|
||||
| -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Window Manager** | [Niri][Niri] |
|
||||
| **Terminal Emulator** | [Zellij][Zellij] + [foot][foot]/[Kitty][Kitty]/[Alacritty][Alacritty]/[Ghostty][Ghostty] |
|
||||
| **Bar** | [Waybar][Waybar] |
|
||||
| **Application Launcher** | [anyrun][anyrun] |
|
||||
| **Notification Daemon** | [Mako][Mako] |
|
||||
| **Status Bar** / **Notifier** / **Launcher** / **lockscreens** | [noctalia-shell][noctalia-shell] |
|
||||
| **Display Manager** | [tuigreet][tuigreet] |
|
||||
| **Color Scheme** | [catppuccin-nix][catppuccin-nix] |
|
||||
| **network management tool** | [NetworkManager][NetworkManager] |
|
||||
@@ -72,7 +70,7 @@ You don't have to go through the pain I've experienced again! Check out my
|
||||
| **Text Editor** | [Neovim][Neovim] |
|
||||
| **Fonts** | [Nerd fonts][Nerd fonts] |
|
||||
| **Image Viewer** | [imv][imv] |
|
||||
| **Screenshot Software** | [hyprshot][hyprshot] |
|
||||
| **Screenshot Software** | Niri's builtin function |
|
||||
| **Screen Recording** | [OBS][OBS] |
|
||||
| **Filesystem & Encryption** | tmpfs as `/`, [Btrfs][Btrfs] subvolumes on a [LUKS][LUKS] encrypted partition for persistent, unlock via passphrase |
|
||||
| **Secure Boot** | [lanzaboote][lanzaboote] |
|
||||
@@ -111,17 +109,13 @@ For NixOS:
|
||||
|
||||
```bash
|
||||
# deploy one of the configuration based on the hostname
|
||||
sudo nixos-rebuild switch --flake .#ai-hyprland
|
||||
|
||||
# deploy via `just`(a command runner with similar syntax to make) & Justfile
|
||||
# Deploy the hyprland nixosConfiguration by hostname match
|
||||
just hypr
|
||||
sudo nixos-rebuild switch --flake .#ai-niri
|
||||
|
||||
# Deploy the niri nixosConfiguration by hostname match
|
||||
just niri
|
||||
|
||||
# or we can deploy with details
|
||||
just hypr debug
|
||||
just niri debug
|
||||
```
|
||||
|
||||
For macOS:
|
||||
@@ -164,19 +158,11 @@ Other dotfiles that inspired me:
|
||||
- Modularized NixOS Configuration
|
||||
- [hlissner/dotfiles](https://github.com/hlissner/dotfiles)
|
||||
- [viperML/dotfiles](https://github.com/viperML/dotfiles)
|
||||
- Hyprland(wayland)
|
||||
- [notwidow/hyprland](https://github.com/notwidow/hyprland): This is where I start my hyprland
|
||||
journey.
|
||||
- [HeinzDev/Hyprland-dotfiles](https://github.com/HeinzDev/Hyprland-dotfiles): Refer to the waybar
|
||||
configuration here.
|
||||
- [Zeioth/zeioth-hyprland-config](https://github.com/Zeioth/zeioth-hyprland-config)
|
||||
- [linuxmobile/kaku](https://github.com/linuxmobile/kaku)
|
||||
- Neovim/AstroNvim
|
||||
- [maxbrunet/dotfiles](https://github.com/maxbrunet/dotfiles): astronvim with nix flakes.
|
||||
- Misc
|
||||
- [1amSimp1e/dots](https://github.com/1amSimp1e/dots)
|
||||
|
||||
[Hyprland]: https://github.com/hyprwm/Hyprland
|
||||
[Niri]: https://github.com/YaLTeR/niri
|
||||
[Kitty]: https://github.com/kovidgoyal/kitty
|
||||
[foot]: https://codeberg.org/dnkl/foot
|
||||
@@ -184,11 +170,6 @@ Other dotfiles that inspired me:
|
||||
[Ghostty]: https://github.com/ghostty-org/ghostty
|
||||
[Nushell]: https://github.com/nushell/nushell
|
||||
[Starship]: https://github.com/starship/starship
|
||||
[Waybar]: https://github.com/Alexays/Waybar
|
||||
[polybar]: https://github.com/polybar/polybar
|
||||
[rofi]: https://github.com/davatorium/rofi
|
||||
[anyrun]: https://github.com/Kirottu/anyrun
|
||||
[Dunst]: https://github.com/dunst-project/dunst
|
||||
[Fcitx5]: https://github.com/fcitx/fcitx5
|
||||
[rime]: https://wiki.archlinux.org/title/Rime
|
||||
[flypy]: https://flypy.cc/
|
||||
@@ -197,10 +178,8 @@ Other dotfiles that inspired me:
|
||||
[Zellij]: https://github.com/zellij-org/zellij
|
||||
[Neovim]: https://github.com/neovim/neovim
|
||||
[AstroNvim]: https://github.com/AstroNvim/AstroNvim
|
||||
[Hyprshot]: https://github.com/Gustash/Hyprshot
|
||||
[imv]: https://sr.ht/~exec64/imv/
|
||||
[OBS]: https://obsproject.com
|
||||
[Mako]: https://github.com/emersion/mako
|
||||
[Nerd fonts]: https://github.com/ryanoasis/nerd-fonts
|
||||
[catppuccin-nix]: https://github.com/catppuccin/nix
|
||||
[NetworkManager]: https://wiki.gnome.org/Projects/NetworkManager
|
||||
@@ -212,3 +191,4 @@ Other dotfiles that inspired me:
|
||||
[Btrfs]: https://btrfs.readthedocs.io
|
||||
[LUKS]: https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system
|
||||
[lanzaboote]: https://github.com/nix-community/lanzaboote
|
||||
[noctalia-shell]: https://github.com/noctalia-dev/noctalia-shell
|
||||
|
||||
76
flake.lock
generated
@@ -45,29 +45,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"anyrun": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758121794,
|
||||
"narHash": "sha256-IlnFA/a9Clgbt+FuavIKWtauhtH4Fo/rGJIjJDDeYRs=",
|
||||
"owner": "anyrun-org",
|
||||
"repo": "anyrun",
|
||||
"rev": "c787318f590102b68fbd2e5b02ea47e96f4ecb62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "anyrun-org",
|
||||
"ref": "v25.9.3",
|
||||
"repo": "anyrun",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"blender-bin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@@ -248,27 +225,6 @@
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"anyrun",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1754487366,
|
||||
"narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"lanzaboote",
|
||||
@@ -289,7 +245,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_3": {
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": "nixpkgs-lib"
|
||||
},
|
||||
@@ -307,7 +263,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_4": {
|
||||
"flake-parts_3": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixpak",
|
||||
@@ -330,7 +286,7 @@
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
@@ -348,7 +304,7 @@
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681202837,
|
||||
@@ -567,7 +523,7 @@
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-compat": "flake-compat_3",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
@@ -645,7 +601,7 @@
|
||||
},
|
||||
"nix-gaming": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_3",
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
@@ -723,7 +679,7 @@
|
||||
},
|
||||
"nixpak": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_4",
|
||||
"flake-parts": "flake-parts_3",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
@@ -1023,7 +979,6 @@
|
||||
"inputs": {
|
||||
"aagl": "aagl",
|
||||
"agenix": "agenix",
|
||||
"anyrun": "anyrun",
|
||||
"blender-bin": "blender-bin",
|
||||
"catppuccin": "catppuccin",
|
||||
"disko": "disko",
|
||||
@@ -1151,21 +1106,6 @@
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
@@ -1180,7 +1120,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
|
||||
@@ -80,15 +80,6 @@
|
||||
url = "github:nix-community/preservation";
|
||||
};
|
||||
|
||||
# community wayland nixpkgs
|
||||
# nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
|
||||
# anyrun - a wayland launcher
|
||||
anyrun = {
|
||||
url = "github:/anyrun-org/anyrun/v25.9.3";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# generate iso/qcow2/docker/... image from nixos configuration
|
||||
nixos-generators = {
|
||||
url = "github:nix-community/nixos-generators";
|
||||
|
||||
@@ -22,7 +22,6 @@ home/
|
||||
├── linux/ # Linux-specific home manager configurations
|
||||
│ ├── base/ # Linux base configurations
|
||||
│ ├── gui/ # Linux GUI applications
|
||||
│ │ ├── hyprland/ # Hyprland window manager
|
||||
│ │ ├── niri/ # Niri window manager
|
||||
│ │ └── ...
|
||||
│ ├── editors/ # Linux-specific editors
|
||||
|
||||
@@ -15,7 +15,6 @@ cases.
|
||||
### Desktop Configurations
|
||||
|
||||
- **gui/**: Desktop environment configurations
|
||||
- **hyprland/**: Hyprland window manager with custom keybindings and settings
|
||||
- **niri/**: Niri compositor configuration
|
||||
- **base/**: Common desktop applications and services
|
||||
- **editors/**: Text editor configurations for desktop environments
|
||||
|
||||
@@ -7,15 +7,13 @@ Manager.
|
||||
|
||||
### Window Managers
|
||||
|
||||
- **hyprland**: Hyprland compositor configuration with custom keybindings, settings, and window
|
||||
rules
|
||||
- **niri**: Niri compositor configuration with custom settings, keybindings, spawn-at-startup rules,
|
||||
and window rules
|
||||
|
||||
### Base Desktop Environment
|
||||
|
||||
- **base**: Common desktop configurations shared across all environments, including:
|
||||
- Desktop applications (anyrun, mako, waybar, wlogout)
|
||||
- Desktop applications (noctalia-shell)
|
||||
- Creative tools and media applications
|
||||
- Development tools
|
||||
- Eye protection utilities (gammastep)
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
anyrun,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
anyrunPackages = anyrun.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
(
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
# Important! We disable home-manager's module to avoid option
|
||||
# definition collisions
|
||||
disabledModules = [ "${modulesPath}/programs/anyrun.nix" ];
|
||||
}
|
||||
)
|
||||
anyrun.homeManagerModules.default
|
||||
];
|
||||
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
# The package should come from the same flake as all the plugins to avoid breakage.
|
||||
package = anyrunPackages.anyrun;
|
||||
config = {
|
||||
# The horizontal position.
|
||||
# when using `fraction`, it sets a fraction of the width or height of the screen
|
||||
x.fraction = 0.5; # at the middle of the screen
|
||||
# The vertical position.
|
||||
y.fraction = 0.05; # at the top of the screen
|
||||
# The width of the runner.
|
||||
width.fraction = 0.3; # 30% of the screen
|
||||
|
||||
hideIcons = false;
|
||||
ignoreExclusiveZones = false;
|
||||
layer = "overlay";
|
||||
hidePluginInfo = false;
|
||||
closeOnClick = true;
|
||||
showResultsImmediately = true;
|
||||
maxEntries = null;
|
||||
|
||||
# https://github.com/anyrun-org/anyrun/tree/master/plugins
|
||||
plugins = with anyrunPackages; [
|
||||
applications # Launch applications
|
||||
dictionary # Look up word definitions using the Free Dictionary API.
|
||||
nix-run # search & run graphical apps from nixpkgs via `nix run`, without installing it.
|
||||
# randr # quickly change monitor configurations on the fly
|
||||
rink # A simple calculator plugin
|
||||
symbols # Look up unicode symbols and custom user defined symbols.
|
||||
translate # ":zh <text to translate>" Quickly translate text using the Google Translate API.
|
||||
niri-focus # Search for & focus the window via title/appid on Niri
|
||||
];
|
||||
};
|
||||
|
||||
extraConfigFiles = {
|
||||
"symbols.ron".source = ./conf/anyrun/symbols.ron;
|
||||
"applications.ron".source = ./conf/anyrun/applications.ron;
|
||||
};
|
||||
};
|
||||
|
||||
# https://github.com/anyrun-org/anyrun/discussions/179
|
||||
xdg.configFile."anyrun/style.css".source = ./conf/anyrun/style.css;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
Config(
|
||||
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
||||
desktop_actions: true,
|
||||
|
||||
max_entries: 5,
|
||||
|
||||
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
||||
// to determine what terminal to use.
|
||||
terminal: Some(Terminal(
|
||||
// The main terminal command
|
||||
command: "alacritty",
|
||||
// What arguments should be passed to the terminal process to run the command correctly
|
||||
// {} is replaced with the command in the desktop entry
|
||||
args: "-e {}",
|
||||
)),
|
||||
)
|
||||
@@ -1,101 +0,0 @@
|
||||
/* ===== Color variables ===== */
|
||||
:root {
|
||||
--bg-color: #313244;
|
||||
--fg-color: #cdd6f4;
|
||||
--primary-color: #89b4fa;
|
||||
--secondary-color: #cba6f7;
|
||||
--border-color: var(--primary-color);
|
||||
--selected-bg-color: var(--primary-color);
|
||||
--selected-fg-color: var(--bg-color);
|
||||
}
|
||||
|
||||
/* ===== Global reset ===== */
|
||||
* {
|
||||
all: unset;
|
||||
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||
}
|
||||
|
||||
/* ===== Transparent window ===== */
|
||||
window {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
/* ===== Main container ===== */
|
||||
box.main {
|
||||
border-radius: 16px;
|
||||
background-color: color-mix(in srgb, var(--bg-color) 80%, transparent);
|
||||
border: 0.5px solid color-mix(in srgb, var(--fg-color) 25%, transparent);
|
||||
padding: 12px; /* add uniform padding around the whole box */
|
||||
}
|
||||
|
||||
/* ===== Input field ===== */
|
||||
text {
|
||||
font-size: 1.3rem;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 16px;
|
||||
margin-bottom: 12px;
|
||||
padding: 5px 10px;
|
||||
min-height: 44px;
|
||||
caret-color: var(--primary-color);
|
||||
}
|
||||
|
||||
/* ===== List container ===== */
|
||||
.matches {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* ===== Single match row ===== */
|
||||
.match {
|
||||
font-size: 1.1rem;
|
||||
padding: 4px 10px; /* tight vertical spacing */
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* Remove default label margins */
|
||||
.match * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Selected / hover state */
|
||||
.match:selected,
|
||||
.match:hover {
|
||||
background-color: var(--selected-bg-color);
|
||||
color: var(--selected-fg-color);
|
||||
}
|
||||
|
||||
.match:selected label.plugin.info,
|
||||
.match:hover label.plugin.info {
|
||||
color: var(--selected-fg-color);
|
||||
}
|
||||
|
||||
.match:selected label.match.description,
|
||||
.match:hover label.match.description {
|
||||
color: color-mix(in srgb, var(--selected-fg-color) 90%, transparent);
|
||||
}
|
||||
|
||||
/* ===== Plugin info label ===== */
|
||||
label.plugin.info {
|
||||
color: var(--fg-color);
|
||||
font-size: 1rem;
|
||||
min-width: 160px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* ===== Description label ===== */
|
||||
label.match.description {
|
||||
font-size: 0rem;
|
||||
color: var(--fg-color);
|
||||
}
|
||||
|
||||
/* ===== Fade-in animation ===== */
|
||||
@keyframes fade {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
Config(
|
||||
// The prefix that the search needs to begin with to yield symbol results
|
||||
prefix: "",
|
||||
// Custom user defined symbols to be included along the unicode symbols
|
||||
symbols: {
|
||||
// "name": "text to be copied"
|
||||
"shrug": "¯\\_(ツ)_/¯",
|
||||
},
|
||||
max_entries: 3,
|
||||
)
|
||||
@@ -1,51 +0,0 @@
|
||||
## Mako configuration file
|
||||
|
||||
# GLOBAL CONFIGURATION OPTIONS
|
||||
max-history=100
|
||||
sort=-time
|
||||
|
||||
# BINDING OPTIONS
|
||||
on-button-left=dismiss
|
||||
on-button-middle=none
|
||||
on-button-right=dismiss-all
|
||||
on-touch=dismiss
|
||||
on-notify=exec mpv /usr/share/sounds/freedesktop/stereo/message.oga
|
||||
|
||||
# STYLE OPTIONS
|
||||
font=Maple Mono NF CN
|
||||
width=300
|
||||
height=100
|
||||
margin=10
|
||||
padding=15
|
||||
border-size=2
|
||||
border-radius=0
|
||||
icons=1
|
||||
max-icon-size=48
|
||||
icon-location=left
|
||||
markup=1
|
||||
actions=1
|
||||
history=1
|
||||
text-alignment=left
|
||||
default-timeout=5000
|
||||
ignore-timeout=0
|
||||
max-visible=5
|
||||
layer=overlay
|
||||
anchor=top-right
|
||||
|
||||
background-color=#1e1e2e
|
||||
text-color=#d9e0ee
|
||||
border-color=#313244
|
||||
progress-color=over #89b4fa
|
||||
|
||||
[urgency=low]
|
||||
border-color=#313244
|
||||
default-timeout=2000
|
||||
|
||||
[urgency=normal]
|
||||
border-color=#313244
|
||||
default-timeout=5000
|
||||
|
||||
[urgency=high]
|
||||
border-color=#f38ba8
|
||||
text-color=#f38ba8
|
||||
default-timeout=0
|
||||
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 23 KiB |
@@ -1,159 +0,0 @@
|
||||
{
|
||||
"position": "top",
|
||||
"layer": "top",
|
||||
"modules-left": ["custom/launcher", "temperature", "backlight", "network"],
|
||||
"modules-center": ["custom/playerctl"],
|
||||
"modules-right": [
|
||||
"wireplumber",
|
||||
"wireplumber#source",
|
||||
"cpu",
|
||||
"memory",
|
||||
"clock",
|
||||
"battery",
|
||||
"idle_inhibitor",
|
||||
"custom/powermenu",
|
||||
"tray",
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate",
|
||||
"format-icons": {
|
||||
"1": "",
|
||||
"2": "",
|
||||
"3": "",
|
||||
"4": "",
|
||||
"5": "",
|
||||
"6": "",
|
||||
"7": "",
|
||||
"8": "",
|
||||
"9": "",
|
||||
"10": "〇",
|
||||
"focused": "",
|
||||
"default": "",
|
||||
},
|
||||
},
|
||||
"clock": {
|
||||
"interval": 60,
|
||||
"align": 0,
|
||||
"rotate": 0,
|
||||
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": " {:%H:%M}",
|
||||
"format-alt": " {:%a %b %d, %G}",
|
||||
},
|
||||
"cpu": {
|
||||
"format": "CPU {usage}%",
|
||||
"interval": 1,
|
||||
"on-click-middle": "foot btop",
|
||||
"on-click-right": "foot btop",
|
||||
},
|
||||
"memory": {
|
||||
"format": "MEM {percentage}%",
|
||||
"interval": 1,
|
||||
"states": {
|
||||
"warning": 85,
|
||||
},
|
||||
},
|
||||
"custom/launcher": {
|
||||
"format": "\uf313 ",
|
||||
"on-click": "anyrun",
|
||||
"on-click-middle": "exec default_wall",
|
||||
"on-click-right": "exec wallpaper_random",
|
||||
"tooltip": false,
|
||||
},
|
||||
"custom/powermenu": {
|
||||
"format": "\uf011",
|
||||
"on-click": "wlogout",
|
||||
"tooltip": false,
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "\uf06e",
|
||||
"deactivated": "\uf070",
|
||||
},
|
||||
"tooltip": false,
|
||||
},
|
||||
"custom/playerctl": {
|
||||
"format": "{icon} <span>{}</span>",
|
||||
"return-type": "json",
|
||||
"max-length": 55,
|
||||
"exec": "playerctl -a metadata --format '{\"text\": \" {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
|
||||
"on-click-middle": "playerctl previous",
|
||||
"on-click": "playerctl play-pause",
|
||||
"on-click-right": "playerctl next",
|
||||
"format-icons": {
|
||||
"Paused": "<span foreground='#6dd9d9'></span>",
|
||||
"Playing": "<span foreground='#82db97'></span>",
|
||||
},
|
||||
},
|
||||
"network": {
|
||||
"interval": 5,
|
||||
"format": "{ifname}",
|
||||
"format-wifi": " {signalStrength}% Down: {bandwidthDownBytes} Up: {bandwidthUpBytes} {essid}",
|
||||
"format-ethernet": " {ifname} Down: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"tooltip-format": " {ifname} via {gwaddri}",
|
||||
"tooltip-format-wifi": " {ifname} @ {essid}\nIP: {ipaddr}\nStrength: {signalStrength}%\nFreq: {frequency}MHz\nDown: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"tooltip-format-ethernet": " {ifname}\nIP: {ipaddr}\n Down: {bandwidthDownBytes} Up: {bandwidthUpBytes}",
|
||||
"tooltip-format-disconnected": "Disconnected",
|
||||
"max-length": 50,
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "foot nmtui",
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Mute",
|
||||
"format-bluetooth": " {volume}%",
|
||||
"format-bluetooth-muted": " Mute",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""],
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-click-right": "GSK_RENDERER=opengl pavucontrol",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"wireplumber#source": {
|
||||
"node-type": "Audio/Source",
|
||||
"format": " {volume}%",
|
||||
"format-muted": " Muted",
|
||||
"tooltip": false,
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
|
||||
"on-click-right": "GSK_RENDERER=opengl pavucontrol",
|
||||
"scroll-step": 5,
|
||||
},
|
||||
"temperature": {
|
||||
"format": "\uf2c9 {temperatureC}\u00b0C",
|
||||
"tooltip": false,
|
||||
},
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5,
|
||||
},
|
||||
"battery": {
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15,
|
||||
},
|
||||
"max-length": 20,
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-warning": "{icon} {capacity}%",
|
||||
"format-critical": "{icon} {capacity}%",
|
||||
"format-charging": "<span font-family='Font Awesome 6 Free'></span> {capacity}%",
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
"format-full": " {capacity}%",
|
||||
"format-icons": [" ", " ", " ", " ", " "],
|
||||
},
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* https://github.com/catppuccin/waybar/blob/main/themes/mocha.css
|
||||
*
|
||||
* Catppuccin Mocha palette
|
||||
* Maintainer: rubyowo
|
||||
*
|
||||
*/
|
||||
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
@@ -1,156 +0,0 @@
|
||||
@import "mocha.css";
|
||||
|
||||
* {
|
||||
/* https://docs.gtk.org/gtk3/css-overview.html#colors */
|
||||
color: @text;
|
||||
font-family: "Maple Mono NF CN";
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
border-radius: 8px;
|
||||
transition-property: background-color;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
@keyframes blink_red {
|
||||
to {
|
||||
background-color: rgb(242, 143, 173);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
}
|
||||
.warning,
|
||||
.critical,
|
||||
.urgent {
|
||||
animation-name: blink_red;
|
||||
animation-duration: 1s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
border: 2px solid alpha(@crust, 0.3);
|
||||
}
|
||||
window > box {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-top: 5px;
|
||||
background-color: shade(@base, 0.9);
|
||||
padding: 3px;
|
||||
padding-left: 8px;
|
||||
border: 2px none #33ccff;
|
||||
}
|
||||
#workspaces {
|
||||
padding-left: 0px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
#workspaces button {
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
}
|
||||
#workspaces button.active {
|
||||
background-color: rgb(181, 232, 224);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button.urgent {
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
#workspaces button:hover {
|
||||
background-color: rgb(248, 189, 150);
|
||||
color: rgb(26, 24, 38);
|
||||
}
|
||||
tooltip {
|
||||
background: rgb(48, 45, 65);
|
||||
}
|
||||
tooltip label {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
#custom-launcher {
|
||||
font-size: 20px;
|
||||
padding-left: 8px;
|
||||
padding-right: 6px;
|
||||
color: #7ebae4;
|
||||
}
|
||||
#mode,
|
||||
#clock,
|
||||
#memory,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#custom-playerctl,
|
||||
#backlight,
|
||||
#wireplumber,
|
||||
#wireplumber.source,
|
||||
#network,
|
||||
#battery,
|
||||
#custom-powermenu {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
/* #mode { */
|
||||
/* margin-left: 10px; */
|
||||
/* background-color: rgb(248, 189, 150); */
|
||||
/* color: rgb(26, 24, 38); */
|
||||
/* } */
|
||||
#memory {
|
||||
color: rgb(181, 232, 224);
|
||||
}
|
||||
#cpu {
|
||||
color: rgb(245, 194, 231);
|
||||
}
|
||||
#clock {
|
||||
color: rgb(217, 224, 238);
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
color: rgb(221, 182, 242);
|
||||
padding-right: 8px;
|
||||
}
|
||||
#battery {
|
||||
min-width: 55px;
|
||||
color: rgb(126, 186, 244);
|
||||
}
|
||||
#battery.charging,
|
||||
#battery.full,
|
||||
#battery.plugged {
|
||||
color: #26a65b;
|
||||
}
|
||||
#battery.critical:not(.charging) {
|
||||
color: #f53c3c;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: linear;
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
#temperature {
|
||||
color: rgb(150, 205, 251);
|
||||
}
|
||||
#backlight {
|
||||
color: rgb(248, 189, 150);
|
||||
}
|
||||
#wireplumber {
|
||||
color: rgb(245, 224, 220);
|
||||
}
|
||||
|
||||
#wireplumber.source {
|
||||
color: rgb(181, 232, 224);
|
||||
}
|
||||
|
||||
#custom-playerctl {
|
||||
color: rgb(166, 227, 161);
|
||||
}
|
||||
#network {
|
||||
color: #abe9b3;
|
||||
}
|
||||
#network.disconnected {
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
#custom-powermenu {
|
||||
color: rgb(242, 143, 173);
|
||||
padding-right: 8px;
|
||||
}
|
||||
#tray {
|
||||
padding-right: 8px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
Before Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 7.0 KiB |
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"label" : "lock",
|
||||
"action" : "~/.config/hypr/scripts/lockscreen",
|
||||
"text" : "Lock",
|
||||
"keybind" : "l"
|
||||
}
|
||||
{
|
||||
"label" : "hibernate",
|
||||
"action" : "systemctl hibernate",
|
||||
"text" : "Hibernate",
|
||||
"keybind" : "h"
|
||||
}
|
||||
{
|
||||
"label" : "logout",
|
||||
"action" : "loginctl terminate-user $USER",
|
||||
"text" : "Logout",
|
||||
"keybind" : "e"
|
||||
}
|
||||
{
|
||||
"label" : "shutdown",
|
||||
"action" : "systemctl poweroff",
|
||||
"text" : "Shutdown",
|
||||
"keybind" : "s"
|
||||
}
|
||||
{
|
||||
"label" : "suspend",
|
||||
"action" : "systemctl suspend",
|
||||
"text" : "Suspend",
|
||||
"keybind" : "u"
|
||||
}
|
||||
{
|
||||
"label" : "reboot",
|
||||
"action" : "systemctl reboot",
|
||||
"text" : "Reboot",
|
||||
"keybind" : "r"
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
/** ********** Fonts ********** **/
|
||||
* {
|
||||
font-family: "Maple Mono NF CN", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** ********** Main Window ********** **/
|
||||
window {
|
||||
background-color: #1e1e2e;
|
||||
}
|
||||
|
||||
/** ********** Buttons ********** **/
|
||||
button {
|
||||
background-color: #242434;
|
||||
color: #ffffff;
|
||||
border: 2px solid #282838;
|
||||
border-radius: 20px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: 35%;
|
||||
}
|
||||
|
||||
button:focus,
|
||||
button:active,
|
||||
button:hover {
|
||||
background-color: #89b4fa;
|
||||
outline-style: none;
|
||||
}
|
||||
|
||||
/** ********** Icons ********** **/
|
||||
#lock {
|
||||
background-image: image(url("icons/lock.png"), url("/usr/share/wlogout/icons/lock.png"));
|
||||
}
|
||||
|
||||
#logout {
|
||||
background-image: image(url("icons/logout.png"), url("/usr/share/wlogout/icons/logout.png"));
|
||||
}
|
||||
|
||||
#suspend {
|
||||
background-image: image(url("icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png"));
|
||||
}
|
||||
|
||||
#hibernate {
|
||||
background-image: image(
|
||||
url("icons/hibernate.png"),
|
||||
url("/usr/share/wlogout/icons/hibernate.png")
|
||||
);
|
||||
}
|
||||
|
||||
#shutdown {
|
||||
background-image: image(url("icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png"));
|
||||
}
|
||||
|
||||
#reboot {
|
||||
background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||
}
|
||||
@@ -1,13 +1,6 @@
|
||||
{ mylib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./anyrun.nix
|
||||
./nvidia.nix
|
||||
];
|
||||
imports = mylib.scanPaths ./.;
|
||||
|
||||
# wayland related
|
||||
home.sessionVariables = {
|
||||
@@ -39,37 +32,9 @@
|
||||
wf-recorder # screen recording
|
||||
];
|
||||
|
||||
xdg.configFile =
|
||||
let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
confPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/base/desktop/conf";
|
||||
in
|
||||
{
|
||||
"mako".source = mkSymlink "${confPath}/mako";
|
||||
"waybar".source = mkSymlink "${confPath}/waybar";
|
||||
"wlogout".source = mkSymlink "${confPath}/wlogout";
|
||||
"hypr/hypridle.conf".source = mkSymlink "${confPath}/hypridle.conf";
|
||||
};
|
||||
|
||||
# status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
};
|
||||
# Disable catppuccin to avoid conflict with my non-nix config.
|
||||
catppuccin.waybar.enable = false;
|
||||
|
||||
# screen locker
|
||||
programs.swaylock.enable = true;
|
||||
|
||||
# Logout Menu
|
||||
programs.wlogout.enable = true;
|
||||
catppuccin.wlogout.enable = false;
|
||||
|
||||
# Hyprland idle daemon
|
||||
services.hypridle.enable = true;
|
||||
|
||||
# notification daemon, the same as dunst
|
||||
services.mako.enable = true;
|
||||
catppuccin.mako.enable = false;
|
||||
}
|
||||
|
||||
9
home/linux/gui/base/desktop/hypridle/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
xdg.configFile."hypr/hypridle.conf".source = ./hypridle.conf;
|
||||
|
||||
# Hyprland idle daemon
|
||||
services.hypridle.enable = true;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
general {
|
||||
lock_cmd = pidof swaylock || swaylock # avoid starting multiple instances
|
||||
lock_cmd = noctalia-shell ipc call lockScreen lock # avoid starting multiple instances
|
||||
before_sleep_cmd = loginctl lock-session # lock before suspend
|
||||
after_sleep_cmd = hyprctl dispatch dpms on # resume dpms after suspend
|
||||
# after_sleep_cmd = hyprctl dispatch dpms on # resume dpms after suspend
|
||||
ignore_dbus_inhibit = false # whether to ignore dbus-sent idle-inhibit requests
|
||||
}
|
||||
|
||||
@@ -20,16 +20,14 @@ listener {
|
||||
# }
|
||||
|
||||
listener {
|
||||
timeout = 1600 # 20 minutes
|
||||
on-timeout = pidof swaylock || swaylock # lock screen
|
||||
on-resume = hyprctl dispatch dpms on # monitor wake up
|
||||
timeout = 1200 # 20 minutes
|
||||
on-timeout = noctalia-shell ipc call lockScreen lock # lock screen
|
||||
}
|
||||
|
||||
listener {
|
||||
timeout = 1660 # 31 minutes
|
||||
on-timeout = hyprctl dispatch dpms off # screen off
|
||||
on-resume = hyprctl dispatch dpms on && brightnessctl -r # monitor wake up & screen on
|
||||
}
|
||||
# listener {
|
||||
# timeout = 1660 # 31 minutes
|
||||
# on-resume = brightnessctl -r # monitor wake up & screen on
|
||||
# }
|
||||
|
||||
# listener {
|
||||
# timeout = 1800 # 30min
|
||||
54
home/linux/gui/base/desktop/noctalia/default.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
wallpapers,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
noctalia-shell
|
||||
qt6Packages.qt6ct # for icon theme
|
||||
app2unit # Launch Desktop Entries (or arbitrary commands) as Systemd user units
|
||||
]
|
||||
++ (lib.optionals pkgs.stdenv.isx86_64 [
|
||||
gpu-screen-recorder # recoding screen
|
||||
]);
|
||||
|
||||
home.file."Pictures/Wallpapers".source = wallpapers;
|
||||
|
||||
xdg.configFile =
|
||||
let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
confPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/base/desktop/noctalia";
|
||||
in
|
||||
{
|
||||
"noctalia/settings.json".source = mkSymlink "${confPath}/settings.json";
|
||||
};
|
||||
|
||||
systemd.user.services.noctalia-shell = {
|
||||
Unit = {
|
||||
Description = "Noctalia Shell - Wayland desktop shell";
|
||||
Documentation = "https://docs.noctalia.dev/docs";
|
||||
PartOf = [ config.wayland.systemd.target ];
|
||||
After = [ config.wayland.systemd.target ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = lib.getExe pkgs.noctalia-shell;
|
||||
Restart = "on-failure";
|
||||
|
||||
Environment = [
|
||||
"QT_QPA_PLATFORM=wayland;xcb"
|
||||
"QT_QPA_PLATFORMTHEME=qt6ct"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR=1"
|
||||
];
|
||||
};
|
||||
|
||||
Install.WantedBy = [ config.wayland.systemd.target ];
|
||||
};
|
||||
}
|
||||
517
home/linux/gui/base/desktop/noctalia/settings.json
Normal file
@@ -0,0 +1,517 @@
|
||||
{
|
||||
"appLauncher": {
|
||||
"customLaunchPrefix": "",
|
||||
"customLaunchPrefixEnabled": false,
|
||||
"enableClipPreview": true,
|
||||
"enableClipboardHistory": false,
|
||||
"iconMode": "native",
|
||||
"pinnedExecs": [],
|
||||
"position": "center",
|
||||
"showCategories": true,
|
||||
"sortByMostUsed": true,
|
||||
"terminalCommand": "xterm -e",
|
||||
"useApp2Unit": true,
|
||||
"viewMode": "list"
|
||||
},
|
||||
"audio": {
|
||||
"cavaFrameRate": 30,
|
||||
"externalMixer": "pwvucontrol || pavucontrol",
|
||||
"mprisBlacklist": [],
|
||||
"preferredPlayer": "",
|
||||
"visualizerType": "linear",
|
||||
"volumeOverdrive": false,
|
||||
"volumeStep": 1
|
||||
},
|
||||
"bar": {
|
||||
"capsuleOpacity": 1,
|
||||
"density": "comfortable",
|
||||
"exclusive": true,
|
||||
"floating": false,
|
||||
"marginHorizontal": 0.25,
|
||||
"marginVertical": 0.25,
|
||||
"monitors": [],
|
||||
"outerCorners": true,
|
||||
"position": "top",
|
||||
"showCapsule": true,
|
||||
"showOutline": false,
|
||||
"transparent": true,
|
||||
"widgets": {
|
||||
"center": [
|
||||
{
|
||||
"characterCount": 2,
|
||||
"colorizeIcons": false,
|
||||
"enableScrollWheel": true,
|
||||
"followFocusedScreen": false,
|
||||
"hideUnoccupied": false,
|
||||
"id": "Workspace",
|
||||
"labelMode": "index",
|
||||
"showApplications": false,
|
||||
"showLabelsOnlyWhenOccupied": true
|
||||
}
|
||||
],
|
||||
"left": [
|
||||
{
|
||||
"hideMode": "alwaysExpanded",
|
||||
"icon": "rocket",
|
||||
"id": "CustomButton",
|
||||
"leftClickExec": "noctalia-shell ipc call launcher toggle",
|
||||
"leftClickUpdateText": true,
|
||||
"maxTextLength": {
|
||||
"horizontal": 10,
|
||||
"vertical": 10
|
||||
},
|
||||
"middleClickExec": "",
|
||||
"middleClickUpdateText": false,
|
||||
"parseJson": false,
|
||||
"rightClickExec": "",
|
||||
"rightClickUpdateText": false,
|
||||
"showIcon": true,
|
||||
"textCollapse": "",
|
||||
"textCommand": "",
|
||||
"textIntervalMs": 3000,
|
||||
"textStream": false,
|
||||
"wheelDownExec": "",
|
||||
"wheelDownUpdateText": false,
|
||||
"wheelExec": "",
|
||||
"wheelMode": "unified",
|
||||
"wheelUpExec": "",
|
||||
"wheelUpUpdateText": false,
|
||||
"wheelUpdateText": false
|
||||
},
|
||||
{
|
||||
"customFont": "",
|
||||
"formatHorizontal": "HH:mm ddd, MMM dd",
|
||||
"formatVertical": "HH mm - dd MM",
|
||||
"id": "Clock",
|
||||
"useCustomFont": false,
|
||||
"usePrimaryColor": false
|
||||
},
|
||||
{
|
||||
"diskPath": "/persistent",
|
||||
"id": "SystemMonitor",
|
||||
"showCpuTemp": true,
|
||||
"showCpuUsage": true,
|
||||
"showDiskUsage": true,
|
||||
"showGpuTemp": false,
|
||||
"showMemoryAsPercent": true,
|
||||
"showMemoryUsage": true,
|
||||
"showNetworkStats": true,
|
||||
"usePrimaryColor": false
|
||||
},
|
||||
{
|
||||
"colorizeIcons": false,
|
||||
"hideMode": "hidden",
|
||||
"id": "ActiveWindow",
|
||||
"maxWidth": 145,
|
||||
"scrollingMode": "hover",
|
||||
"showIcon": true,
|
||||
"useFixedWidth": false
|
||||
},
|
||||
{
|
||||
"hideMode": "hidden",
|
||||
"hideWhenIdle": false,
|
||||
"id": "MediaMini",
|
||||
"maxWidth": 145,
|
||||
"scrollingMode": "hover",
|
||||
"showAlbumArt": false,
|
||||
"showArtistFirst": true,
|
||||
"showProgressRing": true,
|
||||
"showVisualizer": false,
|
||||
"useFixedWidth": false,
|
||||
"visualizerType": "linear"
|
||||
}
|
||||
],
|
||||
"right": [
|
||||
{
|
||||
"id": "ScreenRecorder"
|
||||
},
|
||||
{
|
||||
"hideWhenZero": false,
|
||||
"id": "NotificationHistory",
|
||||
"showUnreadBadge": true
|
||||
},
|
||||
{
|
||||
"deviceNativePath": "",
|
||||
"displayMode": "alwaysShow",
|
||||
"hideIfNotDetected": true,
|
||||
"id": "Battery",
|
||||
"showNoctaliaPerformance": true,
|
||||
"showPowerProfiles": true,
|
||||
"warningThreshold": 30
|
||||
},
|
||||
{
|
||||
"displayMode": "alwaysShow",
|
||||
"id": "Volume"
|
||||
},
|
||||
{
|
||||
"displayMode": "alwaysShow",
|
||||
"id": "Brightness"
|
||||
},
|
||||
{
|
||||
"blacklist": [],
|
||||
"colorizeIcons": false,
|
||||
"drawerEnabled": true,
|
||||
"hidePassive": false,
|
||||
"id": "Tray",
|
||||
"pinned": []
|
||||
},
|
||||
{
|
||||
"colorizeDistroLogo": false,
|
||||
"colorizeSystemIcon": "none",
|
||||
"customIconPath": "",
|
||||
"enableColorization": false,
|
||||
"icon": "noctalia",
|
||||
"id": "ControlCenter",
|
||||
"useDistroLogo": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"brightness": {
|
||||
"brightnessStep": 2,
|
||||
"enableDdcSupport": true,
|
||||
"enforceMinimum": true
|
||||
},
|
||||
"calendar": {
|
||||
"cards": [
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "calendar-header-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "calendar-month-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "timer-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "weather-card"
|
||||
}
|
||||
]
|
||||
},
|
||||
"colorSchemes": {
|
||||
"darkMode": true,
|
||||
"generateTemplatesForPredefined": true,
|
||||
"manualSunrise": "06:30",
|
||||
"manualSunset": "18:30",
|
||||
"matugenSchemeType": "scheme-rainbow",
|
||||
"predefinedScheme": "Noctalia (default)",
|
||||
"schedulingMode": "off",
|
||||
"useWallpaperColors": true
|
||||
},
|
||||
"controlCenter": {
|
||||
"cards": [
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "profile-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "shortcuts-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "audio-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "brightness-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "weather-card"
|
||||
},
|
||||
{
|
||||
"enabled": true,
|
||||
"id": "media-sysmon-card"
|
||||
}
|
||||
],
|
||||
"position": "close_to_bar_button",
|
||||
"shortcuts": {
|
||||
"left": [
|
||||
{
|
||||
"id": "WiFi"
|
||||
},
|
||||
{
|
||||
"id": "Bluetooth"
|
||||
},
|
||||
{
|
||||
"id": "ScreenRecorder"
|
||||
},
|
||||
{
|
||||
"id": "WallpaperSelector"
|
||||
}
|
||||
],
|
||||
"right": [
|
||||
{
|
||||
"id": "Notifications"
|
||||
},
|
||||
{
|
||||
"id": "PowerProfile"
|
||||
},
|
||||
{
|
||||
"id": "KeepAwake"
|
||||
},
|
||||
{
|
||||
"id": "NightLight"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"desktopWidgets": {
|
||||
"enabled": false,
|
||||
"gridSnap": false,
|
||||
"monitorWidgets": []
|
||||
},
|
||||
"dock": {
|
||||
"animationSpeed": 1,
|
||||
"backgroundOpacity": 1,
|
||||
"colorizeIcons": false,
|
||||
"deadOpacity": 0.6,
|
||||
"displayMode": "auto_hide",
|
||||
"enabled": false,
|
||||
"floatingRatio": 1,
|
||||
"inactiveIndicators": false,
|
||||
"monitors": [],
|
||||
"onlySameOutput": true,
|
||||
"pinnedApps": [],
|
||||
"pinnedStatic": false,
|
||||
"size": 1
|
||||
},
|
||||
"general": {
|
||||
"allowPanelsOnScreenWithoutBar": true,
|
||||
"animationDisabled": false,
|
||||
"animationSpeed": 1,
|
||||
"avatarImage": "/home/ryan/codes/thiscute.world/static/avatar/myself.jpg",
|
||||
"boxRadiusRatio": 1,
|
||||
"compactLockScreen": false,
|
||||
"dimmerOpacity": 0.2,
|
||||
"enableShadows": true,
|
||||
"forceBlackScreenCorners": false,
|
||||
"iRadiusRatio": 1,
|
||||
"language": "",
|
||||
"lockOnSuspend": true,
|
||||
"radiusRatio": 1,
|
||||
"scaleRatio": 1,
|
||||
"screenRadiusRatio": 1,
|
||||
"shadowDirection": "bottom_right",
|
||||
"shadowOffsetX": 2,
|
||||
"shadowOffsetY": 3,
|
||||
"showHibernateOnLockScreen": false,
|
||||
"showScreenCorners": false,
|
||||
"showSessionButtonsOnLockScreen": true
|
||||
},
|
||||
"hooks": {
|
||||
"darkModeChange": "",
|
||||
"enabled": false,
|
||||
"performanceModeDisabled": "",
|
||||
"performanceModeEnabled": "",
|
||||
"screenLock": "",
|
||||
"screenUnlock": "",
|
||||
"wallpaperChange": ""
|
||||
},
|
||||
"location": {
|
||||
"analogClockInCalendar": false,
|
||||
"firstDayOfWeek": 1,
|
||||
"name": "Changsha",
|
||||
"showCalendarEvents": true,
|
||||
"showCalendarWeather": true,
|
||||
"showWeekNumberInCalendar": false,
|
||||
"use12hourFormat": false,
|
||||
"useFahrenheit": false,
|
||||
"weatherEnabled": true,
|
||||
"weatherShowEffects": true
|
||||
},
|
||||
"network": {
|
||||
"wifiEnabled": true
|
||||
},
|
||||
"nightLight": {
|
||||
"autoSchedule": true,
|
||||
"dayTemp": "6500",
|
||||
"enabled": true,
|
||||
"forced": false,
|
||||
"manualSunrise": "06:30",
|
||||
"manualSunset": "18:30",
|
||||
"nightTemp": "4000"
|
||||
},
|
||||
"notifications": {
|
||||
"backgroundOpacity": 1,
|
||||
"criticalUrgencyDuration": 15,
|
||||
"enableKeyboardLayoutToast": true,
|
||||
"enabled": true,
|
||||
"location": "top_right",
|
||||
"lowUrgencyDuration": 3,
|
||||
"monitors": [],
|
||||
"normalUrgencyDuration": 8,
|
||||
"overlayLayer": true,
|
||||
"respectExpireTimeout": false,
|
||||
"sounds": {
|
||||
"criticalSoundFile": "",
|
||||
"enabled": true,
|
||||
"excludedApps": "discord,firefox,chrome,chromium,edge",
|
||||
"lowSoundFile": "",
|
||||
"normalSoundFile": "",
|
||||
"separateSounds": false,
|
||||
"volume": 0.5
|
||||
}
|
||||
},
|
||||
"osd": {
|
||||
"autoHideMs": 2000,
|
||||
"backgroundOpacity": 1,
|
||||
"enabled": true,
|
||||
"enabledTypes": [0, 1, 2, 4],
|
||||
"location": "top_right",
|
||||
"monitors": [],
|
||||
"overlayLayer": true
|
||||
},
|
||||
"screenRecorder": {
|
||||
"audioCodec": "opus",
|
||||
"audioSource": "default_output",
|
||||
"colorRange": "limited",
|
||||
"directory": "/home/ryan/Videos",
|
||||
"frameRate": 30,
|
||||
"quality": "high",
|
||||
"showCursor": true,
|
||||
"videoCodec": "h264",
|
||||
"videoSource": "portal"
|
||||
},
|
||||
"sessionMenu": {
|
||||
"countdownDuration": 10000,
|
||||
"enableCountdown": true,
|
||||
"largeButtonsStyle": true,
|
||||
"position": "center",
|
||||
"powerOptions": [
|
||||
{
|
||||
"action": "lock",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "suspend",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "hibernate",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "reboot",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "logout",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
},
|
||||
{
|
||||
"action": "shutdown",
|
||||
"command": "",
|
||||
"countdownEnabled": true,
|
||||
"enabled": true
|
||||
}
|
||||
],
|
||||
"showHeader": true
|
||||
},
|
||||
"settingsVersion": 32,
|
||||
"systemMonitor": {
|
||||
"cpuCriticalThreshold": 95,
|
||||
"cpuPollingInterval": 10000,
|
||||
"cpuWarningThreshold": 80,
|
||||
"criticalColor": "",
|
||||
"diskCriticalThreshold": 90,
|
||||
"diskPollingInterval": 250,
|
||||
"diskWarningThreshold": 80,
|
||||
"enableDgpuMonitoring": false,
|
||||
"gpuCriticalThreshold": 90,
|
||||
"gpuPollingInterval": 3000,
|
||||
"gpuWarningThreshold": 80,
|
||||
"memCriticalThreshold": 90,
|
||||
"memPollingInterval": 250,
|
||||
"memWarningThreshold": 80,
|
||||
"networkPollingInterval": 3000,
|
||||
"tempCriticalThreshold": 90,
|
||||
"tempPollingInterval": 3000,
|
||||
"tempWarningThreshold": 80,
|
||||
"useCustomColors": false,
|
||||
"warningColor": ""
|
||||
},
|
||||
"templates": {
|
||||
"alacritty": false,
|
||||
"cava": false,
|
||||
"code": false,
|
||||
"discord": false,
|
||||
"emacs": false,
|
||||
"enableUserTemplates": false,
|
||||
"foot": false,
|
||||
"fuzzel": false,
|
||||
"ghostty": false,
|
||||
"gtk": false,
|
||||
"helix": false,
|
||||
"hyprland": false,
|
||||
"kcolorscheme": false,
|
||||
"kitty": false,
|
||||
"mango": false,
|
||||
"niri": false,
|
||||
"pywalfox": false,
|
||||
"qt": false,
|
||||
"spicetify": false,
|
||||
"telegram": false,
|
||||
"vicinae": false,
|
||||
"walker": false,
|
||||
"wezterm": false,
|
||||
"yazi": false,
|
||||
"zed": false
|
||||
},
|
||||
"ui": {
|
||||
"bluetoothDetailsViewMode": "grid",
|
||||
"bluetoothHideUnnamedDevices": false,
|
||||
"fontDefault": "Maple Mono NF CN",
|
||||
"fontDefaultScale": 1,
|
||||
"fontFixed": "Maple Mono NF CN",
|
||||
"fontFixedScale": 1,
|
||||
"panelBackgroundOpacity": 0.85,
|
||||
"panelsAttachedToBar": true,
|
||||
"settingsPanelMode": "attached",
|
||||
"tooltipsEnabled": true,
|
||||
"wifiDetailsViewMode": "grid"
|
||||
},
|
||||
"wallpaper": {
|
||||
"directory": "/home/ryan/Pictures/Wallpapers",
|
||||
"enableMultiMonitorDirectories": false,
|
||||
"enabled": true,
|
||||
"fillColor": "#000000",
|
||||
"fillMode": "crop",
|
||||
"hideWallpaperFilenames": false,
|
||||
"monitorDirectories": [],
|
||||
"overviewEnabled": true,
|
||||
"panelPosition": "follow_bar",
|
||||
"randomEnabled": true,
|
||||
"randomIntervalSec": 600,
|
||||
"recursiveSearch": false,
|
||||
"setWallpaperOnAllMonitors": true,
|
||||
"transitionDuration": 1500,
|
||||
"transitionEdgeSmoothness": 0.05,
|
||||
"transitionType": "random",
|
||||
"useWallhaven": false,
|
||||
"wallhavenCategories": "111",
|
||||
"wallhavenOrder": "desc",
|
||||
"wallhavenPurity": "100",
|
||||
"wallhavenQuery": "",
|
||||
"wallhavenRatios": "",
|
||||
"wallhavenResolutionHeight": "",
|
||||
"wallhavenResolutionMode": "atleast",
|
||||
"wallhavenResolutionWidth": "",
|
||||
"wallhavenSorting": "relevance"
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
vulkan-tools
|
||||
mesa-demos
|
||||
nvitop
|
||||
(pkgs-x64.zoom-us.override { hyprlandXdgDesktopPortalSupport = true; })
|
||||
(pkgs-x64.zoom-us)
|
||||
];
|
||||
|
||||
programs.mpv = {
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
wallpapers,
|
||||
...
|
||||
}:
|
||||
{
|
||||
systemd.user.services.wallpaper = {
|
||||
Unit = {
|
||||
Description = "Wallpaper Switcher daemon";
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
];
|
||||
Wants = [ "graphical-session-pre.target" ];
|
||||
};
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
Service = {
|
||||
ExecStart = lib.getExe (
|
||||
pkgs.writeShellApplication {
|
||||
name = "wallpaper";
|
||||
runtimeInputs = with pkgs; [
|
||||
procps
|
||||
feh
|
||||
swaybg
|
||||
python3
|
||||
];
|
||||
text = ''
|
||||
export WALLPAPERS_DIR="${wallpapers}"
|
||||
export WALLPAPERS_STATE_FILEPATH="${config.xdg.stateHome}/wallpaper-switcher/switcher_state"
|
||||
export WALLPAPER_WAIT_MIN=60
|
||||
export WALLPAPER_WAIT_MAX=180
|
||||
exec ${./wallpaper-switcher.py}
|
||||
'';
|
||||
}
|
||||
);
|
||||
RestartSec = 3;
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
This script will randomly select a wallpaper from the wallpapers directory.
|
||||
It will skip the last wallpaper used, so that you don't get the same wallpaper.
|
||||
|
||||
It will also set the wallpaper using `feh` for X11, or `swaybg` for Wayland.
|
||||
|
||||
Maintainer: ryan4yin [xiaoyin_c@qq.com]
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import random
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Union
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class WallpaperSwitcher:
|
||||
def __init__(
|
||||
self,
|
||||
wait_min,
|
||||
wait_max,
|
||||
wallpapers_dir: Path,
|
||||
state_filepath: Path,
|
||||
image_extensions: Union[tuple, list],
|
||||
) -> None:
|
||||
self.wallpapers_dir = wallpapers_dir
|
||||
self.image_extensions = image_extensions
|
||||
self.state_filepath = state_filepath
|
||||
self.wait_min = wait_min
|
||||
self.wait_max = wait_max
|
||||
|
||||
# initialize the state file
|
||||
self.state_filepath.parent.mkdir(parents=True, exist_ok=True)
|
||||
self.current_state = self.state_filepath.open("a+", encoding="utf-8")
|
||||
self.current_wallpaper_list = list()
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Iterate on all wallpapers in the wallpapers directory, cycling through them in a random order.
|
||||
"""
|
||||
self.initialize_state()
|
||||
while True:
|
||||
for i, w in enumerate(self.current_wallpaper_list):
|
||||
if i < self.current_wallpaper_index:
|
||||
continue
|
||||
|
||||
logger.info(
|
||||
f"Setting wallpaper {i+1}/{len(self.current_wallpaper_list)}: {w}"
|
||||
)
|
||||
self.set_wallpaper(w)
|
||||
|
||||
# update the state
|
||||
self.current_wallpaper_index = i
|
||||
self.save_state()
|
||||
|
||||
wait_time = random.randint(self.wait_min, self.wait_max)
|
||||
logger.info(f"Waiting {wait_time} seconds...")
|
||||
time.sleep(wait_time)
|
||||
|
||||
# reset the state
|
||||
self.reset_state()
|
||||
|
||||
def save_state(self):
|
||||
wallpaper_list = [w.as_posix() for w in self.current_wallpaper_list]
|
||||
state = {
|
||||
"current_wallpaper_list": wallpaper_list,
|
||||
"current_wallpaper_index": self.current_wallpaper_index,
|
||||
}
|
||||
self.current_state.truncate(0)
|
||||
self.current_state.write(json.dumps(state, indent=4))
|
||||
self.current_state.flush()
|
||||
|
||||
def initialize_state(self):
|
||||
self.current_state.seek(0)
|
||||
data = self.current_state.read()
|
||||
if not data:
|
||||
logger.info("No state found, resetting...")
|
||||
self.reset_state()
|
||||
else:
|
||||
logger.info("State found, reloading...")
|
||||
state = json.loads(data)
|
||||
wallpapers = [Path(w) for w in state["current_wallpaper_list"]]
|
||||
self.current_wallpaper_list = wallpapers
|
||||
self.current_wallpaper_index = state["current_wallpaper_index"]
|
||||
|
||||
def reset_state(self):
|
||||
logger.info(f"Rescanning & shuffle wallpapers in {self.wallpapers_dir} ...")
|
||||
wallpapers = list(
|
||||
filter(
|
||||
lambda x: x.suffix in self.image_extensions,
|
||||
self.wallpapers_dir.iterdir(),
|
||||
)
|
||||
)
|
||||
random.shuffle(wallpapers)
|
||||
self.current_wallpaper_list = wallpapers
|
||||
self.current_wallpaper_index = 0
|
||||
|
||||
def set_wallpaper(self, path: Path):
|
||||
# check if we are running under x11 or wayland
|
||||
if (
|
||||
"WAYLAND_DISPLAY" in os.environ
|
||||
or os.environ.get("XDG_SESSION_TYPE") == "wayland"
|
||||
):
|
||||
self.set_wallpaper_wayland(path)
|
||||
else:
|
||||
self.set_wallpaper_x11(path)
|
||||
|
||||
def set_wallpaper_x11(self, path: Path):
|
||||
subprocess.run(["feh", "--bg-fill", path])
|
||||
|
||||
def set_wallpaper_wayland(self, path: Path):
|
||||
# find all swaybg processes
|
||||
swaybg_pids = subprocess.run(
|
||||
["pgrep", "-f", "swaybg"], stdout=subprocess.PIPE
|
||||
).stdout.decode("utf-8")
|
||||
|
||||
# run swaybg in the background, and make it running even after the parent process exits
|
||||
subprocess.Popen(
|
||||
["swaybg", "--output", "*", "--mode", "fill", "--image", path],
|
||||
start_new_session=True,
|
||||
)
|
||||
time.sleep(1)
|
||||
|
||||
# kill all old swaybg processes
|
||||
for pid in swaybg_pids.splitlines():
|
||||
try:
|
||||
os.kill(int(pid), 9)
|
||||
except ProcessLookupError:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
wallpapers_dir = os.getenv("WALLPAPERS_DIR")
|
||||
state_filepath = os.getenv("WALLPAPERS_STATE_FILEPATH")
|
||||
if not wallpapers_dir:
|
||||
raise Exception("WALLPAPERS_DIR not set")
|
||||
if not state_filepath:
|
||||
raise Exception("WALLPAPERS_STATE_FILEPATH not set")
|
||||
|
||||
image_postfix = (
|
||||
".jpg",
|
||||
".jpeg",
|
||||
".png",
|
||||
# ".gif",
|
||||
# ".webp"
|
||||
)
|
||||
wait_min = int(os.getenv("WALLPAPER_WAIT_MIN", 60))
|
||||
wait_max = int(os.getenv("WALLPAPER_WAIT_MAX", 300))
|
||||
wallpaper_switcher = WallpaperSwitcher(
|
||||
wait_min,
|
||||
wait_max,
|
||||
Path(wallpapers_dir).expanduser(),
|
||||
Path(state_filepath).expanduser(),
|
||||
image_postfix,
|
||||
)
|
||||
wallpaper_switcher.run()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,9 +0,0 @@
|
||||
# Hyprland
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
show hyprland's log:
|
||||
|
||||
```bash
|
||||
hyprctl rollinglog
|
||||
```
|
||||
@@ -1,22 +0,0 @@
|
||||
#-- Startup ----------------------------------------------------
|
||||
## Fix anyrun
|
||||
## https://github.com/anyrun-org/anyrun/issues/153
|
||||
exec-once = ln -s "$XDG_RUNTIME_DIR/hypr" /tmp/hypr
|
||||
|
||||
## Launch my daily-used apps at startup
|
||||
# Terminals
|
||||
exec-once = foot
|
||||
exec-once = alacritty
|
||||
# Network
|
||||
exec-once = clash-verge &
|
||||
# Browsers
|
||||
exec-once = firefox
|
||||
exec-once = google-chrome-stable
|
||||
exec-once = chromium-browser
|
||||
# Chat
|
||||
exec-once = Telegram
|
||||
|
||||
|
||||
# Switch to Terminals & Browsers
|
||||
exec-once = sleep 3; hyprctl dispatch workspace 1
|
||||
exec-once = sleep 3; hyprctl dispatch workspace 4
|
||||
@@ -1,5 +0,0 @@
|
||||
# -- Fcitx5 input method
|
||||
windowrule=pseudo,class:^(fcitx)$ # enable this will make fcitx5 works, but fcitx5-configtool will not work!
|
||||
exec-once=cp ~/.config/fcitx5/profile-bak ~/.config/fcitx5/profile # restore fcitx5 profile managed by nixos
|
||||
exec-once=fcitx5 -d --replace # start fcitx5 daemon
|
||||
bind=ALT,E,exec,pkill fcitx5 -9;sleep 1;fcitx5 -d --replace; sleep 1;fcitx5-remote -r
|
||||
@@ -1,151 +0,0 @@
|
||||
# https://wiki.hyprland.org/Configuring/Binds/
|
||||
#
|
||||
# Format:
|
||||
# bind = MODS, key, dispatcher, params
|
||||
|
||||
#-- Keybindings ----------------------------------------------------
|
||||
$mod = ALT # use ALT instead of SUPER, to match the mod key with aerospace on darwin.
|
||||
$files = thunar
|
||||
$browser = firefox
|
||||
|
||||
|
||||
# SYSTEM
|
||||
# ============================================================================
|
||||
|
||||
# - Drag modifier
|
||||
# BIND MOD KEY DISPATCHER
|
||||
bindm = $mod, mouse:272, movewindow
|
||||
bindm = $mod, mouse:273, resizewindow
|
||||
|
||||
# - System
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod, q, killactive # kill window
|
||||
|
||||
# - Terminal
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod, Return, exec, foot
|
||||
bind = $mod SHIFT, Return, exec, alacritty
|
||||
bind = $mod, d, exec, anyrun
|
||||
|
||||
# - Hardware control
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
# https://wiki.archlinux.org/title/WirePlumber
|
||||
bindel = , XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+ --limit 1.0
|
||||
bindel = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-
|
||||
bindl = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindl = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bind = , XF86MonBrightnessUp, exec, brightnessctl --class=backlight set 1%+
|
||||
bind = , XF86MonBrightnessDown, exec, brightnessctl --class=backlight set 1%-
|
||||
bind = , XF86KbdBrightnessUp, exec, brightnessctl --device=kbd_backlight set 10%+
|
||||
bind = , XF86KbdBrightnessDown, exec, brightnessctl --device=kbd_backlight set 10%-
|
||||
bind = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bind = , XF86AudioNext, exec, playerctl next
|
||||
bind = , XF86AudioPrev, exec, playerctl previous
|
||||
bind = , XF86Search, exec, anyrun
|
||||
|
||||
# WORKSPACES
|
||||
# ============================================================================
|
||||
|
||||
# - Switch to workspace
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
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
|
||||
|
||||
# - Move focussed window to workspace
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
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, mouse_down, workspace, e+1
|
||||
bind = $mod, mouse_up, workspace, e-1
|
||||
|
||||
|
||||
# Window
|
||||
# ============================================================================
|
||||
|
||||
# Move Window
|
||||
bind = $mod SHIFT, left, movewindow, l
|
||||
bind = $mod SHIFT, right, movewindow, r
|
||||
bind = $mod SHIFT, up, movewindow, u
|
||||
bind = $mod SHIFT, down, movewindow, d
|
||||
|
||||
# Focus Window
|
||||
bind = $mod, left, movefocus, l
|
||||
bind = $mod, right, movefocus, r
|
||||
bind = $mod, up, movefocus, u
|
||||
bind = $mod, down, movefocus, d
|
||||
|
||||
# Resize Window
|
||||
bind = $mod CTRL, left, resizeactive, -20 0
|
||||
bind = $mod CTRL, right, resizeactive, 20 0
|
||||
bind = $mod CTRL, up, resizeactive, 0 -20
|
||||
bind = $mod CTRL, down, resizeactive, 0 20
|
||||
|
||||
# MODES
|
||||
# ============================================================================
|
||||
|
||||
# BIND MOD KEY DISPATCHER VALUE
|
||||
bind = $mod SHIFT, d, submap, mode_displays
|
||||
bind = $mod SHIFT, a, submap, mode_move
|
||||
bind = $mod , r, submap, mode_resize
|
||||
bind = $mod SHIFT, s, submap, mode_screenshot
|
||||
bind = $mod SHIFT, e, submap, mode_shutdown
|
||||
|
||||
# LAYOUT
|
||||
# ============================================================================
|
||||
|
||||
# ## Action // Toggle floating ##
|
||||
bind = $mod, space, togglefloating
|
||||
|
||||
# ## Action // Toggle fullscreen ##
|
||||
bind = $mod, f, fullscreen
|
||||
|
||||
# ## Action // Switch to window stacking ##
|
||||
# bind = $mod, s, layout stacking
|
||||
|
||||
# ## Action // Switch to window tabbing ##
|
||||
# bind = $mod, w, layout tabbed
|
||||
|
||||
# ## Action // Toggle window splitting ##
|
||||
# bind = $mod, e, layout toggle split
|
||||
|
||||
|
||||
# Misc
|
||||
# ============================================================================
|
||||
|
||||
# -- Screenshots --
|
||||
bind = , Print, exec, hyprshot -m output -o ~/Pictures/Screenshots -- imv
|
||||
bind = $mod, Print, exec, hyprshot -m window -o ~/Pictures/Screenshots -- imv
|
||||
bind = CTRL, Print, exec, hyprshot -m region -o ~/Pictures/Screenshots
|
||||
|
||||
# -- Others --
|
||||
bind = CTRL ALT, l, exec, swaylock
|
||||
bind = $mod SHIFT, x, exec, wlogout
|
||||
bind = $mod, n, exec, nm-connection-editor # need install network-manager-applet
|
||||
|
||||
|
||||
# Gestures
|
||||
# ============================================================================
|
||||
# https://wiki.hypr.land/Configuring/Gestures/
|
||||
|
||||
# gesture = fingers, direction, action, options
|
||||
gesture = 3, horizontal, workspace
|
||||
gesture = 3, down, mod: ALT, close
|
||||
gesture = 3, up, mod: SUPER, scale: 1.5, fullscreen
|
||||
|
||||
@@ -1,140 +0,0 @@
|
||||
# WINDOWS AND BORDERS
|
||||
# ================================================
|
||||
general {
|
||||
layout = dwindle
|
||||
|
||||
# Cursor
|
||||
no_focus_fallback = true
|
||||
|
||||
# Gaps
|
||||
gaps_in = 5
|
||||
gaps_out = 5
|
||||
|
||||
# Borders
|
||||
border_size = 2
|
||||
col.active_border = 0xff4477ff
|
||||
col.inactive_border = 0xff2f343f
|
||||
|
||||
# Resize
|
||||
resize_on_border = false
|
||||
hover_icon_on_border = false
|
||||
|
||||
# Allow tearing (you must add a window rule to the window to allow tearing)
|
||||
allow_tearing = false
|
||||
}
|
||||
|
||||
cursor {
|
||||
inactive_timeout = 900 # Hide the cursor after n ms (also works on screenlock)
|
||||
no_warps = false # Never move the cursor automatically
|
||||
}
|
||||
|
||||
ecosystem {
|
||||
no_donation_nag = true
|
||||
no_update_news = true
|
||||
}
|
||||
|
||||
misc {
|
||||
# Allow windows to steal focus - (only xorg apps currently)
|
||||
focus_on_activate = false
|
||||
|
||||
# Enable if you use personalized wallpapers
|
||||
disable_hyprland_logo = true
|
||||
}
|
||||
|
||||
# VISUAL EFFECTS
|
||||
# ================================================
|
||||
|
||||
# See: https://wiki.hyprland.org/Configuring/Variables
|
||||
decoration {
|
||||
|
||||
# Round borders
|
||||
rounding = 8
|
||||
|
||||
# Shadow
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
active_opacity=1.0
|
||||
inactive_opacity=0.9
|
||||
fullscreen_opacity=1.0
|
||||
|
||||
blur {
|
||||
enabled=true
|
||||
new_optimizations = true
|
||||
size=3 # minimum 1
|
||||
passes=1 # minimum 1, more passes = more resource intensive.
|
||||
ignore_opacity=false
|
||||
}
|
||||
}
|
||||
|
||||
# See: https://wiki.hyprland.org/Configuring/Animations
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# BEZIERS NAME X0 Y0 X1 Y1
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
# ANIMATION NAME ON SPEED CURVE STYLE
|
||||
animation = windows, 1, 2, myBezier
|
||||
animation = windowsOut, 1, 2, default, popin 80%
|
||||
animation = border, 1, 5, default
|
||||
animation = fadeIn, 1, 2, default
|
||||
animation = fadeOut, 1, 2, default
|
||||
animation = workspaces, 1, 6, default, fade
|
||||
animation = specialWorkspace, 1, 3, myBezier, slide
|
||||
}
|
||||
|
||||
|
||||
# LAYOUT DETAILS
|
||||
# ================================================
|
||||
|
||||
# See: https://wiki.hyprland.org/Configuring/Dwindle-Layout/
|
||||
dwindle {
|
||||
pseudotile = yes
|
||||
preserve_split = yes
|
||||
}
|
||||
|
||||
# See: https://wiki.hyprland.org/Configuring/Master-Layout
|
||||
master {
|
||||
new_on_top = true
|
||||
}
|
||||
|
||||
#-- Input ----------------------------------------------------
|
||||
# Configure mouse and touchpad here.
|
||||
input {
|
||||
kb_layout=us
|
||||
kb_variant=
|
||||
kb_model=
|
||||
kb_options=
|
||||
kb_rules=
|
||||
|
||||
# mouse focus will not switch to the hovered window unless the mouse crosses a window boundary
|
||||
follow_mouse=1
|
||||
mouse_refocus=false
|
||||
|
||||
natural_scroll=0
|
||||
touchpad {
|
||||
natural_scroll = 1
|
||||
clickfinger_behavior = true
|
||||
disable_while_typing = true # seems useless...
|
||||
# tap - 轻触触摸板, click - 点击触摸板
|
||||
# disable tap related features to avoid palm rejection.
|
||||
tap-to-click = false
|
||||
tap-and-drag = false
|
||||
|
||||
}
|
||||
force_no_accel=0
|
||||
# repeat_rate=
|
||||
# repeat_delay=
|
||||
numlock_by_default=1
|
||||
}
|
||||
|
||||
# Monitors
|
||||
# ===================================================
|
||||
monitor = , preferred, auto, 1
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
# You can discover a class with 'hyprctl clients'
|
||||
# Check the syntax on: https://wiki.hyprland.org/Configuring/Window-Rules/
|
||||
|
||||
|
||||
# WINDOW RULES
|
||||
# ============================================================================
|
||||
|
||||
# Workspace RULE WINDOW
|
||||
# Terminals
|
||||
windowrulev2 = workspace 1, class:^(foot)$
|
||||
windowrulev2 = workspace 2, class:^(Alacritty)$
|
||||
# Work Chat / Meeting
|
||||
windowrulev2 = workspace 3, class:^(Zoom Workplace)$
|
||||
# Browsers
|
||||
windowrulev2 = workspace 4, class:^(firefox)$
|
||||
windowrulev2 = workspace 5, class:^(google-chrome)$
|
||||
windowrulev2 = workspace 5, class:^(chromium-browser)$
|
||||
# Chat
|
||||
windowrulev2 = workspace 6, class:^(QQ)$
|
||||
windowrulev2 = workspace 6, class:^(wechat)$
|
||||
windowrulev2 = workspace 6, class:^(org.telegram.desktop)$
|
||||
# Music
|
||||
# windowrulev2 = workspace 7, class:^(music)$
|
||||
# Mail / Calendar
|
||||
windowrulev2 = workspace 8, class:^(thunderbird)$,title:^(.*Reminder)
|
||||
# File Manager & Image/PDF Viewer
|
||||
windowrulev2 = workspace 9, class:^(thunder)$
|
||||
windowrulev2 = workspace 9, class:^(code)$ # VS Code
|
||||
windowrulev2 = workspace 9, class:^(cursor)$ # Cursor AI Editor
|
||||
# Other
|
||||
windowrulev2 = workspace 10, class:^(org.wireshark.Wireshark)$
|
||||
windowrulev2 = workspace 10, class:^(clash-verge)$
|
||||
|
||||
|
||||
# Float RULE WINDOW
|
||||
windowrulev2 = float, class:^(Zoom Workplace)$
|
||||
windowrulev2 = float, class:^(pulsemixer)$
|
||||
windowrulev2 = float, class:^(org.pulseaudio.pavucontrol)$
|
||||
windowrulev2 = float, class:^(nm-connection-editor)$
|
||||
windowrulev2 = float, class:^(feh|imv|Gpicview)$
|
||||
windowrulev2 = float, title:^(File Transfer*)$
|
||||
windowrulev2 = float, title:^(Firefox — Sharing Indicator)$
|
||||
windowrulev2 = float, class:^(firefox)$,title:^(library)
|
||||
windowrulev2 = float, title:^(Save File)$
|
||||
windowrulev2 = float, class:^(blueman-manager)$
|
||||
windowrulev2 = float, class:^(thunderbird)$,title:^(.*Reminder)
|
||||
|
||||
# HOT FIXES
|
||||
# ============================================================================
|
||||
|
||||
# Steam
|
||||
# Fix: Steam menus disappearing on mouseover
|
||||
windowrulev2 = stayfocused, title:^()$, class:^(steam)$
|
||||
windowrulev2 = minsize 1 1, title:^()$, class:^(steam)$
|
||||
# Fix: Steam starts in a broken position as float window
|
||||
windowrulev2 = tile, class:^(steam)$
|
||||
windowrulev2 = fullscreen, class:^(steam)$
|
||||
# Games
|
||||
# windowrulev2 = immediate, class:^(steam_app_xxx)$ # game 1
|
||||
|
||||
# wlogout
|
||||
windowrulev2 = float, class:^(wlogout)$
|
||||
windowrulev2 = move 0 0, class:^(wlogout)$
|
||||
windowrulev2 = size 100% 100%, class:^(wlogout)$
|
||||
windowrulev2 = animation slide, class:^(wlogout)$
|
||||
@@ -1,45 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}@args:
|
||||
let
|
||||
cfg = config.modules.desktop.hyprland;
|
||||
in
|
||||
{
|
||||
options.modules.desktop.hyprland = {
|
||||
enable = lib.mkEnableOption "hyprland compositor";
|
||||
settings = lib.mkOption {
|
||||
type =
|
||||
with lib.types;
|
||||
let
|
||||
valueType =
|
||||
nullOr (oneOf [
|
||||
bool
|
||||
int
|
||||
float
|
||||
str
|
||||
path
|
||||
(attrsOf valueType)
|
||||
(listOf valueType)
|
||||
])
|
||||
// {
|
||||
description = "Hyprland configuration value";
|
||||
};
|
||||
in
|
||||
valueType;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = cfg.settings;
|
||||
}
|
||||
(import ./hyprland.nix args)
|
||||
(import ./xdg.nix args)
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
package = pkgs.hyprland;
|
||||
in
|
||||
{
|
||||
xdg.configFile =
|
||||
let
|
||||
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
|
||||
confPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/hyprland/conf";
|
||||
in
|
||||
{
|
||||
"hypr/configs".source = mkSymlink confPath;
|
||||
};
|
||||
|
||||
# NOTE:
|
||||
# We have to enable hyprland/i3's systemd user service in home-manager,
|
||||
# so that gammastep/wallpaper-switcher's user service can be start correctly!
|
||||
# they are all depending on hyprland/i3's user graphical-session
|
||||
wayland.windowManager.hyprland = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
settings = {
|
||||
source =
|
||||
let
|
||||
configPath = "${config.home.homeDirectory}/.config/hypr/configs";
|
||||
in
|
||||
[
|
||||
"${configPath}/exec.conf"
|
||||
"${configPath}/fcitx5.conf"
|
||||
"${configPath}/keybindings.conf"
|
||||
"${configPath}/settings.conf"
|
||||
"${configPath}/windowrules.conf"
|
||||
];
|
||||
env = [
|
||||
|
||||
];
|
||||
};
|
||||
# gammastep/wallpaper-switcher need this to be enabled.
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
};
|
||||
};
|
||||
services.polkit-gnome.enable = true; # polkit
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${package}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
|
||||
config = {
|
||||
common = {
|
||||
# Use xdg-desktop-portal-gtk for every portal interface...
|
||||
default = [
|
||||
"hyprland"
|
||||
"gtk"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Sets environment variable NIXOS_XDG_OPEN_USE_PORTAL to 1
|
||||
# This will make xdg-open use the portal to open programs,
|
||||
# which resolves bugs involving programs opening inside FHS envs or with unexpected env vars set from wrappers.
|
||||
# xdg-open is used by almost all programs to open a unknown file/uri
|
||||
# alacritty as an example, it use xdg-open as default, but you can also custom this behavior
|
||||
# and vscode has open like `External Uri Openers`
|
||||
xdgOpenUsePortal = true;
|
||||
# ls /etc/profiles/per-user/ryan/share/xdg-desktop-portal/portals
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-gtk # for provides file picker / OpenURI
|
||||
# xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-hyprland # for Hyprland
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -8,6 +8,7 @@ include "./keybindings.kdl"
|
||||
include "./windowrules.kdl"
|
||||
include "./spawn-at-startup.kdl"
|
||||
include "./niri-hardware.kdl"
|
||||
include "./noctalia-shell.kdl"
|
||||
|
||||
// Input device configuration.
|
||||
// Find the full list of options on the wiki:
|
||||
@@ -225,8 +226,3 @@ animations {
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://yalter.github.io/niri/Configuration:-Window-Rules
|
||||
|
||||
layer-rule {
|
||||
match namespace="waybar"
|
||||
opacity 0.800000
|
||||
}
|
||||
|
||||
@@ -16,8 +16,14 @@ binds {
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Mod+Return { spawn "foot"; }
|
||||
Mod+Shift+Return { spawn "alacritty"; }
|
||||
Mod+D { spawn "anyrun"; }
|
||||
CTRL+Alt+L { spawn "swaylock"; }
|
||||
|
||||
// Launcher
|
||||
Mod+D { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
|
||||
Mod+Space { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
|
||||
XF86Search { spawn "noctalia-shell" "ipc" "call" "launcher" "toggle"; }
|
||||
|
||||
// Locker
|
||||
CTRL+Alt+L { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; }
|
||||
|
||||
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
|
||||
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
|
||||
@@ -28,36 +34,44 @@ binds {
|
||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||
// Using spawn-sh allows to pass multiple arguments together with the command.
|
||||
// "-l 1.0" limits the volume to 100%.
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+ --limit 1.0"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||
// XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01+ --limit 1.0"; }
|
||||
// XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.01-"; }
|
||||
// XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
// XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteInput"; }
|
||||
|
||||
|
||||
// Example media keys mapping using playerctl.
|
||||
// This will work with any MPRIS-enabled media player.
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
||||
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
||||
// XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
||||
// XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
||||
// XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
||||
// XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "noctalia-shell ipc call media playPause"; }
|
||||
XF86AudioStop allow-when-locked=true { spawn-sh "noctalia-shell ipc call media pause"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "octalia-shell ipc call media previous"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "noctalia-shell ipc call media next"; }
|
||||
|
||||
// Example brightness key mappings for brightnessctl.
|
||||
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
|
||||
// but you need to manually put each argument in separate "" quotes.
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%+"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%-"; }
|
||||
// XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%+"; }
|
||||
// XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "1%-"; }
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; }
|
||||
|
||||
// keyboard backlight
|
||||
XF86KbdBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--device=kbd_backlight" "set" "10%+"; }
|
||||
XF86KbdBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--device=kbd_backlight" "set" "10%-"; }
|
||||
|
||||
// for apple-silicon touchbar
|
||||
XF86Search { spawn "anyrun"; }
|
||||
|
||||
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
||||
// You can also move the mouse into the top-left hot corner,
|
||||
// or do a four-finger swipe up on a touchpad.
|
||||
// Mod+O repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Q repeat=false { close-window; }
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
@@ -184,8 +198,6 @@ binds {
|
||||
// Makes the column "fill the rest of the space".
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
// Center all fully visible columns on screen.
|
||||
Mod+Ctrl+C { center-visible-columns; }
|
||||
|
||||
@@ -206,7 +218,6 @@ binds {
|
||||
|
||||
// Move the focused window between the floating and the tiling layout.
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
// Toggle tabbed column display mode.
|
||||
// Windows in this column will appear as vertical tabs,
|
||||
@@ -235,11 +246,18 @@ binds {
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
Mod+Shift+E { spawn "wlogout"; }
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
Mod+Q repeat=false { close-window; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
|
||||
// Utility shortcuts
|
||||
Mod+Shift+V { spawn "noctalia-shell" "ipc" "call" "launcher" "clipboard"; }
|
||||
Mod+C { spawn "noctalia-shell" "ipc" "call" "launcher" "calculator"; }
|
||||
|
||||
Mod+S { spawn "noctalia-shell" "ipc" "call" "controlCenter" "toggle"; }
|
||||
Mod+E { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; }
|
||||
}
|
||||
|
||||
20
home/linux/gui/niri/conf/noctalia-shell.kdl
Normal file
@@ -0,0 +1,20 @@
|
||||
// https://docs.noctalia.dev/getting-started/compositor-settings/niri/
|
||||
|
||||
window-rule {
|
||||
// Rounded corners for a modern look.
|
||||
geometry-corner-radius 20
|
||||
|
||||
// Clips window contents to the rounded corner boundaries.
|
||||
clip-to-geometry true
|
||||
}
|
||||
|
||||
debug {
|
||||
// Allows notification actions and window activation from Noctalia.
|
||||
honor-xdg-activation-with-invalid-serial
|
||||
}
|
||||
|
||||
// Set the overview wallpaper on the backdrop.
|
||||
layer-rule {
|
||||
match namespace="^noctalia-overview*"
|
||||
place-within-backdrop true
|
||||
}
|
||||
@@ -3,12 +3,6 @@
|
||||
// which may be more convenient to use.
|
||||
// See the binds section below for more spawn examples.
|
||||
|
||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
// spawn-at-startup "waybar"
|
||||
|
||||
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
||||
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
||||
|
||||
// Terminal applications
|
||||
spawn-at-startup "foot"
|
||||
spawn-at-startup "alacritty"
|
||||
|
||||
@@ -28,6 +28,7 @@ in
|
||||
{
|
||||
"niri/config.kdl".source = mkSymlink "${confPath}/config.kdl";
|
||||
"niri/keybindings.kdl".source = mkSymlink "${confPath}/keybindings.kdl";
|
||||
"niri/noctalia-shell.kdl".source = mkSymlink "${confPath}/noctalia-shell.kdl";
|
||||
"niri/spawn-at-startup.kdl".source = mkSymlink "${confPath}/spawn-at-startup.kdl";
|
||||
"niri/windowrules.kdl".source = mkSymlink "${confPath}/windowrules.kdl";
|
||||
};
|
||||
|
||||
@@ -8,9 +8,6 @@ in
|
||||
"${config.home.homeDirectory}/.ssh/${hostName}";
|
||||
|
||||
modules.desktop.nvidia.enable = false;
|
||||
modules.desktop.hyprland.settings.source = [
|
||||
"${config.home.homeDirectory}/nix-config/hosts/12kingdoms-shoukei/hypr-hardware.conf"
|
||||
];
|
||||
|
||||
xdg.configFile."niri/niri-hardware.kdl".source =
|
||||
mkSymlink "${config.home.homeDirectory}/nix-config/hosts/12kingdoms-shoukei/niri-hardware.kdl";
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
# https://wiki.hyprland.org/Configuring/Monitors/
|
||||
#
|
||||
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
||||
# highres: get the best possible resolution
|
||||
# auto: position automatically
|
||||
# 1.33: scale to 1.33 times
|
||||
# bitdepth,10: enable 10 bit support
|
||||
monitor=eDP-1, highres@highrr, 0x0, 1.33, bitdepth,10
|
||||
@@ -7,9 +7,6 @@ in
|
||||
|
||||
modules.desktop.nvidia.enable = true;
|
||||
|
||||
modules.desktop.hyprland.settings.source = [
|
||||
"${config.home.homeDirectory}/nix-config/hosts/idols-ai/hypr-hardware.conf"
|
||||
];
|
||||
xdg.configFile."niri/niri-hardware.kdl".source =
|
||||
mkSymlink "${config.home.homeDirectory}/nix-config/hosts/idols-ai/niri-hardware.kdl";
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
# https://wiki.hyprland.org/Configuring/Monitors/
|
||||
#
|
||||
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
||||
# highres: get the best possible resolution
|
||||
# auto: position automatically
|
||||
# 1.5: scale to 1.5 times
|
||||
# bitdepth,10: enable 10 bit support
|
||||
#
|
||||
# P32A2V - 3840x2160@144
|
||||
# Hyprshot have problems which HDR.
|
||||
# monitor=DP-2, highres@highrr, 0x0, 1.5, bitdepth,10, cm, hdr, sdrbrightness, 1.3, sdrsaturation, 1
|
||||
monitor=DP-2, highres@highrr, 0x0, 1.5, bitdepth,10
|
||||
# 27D1U - 3840x2160@60
|
||||
monitor=HDMI-A-1, highres@highrr, auto-right, 1.5, bitdepth,10
|
||||
|
||||
|
||||
# Bind Workspace to Monitors
|
||||
# Terminals
|
||||
workspace = 1, monitor:HDMI-A-1
|
||||
workspace = 2, monitor:HDMI-A-1
|
||||
# Work Chat / Meeting
|
||||
workspace = 3, monitor:HDMI-A-1
|
||||
# Browsers
|
||||
workspace = 4, monitor:DP-2
|
||||
workspace = 5, monitor:DP-2
|
||||
# Chat
|
||||
workspace = 6, monitor:HDMI-A-1
|
||||
# Music
|
||||
workspace = 7, monitor:HDMI-A-1
|
||||
# Mail / Calendar
|
||||
workspace = 8, monitor:DP-2
|
||||
# File Manager & Image/PDF Viewer
|
||||
workspace = 9, monitor:DP-2
|
||||
# Other
|
||||
workspace = 10, monitor:HDMI-A-1
|
||||
@@ -51,18 +51,6 @@ let
|
||||
];
|
||||
};
|
||||
|
||||
modules-hyprland = {
|
||||
nixos-modules = [
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-modules = [
|
||||
{
|
||||
modules.desktop.hyprland.enable = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.home-modules;
|
||||
};
|
||||
|
||||
modules-niri = {
|
||||
nixos-modules = [
|
||||
{ programs.niri.enable = true; }
|
||||
@@ -76,14 +64,11 @@ let
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
# host with hyprland compositor
|
||||
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
|
||||
"${name}-niri" = mylib.nixosSystem (modules-niri // args);
|
||||
};
|
||||
|
||||
# generate iso image for hosts with desktop environment
|
||||
packages = {
|
||||
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
|
||||
"${name}-niri" = inputs.self.nixosConfigurations."${name}-niri".config.formats.iso;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"shoukei-hyprland"
|
||||
"shoukei-niri"
|
||||
];
|
||||
in
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"shoukei-hyprland"
|
||||
"shoukei-niri"
|
||||
];
|
||||
in
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
}:
|
||||
let
|
||||
specialExpected = {
|
||||
"shoukei-hyprland" = "shoukei";
|
||||
"shoukei-niri" = "shoukei";
|
||||
};
|
||||
specialHostNames = builtins.attrNames specialExpected;
|
||||
|
||||
@@ -50,16 +50,6 @@ let
|
||||
];
|
||||
};
|
||||
|
||||
modules-hyprland = {
|
||||
nixos-modules = [
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-modules = [
|
||||
{ modules.desktop.hyprland.enable = true; }
|
||||
]
|
||||
++ base-modules.home-modules;
|
||||
};
|
||||
|
||||
modules-niri = {
|
||||
nixos-modules = [
|
||||
{ programs.niri.enable = true; }
|
||||
@@ -73,14 +63,11 @@ let
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
# host with hyprland compositor
|
||||
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
|
||||
"${name}-niri" = mylib.nixosSystem (modules-niri // args);
|
||||
};
|
||||
|
||||
# generate iso image for hosts with desktop environment
|
||||
packages = {
|
||||
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
|
||||
"${name}-niri" = inputs.self.nixosConfigurations."${name}-niri".config.formats.iso;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"ai-hyprland"
|
||||
"ai-niri"
|
||||
"ruby"
|
||||
"k3s-prod-1-master-1"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
let
|
||||
username = myvars.username;
|
||||
hosts = [
|
||||
"ai-hyprland"
|
||||
"ai-niri"
|
||||
"ruby"
|
||||
"k3s-prod-1-master-1"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
}:
|
||||
let
|
||||
specialExpected = {
|
||||
"ai-hyprland" = "ai";
|
||||
"ai-niri" = "ai";
|
||||
};
|
||||
specialHostNames = builtins.attrNames specialExpected;
|
||||
|
||||
@@ -18,5 +18,3 @@ Useful for Linux(fcitx5-rime) & macOS(squirrel).
|
||||
|
||||
- [Fcitx5 - Arch Linux Wiki](https://wiki.archlinux.org/title/Fcitx5)
|
||||
- [Fcitx5 - Official Wiki](https://fcitx-im.org/wiki/Fcitx_5/zh-cn)
|
||||
- [discussion about using fcitx5 on hyprland](https://github.com/hyprwm/Hyprland/discussions/421)
|
||||
- [hyprland issue about fcitx5](https://github.com/hyprwm/Hyprland/discussions/421)
|
||||
|
||||