diff --git a/.stow-local-ignore b/.stow-local-ignore index e52064f..11081ed 100755 --- a/.stow-local-ignore +++ b/.stow-local-ignore @@ -1,3 +1,4 @@ .git .gitignore +custom nix diff --git a/custom/dunst/dunstrc b/custom/dunst/dunstrc new file mode 100644 index 0000000..7945f3f --- /dev/null +++ b/custom/dunst/dunstrc @@ -0,0 +1,70 @@ +[global] + monitor = 0 + follow = mouse + width = (300,400) + height = 250 + origin = top-right + offset = 8x47 + indicate_hidden = yes + shrink = no + transparency = 0 + notification_height = 0 + separator_height = 2 + padding = 12 + horizontal_padding = 12 + frame_width = 2 + frame_color = "#343746" + separator_color = frame + sort = yes + idle_threshold = 120 + font = Roboto mono 12 + line_height = 0 + markup = full + format = "%s\n%b" + alignment = left + vertical_alignment = center + show_age_threshold = 60 + word_wrap = yes + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + show_indicators = no + icon_position = left + min_icon_size = 50 + max_icon_size = 50 + icon_path = /usr/share/icons/Papirus/16x16/ + sticky_history = no + history_length = 50 + dmenu = /usr/bin/dmenu -p dunst: + browser = /usr/bin/sensible-browser + always_run_script = true + title = Dunst + class = Dunst + startup_notification = false + verbosity = mesg + corner_radius = 20 + ignore_dbusclose = false + force_xinerama = false + mouse_middle_click = do_action, close_current + mouse_right_click = close_all +[experimental] + per_monitor_dpi = false +[shortcuts] + close = ctrl+space + close_all = ctrl+shift+space + history = ctrl+grave + context = ctrl+shift+period +[urgency_low] + background = "#1b1b25" + foreground = "#dedede" + timeout = 5 +[urgency_normal] + background = "#1b1b25" + foreground = "#dedede" + timeout = 5 +[urgency_critical] + background = "#1b1b25" + foreground = "#dedede" + frame_color = "#f07178" + timeout = 0 diff --git a/custom/fonts/feather/Feather.ttf b/custom/fonts/feather/Feather.ttf new file mode 100644 index 0000000..88bdfd0 Binary files /dev/null and b/custom/fonts/feather/Feather.ttf differ diff --git a/custom/rofi/config.rasi b/custom/rofi/config.rasi new file mode 100644 index 0000000..58a5e0d --- /dev/null +++ b/custom/rofi/config.rasi @@ -0,0 +1,181 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Configuration For Rofi Version: 1.7.3 + **/ + +configuration { + /*---------- General setting ----------*/ + modi: "drun,run,filebrowser,window"; + case-sensitive: false; + cycle: true; + filter: ""; + scroll-method: 0; + normalize-match: true; + show-icons: true; + icon-theme: "Papirus"; +/* cache-dir: ;*/ + steal-focus: false; +/* dpi: -1;*/ + + /*---------- Matching setting ----------*/ + matching: "normal"; + tokenize: true; + + /*---------- SSH settings ----------*/ + ssh-client: "ssh"; + ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]"; + parse-hosts: true; + parse-known-hosts: true; + + /*---------- Drun settings ----------*/ + drun-categories: ""; + drun-match-fields: "name,generic,exec,categories,keywords"; + drun-display-format: "{name} [({generic})]"; + drun-show-actions: false; + drun-url-launcher: "xdg-open"; + drun-use-desktop-cache: false; + drun-reload-desktop-cache: false; + drun { + /** Parse user desktop files. */ + parse-user: true; + /** Parse system desktop files. */ + parse-system: true; + } + + /*---------- Run settings ----------*/ + run-command: "{cmd}"; + run-list-command: ""; + run-shell-command: "{terminal} -e {cmd}"; + + /*---------- Fallback Icon ----------*/ + run,drun { + fallback-icon: "application-x-addon"; + } + + /*---------- Window switcher settings ----------*/ + window-match-fields: "title,class,role,name,desktop"; + window-command: "wmctrl -i -R {window}"; + window-format: "{w} - {c} - {t:0}"; + window-thumbnail: false; + + /*---------- Combi settings ----------*/ +/* combi-modi: "window,run";*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ + + /*---------- History and Sorting ----------*/ + disable-history: false; + sorting-method: "normal"; + max-history-size: 25; + + /*---------- Display setting ----------*/ + display-window: "Windows"; + display-windowcd: "Window CD"; + display-run: "Run"; + display-ssh: "SSH"; + display-drun: "Apps"; + display-combi: "Combi"; + display-keys: "Keys"; + display-filebrowser: "Files"; + + /*---------- Misc setting ----------*/ + terminal: "rofi-sensible-terminal"; + font: "Mono 12"; + sort: false; + threads: 0; + click-to-exit: true; +/* ignored-prefixes: "";*/ +/* pid: "/run/user/1000/rofi.pid";*/ + + /*---------- File browser settings ----------*/ + filebrowser { +/* directory: "/home";*/ + directories-first: true; + sorting-method: "name"; + } + + /*---------- Other settings ----------*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + + /*---------- Keybindings ----------*/ +/* + kb-primary-paste: "Control+V,Shift+Insert"; + kb-secondary-paste: "Control+v,Insert"; + kb-clear-line: "Control+w"; + kb-move-front: "Control+a"; + kb-move-end: "Control+e"; + kb-move-word-back: "Alt+b,Control+Left"; + kb-move-word-forward: "Alt+f,Control+Right"; + kb-move-char-back: "Left,Control+b"; + kb-move-char-forward: "Right,Control+f"; + kb-remove-word-back: "Control+Alt+h,Control+BackSpace"; + kb-remove-word-forward: "Control+Alt+d"; + kb-remove-char-forward: "Delete,Control+d"; + kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h"; + kb-remove-to-eol: "Control+k"; + kb-remove-to-sol: "Control+u"; + kb-accept-entry: "Control+j,Control+m,Return,KP_Enter"; + kb-accept-custom: "Control+Return"; + kb-accept-custom-alt: "Control+Shift+Return"; + kb-accept-alt: "Shift+Return"; + kb-delete-entry: "Shift+Delete"; + kb-mode-next: "Shift+Right,Control+Tab"; + kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab"; + kb-mode-complete: "Control+l"; + kb-row-left: "Control+Page_Up"; + kb-row-right: "Control+Page_Down"; + kb-row-down: "Down,Control+n"; + kb-page-prev: "Page_Up"; + kb-page-next: "Page_Down"; + kb-row-first: "Home,KP_Home"; + kb-row-last: "End,KP_End"; + kb-row-select: "Control+space"; + kb-screenshot: "Alt+S"; + kb-ellipsize: "Alt+period"; + kb-toggle-case-sensitivity: "grave,dead_grave"; + kb-toggle-sort: "Alt+grave"; + kb-cancel: "Escape,Control+g,Control+bracketleft"; + kb-custom-1: "Alt+1"; + kb-custom-2: "Alt+2"; + kb-custom-3: "Alt+3"; + kb-custom-4: "Alt+4"; + kb-custom-5: "Alt+5"; + kb-custom-6: "Alt+6"; + kb-custom-7: "Alt+7"; + kb-custom-8: "Alt+8"; + kb-custom-9: "Alt+9"; + kb-custom-10: "Alt+0"; + kb-custom-11: "Alt+exclam"; + kb-custom-12: "Alt+at"; + kb-custom-13: "Alt+numbersign"; + kb-custom-14: "Alt+dollar"; + kb-custom-15: "Alt+percent"; + kb-custom-16: "Alt+dead_circumflex"; + kb-custom-17: "Alt+ampersand"; + kb-custom-18: "Alt+asterisk"; + kb-custom-19: "Alt+parenleft"; + kb-select-1: "Super+1"; + kb-select-2: "Super+2"; + kb-select-3: "Super+3"; + kb-select-4: "Super+4"; + kb-select-5: "Super+5"; + kb-select-6: "Super+6"; + kb-select-7: "Super+7"; + kb-select-8: "Super+8"; + kb-select-9: "Super+9"; + kb-select-10: "Super+0"; + ml-row-left: "ScrollLeft"; + ml-row-right: "ScrollRight"; + ml-row-up: "ScrollUp"; + ml-row-down: "ScrollDown"; + me-select-entry: "MousePrimary"; + me-accept-entry: "MouseDPrimary"; + me-accept-custom: "Control+MouseDPrimary"; +*/ +} diff --git a/custom/rofi/launcher.rasi b/custom/rofi/launcher.rasi new file mode 100644 index 0000000..fe2c342 --- /dev/null +++ b/custom/rofi/launcher.rasi @@ -0,0 +1,171 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + modi: "drun"; + show-icons: true; + display-drun: ""; + drun-display-format: "{name}"; +} + +/*****----- Global Properties -----*****/ +@import "shared/colors.rasi" +@import "shared/fonts.rasi" + +/*****----- Main Window -----*****/ +window { + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 400px; + x-offset: 0px; + y-offset: 0px; + + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background; + cursor: "default"; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @selected; + background-color: transparent; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 15px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @selected; + text-color: @background; + children: [ "prompt", "entry" ]; +} + +prompt { + enabled: true; + background-color: inherit; + text-color: inherit; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: "::"; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 1; + lines: 6; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @selected; + border-radius: 0px; + background-color: @background-alt; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 8px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element normal.normal { + background-color: @background; + text-color: @foreground; +} +element selected.normal { + background-color: @background-alt; + text-color: @foreground; +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +error-message { + padding: 15px; + border: 2px solid; + border-radius: 12px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} +textbox { + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; +} diff --git a/custom/rofi/shared/colors.rasi b/custom/rofi/shared/colors.rasi new file mode 100644 index 0000000..7390656 --- /dev/null +++ b/custom/rofi/shared/colors.rasi @@ -0,0 +1,33 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + * + * Available Colors Schemes + * + * adapta catppuccin everforest navy paper + * arc cyberpunk gruvbox nord solarized + * black dracula lovelace onedark yousai + * + **/ + +/* Import color-scheme from `colors` directory */ + +/** + * + * Author : Levi Lacoss (fishyfishfish55) + * Github : @fishyfishfish55 + * + * Colors + **/ + +* { + background: #15161EFF; + background-alt: #1A1B26FF; + foreground: #C0CAF5FF; + selected: #33467CFF; + active: #414868FF; + urgent: #F7768EFF; +} diff --git a/custom/rofi/shared/fonts.rasi b/custom/rofi/shared/fonts.rasi new file mode 100644 index 0000000..430c73d --- /dev/null +++ b/custom/rofi/shared/fonts.rasi @@ -0,0 +1,12 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Fonts + * + **/ + +* { + font: "JetBrains Mono Nerd Font 10"; +} diff --git a/nix/flake.lock b/nix/flake.lock index d7c1460..c19e1d7 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "custom-fonts": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "path": "./fonts", + "type": "path" + }, + "original": { + "path": "./fonts", + "type": "path" + }, + "parent": [] + }, "flake-compat": { "flake": false, "locked": { @@ -150,6 +166,7 @@ }, "root": { "inputs": { + "custom-fonts": "custom-fonts", "home-manager": "home-manager", "mantle": "mantle", "nixos-wsl": "nixos-wsl", diff --git a/nix/flake.nix b/nix/flake.nix index d47e0e9..158cf61 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -12,6 +12,8 @@ mantle.inputs.nixpkgs.follows = "nixpkgs"; rokit.url = "github:rocketcamel/rokit-nix"; rokit.inputs.nixpkgs.follows = "nixpkgs"; + custom-fonts.url = "path:./fonts"; + custom-fonts.inputs.nixpkgs.follows = "nixpkgs"; }; outputs = @@ -71,6 +73,9 @@ inputs.mantle.packages.${host.architecture}.default inputs.rokit.packages.${host.architecture}.default ]; + fonts.packages = [ + inputs.custom-fonts.packages.${host.architecture}.default + ]; nixpkgs.config.allowUnfree = true; } ] diff --git a/nix/fonts/custom-fonts.nix b/nix/fonts/custom-fonts.nix new file mode 100644 index 0000000..c0f3c95 --- /dev/null +++ b/nix/fonts/custom-fonts.nix @@ -0,0 +1,12 @@ +{ stdenv, lib }: +stdenv.mkDerivation { + pname = "custom-fonts"; + version = "0.1.0"; + + src = ../../custom/fonts; + + installPhase = '' + mkdir -p $out/share/fonts + cp -r $src/* $out/share/fonts + ''; +} diff --git a/nix/fonts/flake.lock b/nix/fonts/flake.lock new file mode 100644 index 0000000..20428dc --- /dev/null +++ b/nix/fonts/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1750134718, + "narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix/fonts/flake.nix b/nix/fonts/flake.nix new file mode 100644 index 0000000..3c7390f --- /dev/null +++ b/nix/fonts/flake.nix @@ -0,0 +1,18 @@ +{ + description = "custom-fonts"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = + { self, nixpkgs }: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + fonts = pkgs.callPackage ./custom-fonts.nix { }; + in + { + packages.x86_64-linux.default = fonts; + }; +} diff --git a/nix/fonts/result b/nix/fonts/result new file mode 120000 index 0000000..c1f940e --- /dev/null +++ b/nix/fonts/result @@ -0,0 +1 @@ +/nix/store/0vacng2hzhihjl7z98ni7vzs8rdl68v3-custom-fonts-0.1.0 \ No newline at end of file diff --git a/nix/hosts/tux/configuration.nix b/nix/hosts/tux/configuration.nix index 7975810..5c51264 100644 --- a/nix/hosts/tux/configuration.nix +++ b/nix/hosts/tux/configuration.nix @@ -39,10 +39,6 @@ wheelNeedsPassword = false; }; - fonts.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - ]; - i3.enable = true; kanata.enable = true; diff --git a/nix/modules/commonPackages.nix b/nix/modules/commonPackages.nix index 89071da..931af8f 100644 --- a/nix/modules/commonPackages.nix +++ b/nix/modules/commonPackages.nix @@ -16,6 +16,11 @@ mplus-outline-fonts.githubRelease dina-font proggyfonts + nerd-fonts.jetbrains-mono + nerd-fonts.iosevka + roboto + roboto-mono + open-sans ]; fonts.fontDir.enable = true; commonPackages = with pkgs; [ diff --git a/nix/modules/default.nix b/nix/modules/default.nix index 38be5d8..388c945 100644 --- a/nix/modules/default.nix +++ b/nix/modules/default.nix @@ -12,5 +12,6 @@ ./kanata.nix ./pipewire.nix ./keys.nix + ./rofi.nix ]; } diff --git a/nix/modules/i3.nix b/nix/modules/i3.nix index 0cadeae..83c36eb 100644 --- a/nix/modules/i3.nix +++ b/nix/modules/i3.nix @@ -48,9 +48,13 @@ ahk_x11 prismlauncher feh + dconf + rofi + papirus-icon-theme ]; programs.thunar.enable = true; services.tumbler.enable = true; + rofi.enable = true; home-manager.users.luca = { programs = { @@ -58,7 +62,7 @@ enable = true; settings = { "shell-integration-features" = "no-cursor"; - "background-opacity" = 0.8; + "background-opacity" = 0.85; "cursor-style" = "block"; "cursor-style-blink" = false; "font-size" = 15; @@ -67,6 +71,18 @@ }; services.dunst = { enable = true; + configFile = ../../custom/dunst/dunstrc; + }; + gtk = { + enable = true; + theme.name = "Adwaita-dark"; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = true; + }; + }; + qt = { + enable = true; + style.name = "adwaita-dark"; }; services.picom = { @@ -75,10 +91,6 @@ }; services.copyq.enable = true; - xsession.initExtra = '' - xset s off - xset s noblank - ''; xsession.windowManager.i3 = { enable = true; extraConfig = '' @@ -89,11 +101,13 @@ config = { modifier = "Mod4"; defaultWorkspace = "workspace number 1"; - terminal = "alacritty"; + terminal = "ghostty"; fonts = { names = [ "Noto Sans" "Noto Sans CJK JP" + "Open Sans" + "Feather" ]; size = 10.0; }; @@ -114,7 +128,7 @@ "${modifier}+Shift+j" = "move down"; "${modifier}+Shift+k" = "move up"; "${modifier}+Shift+l" = "move right"; - "${modifier}+Return" = "exec ghostty"; + "${modifier}+d" = "exec rofi -show drun -theme ~/.config/rofi/launcher.rasi"; }; #startup = [ # { diff --git a/nix/modules/rofi.nix b/nix/modules/rofi.nix new file mode 100644 index 0000000..ab93466 --- /dev/null +++ b/nix/modules/rofi.nix @@ -0,0 +1,20 @@ +{ + pkgs, + lib, + config, + ... +}: +{ + options.rofi = { + enable = lib.mkEnableOption "enable rofi"; + }; + + config = lib.mkIf config.rofi.enable { + home-manager.users.luca = { + + xdg.configFile = { + "rofi".source = ../../custom/rofi; + }; + }; + }; +}