this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix dolphin file associations

Ben C ccde1fe7 88b8078a

+461 -435
+169 -159
nixosModules/dev/nvim.nix
··· 4 4 config, 5 5 lib, 6 6 ... 7 - }: { 7 + }: 8 + { 8 9 environment.systemPackages = with pkgs; [ 9 10 ripgrep 10 11 fd 11 12 ]; 12 13 13 14 home-manager.users.bean = { 14 - imports = [inputs.nixvim.homeManagerModules.nixvim]; 15 + imports = [ inputs.nixvim.homeManagerModules.nixvim ]; 15 16 16 17 programs.nixvim = { 17 18 enable = true; ··· 58 59 background = true; 59 60 }; 60 61 virtual_text = { 61 - errors = ["italic"]; 62 - hints = ["italic"]; 63 - information = ["italic"]; 64 - warnings = ["italic"]; 65 - ok = ["italic"]; 62 + errors = [ "italic" ]; 63 + hints = [ "italic" ]; 64 + information = [ "italic" ]; 65 + warnings = [ "italic" ]; 66 + ok = [ "italic" ]; 66 67 }; 67 68 underlines = { 68 - errors = ["underline"]; 69 - hints = ["underline"]; 70 - information = ["underline"]; 71 - warnings = ["underline"]; 69 + errors = [ "underline" ]; 70 + hints = [ "underline" ]; 71 + information = [ "underline" ]; 72 + warnings = [ "underline" ]; 72 73 }; 73 74 }; 74 75 }; ··· 90 91 ''; 91 92 92 93 autoGroups = { 93 - restore_cursor = {}; 94 - open_neotree = {}; 94 + restore_cursor = { }; 95 + open_neotree = { }; 95 96 }; 96 97 97 98 opts = { ··· 112 113 autoCmd = [ 113 114 { 114 115 group = "restore_cursor"; 115 - event = ["BufReadPost"]; 116 + event = [ "BufReadPost" ]; 116 117 pattern = "*"; 117 118 callback.__raw = '' 118 119 function() ··· 129 130 } 130 131 { 131 132 group = "open_neotree"; 132 - event = ["BufRead"]; 133 + event = [ "BufRead" ]; 133 134 pattern = "*"; 134 135 once = true; 135 136 callback.__raw = '' ··· 157 158 }; 158 159 }; 159 160 160 - keymaps = let 161 - prefixMap = pre: maps: 162 - builtins.map (k: { 163 - action = "<cmd>${k.action}<cr>"; 164 - key = "${pre}${k.key}"; 165 - options = k.options; 166 - }) 167 - maps; 168 - in 161 + keymaps = 162 + let 163 + prefixMap = 164 + pre: maps: 165 + builtins.map (k: { 166 + action = "<cmd>${k.action}<cr>"; 167 + key = "${pre}${k.key}"; 168 + options = k.options; 169 + }) maps; 170 + in 169 171 lib.lists.flatten ( 170 - builtins.map (g: 171 - if builtins.hasAttr "group" g 172 - then prefixMap g.prefix g.keys 173 - else g) [ 172 + builtins.map (g: if builtins.hasAttr "group" g then prefixMap g.prefix g.keys else g) [ 173 + { 174 + action = ''"+p''; 175 + key = "<C-S-V>"; 176 + options.desc = "Paste from system clipboard"; 177 + } 178 + { 179 + action = ''"+y''; 180 + key = "<C-S-C>"; 181 + options.desc = "Copy to system clipboard"; 182 + } 183 + { 184 + action = ''"+x''; 185 + key = "<C-S-X>"; 186 + options.desc = "Cut to system clipboard"; 187 + } 174 188 { 175 189 group = "Tab Navigation"; 176 190 prefix = "<Tab>"; ··· 291 305 } 292 306 { 293 307 action.__raw = "[[<C-\\><C-n><C-w>]]"; 294 - mode = ["t"]; 308 + mode = [ "t" ]; 295 309 key = "<C-w>"; 296 310 } 297 311 { 298 312 action.__raw = "[[<C-\\><C-n>]]"; 299 - mode = ["t"]; 313 + mode = [ "t" ]; 300 314 key = "<esc>"; 301 315 } 302 316 { ··· 307 321 ); 308 322 309 323 extraPlugins = with pkgs.vimPlugins; [ 310 - {plugin = pkgs.nvim-mdx;} 311 - {plugin = satellite-nvim;} 312 - {plugin = flatten-nvim;} 313 - {plugin = tiny-devicons-auto-colors-nvim;} 324 + { plugin = pkgs.nvim-mdx; } 325 + { plugin = satellite-nvim; } 326 + { plugin = flatten-nvim; } 327 + { plugin = tiny-devicons-auto-colors-nvim; } 314 328 ]; 315 329 316 330 plugins = { ··· 382 396 opts = { 383 397 position = "center"; 384 398 }; 385 - layout = let 386 - o = { 387 - position = "center"; 388 - }; 389 - txt = s: { 390 - type = "text"; 391 - val = s; 392 - opts = 393 - { 399 + layout = 400 + let 401 + o = { 402 + position = "center"; 403 + }; 404 + txt = s: { 405 + type = "text"; 406 + val = s; 407 + opts = { 394 408 hl = "Keyword"; 395 - } 396 - // o; 397 - }; 398 - grp = g: { 399 - type = "group"; 400 - val = g; 401 - opts.spacing = 1; 402 - }; 403 - btn = { 404 - val, 405 - onClick, 406 - ... 407 - }: { 408 - type = "button"; 409 - inherit val; 410 - opts = o; 411 - on_press.__raw = "function() vim.cmd[[${onClick}]] end"; 412 - }; 413 - cmd = { 414 - command, 415 - width, 416 - height, 417 - }: { 418 - type = "terminal"; 419 - inherit command width height; 420 - opts = o; 421 - }; 422 - pad = { 423 - type = "padding"; 424 - val = 2; 425 - }; 426 - in 409 + } // o; 410 + }; 411 + grp = g: { 412 + type = "group"; 413 + val = g; 414 + opts.spacing = 1; 415 + }; 416 + btn = 417 + { 418 + val, 419 + onClick, 420 + ... 421 + }: 422 + { 423 + type = "button"; 424 + inherit val; 425 + opts = o; 426 + on_press.__raw = "function() vim.cmd[[${onClick}]] end"; 427 + }; 428 + cmd = 429 + { 430 + command, 431 + width, 432 + height, 433 + }: 434 + { 435 + type = "terminal"; 436 + inherit command width height; 437 + opts = o; 438 + }; 439 + pad = { 440 + type = "padding"; 441 + val = 2; 442 + }; 443 + in 427 444 [ 428 - pad 429 445 pad 430 446 pad 431 447 ] 432 448 ++ (lib.intersperse pad [ 433 - ( 434 - let 435 - banner = 436 - pkgs.runCommand "nvim-banner" {} 437 - ''${pkgs.toilet}/bin/toilet " NIXVIM " -f mono12 -F border > $out''; 438 - # bannerText = builtins.readFile banner; 439 - in 440 - cmd { 441 - command = ''open ${banner} | ${pkgs.lolcat}/bin/lolcat -f -S (random int 1..360)''; 442 - # Hardcoding to prevent IFD 443 - width = 83; # (builtins.stringLength (lib.trim (builtins.elemAt (lib.splitString "\n" bannerText) 1))) - 3; 444 - height = 12; # (builtins.length (lib.splitString "\n" bannerText)) - 1; 445 - } 446 - ) 449 + (cmd { 450 + command = '' 451 + ${pkgs.toilet}/bin/toilet " NIXVIM " -f mono12 -F border | ${pkgs.lolcat}/bin/lolcat -f 452 + ''; 453 + # Hardcoding to prevent IFD 454 + width = 83; # (builtins.stringLength (lib.trim (builtins.elemAt (lib.splitString "\n" bannerText) 1))) - 3; 455 + height = 12; # (builtins.length (lib.splitString "\n" bannerText)) - 1; 456 + }) 447 457 (grp [ 448 458 (btn { 449 - val = " 󰉋 Open Project"; 450 - onClick = "Telescope projects"; 451 - shortcut = "<leader>p"; 459 + val = " Terminal"; 460 + onClick = "ToggleTerm"; 452 461 }) 453 462 (btn { 454 - val = " 󱋡 Open Recent File"; 455 - onClick = "Telescope oldfiles"; 456 - shortcut = "<leader>r"; 463 + val = "󰉋 Open Project"; 464 + onClick = "Telescope projects"; 457 465 }) 458 466 (btn { 459 - val = " 󰅙 Quit"; 467 + val = "󰅙 Quit"; 460 468 onClick = "q"; 461 - shortcut = "q"; 462 469 }) 463 470 ]) 464 - (txt "::<シ>") 471 + (grp [ 472 + (txt " Neovim Version ${pkgs.neovim.version}") 473 + (txt " NixVim Rev ${builtins.substring 0 5 inputs.nixvim.rev}") 474 + ]) 465 475 ]) 466 - ++ [pad]; 476 + ++ [ pad ]; 467 477 }; 468 478 469 479 trouble = { ··· 585 595 hover = { 586 596 enabled = true; 587 597 delay = 150; 588 - reveal = ["close"]; 598 + reveal = [ "close" ]; 589 599 }; 590 600 sort_by = "insert_at_end"; 591 601 diagnostics = "nvim_lsp"; ··· 600 610 601 611 statuscol = { 602 612 enable = true; 603 - settings.segments = let 604 - dispCond = { 605 - __raw = '' 606 - function(ln) 607 - return vim.bo.filetype ~= "neo-tree" 608 - end 609 - ''; 610 - }; 611 - in [ 612 - { 613 - click = "v:lua.ScSa"; 614 - condition = [ 615 - dispCond 616 - ]; 617 - text = [ 618 - "%s" 619 - ]; 620 - } 621 - { 622 - click = "v:lua.ScLa"; 623 - condition = [dispCond]; 624 - text = [ 625 - { 626 - __raw = "require('statuscol.builtin').lnumfunc"; 627 - } 628 - ]; 629 - } 630 - { 631 - click = "v:lua.ScFa"; 632 - condition = [ 633 - dispCond 634 - { 635 - __raw = "require('statuscol.builtin').not_empty"; 636 - } 637 - ]; 638 - text = [ 639 - { 640 - __raw = "require('statuscol.builtin').foldfunc"; 641 - } 642 - " " 643 - ]; 644 - } 645 - ]; 613 + settings.segments = 614 + let 615 + dispCond = { 616 + __raw = '' 617 + function(ln) 618 + return vim.bo.filetype ~= "neo-tree" 619 + end 620 + ''; 621 + }; 622 + in 623 + [ 624 + { 625 + click = "v:lua.ScSa"; 626 + condition = [ 627 + dispCond 628 + ]; 629 + text = [ 630 + "%s" 631 + ]; 632 + } 633 + { 634 + click = "v:lua.ScLa"; 635 + condition = [ dispCond ]; 636 + text = [ 637 + { 638 + __raw = "require('statuscol.builtin').lnumfunc"; 639 + } 640 + ]; 641 + } 642 + { 643 + click = "v:lua.ScFa"; 644 + condition = [ 645 + dispCond 646 + { 647 + __raw = "require('statuscol.builtin').not_empty"; 648 + } 649 + ]; 650 + text = [ 651 + { 652 + __raw = "require('statuscol.builtin').foldfunc"; 653 + } 654 + " " 655 + ]; 656 + } 657 + ]; 646 658 }; 647 659 648 660 dropbar = { ··· 668 680 669 681 options = { 670 682 theme = "catppuccin"; 671 - disabled_filetypes = ["neo-tree"]; 672 - ignore_focus = ["neo-tree"]; 683 + disabled_filetypes = [ "neo-tree" ]; 684 + ignore_focus = [ "neo-tree" ]; 673 685 }; 674 686 }; 675 687 }; 676 688 677 689 nix-develop = { 678 690 enable = true; 679 - package = 680 - pkgs.vimPlugins.nix-develop-nvim.overrideAttrs ( 681 - prev: next: { 682 - src = 683 - pkgs.fetchFromGitHub { 684 - owner = "Bwc9876"; 685 - repo = "nix-develop.nvim"; 686 - rev = "089cd52191ccbb3726594e21cd96567af6088dd5"; 687 - sha256 = "sha256-EIEJk8/IAuG+UICUJ2F8QakgRpFrQ1ezDSJ79NAVuD8= 691 + package = pkgs.vimPlugins.nix-develop-nvim.overrideAttrs ( 692 + prev: next: { 693 + src = pkgs.fetchFromGitHub { 694 + owner = "Bwc9876"; 695 + repo = "nix-develop.nvim"; 696 + rev = "089cd52191ccbb3726594e21cd96567af6088dd5"; 697 + sha256 = "sha256-EIEJk8/IAuG+UICUJ2F8QakgRpFrQ1ezDSJ79NAVuD8= 688 698 "; 689 - }; 690 - } 691 - ); 699 + }; 700 + } 701 + ); 692 702 }; 693 703 694 704 project-nvim = { ··· 779 789 cmp = { 780 790 enable = true; 781 791 settings = { 782 - sources = map (name: {inherit name;}) [ 792 + sources = map (name: { inherit name; }) [ 783 793 "nvim_lsp" 784 794 "nvim_lsp_signature_help" 785 795 "path"
+292 -276
nixosModules/graphics/shell.nix
··· 4 4 lib, 5 5 inputs', 6 6 ... 7 - }: { 8 - users.users.bean.extraGroups = ["video"]; 7 + }: 8 + { 9 + users.users.bean.extraGroups = [ "video" ]; 9 10 10 11 nixpkgs.overlays = [ 11 12 (next: prev: { ··· 32 33 kdePackages.dolphin 33 34 kdePackages.ark 34 35 kdePackages.kio-extras 36 + kdePackages.kservice # Dolphin stupid? 37 + libsForQt5.kservice 35 38 kdePackages.kdegraphics-thumbnailers 36 39 kdePackages.kimageformats 37 40 kdePackages.taglib ··· 66 69 # Needed to open the firewall, actual service is managed in HM 67 70 programs.kdeconnect.enable = true; 68 71 69 - home-manager.users.bean = let 70 - screenOffCmd = "hyprctl dispatch dpms off; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-add \"timeout\""; 71 - screenOnCmd = "hyprctl dispatch dpms on; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-remove \"timeout\""; 72 - in { 73 - xdg.configFile = { 74 - "swappy/config".text = '' 75 - [Default] 76 - save_dir=$HOME/Pictures/Screenshots 77 - save_filename_format=%Y-%m-%dT%H:%M:%S-edited.png 78 - show_panel=true 79 - line_size=5 80 - text_size=20 81 - text_font=monospace 82 - paint_mode=brush 83 - early_exit=false 84 - fill_shape=false 85 - ''; 86 - "kdeconnect/config".text = '' 87 - [General] 88 - name=${lib.toUpper config.networking.hostName} 89 - ''; 90 - }; 72 + home-manager.users.bean = 73 + let 74 + screenOffCmd = "hyprctl dispatch dpms off; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-add \"timeout\""; 75 + screenOnCmd = "hyprctl dispatch dpms on; ${pkgs.swaynotificationcenter}/bin/swaync-client --inhibitor-remove \"timeout\""; 76 + in 77 + { 78 + xdg.configFile = { 79 + "swappy/config".text = '' 80 + [Default] 81 + save_dir=$HOME/Pictures/Screenshots 82 + save_filename_format=%Y-%m-%dT%H:%M:%S-edited.png 83 + show_panel=true 84 + line_size=5 85 + text_size=20 86 + text_font=monospace 87 + paint_mode=brush 88 + early_exit=false 89 + fill_shape=false 90 + ''; 91 + "kdeconnect/config".text = '' 92 + [General] 93 + name=${lib.toUpper config.networking.hostName} 94 + ''; 95 + }; 91 96 92 - # Doing our own thing for rofi 93 - catppuccin.rofi.enable = false; 97 + # Doing our own thing for rofi 98 + catppuccin.rofi.enable = false; 94 99 95 - systemd.user.services = let 96 - target = config.home-manager.users.bean.wayland.systemd.target; 97 - mkShellService = { 98 - desc, 99 - service, 100 - }: { 101 - Install = { 102 - WantedBy = [target]; 103 - }; 100 + systemd.user.services = 101 + let 102 + target = config.home-manager.users.bean.wayland.systemd.target; 103 + mkShellService = 104 + { 105 + desc, 106 + service, 107 + }: 108 + { 109 + Install = { 110 + WantedBy = [ target ]; 111 + }; 104 112 105 - Unit = { 106 - ConditionEnvironment = "WAYLAND_DISPLAY"; 107 - Description = desc; 108 - After = [target]; 109 - PartOf = [target]; 110 - }; 113 + Unit = { 114 + ConditionEnvironment = "WAYLAND_DISPLAY"; 115 + Description = desc; 116 + After = [ target ]; 117 + PartOf = [ target ]; 118 + }; 111 119 112 - Service = service; 113 - }; 114 - in { 115 - dolphin = mkShellService { 116 - desc = "Dolphin File Manager Daemon"; 120 + Service = service; 121 + }; 122 + in 123 + { 124 + dolphin = mkShellService { 125 + desc = "Dolphin File Manager Daemon"; 117 126 118 - service = { 119 - ExecStart = "${pkgs.kdePackages.dolphin}/bin/dolphin --daemon"; 120 - Restart = "on-failure"; 121 - RestartSec = "10"; 122 - BusName = "org.freedesktop.FileManager1"; 123 - }; 124 - }; 127 + service = { 128 + ExecStart = "${pkgs.kdePackages.dolphin}/bin/dolphin --daemon"; 129 + Restart = "on-failure"; 130 + RestartSec = "10"; 131 + BusName = "org.freedesktop.FileManager1"; 132 + }; 133 + }; 125 134 126 - battery-notif = mkShellService { 127 - desc = "Battery Notification Service"; 135 + battery-notif = mkShellService { 136 + desc = "Battery Notification Service"; 128 137 129 - service = { 130 - ExecStart = "${pkgs.nushell}/bin/nu ${../../res/battery_notif.nu}"; 131 - Restart = "on-failure"; 132 - RestartSec = "10"; 133 - }; 134 - }; 138 + service = { 139 + ExecStart = "${pkgs.nushell}/bin/nu ${../../res/battery_notif.nu}"; 140 + Restart = "on-failure"; 141 + RestartSec = "10"; 142 + }; 143 + }; 135 144 136 - mpris-idle-inhibit = mkShellService { 137 - desc = "MPRIS Idle Inhibitor"; 145 + mpris-idle-inhibit = mkShellService { 146 + desc = "MPRIS Idle Inhibitor"; 138 147 139 - service = { 140 - ExecStart = ''${inputs'.wayland-mpris-idle-inhibit.packages.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 141 - Restart = "on-failure"; 142 - RestartSec = "10"; 148 + service = { 149 + ExecStart = ''${inputs'.wayland-mpris-idle-inhibit.packages.default}/bin/wayland-mpris-idle-inhibit --ignore "kdeconnect" --ignore "playerctld"''; 150 + Restart = "on-failure"; 151 + RestartSec = "10"; 152 + }; 153 + }; 143 154 }; 144 - }; 145 - }; 155 + 156 + services = { 157 + hyprpolkitagent.enable = true; 158 + kdeconnect.enable = true; 159 + hypridle = { 160 + enable = true; 161 + settings = { 162 + general = { 163 + lock_cmd = "pidof hyprlock || hyprlock"; 164 + unlock_cmd = "pkill hyprlock --signal SIGUSR1"; 165 + before_sleep_cmd = "loginctl lock-session"; 166 + after_sleep_cmd = screenOnCmd; 167 + }; 146 168 147 - services = { 148 - hyprpolkitagent.enable = true; 149 - kdeconnect.enable = true; 150 - hypridle = { 151 - enable = true; 152 - settings = { 153 - general = { 154 - lock_cmd = "pidof hyprlock || hyprlock"; 155 - unlock_cmd = "pkill hyprlock --signal SIGUSR1"; 156 - before_sleep_cmd = "loginctl lock-session"; 157 - after_sleep_cmd = screenOnCmd; 169 + listener = 170 + let 171 + lockTimeout = 120; 172 + in 173 + [ 174 + { 175 + timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity 176 + on-timeout = "loginctl lock-session"; 177 + } 178 + { 179 + timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking 180 + on-timeout = screenOffCmd; 181 + on-resume = screenOnCmd; 182 + } 183 + { 184 + timeout = lockTimeout + 600; # Suspend 10 minutes after locking 185 + on-timeout = "systemctl suspend"; 186 + } 187 + ]; 158 188 }; 159 - 160 - listener = let 161 - lockTimeout = 120; 162 - in [ 163 - { 164 - timeout = lockTimeout; # Lock the screen after 2 minutes of inactivity 165 - on-timeout = "loginctl lock-session"; 166 - } 167 - { 168 - timeout = lockTimeout + 120; # Turn off the screen 2 minutes after locking 169 - on-timeout = screenOffCmd; 170 - on-resume = screenOnCmd; 171 - } 172 - { 173 - timeout = lockTimeout + 600; # Suspend 10 minutes after locking 174 - on-timeout = "systemctl suspend"; 175 - } 189 + }; 190 + cliphist = { 191 + enable = true; 192 + systemdTargets = lib.mkForce [ 193 + config.home-manager.users.bean.wayland.systemd.target 176 194 ]; 177 195 }; 178 - }; 179 - cliphist = { 180 - enable = true; 181 - systemdTargets = lib.mkForce [ 182 - config.home-manager.users.bean.wayland.systemd.target 183 - ]; 184 - }; 185 - udiskie = { 186 - enable = true; 187 - automount = false; 188 - tray = "never"; 189 - }; 190 - playerctld.enable = true; 191 - network-manager-applet.enable = true; 192 - wlsunset = { 193 - enable = true; 194 - sunrise = "6:00"; 195 - sunset = "22:00"; 196 - }; 197 - swayosd = { 198 - enable = true; 199 - stylePath = pkgs.writeText "swayosd-style.css" '' 200 - window#osd { 201 - border-radius: 5rem; 202 - } 196 + udiskie = { 197 + enable = true; 198 + automount = false; 199 + tray = "never"; 200 + }; 201 + playerctld.enable = true; 202 + network-manager-applet.enable = true; 203 + wlsunset = { 204 + enable = true; 205 + sunrise = "6:00"; 206 + sunset = "22:00"; 207 + }; 208 + swayosd = { 209 + enable = true; 210 + stylePath = pkgs.writeText "swayosd-style.css" '' 211 + window#osd { 212 + border-radius: 5rem; 213 + } 203 214 204 - #container { 205 - padding: 5px 10px; 206 - } 207 - ''; 215 + #container { 216 + padding: 5px 10px; 217 + } 218 + ''; 219 + }; 208 220 }; 209 - }; 210 221 211 - programs = { 212 - rofi = { 213 - enable = true; 214 - package = pkgs.rofi-wayland.override { 215 - plugins = with pkgs; [ 216 - rofi-emoji-wayland 217 - rofi-power-menu 218 - rofi-bluetooth 219 - (rofi-calc.override { 220 - rofi-unwrapped = rofi-wayland-unwrapped; 221 - }) 222 - rofi-pulse-select 223 - ]; 224 - }; 225 - theme = let 226 - inherit (config.home-manager.users.bean.lib.formats.rasi) mkLiteral; 227 - in { 228 - "@import" = "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.home-manager.users.bean.catppuccin.rofi.flavor}.rasi"; 229 - "*" = 230 - (builtins.mapAttrs (name: value: mkLiteral "@${value}") { 231 - "bg0" = "base"; 232 - "bg1" = "mantle"; 233 - "bg2" = "crust"; 234 - "bg3" = config.catppuccin.accent; 235 - "fg0" = "subtext1"; 236 - "fg1" = "text"; 237 - "fg2" = "subtext0"; 238 - "fg3" = "overlay0"; 239 - "fg4" = "surface0"; 240 - }) 241 - // { 242 - font = mkLiteral ''"Roboto 14"''; 243 - background-color = mkLiteral ''transparent''; 244 - text-color = mkLiteral ''@fg0''; 245 - margin = mkLiteral ''0px''; 246 - padding = mkLiteral ''0px''; 247 - spacing = mkLiteral ''0px''; 248 - }; 249 - "window" = { 250 - location = mkLiteral ''north''; 251 - y-offset = mkLiteral ''calc(50% - 176px)''; 252 - width = mkLiteral ''600''; 253 - border-radius = mkLiteral ''24px''; 254 - background-color = mkLiteral ''@bg0''; 255 - }; 256 - "mainbox" = { 257 - padding = mkLiteral ''12px''; 258 - }; 259 - "inputbar" = { 260 - background-color = mkLiteral ''@bg1''; 261 - border-color = mkLiteral ''@bg3''; 262 - border = mkLiteral ''2px''; 263 - border-radius = mkLiteral ''16px''; 264 - padding = mkLiteral ''8px 16px''; 265 - spacing = mkLiteral ''8px''; 266 - children = mkLiteral ''[ prompt, entry ]''; 267 - }; 268 - "prompt" = { 269 - text-color = mkLiteral ''@fg2''; 270 - }; 271 - "entry" = { 272 - placeholder = mkLiteral ''"Search"''; 273 - placeholder-color = mkLiteral ''@fg3''; 274 - }; 275 - "message" = { 276 - margin = mkLiteral ''12px 0 0''; 277 - border-radius = mkLiteral ''16px''; 278 - border-color = mkLiteral ''@bg2''; 279 - background-color = mkLiteral ''@bg2''; 280 - }; 281 - "textbox" = { 282 - padding = mkLiteral ''8px 24px''; 283 - }; 284 - "listview" = { 285 - background-color = mkLiteral ''transparent''; 286 - margin = mkLiteral ''12px 0 0''; 287 - lines = mkLiteral ''8''; 288 - columns = mkLiteral ''2''; 289 - fixed-height = mkLiteral ''false''; 290 - }; 291 - "element" = { 292 - padding = mkLiteral ''8px 16px''; 293 - spacing = mkLiteral ''8px''; 294 - border-radius = mkLiteral ''16px''; 295 - }; 296 - "element normal active" = { 297 - text-color = mkLiteral ''@bg3''; 298 - }; 299 - "element alternate active" = { 300 - text-color = mkLiteral ''@bg3''; 222 + programs = { 223 + rofi = { 224 + enable = true; 225 + package = pkgs.rofi-wayland.override { 226 + plugins = with pkgs; [ 227 + rofi-emoji-wayland 228 + rofi-power-menu 229 + rofi-bluetooth 230 + (rofi-calc.override { 231 + rofi-unwrapped = rofi-wayland-unwrapped; 232 + }) 233 + rofi-pulse-select 234 + ]; 301 235 }; 302 - "element selected normal, element selected active" = { 303 - text-color = mkLiteral ''@fg4''; 304 - background-color = mkLiteral ''@bg3''; 305 - }; 306 - "element-icon" = { 307 - size = mkLiteral ''1em''; 308 - vertical-align = mkLiteral ''0.5''; 309 - }; 310 - "element-text" = { 311 - text-color = mkLiteral ''inherit''; 312 - }; 236 + theme = 237 + let 238 + inherit (config.home-manager.users.bean.lib.formats.rasi) mkLiteral; 239 + in 240 + { 241 + "@import" = 242 + "${config.catppuccin.sources.rofi}/themes/catppuccin-${config.home-manager.users.bean.catppuccin.rofi.flavor}.rasi"; 243 + "*" = 244 + (builtins.mapAttrs (name: value: mkLiteral "@${value}") { 245 + "bg0" = "base"; 246 + "bg1" = "mantle"; 247 + "bg2" = "crust"; 248 + "bg3" = config.catppuccin.accent; 249 + "fg0" = "subtext1"; 250 + "fg1" = "text"; 251 + "fg2" = "subtext0"; 252 + "fg3" = "overlay0"; 253 + "fg4" = "surface0"; 254 + }) 255 + // { 256 + font = mkLiteral ''"Roboto 14"''; 257 + background-color = mkLiteral ''transparent''; 258 + text-color = mkLiteral ''@fg0''; 259 + margin = mkLiteral ''0px''; 260 + padding = mkLiteral ''0px''; 261 + spacing = mkLiteral ''0px''; 262 + }; 263 + "window" = { 264 + location = mkLiteral ''north''; 265 + y-offset = mkLiteral ''calc(50% - 176px)''; 266 + width = mkLiteral ''600''; 267 + border-radius = mkLiteral ''24px''; 268 + background-color = mkLiteral ''@bg0''; 269 + }; 270 + "mainbox" = { 271 + padding = mkLiteral ''12px''; 272 + }; 273 + "inputbar" = { 274 + background-color = mkLiteral ''@bg1''; 275 + border-color = mkLiteral ''@bg3''; 276 + border = mkLiteral ''2px''; 277 + border-radius = mkLiteral ''16px''; 278 + padding = mkLiteral ''8px 16px''; 279 + spacing = mkLiteral ''8px''; 280 + children = mkLiteral ''[ prompt, entry ]''; 281 + }; 282 + "prompt" = { 283 + text-color = mkLiteral ''@fg2''; 284 + }; 285 + "entry" = { 286 + placeholder = mkLiteral ''"Search"''; 287 + placeholder-color = mkLiteral ''@fg3''; 288 + }; 289 + "message" = { 290 + margin = mkLiteral ''12px 0 0''; 291 + border-radius = mkLiteral ''16px''; 292 + border-color = mkLiteral ''@bg2''; 293 + background-color = mkLiteral ''@bg2''; 294 + }; 295 + "textbox" = { 296 + padding = mkLiteral ''8px 24px''; 297 + }; 298 + "listview" = { 299 + background-color = mkLiteral ''transparent''; 300 + margin = mkLiteral ''12px 0 0''; 301 + lines = mkLiteral ''8''; 302 + columns = mkLiteral ''2''; 303 + fixed-height = mkLiteral ''false''; 304 + }; 305 + "element" = { 306 + padding = mkLiteral ''8px 16px''; 307 + spacing = mkLiteral ''8px''; 308 + border-radius = mkLiteral ''16px''; 309 + }; 310 + "element normal active" = { 311 + text-color = mkLiteral ''@bg3''; 312 + }; 313 + "element alternate active" = { 314 + text-color = mkLiteral ''@bg3''; 315 + }; 316 + "element selected normal, element selected active" = { 317 + text-color = mkLiteral ''@fg4''; 318 + background-color = mkLiteral ''@bg3''; 319 + }; 320 + "element-icon" = { 321 + size = mkLiteral ''1em''; 322 + vertical-align = mkLiteral ''0.5''; 323 + }; 324 + "element-text" = { 325 + text-color = mkLiteral ''inherit''; 326 + }; 327 + }; 328 + location = "center"; 313 329 }; 314 - location = "center"; 330 + nushell.extraConfig = '' 331 + plugin add ${pkgs.nu_plugin_dbus}/bin/nu_plugin_dbus 332 + ''; 315 333 }; 316 - nushell.extraConfig = '' 317 - plugin add ${pkgs.nu_plugin_dbus}/bin/nu_plugin_dbus 318 - ''; 319 - }; 320 334 321 - wayland.windowManager.hyprland.settings = { 322 - env = [ 323 - "GRIMBLAST_EDITOR,swappy -f " 324 - ]; 335 + wayland.windowManager.hyprland.settings = { 336 + env = [ 337 + "GRIMBLAST_EDITOR,swappy -f " 338 + ]; 325 339 326 - exec-once = [ 327 - "[workspace 3] uwsm app -- keepassxc /home/bean/Documents/Database.kdbx" 328 - ]; 340 + exec-once = [ 341 + "[workspace 3] uwsm app -- keepassxc /home/bean/Documents/Database.kdbx" 342 + ]; 329 343 330 - bind = let 331 - powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\""; 332 - screenshot = "${pkgs.nushell}/bin/nu ${../../res/screenshot.nu}"; 333 - in [ 334 - "SUPER,S,exec,uwsm app -- rofi -show drun -icon-theme \"candy-icons\" -show-icons" 335 - "SUPER SHIFT,E,exec,uwsm app -- rofi -modi emoji -show emoji" 336 - "SUPER,Delete,exec,uwsm app -- ${powerMenu}" 337 - ",XF86PowerOff,exec,uwsm app -- ${powerMenu}" 338 - "SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\"" 339 - "SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 340 - "SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons" 341 - "SUPER,E,exec,uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/rofi/rofi-places.nu}" 342 - "SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" 343 - "SUPER,A,exec,uwsm app -- pavucontrol --tab 5" 344 - ''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ 󰋩 \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy'' 345 - "SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe" 346 - ",Print,exec,uwsm app -- ${screenshot}" 347 - "SUPER SHIFT,S,exec,uwsm app -- ${screenshot}" 348 - "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${../../res/ocr.nu}" 349 - "SUPER SHIFT,C,exec,uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a" 350 - ]; 351 - bindr = [ 352 - "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/screenrec.nu}" 353 - "CAPS,Caps_Lock,exec,uwsm app -- swayosd-client --caps-lock" 354 - ",Scroll_Lock,exec,uwsm app -- swayosd-client --scroll-lock" 355 - ",Num_Lock,exec,uwsm app -- swayosd-client --num-lock" 356 - ]; 357 - bindl = [ 358 - ",switch:on:Lid Switch,exec,${screenOffCmd}" 359 - ",switch:off:Lid Switch,exec,${screenOnCmd}" 360 - ]; 361 - bindel = [ 362 - ",XF86MonBrightnessUp,exec,uwsm app -- swayosd-client --brightness raise" 363 - ",XF86MonBrightnessDown,exec,uwsm app -- swayosd-client --brightness lower" 364 - ]; 344 + bind = 345 + let 346 + powerMenu = "rofi -modi 'p:${pkgs.rofi-power-menu}/bin/rofi-power-menu' -show p --symbols-font \"FiraMono Nerd Font Mono\""; 347 + screenshot = "${pkgs.nushell}/bin/nu ${../../res/screenshot.nu}"; 348 + in 349 + [ 350 + "SUPER,S,exec,uwsm app -- rofi -show drun -icon-theme \"candy-icons\" -show-icons" 351 + "SUPER SHIFT,E,exec,uwsm app -- rofi -modi emoji -show emoji" 352 + "SUPER,Delete,exec,uwsm app -- ${powerMenu}" 353 + ",XF86PowerOff,exec,uwsm app -- ${powerMenu}" 354 + "SUPER ALT,C,exec,uwsm app -- rofi -show calc -modi calc -no-show-match -no-sort -calc-command \"echo -n '{result}' | wl-copy\"" 355 + "SUPER,B,exec,uwsm app -- ${pkgs.rofi-bluetooth}/bin/rofi-bluetooth" 356 + "SUPER,Tab,exec,uwsm app -- rofi -show window -show-icons" 357 + "SUPER,E,exec,uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/rofi/rofi-places.nu}" 358 + "SUPER,N,exec,uwsm app -- ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw" 359 + "SUPER,A,exec,uwsm app -- pavucontrol --tab 5" 360 + ''SUPER,V,exec,cliphist list | sed -r 's/\[\[ binary data (.* .iB) (.*) (.*) \]\]/ 󰋩 \2 Image (\3, \1)/g' | rofi -dmenu -display-columns 2 -p Clipboard | cliphist decode | wl-copy'' 361 + "SUPER ALT,V,exec,echo -e \"Yes\\nNo\" | [[ $(rofi -dmenu -mesg \"Clear Clipboard History?\" -p Clear) == \"Yes\" ]] && cliphist wipe" 362 + ",Print,exec,uwsm app -- ${screenshot}" 363 + "SUPER SHIFT,S,exec,uwsm app -- ${screenshot}" 364 + "SUPER SHIFT,T,exec,${pkgs.nushell}/bin/nu ${../../res/ocr.nu}" 365 + "SUPER SHIFT,C,exec,uwsm app -- ${pkgs.hyprpicker}/bin/hyprpicker -a" 366 + ]; 367 + bindr = [ 368 + "SUPER SHIFT,R,exec,pkill wf-recorder --signal SIGINT || uwsm app -- ${pkgs.nushell}/bin/nu ${../../res/screenrec.nu}" 369 + "CAPS,Caps_Lock,exec,uwsm app -- swayosd-client --caps-lock" 370 + ",Scroll_Lock,exec,uwsm app -- swayosd-client --scroll-lock" 371 + ",Num_Lock,exec,uwsm app -- swayosd-client --num-lock" 372 + ]; 373 + bindl = [ 374 + ",switch:on:Lid Switch,exec,${screenOffCmd}" 375 + ",switch:off:Lid Switch,exec,${screenOnCmd}" 376 + ]; 377 + bindel = [ 378 + ",XF86MonBrightnessUp,exec,uwsm app -- swayosd-client --brightness raise" 379 + ",XF86MonBrightnessDown,exec,uwsm app -- swayosd-client --brightness lower" 380 + ]; 381 + }; 365 382 }; 366 - }; 367 383 }