diff --git a/home/linux.nix b/home/linux.nix index d7a0c3f..6f66cbf 100644 --- a/home/linux.nix +++ b/home/linux.nix @@ -33,6 +33,7 @@ nautilus-open-any-terminal swaynotificationcenter gimp + wl-clipboard ]; imports = [ @@ -41,10 +42,11 @@ ../modules/zoxide ../modules/direnv ../modules/nvim - ../modules/wezterm + ../modules/ghostty ../modules/fish ../modules/firefox ../modules/wm/swaync + ../modules/wm/cliphist ../modules/wm/awww ../modules/wm/fuzzel ../modules/wm/ironbar diff --git a/hosts/dnsc-machine/default.nix b/hosts/dnsc-machine/default.nix index 21c2ca7..46ff10c 100644 --- a/hosts/dnsc-machine/default.nix +++ b/hosts/dnsc-machine/default.nix @@ -151,6 +151,14 @@ enableSSHSupport = true; }; + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-gnome + ]; + }; + # Services # Pipewire @@ -198,8 +206,21 @@ # Tailscale services.tailscale.enable = true; + # Printing + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + # Environment & session variables - environment.variables.EDITOR = "nvim"; + environment.variables = { + EDITOR = "nvim"; + SYSTEMD_EDITOR = "nvim"; + VISUAL = "nvim"; + }; environment.sessionVariables.NIXOS_OZONE_WL = "1"; # This value determines the NixOS release from which the default diff --git a/modules/ghostty/default.nix b/modules/ghostty/default.nix new file mode 100644 index 0000000..573dd2f --- /dev/null +++ b/modules/ghostty/default.nix @@ -0,0 +1,79 @@ +{ + programs.ghostty = { + enable = true; + enableFishIntegration = true; + installVimSyntax = true; + systemd.enable = true; + clearDefaultKeybinds = true; + settings = { + theme = "Catppuccin Mocha"; + font-size = 15; + font-family = "VictorMono NF SemiBold"; + background-opacity = 0.94; + window-padding-x = 12; + window-padding-y = 12; + window-padding-balance = true; + window-inherit-working-directory = true; + window-theme = "ghostty"; + copy-on-select = "clipboard"; + shell-integration-features = true; + scrollback-limit = 100000; + link-url = true; + link-previews = true; + background = "#0f0b15"; + foreground = "#ffffff"; + cursor-color = "#d369af"; + selection-foreground = "#af85ea"; + selection-background = "#572454"; + palette = [ + "0=#0f0b15" + "1=#f47359" + "2=#29a444" + "3=#b58a52" + "4=#3f95f6" + "5=#d369af" + "6=#4fbaef" + "7=#b8c6d5" + "8=#807c9f" + "9=#ff6a7a" + "10=#00a392" + "11=#df9080" + "12=#029fff" + "13=#af85ea" + "14=#35afbf" + "15=#ffffff" + ]; + keybind = [ + "ctrl+b>s=new_split:auto" + "ctrl+b>minus=new_split:down" + "ctrl+b>v=new_split:right" + "ctrl+b>h=goto_split:left" + "ctrl+b>j=goto_split:down" + "ctrl+b>k=goto_split:up" + "ctrl+b>l=goto_split:right" + "ctrl+b>z=toggle_split_zoom" + "ctrl+b>c=new_tab" + "ctrl+b>x=close_surface" + "ctrl+b>1=goto_tab:1" + "ctrl+b>2=goto_tab:2" + "ctrl+b>3=goto_tab:3" + "ctrl+b>4=goto_tab:4" + "ctrl+b>5=goto_tab:5" + "ctrl+b>6=goto_tab:6" + "ctrl+b>7=goto_tab:7" + "ctrl+b>8=goto_tab:8" + "ctrl+b>9=goto_tab:9" + "ctrl+b>p=toggle_command_palette" + "ctrl+shift+u=scroll_page_lines:-40" + "ctrl+shift+d=scroll_page_lines:40" + "ctrl+plus=increase_font_size:2" + "ctrl+minus=decrease_font_size:2" + "ctrl+0=reset_font_size" + "ctrl+shift+a=select_all" + "ctrl+shift+c=copy_to_clipboard" + "ctrl+shift+v=paste_from_clipboard" + "global:cmd+semicolon=toggle_quick_terminal" + ]; + }; + }; +} diff --git a/modules/wm/cliphist/default.nix b/modules/wm/cliphist/default.nix new file mode 100644 index 0000000..8c1bee1 --- /dev/null +++ b/modules/wm/cliphist/default.nix @@ -0,0 +1,9 @@ +{ ... }: + +{ + services.cliphist = { + enable = true; + allowImages = true; + systemdTargets = [ "graphical-session.target" ]; + }; +} diff --git a/modules/wm/fuzzel/default.nix b/modules/wm/fuzzel/default.nix index 0de3c7f..c8efa91 100644 --- a/modules/wm/fuzzel/default.nix +++ b/modules/wm/fuzzel/default.nix @@ -1,6 +1,23 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { + xdg.configFile."fuzzel/bin" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/fuzzel/scripts"; + }; + + xdg.desktopEntries = { + fuzzel-ssh = { + type = "Application"; + name = "SSH"; + exec = "${config.home.homeDirectory}/.config/fuzzel/bin/fuzzel-ssh.sh"; + }; + fuzzel-cliphist = { + type = "Application"; + name = "Clipboard History"; + exec = "${config.home.homeDirectory}/.config/fuzzel/bin/fuzzel-cliphist.sh"; + }; + }; + programs.fuzzel = { enable = true; settings = { @@ -17,11 +34,11 @@ vertical-pad = 20; inner-pad = 25; image-size-ratio = 1; + prompt = "Open: "; }; colors = { background = "0f0b15f5"; text = "ffffffff"; - message = "bf8a9fff"; prompt = "807c9fff"; input = "ffffffff"; match = "c57fafff"; diff --git a/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh b/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh new file mode 100755 index 0000000..08affd1 --- /dev/null +++ b/modules/wm/fuzzel/scripts/fuzzel-cliphist.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cliphist list | fuzzel --dmenu --prompt "Copy: " | cliphist decode | awk '{$1=$1};1' | head -c -1 | wl-copy diff --git a/modules/wm/fuzzel/scripts/fuzzel-ssh.sh b/modules/wm/fuzzel/scripts/fuzzel-ssh.sh new file mode 100755 index 0000000..5c960fa --- /dev/null +++ b/modules/wm/fuzzel/scripts/fuzzel-ssh.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +fish_executable="/run/current-system/sw/bin/fish" +selected=$(cat ~/.ssh/config | grep "Host " | cut -d " " -f 2 | sort | tail -n +2 | fuzzel --dmenu --prompt "Connect to: ") + +if [ "$selected" != "" ]; then + ghostty -e "$fish_executable" -c "ssh $selected" +fi diff --git a/modules/wm/ly/default.nix b/modules/wm/ly/default.nix index 6d3eeab..02fe8b0 100644 --- a/modules/wm/ly/default.nix +++ b/modules/wm/ly/default.nix @@ -1,6 +1,25 @@ { services.displayManager = { enable = true; - ly.enable = true; + ly = { + enable = true; + settings = { + animation = "doom"; + animation_timeout_sec = 30; + asterisk = "0x2022"; + bigclock = "en"; + default_input = "password"; + doom_fire_height = 1; + doom_top_color = "0x00c57faf"; + doom_middle_color = "0x00d369af"; + doom_bottom_color = "0x00572454"; + session_log = ".local/share/ly-session.log"; + vi_mode = true; + vi_default_mode = "insert"; + bg = "0x000f0b15"; + border_fg = "0x00807c9f"; + box-title = "dnsc-machine"; + }; + }; }; } diff --git a/modules/wm/niri/config/config.kdl b/modules/wm/niri/config/config.kdl index ab96739..d3e62c7 100644 --- a/modules/wm/niri/config/config.kdl +++ b/modules/wm/niri/config/config.kdl @@ -185,6 +185,7 @@ layout { // STARTUP spawn-at-startup "swaync" spawn-at-startup "swww-daemon" +spawn-at-startup "ironbar" spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" hotkey-overlay { @@ -245,16 +246,6 @@ window-rule { // open-on-workspace "chat" // } -// Work around WezTerm's initial configure bug -// by setting an empty default-column-width. -// window-rule { -// // This regular expression is intentionally made as specific as possible, -// // since this is the default config, and we want no false positives. -// // You can get away with just app-id="wezterm" if you want. -// match app-id=r#"^org\.wezfurlong\.wezterm$"# -// default-column-width {} -// } - // Open the Firefox picture-in-picture player as floating by default. window-rule { // This app-id regular expression will work for both: @@ -304,11 +295,12 @@ binds { Mod+Shift+Slash { show-hotkey-overlay; } // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+Return hotkey-overlay-title="Open a terminal" { spawn "wezterm"; } + Mod+T hotkey-overlay-title="Open a terminal" { spawn "ghostty +new-window"; } Mod+Space hotkey-overlay-title="Launcher" { spawn "fuzzel"; } Mod+B hotkey-overlay-title="Browser" { spawn "firefox"; } - Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "wezterm start -- btop"; } + Mod+M hotkey-overlay-title="System Monitor" { spawn-sh "ghostty -e btop"; } Mod+N hotkey-overlay-title="File Manager" { spawn "nautilus"; } + Mod+V hotkey-overlay-title="Clipboard" { spawn-sh "~/.config/fuzzel/bin/fuzzel-cliphist.sh"; } Mod+Alt+L hotkey-overlay-title="Lock the Screen: hyprlock" { spawn "hyprlock"; } // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. @@ -506,8 +498,8 @@ binds { Mod+Shift+Equal { set-window-height "+10%"; } // Move the focused window between the floating and the tiling layout. - Mod+V { toggle-window-floating; } - Mod+Shift+V { switch-focus-between-floating-and-tiling; } + Mod+Shift+S { toggle-window-floating; } + // Mod+Shift+V { switch-focus-between-floating-and-tiling; } // Toggle tabbed column display mode. // Windows in this column will appear as vertical tabs, diff --git a/modules/wm/niri/default.nix b/modules/wm/niri/default.nix index 53b4e63..d0f3bc6 100644 --- a/modules/wm/niri/default.nix +++ b/modules/wm/niri/default.nix @@ -10,7 +10,5 @@ services.polkit-gnome.enable = true; # WM Utilities (split out if they need additional config) - # TODO configure ironbar programs.hyprlock.enable = true; - # TODO: Install idle manager } diff --git a/modules/wm/swaync/style.css b/modules/wm/swaync/style.css index 6bde05f..605b966 100644 --- a/modules/wm/swaync/style.css +++ b/modules/wm/swaync/style.css @@ -32,6 +32,10 @@ @define-color silver #b8c6d5; @define-color silver_bright #ffffff; +* { + font-family: "VictorMono NF SemiBold"; +} + notificationwindow, blankwindow, blankwindow { background: transparent; } @@ -438,14 +442,16 @@ notificationwindow, blankwindow, blankwindow { .widget-buttons-grid flowboxchild > button { padding: 12px 0; margin: 8px; - background-color: @magenta_subtle_bg_darker; - color: @magenta_brighter; + background-color: @magenta; + color: @fg; opacity: 1; } .widget-buttons-grid flowboxchild > button:hover { padding: 12px 0; - background-color: @magenta_subtle_bg; + background-color: @magenta; + box-shadow: inset 0px 0px 15px 3px rgba(0,0,0,0.8); + transition: none; color: @fg; }