diff --git a/home/.chezmoiignore.tmpl b/home/.chezmoiignore.tmpl index 785428c..87afe49 100644 --- a/home/.chezmoiignore.tmpl +++ b/home/.chezmoiignore.tmpl @@ -63,6 +63,12 @@ vim:ft=gotmpl .config/fcitx5 .config/niri .config/neovide + .config/yazi + .config/swaylock + .config/lazygit + .config/rofi + .config/waybar + .config/ghostty .local/share/kio/** .local/share/fonts/** {{ end }} diff --git a/home/dot_config/hypr/hyprland/keymaps.conf b/home/dot_config/hypr/hyprland/keymaps.conf index 8c7369b..c017ed9 100644 --- a/home/dot_config/hypr/hyprland/keymaps.conf +++ b/home/dot_config/hypr/hyprland/keymaps.conf @@ -36,7 +36,8 @@ bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -bind = $mainMod, c, exec, grimblast copysave area $HOME/Pictures/Screenshots/"$(date +%Y%m%d-%H%M%S)" +bind = $mainMod, s, exec, grimblast copysave active $HOME/Pictures/Screenshots/"$(date +%Y%m%d-%H%M%S)" +bind = $mainMod SHIFT, S, exec, grimblast copysave area $HOME/Pictures/Screenshots/"$(date +%Y%m%d-%H%M%S)" bind = $mainMod SHIFT, c, exec, notify-send "Color: $(hyprpicker)" # Switch workspaces with mainMod + [0-9] diff --git a/home/dot_config/kitty/kitty.conf b/home/dot_config/kitty/kitty.conf index daad5dc..3f97f77 100644 --- a/home/dot_config/kitty/kitty.conf +++ b/home/dot_config/kitty/kitty.conf @@ -78,7 +78,5 @@ map cmd+enter toggle_layout stack map ctrl+shift+enter toggle_layout stack # }}} -map f1 launch --type tab --cwd ~/.dotfiles nvim - shell zsh diff --git a/home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua b/home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua index 01d25b4..b5ebee9 100644 --- a/home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua +++ b/home/dot_config/nvim/lua/plugins/mod/blink-pairs.lua @@ -15,7 +15,15 @@ return { disabled_filetypes = {}, -- https://github.com/Saghen/blink.pairs/blob/main/lua/blink/pairs/config/mappings.lua#24 -- Battery included! - pairs = {}, + pairs = { + ["'"] = { + "''", + when = function(ctx) + return ctx:text_before_cursor(1) == "'" + end, + languages = { "nix" }, + }, + }, }, highlights = { enabled = true, diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock index 9fcef65..556d675 100644 --- a/nixcfgs/flake.lock +++ b/nixcfgs/flake.lock @@ -104,6 +104,24 @@ "type": "github" } }, + "catppuccin": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1763110997, + "narHash": "sha256-S2vF+3D/9vna3/vBV7LHiGUbp+ltPsQhvccIyim6VQg=", + "owner": "catppuccin", + "repo": "nix", + "rev": "e6928cdd3dd20636326c2756d2bc8fd1cd825768", + "type": "github" + }, + "original": { + "owner": "catppuccin", + "repo": "nix", + "type": "github" + } + }, "crane": { "locked": { "lastModified": 1751562746, @@ -121,7 +139,7 @@ }, "devshell": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1741473158, @@ -328,7 +346,7 @@ }, "home-manager_2": { "inputs": { - "nixpkgs": "nixpkgs_7" + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1756842514, @@ -418,7 +436,7 @@ "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_8", + "nixpkgs": "nixpkgs_9", "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_3", "xdph": "xdph" @@ -644,7 +662,7 @@ "inputs": { "niri-stable": "niri-stable", "niri-unstable": "niri-unstable", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable", "xwayland-satellite-stable": "xwayland-satellite-stable", "xwayland-satellite-unstable": "xwayland-satellite-unstable" @@ -736,7 +754,7 @@ "inputs": { "flake-compat": "flake-compat", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1763223362, @@ -831,6 +849,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1756819007, + "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1747958103, "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=", @@ -847,6 +881,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1762111121, + "narHash": "sha256-4vhDuZ7OZaZmKKrnDpxLZZpGIJvAeMtK6FKLJYUtAdw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b3d51a0365f6695e7dd5cdf3e180604530ed33b4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1762844143, "narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=", @@ -862,7 +912,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1754028485, "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", @@ -878,7 +928,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1762604901, "narHash": "sha256-Pr2jpryIaQr9Yx8p6QssS03wqB6UifnnLr3HJw9veDw=", @@ -894,7 +944,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1762844143, "narHash": "sha256-SlybxLZ1/e4T2lb1czEtWVzDCVSTvk9WLwGhmxFmBxI=", @@ -910,7 +960,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1722073938, "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", @@ -926,7 +976,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1756542300, "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", @@ -942,7 +992,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1751792365, "narHash": "sha256-J1kI6oAj25IG4EdVlg2hQz8NZTBNYvIS0l4wpr9KcUo=", @@ -958,26 +1008,10 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1756819007, - "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": "flake-parts_3", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1762951833, @@ -1065,13 +1099,14 @@ "inputs": { "betterfox-nix": "betterfox-nix", "caelestia-shell": "caelestia-shell", + "catppuccin": "catppuccin", "firefox-addons": "firefox-addons", "home-manager": "home-manager", "niri-flake": "niri-flake", "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nixcord": "nixcord", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-stable": "nixpkgs-stable_2", "nur": "nur", "plasma-manager": "plasma-manager", @@ -1147,7 +1182,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1750931469, @@ -1234,7 +1269,7 @@ "flake-parts": "flake-parts_4", "home-manager": "home-manager_2", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_9", + "nixpkgs": "nixpkgs_10", "treefmt-nix": "treefmt-nix", "xremap": "xremap" }, diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index 8d8a8b6..395dfda 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -46,6 +46,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; nixcord.url = "github:kaylorben/nixcord"; + catppuccin.url = "github:catppuccin/nix"; }; outputs = { @@ -65,6 +66,7 @@ firefox-addons, zen-browser, nixcord, + catppuccin, ... } @ inputs: let overlays = [ @@ -133,6 +135,7 @@ niri-flake.homeModules.niri betterfox-nix.modules.homeManager.betterfox nixcord.homeModules.nixcord + catppuccin.homeModules.catppuccin ]; }; "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index 7d5aad2..85f3514 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -28,6 +28,7 @@ ../../modules/nixos/desktop/dm/sddm.nix ../../modules/nixos/desktop/de/kde.nix ../../modules/nixos/desktop/de/niri.nix + ../../modules/nixos/desktop/de/hyprland.nix # desktop programs ../../modules/nixos/programs/zsh.nix diff --git a/nixcfgs/modules/home/programs/lsd.nix b/nixcfgs/modules/home/programs/lsd.nix index 921f243..4b11a81 100644 --- a/nixcfgs/modules/home/programs/lsd.nix +++ b/nixcfgs/modules/home/programs/lsd.nix @@ -1,7 +1,6 @@ {pkgs, ...}: { programs.lsd = { enable = true; - colors = "always"; icons = "always"; enableBashIntegration = true; enableFishIntegration = true; diff --git a/nixcfgs/modules/home/programs/starship.nix b/nixcfgs/modules/home/programs/starship.nix index 6576951..d29b113 100644 --- a/nixcfgs/modules/home/programs/starship.nix +++ b/nixcfgs/modules/home/programs/starship.nix @@ -1,4 +1,5 @@ {...}: { + catppuccin.starship.enable = false; programs.starship = { enable = true; enableBashIntegration = true; diff --git a/nixcfgs/users/js0ny/packages/catppuccin.nix b/nixcfgs/users/js0ny/packages/catppuccin.nix index 2240190..b6bfe0f 100644 --- a/nixcfgs/users/js0ny/packages/catppuccin.nix +++ b/nixcfgs/users/js0ny/packages/catppuccin.nix @@ -18,4 +18,10 @@ in { my-catppuccin-kde catppuccin-fcitx5 ]; + + catppuccin = { + enable = true; + flavor = "mocha"; + accent = "pink"; + }; } diff --git a/nixcfgs/users/js0ny/packages/cli.nix b/nixcfgs/users/js0ny/packages/cli.nix index 0c88709..5726108 100644 --- a/nixcfgs/users/js0ny/packages/cli.nix +++ b/nixcfgs/users/js0ny/packages/cli.nix @@ -1,12 +1,20 @@ # ~/.config/nix-config/common/packages-headless.nix {pkgs, ...}: { + programs.bat.enable = true; + programs.btop.enable = true; + programs.delta.enable = true; + programs.lazygit = { + enable = true; + settings = { + git.pagers = [{pager = "delta --dark --paging=never";}]; + }; + }; + home.packages = with pkgs; [ rclone age aichat beancount - bat - btop gnumake chezmoi cmake @@ -15,7 +23,6 @@ dust fd ffmpeg - delta glow hyperfine just @@ -35,8 +42,6 @@ fastfetch fzf kitty - zsh - fish zoxide wakatime-cli sdcv diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index befb682..871b803 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -20,7 +20,6 @@ in { home.packages = with pkgs; [ # Terminal Emulator - ghostty # default kitty alacritty warp-terminal diff --git a/nixcfgs/users/js0ny/programs/chromium.nix b/nixcfgs/users/js0ny/programs/chromium.nix index 16797bc..4be3fdb 100644 --- a/nixcfgs/users/js0ny/programs/chromium.nix +++ b/nixcfgs/users/js0ny/programs/chromium.nix @@ -11,12 +11,19 @@ "--enable-features=TouchpadOverscrollHistoryNavigation" ]; extensions = [ - {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin + {id = "logpjaacgmcbpdkdchjiaagddngobkck";} # Shrotkeys + {id = "bggfcpfjbdkhfhfmkjpbhnkhnpjjeomc";} # Material Icons for GitHub + {id = "ddkjiahejlhfcafbddmgiahcphecmpfh";} # uBlock Origin Lite {id = "ghmbeldphafepmbegfdlkpapadhbakde";} # proton pass {id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # dark reader {id = "gfbliohnnapiefjpjlpjnehglfpaknnc";} # surfingkeys - {id = "bpoadfkcbjbfhfodiogcnhhhpibjhbnh";} # immersive translate {id = "dhdgffkkebhmkfjojejmpbldmpobfkfo";} # tampermonkey + {id = "jlgkpaicikihijadgifklkbpdajbkhjo";} # CrxMouse: Mouse Gestures + {id = "mnjggcdmjocbbbhaepdhchncahnbgone";} # SponsorBlock for Youtube + {id = "clngdbkpkpeebahjckkjfobafhncgmne";} # Stylus + {id = "jpbjcnkcffbooppibceonlgknpkniiff";} # Global Speed + {id = "bdiifdefkgmcblbcghdlonllpjhhjgof";} # Kiss Translator + {id = "gebbhagfogifgggkldgodflihgfeippi";} # Return YouTube Dislike ]; }; } diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix index 82ee91e..fc80aa0 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/window-rules.nix @@ -85,6 +85,14 @@ app-id = "^org.telegram.desktop$"; title = "^Media viewer$"; } + { + app-id = "^com.ayugram.desktop$"; + title = "^Media viewer$"; + } + { + app-id = "^io.github.kukuruzka165.materialgram$"; + title = "^Media viewer$"; + } { app-id = "^wechat$"; title = "^图片和视频$"; diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix index e9167fe..3b31d81 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/packages.nix @@ -34,29 +34,24 @@ in { imports = [ ../../rofi.nix - ./waybar.nix + ./waybar ./swww.nix ./kanshi.nix + ./swaylock.nix ]; home.packages = with pkgs; [ swayidle # Screensaver - dunst # Notification daemon cliphist # Clipboard daemon - wmname # swayidleWrapper brightnessctl playerctl powerprofiles-next blueman ]; - programs.swaylock = { - enable = true; - package = pkgs.swaylock-effects; - }; xdg.portal = { enable = true; extraPortals = with pkgs; [xdg-desktop-portal-wlr xdg-desktop-portal-gtk]; }; - services.blueman-applet.enable = true; services.cliphist.enable = true; + services.dunst.enable = true; } diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/swaylock.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/swaylock.nix new file mode 100644 index 0000000..a4a4774 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/swaylock.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: { + programs.swaylock = { + enable = true; + package = pkgs.swaylock-effects; + settings = { + ignore-empty-password = true; + show-failed-attempts = true; + clock = true; + indicator = true; + indicator-radius = 100; + indicator-thickness = 7; + fade-in = 0.2; + grace = 2; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar.nix deleted file mode 100644 index 84794cd..0000000 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - waybar - pavucontrol - font-awesome - ]; -} diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix new file mode 100644 index 0000000..5574fef --- /dev/null +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/default.nix @@ -0,0 +1,31 @@ +{pkgs, ...}: { + imports = [./modules.nix]; + home.packages = with pkgs; [ + pavucontrol + font-awesome + ]; + services.blueman-applet.enable = true; + programs.waybar = { + enable = true; + style = '' + * { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: "Font Awesome 7 Free", "JetBrainsMono Nerd Font"; + font-size: 14px; + font-feature-settings: "tnum"; + } + #workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + } + + #workspaces button.focused { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; + } + + #workspaces button.urgent { + background-color: #eb4d4b; + } + ''; + }; +} diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix new file mode 100644 index 0000000..879fd2d --- /dev/null +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/waybar/modules.nix @@ -0,0 +1,223 @@ +{...}: { + programs.waybar.settings = [ + { + layer = "top"; + height = 32; + margin-top = 4; + margin-left = 4; + margin-right = 4; + spacing = 4; + modules-left = [ + "custom/osicon" + "sway/workspaces" + "hyprland/workspaces" + "wlr/taskbar" + ]; + modules-right = [ + "tray" + "pulseaudio" + "cpu" + "memory" + "network" + "battery" + "clock" + ]; + "custom/logout" = { + format = "⏻"; + tooltip = false; + on-click = "niri msg action quit"; + }; + "wlr/taskbar" = { + format = "{icon}"; + tooltip-format = "{title} | {app_id}"; + on-click = "activate"; + on-click-middle = "close"; + on-click-right = "fullscreen"; + }; + keyboard-state = { + numlock = true; + capslock = true; + format = "{name} {icon}"; + format-icons = { + locked = ""; + unlocked = ""; + }; + }; + "sway/mode" = { + format = "{}"; + }; + "sway/scratchpad" = { + format = "{icon} {count}"; + show-empty = false; + format-icons = [ + "" + "" + ]; + tooltip = true; + tooltip-format = "{app}: {title}"; + }; + mpd = { + format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% "; + format-disconnected = "Disconnected "; + format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; + unknown-tag = "N/A"; + interval = 2; + consume-icons = { + on = " "; + }; + random-icons = { + off = " "; + on = " "; + }; + repeat-icons = { + on = " "; + }; + single-icons = { + on = "1 "; + }; + state-icons = { + paused = ""; + playing = ""; + }; + tooltip-format = "MPD (connected)"; + tooltip-format-disconnected = "MPD (disconnected)"; + }; + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + tray = { + spacing = 10; + }; + clock = { + tooltip-format = "{:%Y %B}\n{calendar}"; + format = "{:%e %B %H:%M}"; + }; + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + temperature = { + critical-threshold = 80; + format = "{temperatureC}°C {icon}"; + format-icons = [ + "" + "" + "" + ]; + }; + backlight = { + format = "{percent}% {icon}"; + format-icons = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; + }; + battery = { + states = { + warning = 30; + critical = 15; + }; + format = "{capacity}% {icon}"; + format-charging = "{capacity}% "; + format-plugged = "{capacity}% "; + format-alt = "{time} {icon}"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + }; + "battery#bat2" = { + bat = "BAT2"; + }; + network = { + format-wifi = ""; + format-ethernet = ""; + tooltip-format = "{ifname} via {gwaddr} "; + format-linked = ""; + format-disconnected = "⚠"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + pulseaudio = { + scroll-step = 5; + format = "{icon}"; + tooltip-format = "{volume}% {icon}"; + format-bluetooth = "{volume}% {icon}"; + format-bluetooth-muted = " {icon}"; + format-muted = ""; + format-source = "{volume}% "; + format-source-muted = ""; + format-icons = { + headphone = ""; + hands-free = ""; + headset = ""; + phone = ""; + portable = ""; + car = ""; + default = [ + "" + "" + "" + ]; + }; + on-click = "pavucontrol"; + on-click-right = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + }; + "custom/media" = { + format = "{icon} {}"; + return-type = "json"; + max-length = 40; + format-icons = { + spotify = ""; + default = "🎜"; + }; + escape = true; + exec = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; + }; + + power-profiles-daemon = { + format = "{icon}"; + tooltip-format = "Power profile: {profile}\nDriver: {driver}"; + tooltip = true; + format-icons = { + default = ""; + performance = ""; + balanced = ""; + power-saver = ""; + }; + }; + "custom/power" = { + format = "⏻ "; + tooltip = false; + menu = "on-click"; + menu-file = "$HOME/.config/waybar/power_menu.xml"; + menu-actions = { + shutdown = "shutdown"; + reboot = "reboot"; + suspend = "systemctl suspend"; + hibernate = "systemctl hibernate"; + }; + }; + "custom/osicon" = { + format = ""; + on-click-right = "rofi -show drun -icon-theme Papirus -show-icons"; + }; + } + ]; +} diff --git a/nixcfgs/users/js0ny/programs/firefox/addons.nix b/nixcfgs/users/js0ny/programs/firefox/addons.nix index 973b74b..247bcef 100644 --- a/nixcfgs/users/js0ny/programs/firefox/addons.nix +++ b/nixcfgs/users/js0ny/programs/firefox/addons.nix @@ -2,7 +2,9 @@ addons = pkgs.firefox-addons; in { # imports = [./lib.nix]; # TODO: Declarative extension permissions + catppuccin.firefox.enable = true; programs.firefox.profiles.default = { + extensions.force = true; extensions.packages = with addons; [ # Keybindings & Gestures & User Scripts foxy-gestures @@ -12,6 +14,7 @@ in { # Theming material-icons-for-github + firefox-color # Browsing Enhancement darkreader diff --git a/nixcfgs/users/js0ny/programs/ghostty.nix b/nixcfgs/users/js0ny/programs/ghostty.nix new file mode 100644 index 0000000..06a5ccf --- /dev/null +++ b/nixcfgs/users/js0ny/programs/ghostty.nix @@ -0,0 +1,49 @@ +{config, ...}: { + programs.ghostty = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + systemd.enable = true; + # Not ready + settings = { + command = "${config.currentUser.defaultShell}"; + font-size = 13; + font-family = "Maple Mono NF CN"; + # theme = light:Catppuccin Latte,dark:Catppuccin Mocha; + # background-opacity = 0.8; + + cursor-style = "block_hollow"; + cursor-style-blink = true; + cursor-click-to-move = true; + cursor-invert-fg-bg = true; + + window-decoration = "auto"; + + # title = "👻"; + + ### Keybindings + + keybind = [ + "performable:ctrl+c=copy_to_clipboard" + "alt+shift+h=goto_split:left" + "alt+shift+j=goto_split:bottom" + "alt+shift+k=goto_split:top" + "alt+shift+l=goto_split:right" + "alt+shift+|=new_split:right" + "alt+shift+_=new_split:down" + "alt+shift+enter=new_split:auto" + "global:super+backquote=toggle_quick_terminal" + "alt+shift+n=new_window" + ]; + + ### Misc + + app-notifications = "no-clipboard-copy"; + + ### Reference to: + # https://github.com/folke/dot/blob/master/config/ghostty/config + # https://github.com/hackr-sh/ghostty-shaders + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/mpv.nix b/nixcfgs/users/js0ny/programs/mpv.nix index a796ea1..b53125f 100644 --- a/nixcfgs/users/js0ny/programs/mpv.nix +++ b/nixcfgs/users/js0ny/programs/mpv.nix @@ -24,6 +24,8 @@ "s" = "screenshot"; "S" = "screenshot video"; "f" = "cycle fullscreen"; + "n" = "playlist-next"; + "p" = "playlist-prev"; }; }; } diff --git a/nixcfgs/users/js0ny/programs/nvim.nix b/nixcfgs/users/js0ny/programs/nvim.nix index 2223f42..c7fca21 100644 --- a/nixcfgs/users/js0ny/programs/nvim.nix +++ b/nixcfgs/users/js0ny/programs/nvim.nix @@ -23,4 +23,6 @@ in { programs.bash.shellAliases = nvimAlias; programs.zsh.shellAliases = nvimAlias; programs.nushell.shellAliases = nvimAlias; + + catppuccin.nvim.enable = false; # Defined in lua config } diff --git a/nixcfgs/users/js0ny/programs/obs-studio.nix b/nixcfgs/users/js0ny/programs/obs-studio.nix new file mode 100644 index 0000000..fef44a8 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/obs-studio.nix @@ -0,0 +1,31 @@ +{ + pkgs, + lib, + ... +}: { + programs.obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + input-overlay + ]; + }; + + xdg.configFile."obs-studio/user.override.ini".text = lib.generators.toINI {} { + Appearance = { + Theme = "com.obsproject.Catppuccin.Mocha"; + }; + }; + + # Manually merge obs-studio config to existing file + home.activation.mergeObsStudioConfig = lib.hm.dag.entryAfter ["writeBoundary"] '' + if [ -f ~/.config/obs-studio/user.override.ini ]; then + # Create gwenviewrc if it doesn't exist + touch ~/.config/obs-studio/user.ini + + # Merge the override file into the main config + ${pkgs.crudini}/bin/crudini --merge ~/.config/obs-studio/user.ini < ~/.config/obs-studio/user.override.ini + + $DRY_RUN_CMD rm -f ~/.config/obs-studio/user.override.ini + fi + ''; +} diff --git a/nixcfgs/users/js0ny/programs/rime.nix b/nixcfgs/users/js0ny/programs/rime.nix index e44c0e1..e783161 100644 --- a/nixcfgs/users/js0ny/programs/rime.nix +++ b/nixcfgs/users/js0ny/programs/rime.nix @@ -101,6 +101,7 @@ in { ]; }; }; + catppuccin.fcitx5.enable = false; home.file.${rimePath} = { source = rimeConfigFiltered; recursive = true; diff --git a/nixcfgs/users/js0ny/programs/rofi.nix b/nixcfgs/users/js0ny/programs/rofi.nix index 94a869f..d267a63 100644 --- a/nixcfgs/users/js0ny/programs/rofi.nix +++ b/nixcfgs/users/js0ny/programs/rofi.nix @@ -1,9 +1,37 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - rofi - rofimoji - rofi-power-menu - ]; +{ + pkgs, + lib, + config, + ... +}: let + catppuccinEnable = config.catppuccin.enable or false; + catppuccinFlavor = config.catppuccin.flavor or "mocha"; + catppuccinAccent = config.catppuccin.accent or "mauve"; +in { + programs.rofi = { + enable = true; + terminal = "${pkgs.alacritty}/bin/alacritty"; + plugins = with pkgs; [ + rofimoji + rofi-power-menu + rofi-calc + ]; + }; + + # Use this since rasi parsing cannot handle @variable + # it will add quotes around and break the colour variables. + xdg.dataFile."rofi/themes/custom.rasi" = lib.mkIf catppuccinEnable { + enable = true; + text = lib.mkForce '' + @theme "catppuccin-default" + + @import "catppuccin-${catppuccinFlavor}" + + * { + selected-normal-background: @${catppuccinAccent}; + } + ''; + }; # The default desktop entry does not have `categories` field, add it manually. xdg.desktopEntries = { diff --git a/nixcfgs/users/js0ny/programs/thunderbird.nix b/nixcfgs/users/js0ny/programs/thunderbird.nix new file mode 100644 index 0000000..36d39d2 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/thunderbird.nix @@ -0,0 +1,9 @@ +{...}: { + programs.thunderbird = { + enable = true; + profiles.js0ny = { + isDefault = true; + }; + }; + catppuccin.thunderbird.profile = "js0ny"; +} diff --git a/nixcfgs/users/js0ny/programs/vscode.nix b/nixcfgs/users/js0ny/programs/vscode.nix index 64f46d7..b259bf9 100644 --- a/nixcfgs/users/js0ny/programs/vscode.nix +++ b/nixcfgs/users/js0ny/programs/vscode.nix @@ -16,6 +16,8 @@ in { vspacecode.whichkey ]; }; + + catppuccin.vscode.profiles.default.enable = false; programs.fish.shellAbbrs = codeAlias; programs.bash.shellAliases = codeAlias; programs.zsh.shellAliases = codeAlias; diff --git a/nixcfgs/users/js0ny/programs/yazi.nix b/nixcfgs/users/js0ny/programs/yazi.nix index fa77683..41d9f50 100644 --- a/nixcfgs/users/js0ny/programs/yazi.nix +++ b/nixcfgs/users/js0ny/programs/yazi.nix @@ -1,9 +1,72 @@ -{...}: { +{pkgs, ...}: { programs.yazi = { enable = true; enableZshIntegration = true; enableFishIntegration = true; enableNushellIntegration = true; shellWrapperName = "y"; + plugins = { + git = pkgs.yaziPlugins.git; + starship = pkgs.yaziPlugins.starship; + }; + settings = { + preview.wrap = "yes"; + mgr = { + show_hidden = true; + linemode = "size_and_mtime"; + }; + plugin.prepend_fetchers = [ + { + id = "git"; + name = "*"; + run = "git"; + } + { + id = "git"; + name = "*/"; + run = "git"; + } + ]; + }; + keymap = { + mgr.prepend_keymap = [ + { + on = "K"; + run = "seek -5"; + desc = "Seek up 5 units in the preview"; + } + { + on = "J"; + run = "seek 5"; + desc = "Seek down 5 units in the preview"; + } + + # Find + { + on = ["g" "p"]; + run = "cd ~/Pictures"; + desc = "Go ~/Pictures/"; + } + ]; + }; + initLua = '' + function Linemode:size_and_mtime() + local time = math.floor(self._file.cha.mtime or 0) + if time == 0 then + time = "" + elseif os.date("%Y", time) == os.date("%Y") then + time = os.date("%m-%d %H:%M", time) + else + time = os.date("%Y-%m-%d", time) + end + + local size = self._file:size() + return string.format("%s %s", size and ya.readable_size(size) or "/", time) + end + + -- Plugin setups + require("starship"):setup() + require("git"):setup() + ''; }; } diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 0fa6f00..951db68 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -46,10 +46,14 @@ ./programs/edit-clipboard.nix ./programs/discord.nix ./programs/mpv.nix + ./programs/thunderbird.nix + ./programs/obs-studio.nix + ./programs/ghostty.nix # Desktop Linux ./programs/desktop/plasma ./programs/desktop/wayland-wm/niri + ./programs/desktop/wayland-wm/hyprland.nix # General Program config ../../modules/home/programs/eza.nix