mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 01:08:32 +02:00
chore(All Markdown Files): auto wrap text, fix typos
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
1. `base`: The base module that is suitable for any NixOS environment.
|
||||
2. `desktop`: Configuration for desktop environments, such as Hyprland, I3, etc.
|
||||
6. `server.nix`: Configuration which is suitable for both servers and desktops. It import only `base` as its submodule.
|
||||
1. used by all my nixos servers.
|
||||
7. `desktop.nix`: the entrypoint of desktop's configuration, it import both `base` and `desktop` as its submodules.
|
||||
1. used by all my nixos desktops.
|
||||
3. `server.nix`: Configuration which is suitable for both servers and desktops. It import only
|
||||
`base` as its submodule.
|
||||
1. used by all my nixos servers.
|
||||
4. `desktop.nix`: the entrypoint of desktop's configuration, it import both `base` and `desktop` as
|
||||
its submodules.
|
||||
1. used by all my nixos desktops.
|
||||
|
||||
@@ -1,16 +1,18 @@
|
||||
# Desktop Related
|
||||
|
||||
|
||||
3. `base`: all common configurations for all desktops.
|
||||
4. `hyprland`: Hyprland's configuration.
|
||||
5. `i3`: i3's configuration.
|
||||
|
||||
|
||||
## Why install I3/Hyprland in Home Manager instead of a NixOS Module?
|
||||
|
||||
1. I3 & Hyprland's configuration file is located in `~/.config`, which can be easily managed by Home Manager.
|
||||
2. I have many user-specific systemd servcies, such gammastep, wallpaper-switcher, etc. Which can be easily managed by Home Manager, but if we add i3/hyprland in a NixOS Module, those user-level services may failed to start automatically. With i3/hyprland in a Home Manager Module, we can control their systemd service's dependent order more easily, so we can avoid issues like this.
|
||||
1. I3 & Hyprland's configuration file is located in `~/.config`, which can be easily managed by Home
|
||||
Manager.
|
||||
2. I have many user-specific systemd services, such gammastep, wallpaper-switcher, etc. Which can be
|
||||
easily managed by Home Manager, but if we add i3/hyprland in a NixOS Module, those user-level
|
||||
services may failed to start automatically. With i3/hyprland in a Home Manager Module, we can
|
||||
control their systemd service's dependent order more easily, so we can avoid issues like this.
|
||||
3. By install packages as less as possible in NixOS Module, we can:
|
||||
1. Make the NixOS system more secure and stable.
|
||||
2. Make this flake more portable to other non-NixOS systems, as home-manager can be installed on any Linux system.
|
||||
|
||||
1. Make the NixOS system more secure and stable.
|
||||
2. Make this flake more portable to other non-NixOS systems, as home-manager can be installed on
|
||||
any Linux system.
|
||||
|
||||
@@ -2,15 +2,8 @@
|
||||
"position": "top",
|
||||
"layer": "top",
|
||||
|
||||
"modules-left": [
|
||||
"custom/launcher",
|
||||
"temperature",
|
||||
"backlight",
|
||||
"hyprland/workspaces"
|
||||
],
|
||||
"modules-center": [
|
||||
"custom/playerctl"
|
||||
],
|
||||
"modules-left": ["custom/launcher", "temperature", "backlight", "hyprland/workspaces"],
|
||||
"modules-center": ["custom/playerctl"],
|
||||
"modules-right": [
|
||||
"mpd",
|
||||
"pulseaudio",
|
||||
@@ -21,7 +14,7 @@
|
||||
"clock",
|
||||
"idle_inhibitor",
|
||||
"custom/powermenu",
|
||||
"tray"
|
||||
"tray",
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
@@ -38,8 +31,8 @@
|
||||
"9": "",
|
||||
"10": "〇",
|
||||
"focused": "",
|
||||
"default": ""
|
||||
}
|
||||
"default": "",
|
||||
},
|
||||
},
|
||||
|
||||
"clock": {
|
||||
@@ -48,137 +41,123 @@
|
||||
"rotate": 0,
|
||||
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": " {:%H:%M}",
|
||||
"format-alt": " {:%a %b %d, %G}"
|
||||
"format-alt": " {:%a %b %d, %G}",
|
||||
},
|
||||
"cpu": {
|
||||
"format": "\udb80\udf5b {usage}%",
|
||||
"interval": 1,
|
||||
"on-click-middle": "kitty btop",
|
||||
"on-click-right": "kitty btop"
|
||||
"on-click-right": "kitty btop",
|
||||
},
|
||||
"custom/launcher": {
|
||||
"format": "\uf313 ",
|
||||
"on-click": "$HOME/.config/hypr/scripts/menu",
|
||||
"on-click-middle": "exec default_wall",
|
||||
"on-click-right": "exec wallpaper_random",
|
||||
"tooltip": false
|
||||
"tooltip": false,
|
||||
},
|
||||
"custom/powermenu": {
|
||||
"format": "\uf011",
|
||||
"on-click": "$HOME/.config/hypr/scripts/wlogout",
|
||||
"tooltip": false
|
||||
"tooltip": false,
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "\uf06e",
|
||||
"deactivated": "\uf070"
|
||||
"deactivated": "\uf070",
|
||||
},
|
||||
"tooltip": false
|
||||
"tooltip": false,
|
||||
},
|
||||
"memory": {
|
||||
"format": "\udb83\udee0 {percentage}%",
|
||||
"interval": 1,
|
||||
"states": {
|
||||
"warning": 85
|
||||
}
|
||||
"warning": 85,
|
||||
},
|
||||
},
|
||||
"mpd": {
|
||||
"interval": 2,
|
||||
"unknown-tag": "N/A",
|
||||
"format": "{stateIcon} {artist} - {title}",
|
||||
"format-disconnected": " Disconnected",
|
||||
"format-paused": "{stateIcon} {artist} - {title}",
|
||||
"format-stopped": "Stopped ",
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": ""
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)",
|
||||
// Commands to execute on events
|
||||
"on-click": "mpc toggle",
|
||||
"on-click-middle": "mpc prev",
|
||||
"on-click-right": "mpc next",
|
||||
"on-update": "",
|
||||
"on-scroll-up": "mpc seek +00:00:01",
|
||||
"on-scroll-down": "mpc seek -00:00:01",
|
||||
"smooth-scrolling-threshold": 1
|
||||
"interval": 2,
|
||||
"unknown-tag": "N/A",
|
||||
"format": "{stateIcon} {artist} - {title}",
|
||||
"format-disconnected": " Disconnected",
|
||||
"format-paused": "{stateIcon} {artist} - {title}",
|
||||
"format-stopped": "Stopped ",
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": "",
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)",
|
||||
// Commands to execute on events
|
||||
"on-click": "mpc toggle",
|
||||
"on-click-middle": "mpc prev",
|
||||
"on-click-right": "mpc next",
|
||||
"on-update": "",
|
||||
"on-scroll-up": "mpc seek +00:00:01",
|
||||
"on-scroll-down": "mpc seek -00:00:01",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"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>"
|
||||
}
|
||||
"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,
|
||||
//"interface": "wlan*", // (Optional) To force the use of this interface, set it for netspeed to work
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ipaddr}/{cidr}",
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "睊 Disconnected",
|
||||
"format-disabled": "睊 Disabled",
|
||||
"format-alt": " {bandwidthUpBytes} | {bandwidthDownBytes}",
|
||||
"tooltip-format": " {ifname} via {gwaddr}",
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "kitty nmtui"
|
||||
"interval": 5,
|
||||
//"interface": "wlan*", // (Optional) To force the use of this interface, set it for netspeed to work
|
||||
"format-wifi": " {essid}",
|
||||
"format-ethernet": " {ipaddr}/{cidr}",
|
||||
"format-linked": " {ifname} (No IP)",
|
||||
"format-disconnected": "睊 Disconnected",
|
||||
"format-disabled": "睊 Disabled",
|
||||
"format-alt": " {bandwidthUpBytes} | {bandwidthDownBytes}",
|
||||
"tooltip-format": " {ifname} via {gwaddr}",
|
||||
"on-click-middle": "nm-connection-editor",
|
||||
"on-click-right": "kitty nmtui",
|
||||
},
|
||||
"pulseaudio": {
|
||||
//"format": "{volume}% {icon} {format_source}",
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Mute",
|
||||
"format-bluetooth": " {volume}% {format_source}",
|
||||
"format-bluetooth-muted": " Mute",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": [
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
// Commands to execute on events
|
||||
"on-click": "amixer set Master toggle",
|
||||
"on-click-right": "pavucontrol",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
//"format": "{volume}% {icon} {format_source}",
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Mute",
|
||||
"format-bluetooth": " {volume}% {format_source}",
|
||||
"format-bluetooth-muted": " Mute",
|
||||
"format-source": " {volume}%",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""],
|
||||
},
|
||||
"scroll-step": 5.0,
|
||||
// Commands to execute on events
|
||||
"on-click": "amixer set Master toggle",
|
||||
"on-click-right": "pavucontrol",
|
||||
"smooth-scrolling-threshold": 1,
|
||||
},
|
||||
"temperature": {
|
||||
"format": "\uf2c9 {temperatureC}\u00b0C",
|
||||
"tooltip": false
|
||||
"tooltip": false,
|
||||
},
|
||||
"backlight": {
|
||||
"format": "{icon} {percent}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
""
|
||||
]
|
||||
"format-icons": ["", "", "", "", "", "", "", "", ""],
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 15,
|
||||
"spacing": 5
|
||||
"spacing": 5,
|
||||
},
|
||||
"battery": {
|
||||
"bat": "BAT0",
|
||||
@@ -186,7 +165,7 @@
|
||||
"interval": 60,
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
"critical": 15,
|
||||
},
|
||||
"max-length": 20,
|
||||
"format": "{icon} {capacity}%",
|
||||
@@ -196,12 +175,6 @@
|
||||
"format-plugged": " {capacity}%",
|
||||
"format-alt": "{icon} {time}",
|
||||
"format-full": " {capacity}%",
|
||||
"format-icons": [
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
]
|
||||
"format-icons": [" ", " ", " ", " ", " "],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -36,5 +36,3 @@
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
|
||||
|
||||
|
||||
@@ -1,52 +1,57 @@
|
||||
/** ********** Fonts ********** **/
|
||||
* {
|
||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/** ********** Main Window ********** **/
|
||||
window {
|
||||
background-color: #1E1E2E;
|
||||
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%;
|
||||
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;
|
||||
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"));
|
||||
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"));
|
||||
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"));
|
||||
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"));
|
||||
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"));
|
||||
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"));
|
||||
background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png"));
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# Scripts for I3 Blocks
|
||||
|
||||
Mostly copy from [i3blocks-contrib](https://github.com/vivien/i3blocks-contrib), the Official repository for community contributed blocklets.
|
||||
Mostly copy from [i3blocks-contrib](https://github.com/vivien/i3blocks-contrib), the Official
|
||||
repository for community contributed blocklets.
|
||||
|
||||
Reference in New Issue
Block a user