diff --git a/configs/default.nix b/configs/default.nix index 0e936c5..73e871e 100644 --- a/configs/default.nix +++ b/configs/default.nix @@ -89,8 +89,8 @@ in { o = "${pkgs.xdg-utils}/bin/xdg-open"; ns = "nix-shell --run zsh"; - pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in"; - pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out"; + pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy"; + pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste"; tmux = "${pkgs.tmux}/bin/tmux -2"; sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv"; zathura = swallow "${pkgs.zathura}/bin/zathura"; @@ -106,9 +106,14 @@ in }; } { - services.displayManager.cosmic-greeter.enable = false; + # services.displayManager.cosmic-greeter.enable = false; services.desktopManager.cosmic.enable = true; - services.system76-scheduler.enable = true; + # services.system76-scheduler.enable = true; + + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-cosmic ]; + }; users.users.applicative = { name = "applicative"; @@ -148,26 +153,35 @@ in } ]; - home-manager.users.applicative = { - xdg.enable = true; - home.stateVersion = "25.11"; - # programs.git = config.home-manager.users.me.programs.git; - # programs.alacritty = config.home-manager.users.me.programs.alacritty; - }; + home-manager.users.applicative = + lib.recursiveUpdate + (import ./graphical/home-manager.nix { + inherit lib pkgs config; + }) + { + xdg.enable = true; + home.stateVersion = "25.11"; + services.hyprpaper.enable = false; + # programs.git = config.home-manager.users.me.programs.git; + # programs.alacritty = config.home-manager.users.me.programs.alacritty; + }; + } + { + services.power-profiles-daemon.enable = true; } { services.displayManager = { autoLogin = { - enable = true; + enable = false; user = config.users.users.me.name; }; }; services.xserver = { - enable = true; + enable = false; displayManager.lightdm = { - enable = true; + enable = false; greeters.gtk = { - enable = true; + enable = false; indicators = [ "~spacer" "~host" @@ -261,8 +275,8 @@ in ./hledger.nix ./htop.nix ./uni.nix - ./i3.nix - ./hyprland.nix + # ./i3.nix + ./graphical ./i3status-rust.nix ./keyboard ./kdeconnect.nix diff --git a/configs/dunst.nix b/configs/dunst.nix index 505380e..4601962 100644 --- a/configs/dunst.nix +++ b/configs/dunst.nix @@ -18,8 +18,7 @@ in ]; home-manager.users.me.services.dunst = { - enable = true; - iconTheme = pkgs.lib.niveum.theme.icon; + enable = false; settings = { global = { transparency = 10; diff --git a/configs/graphical/default.nix b/configs/graphical/default.nix new file mode 100644 index 0000000..ebdb557 --- /dev/null +++ b/configs/graphical/default.nix @@ -0,0 +1,92 @@ +{ + pkgs, + lib, + config, + ... +}: +let + stylixColors = config.lib.stylix.colors; +in +{ + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + package = pkgs.hyprland; + portalPackage = pkgs.xdg-desktop-portal-hyprland; + }; + + programs.ydotool.enable = true; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-gtk + ]; + config.common.default = "*"; + }; + + services.dbus = { + implementation = "broker"; + # needed for GNOME services outside of GNOME (?) + packages = [ pkgs.gcr ]; + }; + + environment.systemPackages = [ + pkgs.xdg-desktop-portal + pkgs.xdg-desktop-portal-hyprland + ]; + + # services.displayManager.cosmic-greeter = { + # enable = true; + # wayland.enable = true; + # extraPackages = with pkgs.kdePackages; [ + # qtmultimedia + # qtsvg + # ]; + # }; + services.libinput = { + enable = true; + touchpad.tapping = true; + }; + + programs.regreet = + let + wallpaper = + pkgs.runCommand "textured-monochrome-wallpaper.png" + { + buildInputs = [ pkgs.imagemagick ]; + } + '' + magick -size 2560x1440 plasma:fractal \ + -colorspace Gray \ + -normalize \ + -fill ${lib.escapeShellArg config.lib.stylix.colors.withHashtag.base00} -colorize 100% \ + -attenuate 0.15 +noise Gaussian \ + $out + ''; + in + { + enable = true; + settings = { + background = { + path = wallpaper; + fit = "Fill"; + }; + appearance.greeting_msg = "स्वागतम्"; + widget.clock.format = "%F %H:%M"; + }; + font = { + inherit (config.stylix.fonts.sansSerif) name; + size = config.stylix.fonts.sizes.applications; + }; + iconTheme = { + inherit (config.home-manager.users.me.gtk.iconTheme) package name; + }; + }; + + home-manager.users.me = import ./home-manager.nix { + inherit lib pkgs config; + }; +} diff --git a/configs/graphical/home-manager.nix b/configs/graphical/home-manager.nix new file mode 100644 index 0000000..e436c7c --- /dev/null +++ b/configs/graphical/home-manager.nix @@ -0,0 +1,380 @@ +{ + lib, + pkgs, + config, + ... +}: +let + klem = pkgs.klem.override { + options.dmenu = "${pkgs.dmenu}/bin/dmenu -i -p klem"; + options.scripts = { + "p.r paste" = pkgs.writers.writeDash "p.r" '' + ${pkgs.curl}/bin/curl -fSs http://p.r --data-binary @- \ + | ${pkgs.coreutils}/bin/tail --lines=1 \ + | ${pkgs.gnused}/bin/sed 's/\\/krebsco.de/' + ''; + "envs.sh paste" = pkgs.writers.writeDash "envs-host" '' + ${pkgs.curl}/bin/curl -F "file=@-" https://envs.sh + ''; + # this segfaults + # "envs.sh mirror" = pkgs.writers.writeDash "envs-mirror" '' + # ${pkgs.curl}/bin/curl -F "url=$(${pkgs.coreutils}/bin/cat)" https://envs.sh + # ''; + "envs.sh shorten" = pkgs.writers.writeDash "envs-shorten" '' + ${pkgs.curl}/bin/curl -F "shorten=$(${pkgs.coreutils}/bin/cat)" https://envs.sh + ''; + "go.r shorten" = pkgs.writers.writeDash "go.r" '' + ${pkgs.curl}/bin/curl -fSs http://go.r -F "uri=$(${pkgs.coreutils}/bin/cat)" + ''; + "4d2.org paste" = pkgs.writers.writeDash "4d2-paste" '' + ${pkgs.curl}/bin/curl -F "file=@-" https://depot.4d2.org/ + ''; + "0x0.st shorten" = pkgs.writers.writeDash "0x0.st" '' + ${pkgs.curl}/bin/curl -fSs https://0x0.st -F "shorten=$(${pkgs.coreutils}/bin/cat)" + ''; + "rot13" = pkgs.writers.writeDash "rot13" '' + ${pkgs.coreutils}/bin/tr '[A-Za-z]' '[N-ZA-Mn-za-m]' + ''; + "ipa" = pkgs.writers.writeDash "ipa" '' + ${pkgs.ipa}/bin/ipa + ''; + "betacode" = pkgs.writers.writeDash "betacode" '' + ${pkgs.betacode}/bin/betacode + ''; + "curl" = pkgs.writers.writeDash "curl" '' + ${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)" + ''; + ocr = pkgs.writers.writeDash "ocr" '' + ${pkgs.tesseract4}/bin/tesseract -l eng+deu - stdout + ''; + emojai = pkgs.writers.writeDash "emojai" '' + ${pkgs.curl}/bin/curl https://www.emojai.app/api/generate -X POST -H 'Content-Type: application/json' --data-raw "$(${pkgs.jq}/bin/jq -sR '{emoji:.}')" | ${pkgs.jq}/bin/jq -r .result + ''; + }; + }; +in +{ + services.mako.enable = true; + + services.hyprsunset.enable = true; + + programs.ashell = { + enable = true; + settings = { + # position = "bottom"; + modules = { + left = [ + "Workspaces" + [ + "WindowTitle" + ] + [ + "MediaPlayer" + ] + ]; + center = [ "Clock" ]; + right = [ + "KeyboardLayout" + [ + "Tray" + "SystemInfo" + "Settings" + ] + ]; + }; + workspaces = { + workspace_names = + let + arabic = [ + "١" + "٢" + "٣" + "٤" + "٥" + "٦" + "٧" + "٨" + "٩" + "١٠" + ]; + hindi = [ + "१" + "२" + "३" + "४" + "५" + "६" + "७" + "८" + "९" + "१०" + ]; + hebrew = [ + "א" + "ב" + "ג" + "ד" + "ה" + "ו" + "ז" + "ח" + "ט" + "י" + ]; + in + hindi; + visibility_mode = "MonitorSpecific"; + enable_workspace_filling = false; + disable_special_workspaces = true; + }; + keyboard_layout.labels = { + "de" = "🇩🇪"; + }; + window_title = { + mode = "Title"; + truncate_title_after_length = 75; + }; + media_player = { + max_title_length = 40; + }; + system_info.indicators = [ + "Cpu" + "Memory" + { Disk = "/"; } + ]; + clock.format = "%Y-%m-%d (%W %a) %H:%M"; + settings.indicators = [ + "IdleInhibitor" + "PowerProfile" + "Audio" + "Bluetooth" + "Network" + "Vpn" + "Battery" + ]; + appearance = { + font_name = config.stylix.fonts.sansSerif.name; + backdrop = 0.3; + scale_factor = 0.85; + # style = "Solid"; + }; + }; + }; + + services.hyprpaper = { + enable = true; + settings = { + ipc = "on"; + splash = false; + preload = [ "${config.users.users.me.home}/.cache/wallpaper/wallpaper" ]; + }; + }; + + services.hypridle = { + enable = true; + settings = { + general = { + after_sleep_cmd = "hyprctl dispatch dpms on"; + ignore_dbus_inhibit = false; + lock_cmd = "hyprlock"; + }; + listener = [ + { + timeout = 900; + on-timeout = "hyprlock"; + } + { + timeout = 1200; + on-timeout = "hyprctl dispatch dpms off"; + on-resume = "hyprctl dispatch dpms on"; + } + ]; + }; + }; + + programs.hyprlock = { + enable = true; + settings = { + animations.enabled = false; + general = { + hide_cursor = true; + ignore_empty_input = true; + }; + }; + }; + + gtk = { + enable = true; + iconTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; + }; + + wayland.windowManager.hyprland = + let + mod = "SUPER"; + in + { + enable = true; + systemd.enable = false; + systemd.variables = [ "--all" ]; + settings = { + env = [ + "XCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO + "HYPRCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO + "HYPRCURSOR_THEME,${config.stylix.cursor.name}" + "QT_QPA_PLATFORM=wayland" + "GDK_BACKEND=wayland" + "NIXOS_OZONE_WL=1" + "HYPRSHOT_DIR=${config.home-manager.users.me.xdg.userDirs.download}/screenshots" + ]; + permission = [ + "${lib.getExe pkgs.hyprshot}, screencopy, allow" + "${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow" + ]; + monitor = ",preferred,auto,1"; # TODO https://wiki.hypr.land/Configuring/Monitors/ + exec-once = [ + (lib.getExe pkgs.ashell) + "hyprctl dispatch exec \"[workspace special:उपलविशेषः silent] obsidian\"" + "${lib.getExe' pkgs.wl-clipboard "wl-paste"} -t text --watch ${lib.getExe pkgs.clipman} store" + # (lib.getExe pkgs.hyprsunset) + # (lib.getExe pkgs.hyprpaper) + ]; + + general = { + gaps_in = 2; + gaps_out = 2; + border_size = 1; + resize_on_border = true; + allow_tearing = false; + layout = "dwindle"; + }; + + decoration = { + rounding = 2; + rounding_power = 2; + active_opacity = 1.0; + inactive_opacity = 1.0; + shadow = { + enabled = true; + range = 4; + render_power = 3; + }; + blur = { + enabled = true; + size = 3; + passes = 1; + vibrancy = 0.17; + }; + }; + + animations = { + enabled = false; + }; + + dwindle = { + pseudotile = true; + preserve_split = true; + }; + + master.new_status = "master"; + + gesture = [ + "3, horizontal, workspace" + ]; + + input = { + kb_layout = "de"; + kb_variant = "T3"; + kb_options = "compose:caps,grp:ctrls_toggle"; + follow_mouse = 1; + sensitivity = 0; + touchpad.natural_scroll = false; + }; + + bindm = [ + "${mod}, mouse:272, movewindow" + "${mod}, mouse:273, resizewindow" + ]; + bindel = [ + ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + ",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" + ",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" + ", Print, exec, ${lib.getExe pkgs.hyprshot} -m region --clipboard-only" + "${mod}, Print, exec, ${lib.getExe pkgs.hyprshot} -m region" + ]; + bindl = [ + ", XF86AudioNext, exec, playerctl next" + ", XF86AudioPause, exec, playerctl play-pause" + ", XF86AudioPlay, exec, playerctl play-pause" + ", XF86AudioPrev, exec, playerctl previous" + ]; + bind = [ + "${mod}, Return, exec, ${lib.getExe pkgs.niveum-terminal}" + "${mod} SHIFT, Q, killactive," + "${mod} SHIFT, R, exit," + "${mod}, t, exec, ${lib.getExe pkgs.niveum-filemanager}" + "${mod}, Y, exec, ${lib.getExe pkgs.niveum-browser}" + "${mod}, Q, exec, ${lib.getExe pkgs.clipman} pick --tool=rofi" + "${mod}, u, exec, ${lib.getExe pkgs.unicodmenu}" + "${mod}, p, exec, ${lib.getExe pkgs.rofi-pass-wayland}" + "${mod} Shift, Z, togglefloating," + "${mod}, D, exec, ${lib.getExe pkgs.rofi} -show run" + "${mod}, v, togglesplit," # dwindle + "${mod} SHIFT, V, pseudo," # dwindle + "${mod}, F, fullscreen" + "${mod}, h, movefocus, l" + "${mod}, l, movefocus, r" + "${mod}, k, movefocus, u" + "${mod}, j, movefocus, d" + "${mod}, F9, exec, hyprctl hyprsunset temperature -1000" + "${mod}, F10, exec, hyprctl hyprsunset temperature +1000" # reset color temperature + + "${mod}, F12, exec, ${klem}/bin/klem" + "${mod} SHIFT, W, exec, hyprlock" + "${mod} SHIFT, H, movewindow, l" + "${mod} SHIFT, L, movewindow, r" + "${mod} SHIFT, K, movewindow, u" + "${mod} SHIFT, J, movewindow, d" + "${mod}, S, togglespecialworkspace, magic" + "${mod} SHIFT, S, movetoworkspace, special:magic" + "${mod}, O, togglespecialworkspace, उपलविशेषः" + "${mod} SHIFT, O, movetoworkspace, special:उपलविशेषः" + ] + ++ lib.concatMap ( + i: + let + key = lib.mod i 10; + in + [ + "${mod}, ${toString key}, workspace, ${toString i}" + "${mod} SHIFT, ${toString key}, movetoworkspace, ${toString i}" + ] + ) (lib.range 1 10); + + windowrule = [ + "suppressevent maximize, class:.*" # ignore maximize requests from apps + "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # fix some dragging issues with wayyland + + "float,title:^(Picture-in-Picture)$" + "pin,title:^(Picture-in-Picture)$" + "size 640 360,title:^(Picture-in-Picture)$" + "move 100%-640 100%-360,title:^(Picture-in-Picture)$" + ]; + }; + extraConfig = '' + bind = ${mod}, R, submap, resize + submap = resize + binde = , l, resizeactive, 10 0 + binde = , h, resizeactive, -10 0 + binde = , k, resizeactive, 0 -10 + binde = , j, resizeactive, 0 10 + bind = , escape, submap, reset + submap = reset + ''; + }; +} diff --git a/configs/hyprland.nix b/configs/hyprland.nix deleted file mode 100644 index cf9aefb..0000000 --- a/configs/hyprland.nix +++ /dev/null @@ -1,289 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -let - stylixColors = config.lib.stylix.colors; - ashellConfig = (pkgs.formats.toml { }).generate "config.toml" { - # position = "bottom"; - modules = { - left = [ - "Workspaces" - [ - "WindowTitle" - ] - ]; - center = [ "Clock" ]; - right = [ - "KeyboardLayout" - [ - "Tray" - "SystemInfo" - "Settings" - "CustomNotifications" - ] - ]; - }; - workspaces = { - workspace_names = [ - "١" - "٢" - "٣" - "٤" - "٥" - "٦" - "٧" - "٨" - "٩" - "١٠" - ]; - visibility_mode = "MonitorSpecific"; - enable_workspace_filling = false; - disable_special_workspaces = true; - }; - keyboard_layout.labels = { - "de" = "🇩🇪"; - }; - window_title = { - mode = "Title"; - truncate_title_after_length = 75; - }; - media_player = { - max_title_length = 40; - }; - system_info.indicators = [ - "Cpu" - "Memory" - { Disk = "/"; } - ]; - clock.format = "%Y-%m-%d (%W %a) %H:%M"; - settings.indicators = [ - "IdleInhibitor" - "PowerProfile" - "Audio" - "Bluetooth" - "Network" - "Vpn" - "Battery" - ]; - appearance = { - font_name = config.stylix.fonts.sansSerif.name; - backdrop = 0.3; - scale_factor = 0.75; - # style = "Solid"; - primary_color = "#" + stylixColors.base0D; - success_color = "#" + stylixColors.base0B; - text_color = "#" + stylixColors.base05; - workspace_colors = [ ("#" + stylixColors.base0E) ]; - background_color = "#" + stylixColors.base00; - danger_color = "#" + stylixColors.base08; - secondary_color = "#" + stylixColors.base0A; - }; - - CustomModule = [ - { - name = "CustomNotifications"; - icon = "🔔"; - command = "${lib.getExe' pkgs.swaynotificationcenter "swaync-client"} -t -sw"; - listen_cmd = "${lib.getExe' pkgs.swaynotificationcenter "swaync-client"} -swb"; - icons."dnd.*" = "🔕"; - alert = ".*notification"; - } - ]; - }; -in -{ - programs.hyprland = { - enable = true; - withUWSM = true; - xwayland.enable = true; - }; - - xdg.portal = { - enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; - }; - - home-manager.users.me = { - home.file.".config/ashell/config.toml".source = ashellConfig; - - services.swaync.enable = true; - - services.mako.enable = true; - - services.clipman.enable = true; - - services.hyprsunset.enable = true; - - services.hypridle = { - enable = true; - settings = { - general = { - after_sleep_cmd = "hyprctl dispatch dpms on"; - ignore_dbus_inhibit = false; - lock_cmd = "hyprlock"; - }; - listener = [ - { - timeout = 900; - on-timeout = "hyprlock"; - } - { - timeout = 1200; - on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; - } - ]; - }; - }; - - wayland.windowManager.hyprland = { - enable = true; - systemd.enable = !config.programs.hyprland.enable; - settings = - let - mod = "SUPER"; - in - { - env = [ - "XCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO - "HYPRCURSOR_SIZE,${toString config.stylix.cursor.size}" # TODO - "HYPRCURSOR_THEME,${config.stylix.cursor.name}" - "QT_QPA_PLATFORM=wayland" - "GDK_BACKEND=wayland" - "HYPRSHOT_DIR=${config.home-manager.users.me.xdg.userDirs.download}/Screenshots" - ]; - permission = [ - "${lib.getExe pkgs.hyprshot}, screencopy, allow" - "${pkgs.xdg-desktop-portal-hyprland}/libexec/.xdg-desktop-portal-hyprland-wrapped, screencopy, allow" - ]; - monitor = ",preferred,auto,auto"; # TODO https://wiki.hypr.land/Configuring/Monitors/ - exec-once = [ - (lib.getExe pkgs.ashell) - "hyprctl dispatch exec \"[workspace special:obsidian silent] obsidian\"" - ]; - - general = { - gaps_in = 2; - gaps_out = 2; - border_size = 1; - resize_on_border = true; - allow_tearing = false; - layout = "dwindle"; - }; - - decoration = { - rounding = 2; - rounding_power = 2; - active_opacity = 1.0; - inactive_opacity = 0.9; - shadow = { - enabled = true; - range = 4; - render_power = 3; - }; - blur = { - enabled = true; - size = 3; - passes = 1; - vibrancy = 0.17; - }; - }; - - animations = { - enabled = false; - }; - - dwindle = { - pseudotile = true; - preserve_split = true; - }; - - master.new_status = "master"; - - gesture = [ - "3, horizontal, workspace" - ]; - - input = { - kb_layout = "de"; - kb_variant = "T3"; - kb_options = "compose:caps,grp:ctrls_toggle"; - follow_mouse = 1; - sensitivity = 0; - touchpad.natural_scroll = false; - }; - - bindm = [ - "${mod}, mouse:272, movewindow" - "${mod}, mouse:273, resizewindow" - ]; - bindel = [ - ",XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" - ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ",XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" - ",XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" - ", Print, exec, ${lib.getExe pkgs.hyprshot} -m region --clipboard-only" - "${mod}, Print, exec, ${lib.getExe pkgs.hyprshot} -m region" - ]; - bindl = [ - ", XF86AudioNext, exec, playerctl next" - ", XF86AudioPause, exec, playerctl play-pause" - ", XF86AudioPlay, exec, playerctl play-pause" - ", XF86AudioPrev, exec, playerctl previous" - ]; - bind = [ - "${mod}, Return, exec, ${lib.getExe pkgs.niveum-terminal}" - "${mod} SHIFT, Q, killactive," - "${mod} SHIFT, R, exit," - "${mod}, t, exec, ${lib.getExe pkgs.niveum-filemanager}" - "${mod}, Y, exec, ${lib.getExe pkgs.niveum-browser}" - "${mod}, Q, exec, ${lib.getExe pkgs.clipman} pick --tool=${lib.getExe pkgs.rofi}" - "${mod}, u, exec, ${lib.getExe pkgs.unicodmenu}" - "${mod}, p, exec, rofi-pass" - "${mod} Shift, Z, togglefloating," - "${mod}, D, exec, ${lib.getExe pkgs.rofi} -show run" - "${mod}, P, pseudo," # dwindle - "${mod}, v, togglesplit," # dwindle - "${mod}, F, fullscreen" - "${mod}, h, movefocus, l" - "${mod}, l, movefocus, r" - "${mod}, k, movefocus, u" - "${mod}, j, movefocus, d" - "${mod} SHIFT, H, movewindow, l" - "${mod} SHIFT, L, movewindow, r" - "${mod} SHIFT, K, movewindow, u" - "${mod} SHIFT, J, movewindow, d" - "${mod}, S, togglespecialworkspace, magic" - "${mod} SHIFT, S, movetoworkspace, special:magic" - "${mod}, O, togglespecialworkspace, obsidian" - "${mod} SHIFT, O, movetoworkspace, special:obsidian" - ] - ++ lib.concatMap ( - i: - let - key = lib.mod i 10; - in - [ - "${mod}, ${toString key}, workspace, ${toString i}" - "${mod} SHIFT, ${toString key}, movetoworkspace, ${toString i}" - ] - ) (lib.range 1 10); - - windowrule = [ - "suppressevent maximize, class:.*" # ignore maximize requests from apps - "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0" # fix some dragging issues with wayyland - - "float,title:^(Picture-in-Picture)$" - "pin,title:^(Picture-in-Picture)$" - "size 640 360,title:^(Picture-in-Picture)$" - "move 100%-640 100%-360,title:^(Picture-in-Picture)$" - ]; - }; - }; - }; -} diff --git a/configs/keyboard/default.nix b/configs/keyboard/default.nix index 5790d4f..7fc763b 100644 --- a/configs/keyboard/default.nix +++ b/configs/keyboard/default.nix @@ -116,6 +116,7 @@ in swaymsg -s $SWAYSOCK 'input * xkb_variant "${defaultLanguage.variant},${variant}"' swaymsg -s $SWAYSOCK 'input * xkb_options "${lib.concatStringsSep "," xkbOptions}"' elif [ -n "$HYPRLAND_INSTANCE_SIGNATURE" ]; then + hyprctl keyword input:kb_variant "" # otherwise we end up with an invalid combination for a short while hyprctl keyword input:kb_layout "${defaultLanguage.code},${code}" hyprctl keyword input:kb_variant "${defaultLanguage.variant},${variant}" elif [ -n "$DISPLAY" ]; then diff --git a/configs/packages.nix b/configs/packages.nix index 4cd65c7..b44624c 100644 --- a/configs/packages.nix +++ b/configs/packages.nix @@ -88,7 +88,7 @@ in bat # better cat dos2unix genpass # generate passwords - (pkgs.writers.writeDashBin "genpassphrase" ''${pkgs.genpass}/bin/genpass --passphrase | ${pkgs.gnused}/bin/sed 's/ /-/g;s/\(^\|-\)\([a-z]\)/\1\U\2/g;s/$/-'$(${pkgs.coreutils}/bin/date +%Y)'/' '') + (pkgs.writers.writeDashBin "genpassphrase" ''${pkgs.genpass}/bin/genpass "$@" --passphrase | ${pkgs.gnused}/bin/sed 's/ /-/g;s/\(^\|-\)\([a-z]\)/\1\U\2/g;s/$/-'$(${pkgs.coreutils}/bin/date +%Y)'/' '') gcc python3Packages.jsonschema # json validation pup # html toolkit @@ -102,9 +102,8 @@ in arandr # xrandr for noobs wdisplays libnotify # for notify-send - xclip # clipboard CLI + wl-clipboard # clipboard CLI dragon-drop # drag and drop - xorg.xkill # kill by clicking portfolio # personal finance overview audacity calibre @@ -245,7 +244,7 @@ in text2pdf lowdown glow # markdown to term - libreoffice + libreoffice-qt6-fresh # gnumeric dia pandoc diff --git a/configs/stylix.nix b/configs/stylix.nix index 1927a98..5714188 100644 --- a/configs/stylix.nix +++ b/configs/stylix.nix @@ -43,6 +43,7 @@ # dracula # https://draculatheme.com/ # }.yaml"; + stylix.fonts = { serif = { package = pkgs.noto-fonts; @@ -65,7 +66,7 @@ }; sizes = { - terminal = 6; + terminal = 10; applications = 10; }; }; diff --git a/configs/wallpaper.nix b/configs/wallpaper.nix index 98e4b30..2e28a43 100644 --- a/configs/wallpaper.nix +++ b/configs/wallpaper.nix @@ -12,18 +12,26 @@ in systemd.user.services.wallpaper = { wantedBy = [ "graphical-session.target" ]; after = [ "network.target" ]; + path = [ + pkgs.curl + pkgs.hyprland + ]; script = '' set -euf mkdir -p ${stateDir} chmod o+rx ${stateDir} cd ${stateDir} - (${pkgs.curl}/bin/curl -s -o wallpaper.tmp -z wallpaper.tmp ${lib.escapeShellArg url} && cp wallpaper.tmp wallpaper) || : - ${pkgs.feh}/bin/feh --no-fehbg --bg-scale wallpaper + (${pkgs.curl}/bin/curl -s -o wallpaper.tmp -z wallpaper.tmp ${lib.escapeShellArg url} && cp wallpaper.tmp wallpaper.png) || : + hyprctl hyprpaper preload ${stateDir}/wallpaper.png + hyprctl hyprpaper wallpaper ",${stateDir}/wallpaper.png" + sleep 5 + hyprctl hyprpaper unload unused + true ''; startAt = "*:00,10,20,30,40,50"; serviceConfig = { - Restart = "always"; + Restart = "on-failure"; RestartSec = "15s"; StartLimitBurst = 0; }; diff --git a/lib/default.nix b/lib/default.nix index d2b8867..20aca72 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -54,21 +54,6 @@ in sshPort = 22022; - theme = { - gtk = { - name = "Adwaita-dark"; - package = pkgs.gnome-themes-extra; - }; - icon = { - name = "Adwaita"; - package = pkgs.adwaita-icon-theme; - }; - cursor = { - name = "capitaine-cursors-white"; - package = pkgs.capitaine-cursors; - }; - }; - retiolumAddresses = lib.mapAttrs (_: v: { inherit (v.retiolum) ipv4 ipv6; }) ( lib.filterAttrs (_: v: v ? "retiolum") machines ); diff --git a/packages/emailmenu.nix b/packages/emailmenu.nix index f5bdf84..0702c18 100644 --- a/packages/emailmenu.nix +++ b/packages/emailmenu.nix @@ -5,7 +5,7 @@ dmenu, gawk, libnotify, - xclip, + wl-clipboard, khard, }: writers.writeDashBin "emailmenu" '' @@ -16,11 +16,11 @@ writers.writeDashBin "emailmenu" '' dmenu gawk libnotify - xclip + wl-clipboard ] } chosen=$(${khard}/bin/khard email --parsable | awk '!seen[$0]++' | dmenu -i -p 📧 -1 -l 10 | tee --append "$history_file" | cut -f1) [ "$chosen" != "" ] || exit - echo "$chosen" | tr -d '\n' | xclip -selection clipboard + echo "$chosen" | tr -d '\n' | wl-copy notify-send --app-name="$(basename "$0")" "'$chosen' copied to clipboard." & '' diff --git a/packages/klem.nix b/packages/klem.nix index 33c2055..1c89722 100644 --- a/packages/klem.nix +++ b/packages/klem.nix @@ -5,7 +5,7 @@ curl, gnused, coreutils, - xclip, + wl-clipboard, libnotify, writers, options ? { }, @@ -17,14 +17,6 @@ let { imports = [ options ]; options = { - selection = lib.mkOption { - default = "clipboard"; - type = lib.types.enum [ - "primary" - "secondary" - "clipboard" - ]; - }; dmenu = lib.mkOption { default = "${dmenu}/bin/dmenu -i -p klem"; type = lib.types.path; @@ -49,7 +41,7 @@ in writers.writeDashBin "klem" '' set -efu - ${xclip}/bin/xclip -selection ${cfg.selection} -out \ + ${wl-clipboard}/bin/wl-paste \ | case $(echo "${lib.concatStringsSep "\n" (lib.attrNames cfg.scripts)}" | ${cfg.dmenu}) in ${lib.concatStringsSep "\n" ( lib.mapAttrsToList (option: script: '' @@ -58,7 +50,7 @@ writers.writeDashBin "klem" '' )} *) ${coreutils}/bin/cat ;; esac \ - | ${xclip}/bin/xclip -selection ${cfg.selection} -in + | ${wl-clipboard}/bin/wl-copy ${libnotify}/bin/notify-send --app-name="klem" "Result copied to clipboard." '' diff --git a/packages/mpv-radio.nix b/packages/mpv-radio.nix index 7cafc5b..de62102 100644 --- a/packages/mpv-radio.nix +++ b/packages/mpv-radio.nix @@ -7,7 +7,7 @@ di-fm-key-file, radioStreams, executableName ? "mpv-radio", - mpvCommand ? "${mpv}/bin/mpv --force-window=yes", + mpvCommand ? "${mpv}/bin/mpv", }: let streams = radioStreams.override { diff --git a/packages/qrpaste.nix b/packages/qrpaste.nix index 52b0fa3..9695d25 100644 --- a/packages/qrpaste.nix +++ b/packages/qrpaste.nix @@ -2,7 +2,7 @@ writers, mktemp, qrencode, - xclip, + wl-clipboard, nsxiv, }: writers.writeDashBin "qrpaste" '' @@ -11,6 +11,6 @@ writers.writeDashBin "qrpaste" '' clean() { rm "$file" } - ${qrencode}/bin/qrencode "$(${xclip}/bin/xclip -selection clipboard -out)" -o "$file" + ${qrencode}/bin/qrencode "$(${wl-clipboard}/bin/wl-paste)" -o "$file" ${nsxiv}/bin/nsxiv "$file" '' diff --git a/packages/ttspaste.nix b/packages/ttspaste.nix index af22126..b80d058 100644 --- a/packages/ttspaste.nix +++ b/packages/ttspaste.nix @@ -1,10 +1,10 @@ { writers, - xclip, + wl-clipboard, espeak, }: writers.writeDashBin "ttspaste" '' - ${xclip}/bin/xclip -selection clipboard -out | ${espeak}/bin/espeak + ${wl-clipboard}/bin/wl-paste | ${espeak}/bin/espeak '' # curl, mpv, # ${curl}/bin/curl -G http://tts.r/api/tts --data-urlencode 'text@-' | ${mpv}/bin/mpv - diff --git a/packages/unicodmenu.nix b/packages/unicodmenu.nix index 179ca2c..ef359cb 100644 --- a/packages/unicodmenu.nix +++ b/packages/unicodmenu.nix @@ -8,7 +8,7 @@ dmenu, gnused, libnotify, - xclip, + wl-clipboard, xdotool, gawk, fetchFromGitHub, @@ -113,7 +113,7 @@ writers.writeDashBin "unicodmenu" '' gawk gnused libnotify - xclip + wl-clipboard xdotool ] } @@ -127,7 +127,7 @@ writers.writeDashBin "unicodmenu" '' [ "$chosen" != "" ] || exit - echo "$chosen" | tr -d '\n' | xclip -selection clipboard + echo "$chosen" | tr -d '\n' | wl-copy if [ -n "$1" ]; then xdotool key Shift+Insert diff --git a/systems/manakish/hardware-configuration.nix b/systems/manakish/hardware-configuration.nix index f8ff194..3e1cdef 100644 --- a/systems/manakish/hardware-configuration.nix +++ b/systems/manakish/hardware-configuration.nix @@ -41,11 +41,6 @@ device = "/dev/disk/by-uuid/D4AC-91B0"; fsType = "vfat"; }; - "/mnt/sd-card" = { - device = "/dev/disk/by-id/mmc-5E4S5_0x4c585d15-part1"; - fsType = "ext4"; - options = [ "nofail" ]; - }; }; swapDevices = [ ];