diff --git a/misc/.config/doom/config.org b/misc/.config/doom/config.org index ace724b..379e9b6 100644 --- a/misc/.config/doom/config.org +++ b/misc/.config/doom/config.org @@ -605,6 +605,8 @@ Configure typst-ts-mode. ;; (setq treesit-language-source-alist ;; '((typst "https://github.com/uben0/tree-sitter-typst"))) + + (setq typst-pdf-preview-command "zathura %s") #+end_src ** Shell diff --git a/misc/.config/hypr/hyprland.conf b/misc/.config/hypr/hyprland.conf index 4e1dacb..c98e8e1 100644 --- a/misc/.config/hypr/hyprland.conf +++ b/misc/.config/hypr/hyprland.conf @@ -1,10 +1,10 @@ # See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=,highrr,auto,auto monitor=eDP-1, 1920x1080@60Hz, 1280x1480, 1 monitor=DP-5, 1920x1080@60Hz, 1920x400, 1 monitor=DP-7, 2560x1440@60Hz, 3840x0, 1, transform, 3 monitor=DP-6, disable - # Wayland related environment variables. env = XCURSOR_SIZE,24 env = WLR_NO_HARDWARE_CURSORS,1 @@ -39,7 +39,8 @@ general { gaps_in = 6 gaps_out = 12 border_size = 2 - col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg + col.active_border = rgba(ffffffff) rgba(ffffffff) 45deg col.inactive_border = rgba(595959aa) layout = master @@ -48,6 +49,7 @@ general { allow_tearing = false } +blurls = waybar decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more @@ -56,10 +58,10 @@ decoration { blur { enabled = true size = 3 - passes = 1 + passes = 2 } - drop_shadow = yes + drop_shadow = no shadow_range = 4 shadow_render_power = 3 col.shadow = rgba(1a1a1aee) @@ -102,16 +104,15 @@ gestures { misc { # See https://wiki.hyprland.org/Configuring/Variables/ for more force_default_wallpaper = 0 # Set to 0 to disable the anime mascot wallpapers - enable_swallow = true - swallow_regex = ^(st|foot|footclient)$ + # enable_swallow = true + # swallow_regex = ^(st|foot|footclient)$ mouse_move_enables_dpms = true } # Window rules windowrule = tile,title:^(VRChat)$ windowrule = tile,title:^(nsxiv)$ -windowrule = rounding 0,title:^(rofi.*)$ -# windowrule = opacity 0.99,title:^(Obsidian.*)$ +windowrule = bordercolor rgb(FF0000) rgb(880808),title:^(rofi.*)$ $mainMod = SUPER @@ -119,9 +120,8 @@ $mainMod = SUPER bind = CONTROL ALT, BACKSPACE, exec, foot -e zsh -c 'btop' bind = $mainMod, RETURN, exec, foot bind = $mainMod, W, exec, firefox -bind = $mainMod, E, exec, foot -e zsh -c 'local tmp="$(mktemp -t "yazi-cwd.XXXXX")"; yazi "$@" --cwd-file="$tmp"; if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then; cd -- "$cwd"; fi; rm -f -- "$tmp"' +bind = $mainMod, E, exec, foot -e zsh -c 'tmp="$(mktemp -t "yazi-cwd.XXXXX")"; yazi "$@" --cwd-file="$tmp"; if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then; cd -- "$cwd"; fi; rm -f -- "$tmp"; exec $SHELL' bind = $mainMod SHIFT, E, exec, emacsclient -c -a 'emacs' -# bind = $mainMod, C, exec, emacsclient -c -a "emacs" -n --eval '(progn (set-frame-font "FiraCode Nerd Font") (cfw:open-org-calendar))' bind = $mainMod, C, exec, foot -e zsh -c 'khal interactive' bind = $mainMod, M, exec, foot -e zsh -c 'neomutt' @@ -129,26 +129,29 @@ bind = $mainMod, M, exec, foot -e zsh -c 'neomutt' bind = $mainMod, R, exec, fuzzel # System control keybinds -binde = $mainMod, MINUS, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -binde = $mainMod SHIFT, MINUS, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -binde = $mainMod, EQUAL, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -binde = $mainMod SHIFT, EQUAL, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" -binde = ,F7, exec, change-brightness up -binde = ,XF86MonBrightnessUp, exec, change-brightness up -binde = ,F6, exec, change-brightness down -binde = ,XF86MonBrightnessDown, exec, change-brightness down -bind = $mainMod, L, exec, hyprctl dispatch dpms off; swaylock -e -c 000000 -bind = $mainMod SHIFT, R, exec, pkill ags; ags +binde = $mainMod, MINUS, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" +binde = $mainMod SHIFT, MINUS, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" +binde = $mainMod, EQUAL, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" +binde = $mainMod SHIFT, EQUAL, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" +binde = ,F7, exec, change-brightness up +binde = ,XF86MonBrightnessUp, exec, change-brightness up +binde = ,F6, exec, change-brightness down +binde = ,XF86MonBrightnessDown,exec, change-brightness down +bind = $mainMod, L, exec, hyprctl dispatch dpms off; swaylock -e -c 000000 +bind = $mainMod SHIFT, R, exec, pkill ags; ags # Reload AGS +bind = $mainMod CONTROL SHIFT, R, exec, startw # Reload all graphical daemons # Print area, screen, and all, respectively -bind = $mainMod, P, exec, grimblast --freeze copysave area /tmp/screenshot; mv /tmp/screenshot ~/$(rofi -dmenu -l 0 -p "Screenshot filename:" < /dev/null).png -bind = $mainMod SHIFT, P, exec, grimblast --freeze copysave output /tmp/screenshot; mv /tmp/screenshot ~/$(rofi -dmenu -l 0 -p "Screenshot filename:" < /dev/null).png -bind = $mainMod CONTROL SHIFT, P, exec, grimblast --freeze copysave screen /tmp/screenshot; mv /tmp/screenshot ~/$(rofi -dmenu -l 0 -p "Screenshot filename:" < /dev/null).png +bind = $mainMod, P, exec, menu-screenshot area +bind = $mainMod SHIFT, P, exec, menu-screenshot output +bind = $mainMod CONTROL SHIFT, P, exec, menu-screenshot screen # Launch menu scripts with Super-D keychord bind = $mainMod, D, exec, hyprctl dispatch submap menu-submap; sleep 2; hyprctl dispatch submap reset submap = menu-submap +bind = ,A, exec, menu-accent +bind = ,A, submap, reset bind = ,M, exec, menu-man bind = ,M, submap, reset bind = ,O, exec, menu-wpio sink @@ -221,16 +224,16 @@ bind = $mainMod SHIFT, 9, exec, hyprdwm moveto 9 bind = $mainMod SHIFT, 9, exec, hyprdwm moveto 10 # Moving windows between monitors -bind = $mainMod SHIFT, COMMA, movewindow, mon:l -bind = $mainMod SHIFT, LEFT, movewindow, mon:l -bind = $mainMod SHIFT, PERIOD, movewindow, mon:r -bind = $mainMod SHIFT, RIGHT, movewindow, mon:r +bind = $mainMod SHIFT, COMMA, movewindow, mon:-1 +bind = $mainMod SHIFT, LEFT, movewindow, mon:-1 +bind = $mainMod SHIFT, PERIOD, movewindow, mon:+1 +bind = $mainMod SHIFT, RIGHT, movewindow, mon:+1 # Moving focus between monitors -bind = $mainMod, COMMA, exec, hyprctl dispatch focusmonitor l -bind = $mainMod, LEFT, exec, hyprctl dispatch focusmonitor l -bind = $mainMod, PERIOD, exec, hyprctl dispatch focusmonitor r -bind = $mainMod, RIGHT, exec, hyprctl dispatch focusmonitor r +bind = $mainMod, COMMA, exec, hyprctl dispatch focusmonitor -1 +bind = $mainMod, LEFT, exec, hyprctl dispatch focusmonitor -1 +bind = $mainMod, PERIOD, exec, hyprctl dispatch focusmonitor +1 +bind = $mainMod, RIGHT, exec, hyprctl dispatch focusmonitor +1 # Scroll through existing workspaces with mainMod + scroll bind = $mainMod, mouse_down, workspace, e+1 diff --git a/nixos/.config/nixos/core.nix b/nixos/.config/nixos/core.nix index 89b4db6..b095206 100644 --- a/nixos/.config/nixos/core.nix +++ b/nixos/.config/nixos/core.nix @@ -16,16 +16,18 @@ }; # Files to add to /etc - environment.etc = { - "zshenv.local".text = '' - export ZDOTDIR="$HOME/.config/zsh" - ''; + environment = { + binsh = "${pkgs.dash}/bin/dash"; + etc = { + "zshenv.local".text = '' + export ZDOTDIR="$HOME/.config/zsh" + ''; + }; + pathsToLink = [ + "/share" + ]; }; - environment.pathsToLink = [ - "/share" - ]; - i18n.defaultLocale = "en_US.UTF-8"; fonts.packages = with pkgs; [ @@ -36,6 +38,7 @@ hack-font fira-code + inter ]; networking.networkmanager.enable = true; @@ -106,6 +109,7 @@ bluetuith # TUI bluetooth manager bear # Generate Clang compilation database devour # Opens new program on top of terminal + dash # Fast, posix compliant shell distrobox # Easily spin up VMs of other distos docker # Containerization entr # Hooks for file changes diff --git a/nixos/.config/nixos/profiles/fcitx.nix b/nixos/.config/nixos/profiles/fcitx.nix index f675d4a..bd2dffd 100644 --- a/nixos/.config/nixos/profiles/fcitx.nix +++ b/nixos/.config/nixos/profiles/fcitx.nix @@ -1,6 +1,8 @@ { config, pkgs, ... }: -{ +let + nixos-unstable = import {}; +in { i18n = { inputMethod = { # Have to install fcitx5 through here so that the binary is patched to be able to see the addons. @@ -18,5 +20,11 @@ source-han-sans source-han-serif ]; + + nixpkgs.overlays = [ + (self: super: { + fcitx5-with-addons = nixos-unstable.fcitx5-with-addons; + }) + ]; } diff --git a/nixos/.config/nixos/profiles/wm/hyprland.nix b/nixos/.config/nixos/profiles/wm/hyprland.nix index fc2e3b4..32ba286 100644 --- a/nixos/.config/nixos/profiles/wm/hyprland.nix +++ b/nixos/.config/nixos/profiles/wm/hyprland.nix @@ -1,16 +1,43 @@ { config, pkgs, ... }: -{ +let + # Current verison causes segfault. + hyprpicker_0_1_1 = (import (builtins.fetchTarball { + url = "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz"; + }) {}).hyprpicker; # v0.1.1. + nixos-unstable = (import {}); + + flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; + hyprland = (import flake-compat { + src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; + }).defaultNix; +in { + imports = [ + hyprland.nixosModules.default + ]; + + # Trusted Hyprland cache, as to not have to rebuild nightly + nix.settings = { + substituters = ["https://hyprland.cachix.org"]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + }; + # Or else swaylock will not accept correct password security.pam.services.swaylock = {}; programs = { hyprland = { # Dynamic tiling window manager enable = true; - enableNvidiaPatches = true; xwayland.enable = true; + package = (hyprland.packages.${pkgs.system}.default).override (o: { + wlroots = o.wlroots.overrideAttrs (oa: { + patches = oa.patches ++ [ + /home/vince/misc/DisplayLink_v2.patch + ]; + }); + }); }; - waybar.enable = true; # Status bar + # waybar.enable = true; # Status bar }; systemd.user.services = { @@ -19,33 +46,45 @@ wantedBy = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ]; script = "${pkgs.hyprland-autoname-workspaces}/bin/hyprland-autoname-workspaces"; + serviceConfig.Restart = "always"; + serviceConfig.RestartSec = 1; }; network-manager-applet = { description = "Start the network manager applet"; wantedBy = [ "default.target" ]; serviceConfig.Type = "forking"; serviceConfig.Restart = "always"; - serviceConfig.RestartSec = 2; + serviceConfig.RestartSec = 1; serviceConfig.ExecStart = "${pkgs.networkmanagerapplet}/bin/nm-applet"; }; + # waybar = { + # description = "Waybar as systemd service"; + # wantedBy = [ "graphical-session.target" ]; + # partOf = [ "graphical-session.target" ]; + # script = "${pkgs.waybar}/bin/waybar"; + # serviceConfig.Restart = "always"; + # serviceConfig.RestartSec = 1; + # }; }; environment.systemPackages = with pkgs; [ blueman # Bluetooth manager - dunst # Notification daemon + # dunst # Notification daemon eww-wayland firefox # My browser of choice foot # Wayland native terminal gobble # Wayland alternative to devour - grim # Screenshot tool grimblast # Allows freezing screen + grim # Screenshot tool hicolor-icon-theme # Icons - hyprland-autoname-workspaces + hyprland-autoname-workspaces # Add icons to workspace titles hyprpaper + hyprpicker # Colorpicker utility kanshi # Autorandr substitute libnotify # Send messages to notification daemon libreoffice # MSOffice btfo networkmanagerapplet # Wifi dropdown menu + nwg-displays pinentry-rofi # Rofi frontend for pinentry program pyprland # Plugin manager for Hyprland rofi # Menu prompt program @@ -56,6 +95,7 @@ texlive.combined.scheme-full # LaTeX to create documents typst # Cool, minimal LaTeX alternative ungoogled-chromium # If I need a special chrome feature + waybar wayland-utils wdisplays # Arnadr substitute wl-clipboard # Copy/paste utility @@ -64,19 +104,13 @@ # GTK Themes lxappearance-gtk2 # Theme switcher gruvbox-dark-gtk - - # Specific versions of packages - (import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz"; - }) {}).hyprpicker # v0.1.1. Current verison causes segfault. ]; nixpkgs.overlays = [ (self: super: { - grimblast = super.grimblast.override (oa: { - hyprpicker = (import (builtins.fetchTarball { - url = "https://github.com/NixOS/nixpkgs/archive/9957cd48326fe8dbd52fdc50dd2502307f188b0d.tar.gz"; - }) {}).hyprpicker; # v0.1.1. Current verison causes segfault. + hyprpicker = hyprpicker_0_1_1; + grimblast = super.grimblast.override (o: { + hyprpicker = hyprpicker_0_1_1; }); }) ];