From a799c465dbe45e03ae66358160bbe2a07de427a6 Mon Sep 17 00:00:00 2001 From: js0ny Date: Tue, 16 Dec 2025 18:41:18 +0000 Subject: [PATCH] telegram --- nixcfgs/users/js0ny/packages/fonts.nix | 10 +- nixcfgs/users/js0ny/packages/gui.nix | 6 +- .../desktop/wayland-wm/niri/keymaps.nix | 2 + nixcfgs/users/js0ny/programs/telegram.nix | 98 +++++++++++++++++++ nixcfgs/users/js0ny/zephyrus.nix | 3 +- 5 files changed, 111 insertions(+), 8 deletions(-) create mode 100644 nixcfgs/users/js0ny/programs/telegram.nix diff --git a/nixcfgs/users/js0ny/packages/fonts.nix b/nixcfgs/users/js0ny/packages/fonts.nix index 653caba..fcd0100 100644 --- a/nixcfgs/users/js0ny/packages/fonts.nix +++ b/nixcfgs/users/js0ny/packages/fonts.nix @@ -6,8 +6,14 @@ "Maple Mono NF CN" "JetBrainsMono Nerd Font" ]; - serif = ["LXGW WenKai"]; - sansSerif = ["LXGW Neo XiHei"]; + serif = [ + "LXGW WenKai" + "Noto Serif CJK SC" + ]; + sansSerif = [ + "LXGW Neo XiHei" + "Noto Sans CJK SC" + ]; }; }; } diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix index f4fc6d8..9a9fef2 100644 --- a/nixcfgs/users/js0ny/packages/gui.nix +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -66,14 +66,12 @@ in { warp-terminal # PDF Viewer - kdePackages.okular # default + kdePackages.okular sioyek # Image Viewer loupe # SUPER FAST 有催人跑的感觉 w/ GPU Accel. - kdePackages.elisa - # Email protonmail-bridge thunderbird @@ -83,8 +81,6 @@ in { papirus-icon-theme pcloud - materialgram - ayugram-desktop signal-desktop # Use Wayland for Jetbrains # (jetbrains.idea-ultimate.override { diff --git a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix index 70f8bf6..2bf8e7e 100644 --- a/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix +++ b/nixcfgs/users/js0ny/programs/desktop/wayland-wm/niri/keymaps.nix @@ -227,6 +227,8 @@ in { "Mod+Escape".allow-inhibiting = false; "Mod+Escape".action = toggle-keyboard-shortcuts-inhibit; + "Mod+Grave".action = focus-workspace-previous; + "Ctrl+Alt+Delete".action = quit; }; } diff --git a/nixcfgs/users/js0ny/programs/telegram.nix b/nixcfgs/users/js0ny/programs/telegram.nix new file mode 100644 index 0000000..bb52f0f --- /dev/null +++ b/nixcfgs/users/js0ny/programs/telegram.nix @@ -0,0 +1,98 @@ +{ + pkgs, + lib, + ... +}: let + shortcuts = builtins.toJSON [ + { + command = "previous_chat"; + keys = "alt+k"; + } + { + command = "next_chat"; + keys = "alt+j"; + } + { + command = "self_chat"; + keys = "alt+0"; + } + { + command = "pinned_chat1"; + keys = "alt+1"; + } + { + command = "all_chats"; + keys = "alt+1"; + } + { + command = "pinned_chat2"; + keys = "alt+2"; + } + { + command = "folder1"; + keys = "alt+2"; + } + { + command = "pinned_chat3"; + keys = "alt+3"; + } + { + command = "folder2"; + keys = "alt+3"; + } + { + command = "pinned_chat4"; + keys = "alt+4"; + } + { + command = "folder3"; + keys = "alt+4"; + } + { + command = "pinned_chat5"; + keys = "alt+5"; + } + { + command = "folder4"; + keys = "alt+5"; + } + { + command = "pinned_chat6"; + keys = "alt+6"; + } + { + command = "folder5"; + keys = "alt+6"; + } + { + command = "pinned_chat7"; + keys = "alt+7"; + } + { + command = "folder6"; + keys = "alt+7"; + } + { + command = "pinned_chat8"; + keys = "alt+8"; + } + { + command = "last_folder"; + keys = "alt+8"; + } + { + command = "show_archive"; + keys = "alt+9"; + } + ]; +in { + home.packages = with pkgs; [ + ayugram-desktop + materialgram + ]; + xdg.dataFile = { + "AyuGramDesktop/tdata/shortcuts-custom.json".text = shortcuts; + "materialgram/tdata/shortcuts-custom.json".text = shortcuts; + "TelegramDesktop/tdata/shortcuts-custom.json".text = shortcuts; + }; +} diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix index 6937ea3..3da14c8 100644 --- a/nixcfgs/users/js0ny/zephyrus.nix +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -38,7 +38,7 @@ in { ./programs/firefox ./programs/emacs.nix ./programs/vscode.nix - # ./programs/xilinx.nix + ./programs/xilinx.nix ./programs/mime.nix ./programs/zed-editor.nix ./programs/rime.nix @@ -76,6 +76,7 @@ in { ./programs/celluloid.nix ./programs/picard.nix ./programs/cider-2.nix + ./programs/telegram.nix # Desktop Linux ./programs/desktop/gnome