mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 07:02:41 +02:00
feat: ai with both i3 & hyprland
replace archcraft's icon by snowflake(nixos) feat: update waybar's settings
This commit is contained in:
@@ -10,11 +10,17 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
deploy:
|
i3:
|
||||||
nixos-rebuild switch --flake . --use-remote-sudo
|
nixos-rebuild switch --flake .#ai_i3 --use-remote-sudo
|
||||||
|
|
||||||
debug:
|
hyprland:
|
||||||
nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose
|
nixos-rebuild switch --flake .#ai_hyprland --use-remote-sudo
|
||||||
|
|
||||||
|
debug_i3:
|
||||||
|
nixos-rebuild switch --flake .#ai_i3 --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
|
debug_hyprland:
|
||||||
|
nixos-rebuild switch --flake .#ai_hyprland --use-remote-sudo --show-trace --verbose
|
||||||
|
|
||||||
update:
|
update:
|
||||||
nix flake update
|
nix flake update
|
||||||
|
|||||||
@@ -11,7 +11,6 @@
|
|||||||
# the nixConfig here only affects the flake itself, not the system configuration!
|
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
trusted-users = [ "ryan" ];
|
|
||||||
|
|
||||||
substituters = [
|
substituters = [
|
||||||
# replace official cache with a mirror located in China
|
# replace official cache with a mirror located in China
|
||||||
@@ -105,8 +104,9 @@
|
|||||||
};
|
};
|
||||||
} // inputs;
|
} // inputs;
|
||||||
# 星野 アイ, Hoshino Ai
|
# 星野 アイ, Hoshino Ai
|
||||||
idol_ai_modules = [
|
idol_ai_modules_i3 = [
|
||||||
./hosts/idols/ai
|
./hosts/idols/ai
|
||||||
|
./modules/nixos/i3.nix
|
||||||
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
@@ -114,8 +114,20 @@
|
|||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
home-manager.extraSpecialArgs = x64_specialArgs;
|
home-manager.extraSpecialArgs = x64_specialArgs;
|
||||||
home-manager.users.ryan = import ./home/linux/x11.nix;
|
home-manager.users.ryan = import ./home/linux/desktop-i3.nix;
|
||||||
# home-manager.users.ryan = import ./home/linux/wayland.nix;
|
}
|
||||||
|
];
|
||||||
|
idol_ai_modules_hyprland = [
|
||||||
|
./hosts/idols/ai
|
||||||
|
./modules/nixos/hyprland.nix
|
||||||
|
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
|
home-manager.extraSpecialArgs = x64_specialArgs;
|
||||||
|
home-manager.users.ryan = import ./home/linux/desktop-hyprland.nix;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
# 星野 愛久愛海, Hoshino Akuamarin
|
# 星野 愛久愛海, Hoshino Akuamarin
|
||||||
@@ -159,9 +171,13 @@
|
|||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = let system = x64_system; specialArgs = x64_specialArgs; in {
|
nixosConfigurations = let system = x64_system; specialArgs = x64_specialArgs; in {
|
||||||
ai = nixpkgs.lib.nixosSystem {
|
ai_i3 = nixpkgs.lib.nixosSystem { # ai with i3 window manager
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = idol_ai_modules;
|
modules = idol_ai_modules_i3;
|
||||||
|
};
|
||||||
|
ai_hyprland = nixpkgs.lib.nixosSystem { # ai with hyprland compositor
|
||||||
|
inherit system specialArgs;
|
||||||
|
modules = idol_ai_modules_hyprland;
|
||||||
};
|
};
|
||||||
|
|
||||||
aquamarine = nixpkgs.lib.nixosSystem {
|
aquamarine = nixpkgs.lib.nixosSystem {
|
||||||
@@ -220,9 +236,14 @@
|
|||||||
# https://github.com/nix-community/nixos-generators
|
# https://github.com/nix-community/nixos-generators
|
||||||
let system = x64_system; specialArgs = x64_specialArgs; in {
|
let system = x64_system; specialArgs = x64_specialArgs; in {
|
||||||
# Hoshino Ai is a physical machine, so we need to generate an iso image for it.
|
# Hoshino Ai is a physical machine, so we need to generate an iso image for it.
|
||||||
ai = nixos-generators.nixosGenerate {
|
ai_i3 = nixos-generators.nixosGenerate { # ai with i3 window manager
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = idol_ai_modules;
|
modules = idol_ai_modules_i3;
|
||||||
|
format = "iso";
|
||||||
|
};
|
||||||
|
ai_hyprland = nixos-generators.nixosGenerate { # ai with hyprland compositor
|
||||||
|
inherit system specialArgs;
|
||||||
|
modules = idol_ai_modules_hyprland;
|
||||||
format = "iso";
|
format = "iso";
|
||||||
};
|
};
|
||||||
# Hoshino Aquamarine is a virtual machine running on Proxmox VE.
|
# Hoshino Aquamarine is a virtual machine running on Proxmox VE.
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
{ lib, stdenvNoCC, fetchgit }:
|
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
|
||||||
pname = "archcraft-font";
|
|
||||||
version = "2023-05-07";
|
|
||||||
|
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/archcraft-os/archcraft-packages.git";
|
|
||||||
rev = "88030ee6d2df80db958541b53bd3673e081720cf"; # git commit id
|
|
||||||
sparseCheckout = [ "archcraft-fonts/files/icon-fonts/archcraft.ttf" ]; # only fetch the feather.ttf file
|
|
||||||
|
|
||||||
# the sha256 is used to verify the integrity of the downloaded source, and alse cache the build result.
|
|
||||||
# so if you copy other package src's sha256, you will get a cached build result of that package, and all configs in this file will be ignored.
|
|
||||||
# specify sha256 to empty and build it, then an error will indicate the correct sha256
|
|
||||||
sha256 = "sha256-DrGN8lN4Yr1RTyCUZhJjzKgCuC0vTnSWjOKovNg3T/U=";
|
|
||||||
};
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
install -Dm644 archcraft-fonts/files/icon-fonts/archcraft.ttf -t $out/share/fonts/truetype/
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
homepage = "https://github.com/archcraft-os/archcraft-packages";
|
|
||||||
description = "Archcraft icon font";
|
|
||||||
version = version;
|
|
||||||
longDescription = ''Archcraft icon font'';
|
|
||||||
license = licenses.mit;
|
|
||||||
maintainers = [ maintainers.ryan4yin ];
|
|
||||||
platforms = platforms.all;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -13,9 +13,12 @@
|
|||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home = {
|
home = let
|
||||||
username = "ryan";
|
name = "ryan";
|
||||||
homeDirectory = "/home/ryan";
|
in
|
||||||
|
{
|
||||||
|
username = name;
|
||||||
|
homeDirectory = "/home/${name}";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
@@ -13,9 +13,12 @@
|
|||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home = {
|
home = let
|
||||||
username = "ryan";
|
name = "ryan";
|
||||||
homeDirectory = "/home/ryan";
|
in
|
||||||
|
{
|
||||||
|
username = name;
|
||||||
|
homeDirectory = "/home/${name}";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
## Hyprland configuration file for Archcraft
|
## Hyprland configuration file
|
||||||
|
|
||||||
#-- Output ----------------------------------------------------
|
#-- Output ----------------------------------------------------
|
||||||
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
# Configure your Display resolution, offset, scale and Monitors here, use `hyprctl monitors` to get the info.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
## Script To Manage Brightness For Archcraft (in Wayland).
|
## Script To Manage Brightness (in Wayland).
|
||||||
|
|
||||||
iDIR="$HOME/.config/hypr/mako/icons"
|
iDIR="$HOME/.config/hypr/mako/icons"
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
## Script To Manage Speaker Volume For Archcraft (in Wayland).
|
## Script To Manage Speaker Volume(in Wayland).
|
||||||
|
|
||||||
iDIR="$HOME/.config/hypr/mako/icons"
|
iDIR="$HOME/.config/hypr/mako/icons"
|
||||||
|
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import subprocess
|
|
||||||
from pyquery import PyQuery # install using `pip install pyquery`
|
|
||||||
import json
|
|
||||||
|
|
||||||
# weather icons
|
|
||||||
weather_icons = {
|
|
||||||
"sunnyDay": "滛",
|
|
||||||
"clearNight": "望",
|
|
||||||
"cloudyFoggyDay": "",
|
|
||||||
"cloudyFoggyNight": "",
|
|
||||||
"rainyDay": "",
|
|
||||||
"rainyNight": "",
|
|
||||||
"snowyIcyDay": "",
|
|
||||||
"snowyIcyNight": "",
|
|
||||||
"severe": "",
|
|
||||||
"default": "",
|
|
||||||
}
|
|
||||||
|
|
||||||
# get location_id
|
|
||||||
# to get your own location_id, go to https://weather.com & search your location.
|
|
||||||
# once you choose your location, you can see the location_id in the URL(64 chars long hex string)
|
|
||||||
# Shenzen, Guangdong's location id: https://weather.com/en-IN/weather/today/l/7a4684e0789c881e79935986f2e9e5ab05b0104ac4310fd8818006dfb66092c3
|
|
||||||
location_id = "7a4684e0789c881e79935986f2e9e5ab05b0104ac4310fd8818006dfb66092c3"
|
|
||||||
|
|
||||||
# get html page
|
|
||||||
url = "https://weather.com/en-IN/weather/today/l/" + location_id
|
|
||||||
html_data = PyQuery(url=url)
|
|
||||||
|
|
||||||
# current temperature
|
|
||||||
temp = html_data("span[data-testid='TemperatureValue']").eq(0).text()
|
|
||||||
# print(temp)
|
|
||||||
|
|
||||||
# current status phrase
|
|
||||||
status = html_data("div[data-testid='wxPhrase']").text()
|
|
||||||
status = f"{status[:16]}.." if len(status) > 17 else status
|
|
||||||
# print(status)
|
|
||||||
|
|
||||||
# status code
|
|
||||||
status_code = html_data("#regionHeader").attr("class").split(" ")[2].split("-")[2]
|
|
||||||
# print(status_code)
|
|
||||||
|
|
||||||
# status icon
|
|
||||||
icon = (
|
|
||||||
weather_icons[status_code]
|
|
||||||
if status_code in weather_icons
|
|
||||||
else weather_icons["default"]
|
|
||||||
)
|
|
||||||
# print(icon)
|
|
||||||
|
|
||||||
# temperature feels like
|
|
||||||
temp_feel = html_data(
|
|
||||||
"div[data-testid='FeelsLikeSection'] > span[data-testid='TemperatureValue']"
|
|
||||||
).text()
|
|
||||||
temp_feel_text = f"Feels like {temp_feel}c"
|
|
||||||
# print(temp_feel_text)
|
|
||||||
|
|
||||||
# min-max temperature
|
|
||||||
temp_min = (
|
|
||||||
html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']")
|
|
||||||
.eq(0)
|
|
||||||
.text()
|
|
||||||
)
|
|
||||||
temp_max = (
|
|
||||||
html_data("div[data-testid='wxData'] > span[data-testid='TemperatureValue']")
|
|
||||||
.eq(1)
|
|
||||||
.text()
|
|
||||||
)
|
|
||||||
temp_min_max = f" {temp_min}\t\t {temp_max}"
|
|
||||||
# print(temp_min_max)
|
|
||||||
|
|
||||||
# wind speed
|
|
||||||
wind_speed = html_data("span[data-testid='Wind']").text().split("\n")[1]
|
|
||||||
wind_text = f"煮 {wind_speed}"
|
|
||||||
# print(wind_text)
|
|
||||||
|
|
||||||
# humidity
|
|
||||||
humidity = html_data("span[data-testid='PercentageValue']").text()
|
|
||||||
humidity_text = f" {humidity}"
|
|
||||||
# print(humidity_text)
|
|
||||||
|
|
||||||
# visibility
|
|
||||||
visbility = html_data("span[data-testid='VisibilityValue']").text()
|
|
||||||
visbility_text = f" {visbility}"
|
|
||||||
# print(visbility_text)
|
|
||||||
|
|
||||||
# air quality index
|
|
||||||
air_quality_index = html_data("text[data-testid='DonutChartValue']").text()
|
|
||||||
# print(air_quality_index)
|
|
||||||
|
|
||||||
# hourly rain prediction
|
|
||||||
prediction = html_data("section[aria-label='Hourly Forecast']")(
|
|
||||||
"div[data-testid='SegmentPrecipPercentage'] > span"
|
|
||||||
).text()
|
|
||||||
prediction = prediction.replace("Chance of Rain", "")
|
|
||||||
prediction = f"\n\n (hourly) {prediction}" if len(prediction) > 0 else prediction
|
|
||||||
# print(prediction)
|
|
||||||
|
|
||||||
# tooltip text
|
|
||||||
tooltip_text = str.format(
|
|
||||||
"\t\t{}\t\t\n{}\n{}\n{}\n\n{}\n{}\n{}{}",
|
|
||||||
f'<span size="xx-large">{temp}</span>',
|
|
||||||
f"<big>{icon}</big>",
|
|
||||||
f"<big>{status}</big>",
|
|
||||||
f"<small>{temp_feel_text}</small>",
|
|
||||||
f"<big>{temp_min_max}</big>",
|
|
||||||
f"{wind_text}\t{humidity_text}",
|
|
||||||
f"{visbility_text}\tAQI {air_quality_index}",
|
|
||||||
f"<i>{prediction}</i>",
|
|
||||||
)
|
|
||||||
|
|
||||||
# print waybar module data
|
|
||||||
out_data = {
|
|
||||||
"text": f"{icon} {temp}",
|
|
||||||
"alt": status,
|
|
||||||
"tooltip": tooltip_text,
|
|
||||||
"class": status_code,
|
|
||||||
}
|
|
||||||
print(json.dumps(out_data))
|
|
||||||
@@ -1,222 +1,125 @@
|
|||||||
{
|
{
|
||||||
"name": "main-bar",
|
"clock": {
|
||||||
"id": "main-bar",
|
"interval": 60,
|
||||||
"layer": "top",
|
"align": 0,
|
||||||
"mode": "dock",
|
"rotate": 0,
|
||||||
"exclusive": true,
|
"tooltip-format": "<big>{:%B %Y}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
"passthrough": false,
|
"format": " {:%H:%M}",
|
||||||
"height": 32,
|
"format-alt": " {:%a %b %d, %G}"
|
||||||
"spacing": 6,
|
},
|
||||||
"margin": 0,
|
"cpu": {
|
||||||
"margin-top": 0,
|
"format": "\udb80\udf5b {usage}%",
|
||||||
"margin-bottom": 0,
|
"interval": 1
|
||||||
"margin-left": 0,
|
},
|
||||||
"margin-right": 0,
|
"custom/launcher": {
|
||||||
"fixed-center": true,
|
"format": "\uf313 ",
|
||||||
"ipc": true,
|
"on-click": "$HOME/.config/hypr/scripts/menu",
|
||||||
|
"on-click-middle": "exec default_wall",
|
||||||
"modules-left": [
|
"on-click-right": "exec wallpaper_random",
|
||||||
"custom/menu",
|
"tooltip": false
|
||||||
"wlr/workspaces",
|
},
|
||||||
"cpu",
|
"custom/powermenu": {
|
||||||
"memory",
|
"format": "\uf011",
|
||||||
"disk"
|
"on-click": "$HOME/.config/hypr/scripts/wlogout",
|
||||||
],
|
"tooltip": false
|
||||||
"modules-center": [
|
},
|
||||||
"mpd",
|
"idle_inhibitor": {
|
||||||
"tray"
|
"format": "{icon}",
|
||||||
],
|
"format-icons": {
|
||||||
"modules-right": [
|
"activated": "\uf06e",
|
||||||
"pulseaudio",
|
"deactivated": "\uf070"
|
||||||
"custom/weather",
|
|
||||||
"network",
|
|
||||||
"battery",
|
|
||||||
"clock",
|
|
||||||
"custom/power"
|
|
||||||
],
|
|
||||||
|
|
||||||
// waybar-backlight
|
|
||||||
"backlight": {
|
|
||||||
"interval": 2,
|
|
||||||
"align": 0,
|
|
||||||
"rotate": 0,
|
|
||||||
//"device": "amdgpu_bl0",
|
|
||||||
"format": "{icon} {percent}%",
|
|
||||||
"format-icons": [
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
],
|
|
||||||
// Commands to execute on events
|
|
||||||
"on-click": "",
|
|
||||||
"on-click-middle": "",
|
|
||||||
"on-click-right": "",
|
|
||||||
"on-update": "",
|
|
||||||
"on-scroll-up": "light -A 5%",
|
|
||||||
"on-scroll-down": "light -U 5%",
|
|
||||||
"smooth-scrolling-threshold": 1,
|
|
||||||
},
|
},
|
||||||
"wlr/workspaces": {
|
"tooltip": false
|
||||||
"format": "{icon}",
|
},
|
||||||
"on-click": "activate",
|
"layer": "top",
|
||||||
"all-outputs": true,
|
"memory": {
|
||||||
"format-icons": {
|
"format": "\udb83\udee0 {percentage}%",
|
||||||
"1": "",
|
"interval": 1,
|
||||||
"2": "",
|
"states": {
|
||||||
"3": "",
|
"warning": 85
|
||||||
"4": "",
|
|
||||||
"5": "ﭮ",
|
|
||||||
"6": "",
|
|
||||||
"7": "",
|
|
||||||
"8": "",
|
|
||||||
"9": "",
|
|
||||||
"10": "﮼",
|
|
||||||
"focused": "",
|
|
||||||
"default": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// waybar-battery
|
|
||||||
"battery": {
|
|
||||||
"interval": 60,
|
|
||||||
"align": 0,
|
|
||||||
"rotate": 0,
|
|
||||||
//"bat": "BAT1",
|
|
||||||
//"adapter": "ACAD",
|
|
||||||
"full-at": 100,
|
|
||||||
"design-capacity": false,
|
|
||||||
"states": {
|
|
||||||
"good": 95,
|
|
||||||
"warning": 30,
|
|
||||||
"critical": 15
|
|
||||||
},
|
|
||||||
"format": "{icon} {capacity}%",
|
|
||||||
"format-charging": " {capacity}%",
|
|
||||||
"format-plugged": " {capacity}%",
|
|
||||||
"format-full": "{icon} Full",
|
|
||||||
//"format-good": "",
|
|
||||||
"format-alt": "{icon} {time}",
|
|
||||||
"format-icons": [
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
"",
|
|
||||||
""
|
|
||||||
],
|
|
||||||
"format-time": "{H}h {M}min",
|
|
||||||
"tooltip": true,
|
|
||||||
},
|
|
||||||
// waybar-clock
|
|
||||||
"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}"
|
|
||||||
},
|
|
||||||
// waybar-cpu
|
|
||||||
"cpu": {
|
|
||||||
"interval": 5,
|
|
||||||
"format": " LOAD: {usage}%",
|
|
||||||
},
|
|
||||||
// waybar-custom
|
|
||||||
"custom/menu": {
|
|
||||||
"format": "",
|
|
||||||
"tooltip": false,
|
|
||||||
"on-click": "$HOME/.config/hypr/scripts/menu",
|
|
||||||
},
|
|
||||||
"custom/power": {
|
|
||||||
"format": " ",
|
|
||||||
"tooltip": false,
|
|
||||||
"on-click": "$HOME/.config/hypr/scripts/wlogout",
|
|
||||||
},
|
|
||||||
// waybar-disk
|
|
||||||
"disk": {
|
|
||||||
"interval": 30,
|
|
||||||
"format": " FREE: {free}",
|
|
||||||
},
|
|
||||||
// waybar-memory
|
|
||||||
"memory": {
|
|
||||||
"interval": 10,
|
|
||||||
"format": " USED: {used:0.1f}G",
|
|
||||||
},
|
|
||||||
// waybar-mpd
|
|
||||||
"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,
|
|
||||||
},
|
|
||||||
// waybar-network
|
|
||||||
"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": " {bandwidthUpBits} | {bandwidthDownBits}",
|
|
||||||
"tooltip-format": " {ifname} via {gwaddr}",
|
|
||||||
},
|
|
||||||
// weather-custom
|
|
||||||
"custom/weather": {
|
|
||||||
// "format": "{}",
|
|
||||||
// "format-alt": "{alt}: {}",
|
|
||||||
"format-alt-click": "click-right",
|
|
||||||
"interval": 300,
|
|
||||||
"return-type": "json",
|
|
||||||
"exec": "~/.config/hypr/scripts/weather",
|
|
||||||
// "on-click": "xdg-open https://weather.com/en-IN/weather/today/l/$(location_id)"
|
|
||||||
},
|
|
||||||
// waybar-pulseaudio
|
|
||||||
"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,
|
|
||||||
},
|
|
||||||
// waybar-tray
|
|
||||||
"tray": {
|
|
||||||
"icon-size": 16,
|
|
||||||
"spacing": 10
|
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"modules-center": [
|
||||||
|
"clock"
|
||||||
|
],
|
||||||
|
"modules-left": [
|
||||||
|
"custom/launcher",
|
||||||
|
"temperature",
|
||||||
|
"mpd",
|
||||||
|
"custom/cava-internal"
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
"pulseaudio",
|
||||||
|
"backlight",
|
||||||
|
"memory",
|
||||||
|
"cpu",
|
||||||
|
"network",
|
||||||
|
"custom/powermenu",
|
||||||
|
"tray"
|
||||||
|
],
|
||||||
|
"mpd": {
|
||||||
|
"format": "<span foreground='#bb9af7'>\uf001</span> {title}",
|
||||||
|
"format-disconnected": "",
|
||||||
|
"format-paused": "\uf001 {title}",
|
||||||
|
"format-stopped": "<span foreground='#bb9af7'>\uf001</span>",
|
||||||
|
"max-length": 25,
|
||||||
|
"on-click": "mpc --quiet toggle",
|
||||||
|
"on-click-middle": "kitty --class='ncmpcpp' ncmpcpp ",
|
||||||
|
"on-click-right": "mpc update; mpc ls | mpc add",
|
||||||
|
"on-scroll-down": "mpc --quiet next",
|
||||||
|
"on-scroll-up": "mpc --quiet prev",
|
||||||
|
"smooth-scrolling-threshold": 5,
|
||||||
|
"tooltip-format": "{title} - {artist} ({elapsedTime:%M:%S}/{totalTime:%H:%M:%S})"
|
||||||
|
},
|
||||||
|
"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-format": " {bandwidthUpBits} | {bandwidthDownBits}",
|
||||||
|
"tooltip-alt": " {ifname} via {gwaddr}",
|
||||||
|
},
|
||||||
|
"position": "top",
|
||||||
|
"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,
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"format": "\uf2c9 {temperatureC}\u00b0C",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 15,
|
||||||
|
"spacing": 5
|
||||||
|
},
|
||||||
|
"wlr/workspaces": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"on-click": "activate"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,216 +1,134 @@
|
|||||||
/** ********** Fonts ********** **/
|
|
||||||
* {
|
* {
|
||||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
font-size: 12px;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ********** Waybar Window ********** **/
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background-color: #1e1e2e;
|
background-color: transparent;
|
||||||
color: #1e1e2e;
|
|
||||||
border-bottom: 2px solid #313244;
|
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
}
|
||||||
|
window > box {
|
||||||
window#waybar.hidden {
|
margin-left: 5px;
|
||||||
opacity: 0.5;
|
margin-right: 5px;
|
||||||
|
margin-top: 5px;
|
||||||
|
background-color: #1e1e2a;
|
||||||
|
padding: 3px;
|
||||||
|
padding-left: 8px;
|
||||||
|
border: 2px none #33ccff;
|
||||||
}
|
}
|
||||||
|
#workspaces {
|
||||||
/** ********** Backlight ********** **/
|
padding-left: 0px;
|
||||||
#backlight {
|
padding-right: 4px;
|
||||||
background-color: #cba6f7;
|
|
||||||
}
|
}
|
||||||
|
#workspaces button {
|
||||||
/** ********** Battery ********** **/
|
padding-top: 5px;
|
||||||
#battery {
|
padding-bottom: 5px;
|
||||||
background-color: #f9e2af;
|
padding-left: 6px;
|
||||||
|
padding-right: 6px;
|
||||||
}
|
}
|
||||||
|
#workspaces button.active {
|
||||||
#battery.charging {
|
background-color: rgb(181, 232, 224);
|
||||||
|
color: rgb(26, 24, 38);
|
||||||
}
|
}
|
||||||
|
#workspaces button.urgent {
|
||||||
#battery.plugged {
|
color: rgb(26, 24, 38);
|
||||||
}
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
@keyframes blink {
|
background-color: rgb(248, 189, 150);
|
||||||
to {
|
color: rgb(26, 24, 38);
|
||||||
color: #000000;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
tooltip {
|
||||||
#battery.critical:not(.charging) {
|
background: rgb(48, 45, 65);
|
||||||
background-color: #f38ba8;
|
|
||||||
color: #f38ba8;
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
}
|
||||||
|
tooltip label {
|
||||||
/** ********** Clock ********** **/
|
color: rgb(217, 224, 238);
|
||||||
#clock {
|
|
||||||
background-color: #a6e3a1;
|
|
||||||
}
|
}
|
||||||
|
#custom-launcher {
|
||||||
/** ********** CPU ********** **/
|
font-size: 20px;
|
||||||
#cpu {
|
padding-left: 8px;
|
||||||
background-color: #89dceb;
|
padding-right: 6px;
|
||||||
|
color: #7ebae4;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ********** Memory ********** **/
|
|
||||||
#memory {
|
|
||||||
background-color: #eba0ac;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** Disk ********** **/
|
|
||||||
#disk {
|
|
||||||
background-color: #b4befe;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** Tray ********** **/
|
|
||||||
#tray {
|
|
||||||
background-color: #cdd6f4;
|
|
||||||
}
|
|
||||||
#tray > .passive {
|
|
||||||
-gtk-icon-effect: dim;
|
|
||||||
}
|
|
||||||
#tray > .needs-attention {
|
|
||||||
-gtk-icon-effect: highlight;
|
|
||||||
}
|
|
||||||
#tray > .active {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** MPD ********** **/
|
|
||||||
#mpd {
|
|
||||||
background-color: #94e2d5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.disconnected {
|
|
||||||
background-color: #f38ba8;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.stopped {
|
|
||||||
background-color: #f5c2e7;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.playing {
|
|
||||||
background-color: #74c7ec;
|
|
||||||
}
|
|
||||||
|
|
||||||
#mpd.paused {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** Pulseaudio ********** **/
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: #fab387;
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.bluetooth {
|
|
||||||
background-color: #f5c2e7;
|
|
||||||
}
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: #313244;
|
|
||||||
color: #cdd6f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** Network ********** **/
|
|
||||||
#network {
|
|
||||||
background-color: #89b4fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
#network.disconnected,#network.disabled {
|
|
||||||
background-color: #313244;
|
|
||||||
color: #cdd6f4;
|
|
||||||
}
|
|
||||||
#network.linked {
|
|
||||||
}
|
|
||||||
#network.ethernet {
|
|
||||||
}
|
|
||||||
#network.wifi {
|
|
||||||
}
|
|
||||||
|
|
||||||
/** ********** Custom ********** **/
|
|
||||||
#custom-menu, #custom-power, #custom-weather, #custom-updater {
|
|
||||||
border-radius: 4px;
|
|
||||||
margin: 6px 0px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-menu {
|
|
||||||
background-color: #f5c2e7;
|
|
||||||
margin-left: 6px;
|
|
||||||
padding: 2px 6px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-power {
|
|
||||||
background-color: #f38ba8;
|
|
||||||
margin-right: 6px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-updater {
|
|
||||||
background-color: #e6ed7b;
|
|
||||||
margin-right: 6px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Common style **/
|
|
||||||
#backlight,
|
|
||||||
#battery,
|
|
||||||
#clock,
|
|
||||||
#cpu,
|
|
||||||
#disk,
|
|
||||||
#mode,
|
#mode,
|
||||||
|
#clock,
|
||||||
#memory,
|
#memory,
|
||||||
|
#temperature,
|
||||||
|
#cpu,
|
||||||
#mpd,
|
#mpd,
|
||||||
#tray,
|
#custom-wall,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
#pulseaudio,
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#battery,
|
||||||
|
#custom-powermenu,
|
||||||
|
/* #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);
|
||||||
|
}*/
|
||||||
|
#custom-wall {
|
||||||
|
color: #33ccff;
|
||||||
|
}
|
||||||
|
#temperature {
|
||||||
|
color: rgb(150, 205, 251);
|
||||||
|
}
|
||||||
|
#backlight {
|
||||||
|
color: rgb(248, 189, 150);
|
||||||
|
}
|
||||||
|
#pulseaudio {
|
||||||
|
color: rgb(245, 224, 220);
|
||||||
|
}
|
||||||
#network {
|
#network {
|
||||||
border-radius: 4px;
|
color: #abe9b3;
|
||||||
margin: 6px 0px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
}
|
}
|
||||||
|
#network.disconnected {
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
|
||||||
/** ********** Weather ********** **/
|
|
||||||
|
|
||||||
#custom-weather {
|
|
||||||
background-color: #5d388b;
|
|
||||||
margin-right: 6px;
|
|
||||||
padding: 2px 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
}
|
||||||
|
#custom-powermenu {
|
||||||
#custom-weather.severe {
|
color: rgb(242, 143, 173);
|
||||||
color: #eb937d;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
#tray {
|
||||||
#custom-weather.sunnyDay {
|
padding-right: 8px;
|
||||||
color: #c2ca76;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
#mpd.paused {
|
||||||
#custom-weather.clearNight {
|
color: #414868;
|
||||||
color: #2b2b2a;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
#mpd.stopped {
|
||||||
#custom-weather.cloudyFoggyDay, #custom-weather.cloudyFoggyNight {
|
background: transparent;
|
||||||
color: #c2ddda;
|
|
||||||
}
|
}
|
||||||
|
#mpd {
|
||||||
#custom-weather.rainyDay, #custom-weather.rainyNight {
|
color: #c0caf5;
|
||||||
color: #5aaca5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-weather.showyIcyDay, #custom-weather.snowyIcyNight {
|
|
||||||
color: #d6e7e5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-weather.default {
|
|
||||||
color: #dbd9d8;
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/** ********** Fonts ********** **/
|
/** ********** Fonts ********** **/
|
||||||
* {
|
* {
|
||||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
|
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/** ********** Fonts ********** **/
|
/** ********** Fonts ********** **/
|
||||||
* {
|
* {
|
||||||
font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif;
|
font-family: "JetBrains Mono", "Iosevka Nerd Font", sans-serif;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,9 +9,12 @@
|
|||||||
|
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
home = {
|
home = let
|
||||||
username = "ryan";
|
name = "ryan";
|
||||||
homeDirectory = "/home/ryan";
|
in
|
||||||
|
{
|
||||||
|
username = name;
|
||||||
|
homeDirectory = "/home/${name}";
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
|||||||
@@ -13,8 +13,6 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
../../../modules/nixos/fhs-fonts.nix
|
../../../modules/nixos/fhs-fonts.nix
|
||||||
# ../../../modules/nixos/hyprland.nix
|
|
||||||
../../../modules/nixos/i3.nix
|
|
||||||
../../../modules/nixos/libvirt.nix
|
../../../modules/nixos/libvirt.nix
|
||||||
../../../modules/nixos/core-desktop.nix
|
../../../modules/nixos/core-desktop.nix
|
||||||
# ../../../modules/nixos/remote-building.nix
|
# ../../../modules/nixos/remote-building.nix
|
||||||
|
|||||||
@@ -66,10 +66,6 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
(pkgs.callPackage ../../fonts/icomoon-feather-icon-font.nix { })
|
(pkgs.callPackage ../../fonts/icomoon-feather-icon-font.nix { })
|
||||||
|
|
||||||
# arch linux icon, used temporarily in waybar
|
|
||||||
(pkgs.callPackage ../../fonts/archcraft-icon-font.nix { })
|
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# user defined fonts
|
# user defined fonts
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
# enable flakes globally
|
# enable flakes globally
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
nix.settings.trusted-users = ["ryan"];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = lib.mkDefault false;
|
nixpkgs.config.allowUnfree = lib.mkDefault false;
|
||||||
|
|||||||
@@ -74,6 +74,8 @@
|
|||||||
yad # a fork of zenity, for creating dialogs
|
yad # a fork of zenity, for creating dialogs
|
||||||
|
|
||||||
# audio
|
# audio
|
||||||
|
alsa-utils # provides amixer/alsamixer/...
|
||||||
|
cava # for visualizing audio
|
||||||
mpd # for playing system sounds
|
mpd # for playing system sounds
|
||||||
mpc-cli # command-line mpd client
|
mpc-cli # command-line mpd client
|
||||||
ncmpcpp # a mpd client with a UI
|
ncmpcpp # a mpd client with a UI
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
xorg.xdpyinfo # get screen information
|
xorg.xdpyinfo # get screen information
|
||||||
scrot # minimal screen capture tool, used by i3 blur lock to take a screenshot
|
scrot # minimal screen capture tool, used by i3 blur lock to take a screenshot
|
||||||
sysstat # get system information
|
sysstat # get system information
|
||||||
|
alsa-utils # provides amixer/alsamixer/...
|
||||||
|
|
||||||
xfce.thunar # xfce4's file manager
|
xfce.thunar # xfce4's file manager
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nix.settings.trusted-users = ["ryan"];
|
||||||
|
|
||||||
users.groups = {
|
users.groups = {
|
||||||
ryan = { };
|
ryan = { };
|
||||||
docker = { };
|
docker = { };
|
||||||
|
|||||||
Reference in New Issue
Block a user