diff --git a/modules/misc.nix b/modules/misc.nix index 34f74a5..d6c6fda 100644 --- a/modules/misc.nix +++ b/modules/misc.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { imports = [ ../system/vpn.nix ../pkgs/delfin/biscuit.nix diff --git a/pkgs/delfin/biscuit.nix b/pkgs/delfin/biscuit.nix index 83be91e..0e08b72 100644 --- a/pkgs/delfin/biscuit.nix +++ b/pkgs/delfin/biscuit.nix @@ -1,4 +1,4 @@ -{...}: { +{pkgs, ...}: { environment.systemPackages = with pkgs; [ delfin ]; diff --git a/pkgs/wofi/biscuit.nix b/pkgs/wofi/biscuit.nix index c4e2fb2..42bb32d 100644 --- a/pkgs/wofi/biscuit.nix +++ b/pkgs/wofi/biscuit.nix @@ -1,3 +1,16 @@ -{...}: { +{pkgs, ...}: let + # wofiSource = pkgs.fetchFromGitHub { + # owner = "adi1090x"; + # repo = "rofi"; + # rev = "b76c16b2b7c465d7b082e11e5210fcd10c6683a7"; + # hash = "sha256-9IHENxHQors2z3aYj/xToZD79Gmi1aqlE3QnKnvOT9A="; + # }; + wofiSource = builtins.toPath ./launcher; +in { programs.wofi.enable = true; + home.file.".config/wofi" = { + source = wofiSource; + recursive = true; + force = true; + }; } diff --git a/pkgs/wofi/launcher/colors/onedark.rasi b/pkgs/wofi/launcher/colors/onedark.rasi new file mode 100644 index 0000000..7c76108 --- /dev/null +++ b/pkgs/wofi/launcher/colors/onedark.rasi @@ -0,0 +1,16 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + **/ + +* { + background: #1E2127FF; + background-alt: #282B31FF; + foreground: #FFFFFFFF; + selected: #61AFEFFF; + active: #98C379FF; + urgent: #E06C75FF; +} diff --git a/pkgs/wofi/launcher/config.rasi b/pkgs/wofi/launcher/config.rasi new file mode 100644 index 0000000..fe2c342 --- /dev/null +++ b/pkgs/wofi/launcher/config.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/pkgs/wofi/launcher/launcher.sh b/pkgs/wofi/launcher/launcher.sh new file mode 100644 index 0000000..c294cca --- /dev/null +++ b/pkgs/wofi/launcher/launcher.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya (adi1090x) +## Github : @adi1090x +# +## Rofi : Launcher (Modi Drun, Run, File Browser, Window) +# +## Available Styles +# +## style-1 style-2 style-3 style-4 style-5 +## style-6 style-7 style-8 style-9 style-10 +## style-11 style-12 style-13 style-14 style-15 + +dir="$HOME/.config/wofi/launcher/config.rasi" +theme='style-1' + +## Run +wofi \ + -show drun \ + -theme ${dir}/${theme}.rasi diff --git a/pkgs/wofi/launcher/shared/colors.rasi b/pkgs/wofi/launcher/shared/colors.rasi new file mode 100644 index 0000000..d3ca8b2 --- /dev/null +++ b/pkgs/wofi/launcher/shared/colors.rasi @@ -0,0 +1,18 @@ +/** + * + * 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 */ + +@import "~/.config/wofi/colors/onedark.rasi" diff --git a/pkgs/wofi/launcher/shared/fonts.rasi b/pkgs/wofi/launcher/shared/fonts.rasi new file mode 100644 index 0000000..50499c9 --- /dev/null +++ b/pkgs/wofi/launcher/shared/fonts.rasi @@ -0,0 +1,12 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Fonts + * + **/ + +* { + font: "Iosevka Nerd Font 10"; +} diff --git a/system/font.nix b/system/font.nix index 4a14b9e..18dd46d 100644 --- a/system/font.nix +++ b/system/font.nix @@ -2,5 +2,6 @@ fonts.packages = with pkgs; [ nerd-fonts.fira-code nerd-fonts.jetbrains-mono + nerd-fonts.iosevka ]; }