feat: Added icons for homepage

This commit is contained in:
uttarayan21
2025-07-25 15:42:16 +05:30
parent c8665b9205
commit 6a6fc0dbea
19 changed files with 119 additions and 66 deletions

150
home/services/anyrun.nix Normal file
View File

@@ -0,0 +1,150 @@
{
inputs,
pkgs,
device,
# osConfig,
...
}: {
# imports = [inputs.anyrun.homeManagerModules.default];
programs.anyrun = {
enable = device.isDesktopLinux;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
inputs.anyrun-hyprwin.packages.${pkgs.system}.default
inputs.anyrun-rink.packages.${pkgs.system}.default
applications
websearch
shell
translate
symbols
kidex
];
x = {fraction = 0.5;};
y = {fraction = 0.3;};
height = {absolute = 0;};
width = {absolute = 1000;};
showResultsImmediately = true;
maxEntries = 10;
layer = "overlay";
};
extraConfigFiles = {
"nixos-options.ron".text = let
# nixos-options =
# pkgs.lib.optionalString device.isNix
# osConfig.system.build.manual.optionsJSON
# + "/share/doc/nixos/options.json";
hm-options =
inputs.home-manager.packages.${pkgs.system}.docs-json
+ "/share/doc/home-manager/options.json";
# or alternatively if you wish to read any other documentation options, such as home-manager
# get the docs-json package from the home-manager flake
# hm-options = inputs.home-manager.packages.${pkgs.system}.docs-json + "/share/doc/home-manager/options.json";
# options = builtins.toJSON {
# ":nix" = [nixos-options];
# ":hm" = [hm-options];
# ":something-else" = [some-other-option];
# ":nall" = [nixos-options hm-options some-other-option];
# };
options = builtins.toJSON {
":hm" = [hm-options];
};
# // (
# if device.isNix
# then {":nix" = [nixos-options];}
# else {}
# ));
in ''
Config(
options: ${options},
max_entries: Some(10),
)
'';
"shell.ron".text = ''
Config(
prefix: "!",
shell: None,
)
'';
"websearch.ron".text =
/*
ron
*/
''
Config(
prefix: "?",
engines: [
Google,
Custom (
name: "Nix Packages",
url: "search.nixos.org/packages?query={}&channel=unstable"
),
Custom (
name: "GitHub",
url: "github.com/search?q={}"
),
Custom (
name: "docs.rs",
url: "docs.rs/releases/search?query={}"
),
Custom (
name: "NixOS options",
url: "search.nixos.org/options?query={}"
),
DuckDuckGo,
]
)
'';
"rink.ron".text = ''
Config(
currency: Some("${
builtins.toFile "currency.units" ''
!category currencies "Currencies"
usd USD
inr INR
''
}"),
)
'';
"hyprwin.ron".text = ''
Config(
icons: {
"org.wezfurlong.wezterm": "wezterm",
}
)
'';
};
extraCss = ''
window {
color: #ffffff;
background-color: rgba(15, 15, 15, .2);
border-color: #000000;
}
entry {
color: #ffffff;
background-color: rgba(40, 40, 40, .98);
padding: 14px;
font-size: 30px;
border-color: #000000;
border-radius: 10px;
}
#plugin {
color: #efefef;
border-color: #000000;
border-color: #000000;
border-radius: 5px;
}
#main {
color: #efefef;
border-color: #000000;
border-color: #000000;
border-radius: 5px;
}
'';
};
}

View File

@@ -1,8 +1,13 @@
{...}: {
imports = [
# ./syncthing.nix
# ./command-runner.nix
./swaync.nix
./swayosd.nix
./kdeconnect.nix
./hyprland.nix
./gtk.nix
./anyrun.nix
./ironbar
./gui.nix
./eww.nix
];
}

23
home/services/device.nix Normal file
View File

@@ -0,0 +1,23 @@
{
devices,
inputs,
overlays,
home-manager,
...
}: (builtins.mapAttrs (
name: device: let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in
home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [{nixpkgs.config.allowUnfree = true;} ../common/home.nix];
}
)
devices)

19
home/services/eww.nix Normal file
View File

@@ -0,0 +1,19 @@
{
pkgs,
device,
lib,
...
}: let
activate_linux = pkgs.fetchFromGitHub {
owner = "Nycta-b424b3c7";
repo = "eww_activate-linux";
rev = "master";
sha256 = "sha256-CHNkRYR4F9JGMrNubHu+XzkwwI3IHzh93nuS7/Plhe4=";
};
in {
programs.eww = {
enable = device.hasGui && pkgs.stdenv.isLinux;
enableFishIntegration = true;
configDir = activate_linux;
};
}

43
home/services/gtk.nix Normal file
View File

@@ -0,0 +1,43 @@
{
pkgs,
lib,
device,
...
}: {
gtk = {
enable = device.hasGui && pkgs.stdenv.isLinux;
theme = {
name = "catppuccin-mocha-mauve-standard+normal";
package = pkgs.catppuccinThemes.gtk;
# package = pkgs.catppuccin-gtk.override {
# variant = "mocha";
# size = "standard";
# accents = ["mauve"];
# tweaks = ["normal"];
# };
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.catppuccin-papirus-folders.override {
accent = "mauve";
flavor = "mocha";
};
};
cursorTheme = {
name = "Vanillay-DMZ";
package = pkgs.vanilla-dmz;
};
gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
};
home.packages =
lib.optionals
(device.hasGui
&& pkgs.stdenv.isLinux) [
# pkgs.catppuccinThemes.gtk
pkgs.catppuccinThemes.papirus-folders
];
}

44
home/services/gui.nix Normal file
View File

@@ -0,0 +1,44 @@
{
pkgs,
device,
lib,
...
}: {
systemd.user.services.onepassword-gui = lib.optionalAttrs (device.is "ryu") {
Unit = {
Description = "1Password GUI";
BindsTo = ["graphical-session.target"];
After = ["graphical-session-pre.target"];
};
Service = {
ExecStart = "${pkgs._1password-gui}/bin/1password";
Restart = "always";
};
Install = {
WantedBy = ["graphical-session.target"];
};
};
home.packages = with pkgs;
lib.optionals (device.is "ryu") [
nautilus
totem
ffmpegthumbnailer
polkit_gnome
seahorse
signal-desktop
sony-headphones-client
spotify
steam-run
wl-clipboard
(prismlauncher.override {
additionalPrograms = [ffmpeg zenity];
jdks = [
graalvm-ce
zulu8
zulu17
zulu
];
})
];
}

273
home/services/hyprland.nix Normal file
View File

@@ -0,0 +1,273 @@
{
pkgs,
device,
lib,
...
}:
# lib.optionalAttrs device.isNix
{
imports = [
../../modules/hyprpaper.nix
];
# services.hyprpolkitagent.enable = true;
services.hypridle = {
enable = device.hasGui && pkgs.stdenv.isLinux;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 300;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
services.hyprsunset = {
enable = device.hasGui && pkgs.stdenv.isLinux;
};
programs.hyprpaper = let
wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
in {
enable = device.hasGui && pkgs.stdenv.isLinux;
# enable = true;
systemd.enable = true;
systemd.target = "hyprland-session.target";
settings.preload = wallpapers.all;
settings.wallpapers = {
"${device.monitors.primary}" = wallpapers.moon;
"${device.monitors.secondary}" = wallpapers.frieren_3;
"${device.monitors.tertiary}" = wallpapers.shapes;
};
};
programs.hyprlock = {
enable = device.hasGui && pkgs.stdenv.isLinux;
};
wayland.windowManager.hyprland = {
enable = device.hasGui && pkgs.stdenv.isLinux;
systemd.enable = true;
settings = {
source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";
"render:explicit_sync" = true;
monitor = [
# "${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0, bitdepth, 10, cm, hdr" # Washed out colors and can't record with obs
"${device.monitors.primary}, 2560x1440@360, 0x0, 1, transform, 0"
"${device.monitors.secondary}, 2560x1440@170, -1440x-1120, 1, transform, 1"
"${device.monitors.tertiary}, 2560x1440@170, 2560x-1120, 1, transform, 3"
];
input = {
kb_layout = "us";
# kb_variant = "";
# kb_model = "";
kb_options = "ctrl:nocaps";
# kb_rules = "";
follow_mouse = 2;
touchpad = {
natural_scroll = true;
tap-to-click = true;
disable_while_typing = true;
};
};
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = "$mauve $mauve 45deg";
"col.inactive_border" = "$crust";
};
decoration = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10;
# drop_shadow = true;
# shadow_range = 4;
# shadow_render_power = 3;
# col.shadow = "rgba(1a1a1aee)";
blur = {
enabled = true;
size = 3;
passes = 1;
};
};
animations = {
enabled = true;
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile =
true; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # you probably want this
};
master = {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_status = "master";
};
gestures = {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = false;
};
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
# "device:epic-mouse-v1" = { sensitivity = -0.5; };
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
windowrulev2 = [
# "float, title:^(Steam)$"
"float, title:^(Archetype.*)$"
"float, class:(.*nextcloud.*)"
"float, class:org.kde.kdeconnect.app"
];
# "misc:vfr" = true;
env = [
"XCURSOR_SIZE,24"
"XDG_SESSION_TYPE,wayland"
"MOZ_ENABLE_WAYLAND,1"
"QT_QPA_PLATFORM,wayland"
];
exec-once = [
# "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1"
# "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
# "${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg"
# "${pkgs.ironbar}/bin/ironbar"
# "${pkgs.swayosd}/bin/swayosd-server"
# "${pkgs.nextcloud-client}/bin/nextcloud --background"
];
"$mainMod" = "SUPER";
"$mainModShift" = "SUPER_SHIFT";
binde = [
",xf86audioraisevolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume raise"
",xf86audiolowervolume, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume lower"
];
bind = [
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
"$mainMod, Return, exec, ${pkgs.kitty}/bin/kitty"
"$mainModShift, Return, exec, ${pkgs.wezterm}/bin/wezterm"
# "$mainModShift, Return, exec, ${pkgs.foot}/bin/foot"
"$mainModShift, Q, killactive,"
"$mainModShift, s, exec, ${pkgs.hyprshot}/bin/hyprshot -m region"
# "$mainMod, M, exit,"
"$mainMod, t, togglefloating,"
"$mainMod, f, fullscreen,"
"$mainMod, g, fullscreenstate,0,2"
"$mainMod, d, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, Space, exec, ${pkgs.anyrun}/bin/anyrun"
"$mainMod, p, pseudo, # dwindle"
"$mainMod, v, togglesplit,"
# "$mainMod, a, exec, swaync-client -t"
"$mainMod, Tab, cyclenext"
# Audio
",xf86audiomute, exec, ${pkgs.swayosd}/bin/swayosd-client --output-volume mute-toggle"
# ",xf86audioprev, exec, /home/fs0c131y/.cargo/bin/mctl prev"
# ",xf86audionext, exec, /home/fs0c131y/.cargo/bin/mctl next"
# ",xf86audioplay, exec, /home/fs0c131y/.cargo/bin/mctl toggle"
# Screenshot
# "$mainMod,Print, exec, grim"
# "$mainModShift,Print, exec, grim -g "$(slurp)""
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, h, movefocus, l"
"$mainMod, j, movefocus, d"
"$mainMod, k, movefocus, u"
"$mainMod, l, movefocus, r"
"$mainModShift, h, movewindow, l"
"$mainModShift, j, movewindow, d"
"$mainModShift, k, movewindow, u"
"$mainModShift, l, movewindow, r"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
"$mainMod, Tab, cyclenext, bind = ALT, Tab, bringactivetotop,"
];
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
workspace = [
"1, monitor:${device.monitors.primary}"
"2, monitor:${device.monitors.primary}"
"3, monitor:${device.monitors.primary}"
"4, monitor:${device.monitors.primary}"
"5, monitor:${device.monitors.secondary}"
"6, monitor:${device.monitors.secondary}"
"7, monitor:${device.monitors.secondary}"
"8, monitor:${device.monitors.tertiary}"
"9, monitor:${device.monitors.tertiary}"
"10, monitor:${device.monitors.tertiary}"
];
};
};
}

View File

@@ -0,0 +1,105 @@
{
inputs,
pkgs,
device,
...
}: {
imports = [inputs.ironbar.homeManagerModules.default];
programs.ironbar = {
enable = device.hasGui && pkgs.stdenv.isLinux;
package = inputs.ironbar.packages.${pkgs.system}.default;
systemd = true;
config.monitors = {
"${device.monitors.secondary}" = {
position = "bottom";
start = [
{
type = "launcher";
favourites = ["firefox" "discord"];
show_names = false;
show_icons = true;
}
{type = "focused";}
];
end = [
{
type = "clipboard";
max_items = 3;
truncate.length = 50;
truncate.mode = "end";
}
{
type = "music";
player_type = "mpris";
}
{type = "clock";}
];
};
"${device.monitors.primary}" = {
position = "bottom";
icon_theme = "Papirus-Dark";
end = [
{
type = "sys_info";
format = [
" CPU {cpu_percent}% | {temp_c:coretemp-Package-id-0}°C"
" RAM {memory_used}GB/{memory_total}GB"
];
interval = {
cpu = 1;
temps = 5;
memory = 30;
# disks= 300;
# networks= 3;
};
}
{type = "tray";}
];
start = [
{
type = "workspaces";
name_map = {
"1" = "icon:foot";
"2" = "icon:code";
"3" = "icon:firefox";
"4" = "icon:slack";
"5" = "icon:steam";
"6" = "icon:foot";
"7" = "icon:foot";
"8" = "icon:firefox";
"9" = "icon:discord";
"10" = "icon:spotify";
};
favorites = ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"];
all_monitors = true;
}
];
};
"${device.monitors.tertiary}" = {
position = "bottom";
icon_theme = "Papirus-Dark";
start = [
{
type = "launcher";
show_names = false;
show_icons = true;
}
{type = "focused";}
];
end = [
{type = "clock";}
];
};
};
style = let
catppuccin = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "waybar";
rev = "v1.0";
sha256 = "sha256-vfwfBE3iqIN1cGoItSssR7h0z6tuJAhNarkziGFlNBw";
};
mocha = builtins.readFile "${catppuccin}/mocha.css";
in
mocha + builtins.readFile ./ironbar.css;
};
}

View File

@@ -0,0 +1,207 @@
@define-color color_bg @base;
@define-color color_bg_dark @mantle;
@define-color color_border @crust;
@define-color color_border_active @mauve;
@define-color color_text #ffffff;
@define-color color_urgent @lavender;
/* -- base styles -- */
* {
font-family: Noto Sans Nerd Font, sans-serif;
font-size: 16px;
border: none;
border-radius: 0;
}
box, menubar, button {
background-color: @color_bg;
background-image: none;
}
button, label {
color: @color_text;
}
button:hover {
background-color: @color_bg_dark;
}
#bar {
border-top: 1px solid @color_border;
}
.popup {
border: 1px solid @color_border;
padding: 1em;
}
/* -- clipboard -- */
.clipboard {
margin-left: 5px;
font-size: 1.1em;
}
.popup-clipboard .item {
padding-bottom: 0.3em;
border-bottom: 1px solid @color_border;
}
/* -- clock -- */
.clock {
font-weight: bold;
margin-left: 5px;
}
.popup-clock .calendar-clock {
color: @color_text;
font-size: 2.5em;
padding-bottom: 0.1em;
}
.popup-clock .calendar {
background-color: @color_bg;
color: @color_text;
}
.popup-clock .calendar .header {
padding-top: 1em;
border-top: 1px solid @color_border;
font-size: 1.5em;
}
.popup-clock .calendar:selected {
background-color: @color_border_active;
}
/* -- launcher -- */
.launcher .item {
margin-right: 4px;
}
.launcher .item:not(.focused):hover {
background-color: @color_bg_dark;
}
.launcher .open {
border-bottom: 1px solid @color_text;
}
.launcher .focused {
border-bottom: 2px solid @color_border_active;
}
.launcher .urgent {
border-bottom-color: @color_urgent;
}
.popup-launcher {
padding: 0;
}
.popup-launcher .popup-item:not(:first-child) {
border-top: 1px solid @color_border;
}
/* -- music -- */
.music:hover * {
background-color: @color_bg_dark;
}
.popup-music .album-art {
margin-right: 1em;
}
.popup-music .icon-box {
margin-right: 0.4em;
}
.popup-music .title .icon, .popup-music .title .label {
font-size: 1.7em;
}
.popup-music .controls *:disabled {
color: @color_border;
}
.slider slider {
color: @color_urgent;
background-color: @color_urgent;
}
.popup-music .volume .slider slider {
border-radius: 100%;
}
.popup-music .volume .icon {
margin-left: 4px;
}
.popup-music .progress .slider slider {
border-radius: 100%;
}
/* -- script -- */
.script {
padding-left: 10px;
}
/* -- sys_info -- */
.sysinfo {
margin-left: 10px;
}
.sysinfo .item {
margin-left: 5px;
}
/* -- tray -- */
.tray {
margin-left: 10px;
}
/* -- workspaces -- */
.workspaces .item.focused {
box-shadow: inset 0 -3px;
background-color: @color_bg_dark;
}
.workspaces .item:hover {
box-shadow: inset 0 -3px;
}
/* -- custom: power menu -- */
.popup-power-menu #header {
font-size: 1.4em;
padding-bottom: 0.4em;
margin-bottom: 0.6em;
border-bottom: 1px solid @color_border;
}
.popup-power-menu .power-btn {
border: 1px solid @color_border;
padding: 0.6em 1em;
}
.popup-power-menu #buttons > *:nth-child(1) .power-btn {
margin-right: 1em;
}

View File

@@ -0,0 +1,4 @@
{device, ...}: {
services.kdeconnect.enable = device.is "ryu";
services.kdeconnect.indicator = device.is "ryu";
}

View File

@@ -1,6 +1,6 @@
{device, ...}: {
services.swaync = {
enable = device.name == "ryu";
enable = device.is "ryu";
settings = {
notification-inline-replies = true;
cssPriority = "user";

View File

@@ -1,3 +1,3 @@
{device, ...}: {
services.swayosd.enable = device.name == "ryu";
services.swayosd.enable = device.is "ryu";
}