From c3500f337ed081c434f2af1ea6464a8cfd56e26c Mon Sep 17 00:00:00 2001 From: Zhongheng Liu Date: Sun, 11 Aug 2024 19:52:35 +0800 Subject: [PATCH] feat: expanded desktop configuration options Created sensible default waybar configuration Enabled fish z plugins (NOTE: include git plugin next time) DEFUNCT: Created wechat package that includes a license archive to circumvent restrictions --- home-manager/stvnliu/hypr/hyprland.nix | 60 ++++++++++++++------- home-manager/stvnliu/shells/fish.nix | 21 ++++---- home-manager/stvnliu/wechat/default.nix | 8 +++ home-manager/stvnliu/wechat/license.tar.gz | Bin 0 -> 1354 bytes 4 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 home-manager/stvnliu/wechat/default.nix create mode 100644 home-manager/stvnliu/wechat/license.tar.gz diff --git a/home-manager/stvnliu/hypr/hyprland.nix b/home-manager/stvnliu/hypr/hyprland.nix index a57683a..4c89faa 100644 --- a/home-manager/stvnliu/hypr/hyprland.nix +++ b/home-manager/stvnliu/hypr/hyprland.nix @@ -3,22 +3,47 @@ pkgs, ... }: { - home.packages = with pkgs; [ - foot - ]; + home.packages = with pkgs; [foot]; + programs.waybar = { + enable = true; + settings = [ + { + layer = "top"; + position = "top"; + height = 30; + output = ["eDP-1" "HDMI-A-1"]; + modules-left = ["hyprland/window" "wlr/taskbar" "cpu" "memory" "idle-inhibitor"]; + modules-center = ["hyprland/workspaces" "custom/hello-from-waybar"]; + modules-right = ["mpd" "custom/mymodule#with-css-id" "temperature" "battery"]; + + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = true; + }; + "custom/hello-from-waybar" = { + format = "hello {}"; + max-length = 40; + interval = "once"; + exec = pkgs.writeShellScript "hello-from-waybar" '' + echo "from within waybar" + ''; + }; + } + ]; + systemd.enable = true; + systemd.target = "hyprland-session.target"; + }; + wayland.windowManager.hyprland = { # Whether to enable Hyprland wayland compositor enable = true; # The hyprland package to use package = pkgs.hyprland; - plugins = with pkgs.hyprlandPlugins; [ - hyprbars - hyprfocus - csgo-vulkan-fix - ]; + plugins = with pkgs.hyprlandPlugins; [hyprfocus csgo-vulkan-fix]; # Whether to enable XWayland xwayland.enable = true; settings = { + monitor = ",preferred,auto,1.6"; input = { # xset rate 250 50 replacement on wayland... # FAST MODE LET'S GOOO @@ -33,6 +58,8 @@ "$mod" = "SUPER"; bind = [ + ", Print, exec, ${pkgs.grimblast}/bin/grimblast copy area" + "$mod, S, togglespecialworkspace" "$mod, F10, exec, ${pkgs.pamixer} --increase 10" "$mod, F9, exec, ${pkgs.pamixer} --decrease 10" "$mod, Q, killactive" @@ -45,17 +72,12 @@ ++ ( # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); - in [ - "$mod, ${ws}, workspace, ${toString (x + 1)}" - "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - ] - ) + builtins.concatLists (builtins.genList (x: let + ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); + in [ + "$mod, ${ws}, workspace, ${toString (x + 1)}" + "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" + ]) 10) ); bindm = [ diff --git a/home-manager/stvnliu/shells/fish.nix b/home-manager/stvnliu/shells/fish.nix index d2f423c..438760f 100644 --- a/home-manager/stvnliu/shells/fish.nix +++ b/home-manager/stvnliu/shells/fish.nix @@ -16,16 +16,19 @@ in programs.fish = { enable = true; shellAliases = import ./aliases {inherit pkgs;}; + interactiveShellInit = '' + ${pkgs.zoxide}/bin/zoxide init fish | source + ''; plugins = [ - #{ - # name = "z"; - # src = pkgs.fetchFromGitHub { - # owner = "jethrokuan"; - # repo = "z"; - # rev = "ddeb28a7b6a1f0ec6dae40c636e5ca4908ad160a"; - # sha256 = "0c5i7sdrsp0q3vbziqzdyqn4fmp235ax4mn4zslrswvn8g3fvdyh"; - # }; - #} + { + name = "z"; + src = pkgs.fetchFromGitHub { + owner = "jethrokuan"; + repo = "z"; + rev = "ddeb28a7b6a1f0ec6dae40c636e5ca4908ad160a"; + sha256 = "0c5i7sdrsp0q3vbziqzdyqn4fmp235ax4mn4zslrswvn8g3fvdyh"; + }; + } ]; }; }; diff --git a/home-manager/stvnliu/wechat/default.nix b/home-manager/stvnliu/wechat/default.nix new file mode 100644 index 0000000..c20e301 --- /dev/null +++ b/home-manager/stvnliu/wechat/default.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.1.1w" + ]; + home.packages = with pkgs; [ + (wechat-uos.override {uosLicense = ./license.tar.gz;}) + ]; +} diff --git a/home-manager/stvnliu/wechat/license.tar.gz b/home-manager/stvnliu/wechat/license.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..fcef1de3eb782f2a668396399da7eb94f6ed6b0f GIT binary patch literal 1354 zcmV-Q1-1GgiwFQ%s{CO91Ix)wPR%P$)n}j~FfcGMH#JoN(uU@y2FNrVC>WX;ni-n{ zk&&5#fuWI!nK6TcDJ>lZ1Es|!iA6xCWaXEo;!{UR9_kM`Jw!kbH2zadl4+I(NQ!?$ z17Q3c8yT68#y>p(a{T8P>lUTvq$U>Q^(g587#?OOCb;9@*w7Ff|Heijwt=Ckp*b-A z4XEo3>|lh)e?X9HNJwP7pQEp(q|9x8|=0+a?S=koCPb&U@V^08IQC@Co@w$j%xFE7_i z&dAJ51WM~A=jZAxaXE#$#|OCv_y>g`lmb;IB^9HnMA+@@@8Sw}Qfgv)PAbH?Y4PmI%hG)-9J;Xf6t~~)v9nY1r<@j4O4`U?3*|5 zz;)LYYqu$P?aG%fH9S-H;KbC4|9@y?GAS?Q3AfR{_)~g{RLPo^S5=BX@5-35{H06a zqYHDaSvLM-aa>fVUZb)n!a?4&RYF6JlgU13adF8M=ZRlcLlWxir$n68-1*32*&<2j z;A7{me@tES&8hF&=Rcp8=)U@C^JVw^H0$M`)*eVY6+dsr=AP4cEML7%NWRdfdHdd} z`7eGZJ(?UgnQ=iIQaY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