This commit is contained in:
Hadi
2024-05-02 15:40:12 +02:00
parent 92ec6a5ea8
commit 81ab14b256
86 changed files with 227 additions and 146 deletions

View File

@@ -0,0 +1,13 @@
{ config, ... }: {
programs.cava = {
enable = true;
settings = {
general.framerate = 60;
smoothing.noise_reduction = 88;
color = {
background = "'#${config.theme.colors.bg}'";
foreground = "'#${config.theme.colors.primary-bg}'";
};
};
};
}

4
home/apps/default.nix Normal file
View File

@@ -0,0 +1,4 @@
{
imports =
[ ./kitty ./lf ./neofetch ./nvim ./qutebrowser ./spicetify ./wofi ./cava ];
}

View File

@@ -0,0 +1,50 @@
{ config, pkgs, ... }: {
programs.kitty = {
enable = true;
settings = {
scrollback_lines = 10000;
enable_audio_bell = false;
update_check_interval = 0;
font_family = config.theme.font-mono;
font_size = 13;
cursor_shape = "Underline";
cursor_underline_thickness = 1;
window_padding_width = 10;
url_style = "curly";
confirm_os_window_close = "0";
remember_window_size = "no";
disable_ligatures = "never";
shell = "${pkgs.zsh}/bin/zsh";
initial_window_width = 1200;
initial_window_height = 600;
background = "#" + config.theme.colors.bg;
url_color = "#" + config.theme.colors.primary-fg;
color0 = "#" + config.theme.colors.color0;
color8 = "#" + config.theme.colors.color8;
color1 = "#" + config.theme.colors.color1;
color9 = "#" + config.theme.colors.color9;
color2 = "#" + config.theme.colors.color2;
color10 = "#" + config.theme.colors.color10;
color3 = "#" + config.theme.colors.color3;
color11 = "#" + config.theme.colors.color11;
color4 = "#" + config.theme.colors.color4;
color12 = "#" + config.theme.colors.color12;
color5 = "#" + config.theme.colors.color5;
color13 = "#" + config.theme.colors.color13;
color6 = "#" + config.theme.colors.color6;
color14 = "#" + config.theme.colors.color14;
color7 = "#" + config.theme.colors.color7;
color15 = "#" + config.theme.colors.color15;
cursor = "#" + config.theme.colors.fg;
cursor_text_color = "#" + config.theme.colors.bg;
selection_foreground = "#" + config.theme.colors.primary-fg;
selection_background = "#" + config.theme.colors.primary-bg;
};
};
}

174
home/apps/lf/config/colors Normal file
View File

@@ -0,0 +1,174 @@
# vim:ft=dircolors
# (This is not a dircolors file but it helps to highlight colors and comments)
# default values from dircolors
# (entries with a leading # are not implemented in lf)
# #no 00 # NORMAL
# fi 00 # FILE
# #rs 0 # RESET
# di 01;34 # DIR
# ln 01;36 # LINK
# #mh 00 # MULTIHARDLINK
# pi 40;33 # FIFO
# so 01;35 # SOCK
# #do 01;35 # DOOR
# bd 40;33;01 # BLK
# cd 40;33;01 # CHR
# or 40;31;01 # ORPHAN
# #mi 00 # MISSING
# su 37;41 # SETUID
# sg 30;43 # SETGID
# #ca 30;41 # CAPABILITY
# tw 30;42 # STICKY_OTHER_WRITABLE
# ow 34;42 # OTHER_WRITABLE
# st 37;44 # STICKY
# ex 01;32 # EXEC
# default values from lf (with matching order)
# ln 01;36 # LINK
# or 31;01 # ORPHAN
# tw 01;34 # STICKY_OTHER_WRITABLE
# ow 01;34 # OTHER_WRITABLE
# st 01;34 # STICKY
# di 01;34 # DIR
# pi 33 # FIFO
# so 01;35 # SOCK
# bd 33;01 # BLK
# cd 33;01 # CHR
# su 01;32 # SETUID
# sg 01;32 # SETGID
# ex 01;32 # EXEC
# fi 00 # FILE
# file types (with matching order)
ln 01;36 # LINK
or 31;01 # ORPHAN
tw 34 # STICKY_OTHER_WRITABLE
ow 34 # OTHER_WRITABLE
st 01;34 # STICKY
di 01;34 # DIR
pi 33 # FIFO
so 01;35 # SOCK
bd 33;01 # BLK
cd 33;01 # CHR
su 01;32 # SETUID
sg 01;32 # SETGID
ex 01;32 # EXEC
fi 00 # FILE
# archives or compressed (dircolors defaults)
*.tar 01;31
*.tgz 01;31
*.arc 01;31
*.arj 01;31
*.taz 01;31
*.lha 01;31
*.lz4 01;31
*.lzh 01;31
*.lzma 01;31
*.tlz 01;31
*.txz 01;31
*.tzo 01;31
*.t7z 01;31
*.zip 01;31
*.z 01;31
*.dz 01;31
*.gz 01;31
*.lrz 01;31
*.lz 01;31
*.lzo 01;31
*.xz 01;31
*.zst 01;31
*.tzst 01;31
*.bz2 01;31
*.bz 01;31
*.tbz 01;31
*.tbz2 01;31
*.tz 01;31
*.deb 01;31
*.rpm 01;31
*.jar 01;31
*.war 01;31
*.ear 01;31
*.sar 01;31
*.rar 01;31
*.alz 01;31
*.ace 01;31
*.zoo 01;31
*.cpio 01;31
*.7z 01;31
*.rz 01;31
*.cab 01;31
*.wim 01;31
*.swm 01;31
*.dwm 01;31
*.esd 01;31
# image formats (dircolors defaults)
*.jpg 01;35
*.jpeg 01;35
*.mjpg 01;35
*.mjpeg 01;35
*.gif 01;35
*.bmp 01;35
*.pbm 01;35
*.pgm 01;35
*.ppm 01;35
*.tga 01;35
*.xbm 01;35
*.xpm 01;35
*.tif 01;35
*.tiff 01;35
*.png 01;35
*.svg 01;35
*.svgz 01;35
*.mng 01;35
*.pcx 01;35
*.mov 01;35
*.mpg 01;35
*.mpeg 01;35
*.m2v 01;35
*.mkv 01;35
*.webm 01;35
*.ogm 01;35
*.mp4 01;35
*.m4v 01;35
*.mp4v 01;35
*.vob 01;35
*.qt 01;35
*.nuv 01;35
*.wmv 01;35
*.asf 01;35
*.rm 01;35
*.rmvb 01;35
*.flc 01;35
*.avi 01;35
*.fli 01;35
*.flv 01;35
*.gl 01;35
*.dl 01;35
*.xcf 01;35
*.xwd 01;35
*.yuv 01;35
*.cgm 01;35
*.emf 01;35
*.ogv 01;35
*.ogx 01;35
# audio formats (dircolors defaults)
*.aac 00;36
*.au 00;36
*.flac 00;36
*.m4a 00;36
*.mid 00;36
*.midi 00;36
*.mka 00;36
*.mp3 00;36
*.mpc 00;36
*.ogg 00;36
*.ra 00;36
*.wav 00;36
*.oga 00;36
*.opus 00;36
*.spx 00;36
*.xspf 00;36

361
home/apps/lf/config/icons Normal file
View File

@@ -0,0 +1,361 @@
# vim:ft=conf
# These examples require Nerd Fonts or a compatible font to be used.
# See https://www.nerdfonts.com for more information.
# default values from lf (with matching order)
# ln l # LINK
# or l # ORPHAN
# tw t # STICKY_OTHER_WRITABLE
# ow d # OTHER_WRITABLE
# st t # STICKY
# di d # DIR
# pi p # FIFO
# so s # SOCK
# bd b # BLK
# cd c # CHR
# su u # SETUID
# sg g # SETGID
# ex x # EXEC
# fi - # FILE
# file types (with matching order)
ln  # LINK
or  # ORPHAN
tw t # STICKY_OTHER_WRITABLE
ow  # OTHER_WRITABLE
st t # STICKY
di  # DIR
pi p # FIFO
so s # SOCK
bd b # BLK
cd c # CHR
su u # SETUID
sg g # SETGID
ex  # EXEC
fi  # FILE
# file extensions (vim-devicons)
*.styl 
*.sass 
*.scss 
*.htm 
*.html 
*.slim 
*.haml 
*.ejs 
*.css 
*.less 
*.md 
*.mdx 
*.markdown 
*.rmd 
*.json 
*.webmanifest 
*.js 
*.mjs 
*.jsx 
*.rb 
*.gemspec 
*.rake 
*.php 
*.py 
*.pyc 
*.pyo 
*.pyd 
*.coffee 
*.mustache 
*.hbs 
*.conf 
*.ini 
*.yml 
*.yaml 
*.toml 
*.bat 
*.mk 
*.jpg 
*.jpeg 
*.bmp 
*.png 
*.webp 
*.gif 
*.ico 
*.twig 
*.cpp 
*.c++ 
*.cxx 
*.cc 
*.cp 
*.c 
*.cs 󰌛
*.h 
*.hh 
*.hpp 
*.hxx 
*.hs 
*.lhs 
*.nix 
*.lua 
*.java 
*.sh 
*.fish 
*.bash 
*.zsh 
*.ksh 
*.csh 
*.awk 
*.ps1 
*.ml λ
*.mli λ
*.diff 
*.db 
*.sql 
*.dump 
*.clj 
*.cljc 
*.cljs 
*.edn 
*.scala 
*.go 
*.dart 
*.xul 
*.sln 
*.suo 
*.pl 
*.pm 
*.t 
*.rss 
'*.f#' 
*.fsscript 
*.fsx 
*.fs 
*.fsi 
*.rs 
*.rlib 
*.d 
*.erl 
*.hrl 
*.ex 
*.exs 
*.eex 
*.leex 
*.heex 
*.vim 
*.ai 
*.psd 
*.psb 
*.ts 
*.tsx 
*.jl 
*.pp 
*.vue 
*.elm 
*.swift 
*.xcplayground 
*.tex 󰙩
*.r 󰟔
*.rproj 󰗆
*.sol 󰡪
*.pem 
# file names (vim-devicons) (case-insensitive not supported in lf)
*gruntfile.coffee 
*gruntfile.js 
*gruntfile.ls 
*gulpfile.coffee 
*gulpfile.js 
*gulpfile.ls 
*mix.lock 
*dropbox 
*.ds_store 
*.gitconfig 
*.gitignore 
*.gitattributes 
*.gitlab-ci.yml 
*.bashrc 
*.zshrc 
*.zshenv 
*.zprofile 
*.vimrc 
*.gvimrc 
*_vimrc 
*_gvimrc 
*.bashprofile 
*favicon.ico 
*license 
*node_modules 
*react.jsx 
*procfile 
*dockerfile 
*docker-compose.yml 
*docker-compose.yaml 
*compose.yml 
*compose.yaml 
*rakefile 
*config.ru 
*gemfile 
*makefile 
*cmakelists.txt 
*robots.txt 󰚩
# file names (case-sensitive adaptations)
*Gruntfile.coffee 
*Gruntfile.js 
*Gruntfile.ls 
*Gulpfile.coffee 
*Gulpfile.js 
*Gulpfile.ls 
*Dropbox 
*.DS_Store 
*LICENSE 
*React.jsx 
*Procfile 
*Dockerfile 
*Docker-compose.yml 
*Docker-compose.yaml 
*Rakefile 
*Gemfile 
*Makefile 
*CMakeLists.txt 
# file patterns (vim-devicons) (patterns not supported in lf)
# .*jquery.*\.js$ 
# .*angular.*\.js$ 
# .*backbone.*\.js$ 
# .*require.*\.js$ 
# .*materialize.*\.js$ 
# .*materialize.*\.css$ 
# .*mootools.*\.js$ 
# .*vimrc.* 
# Vagrantfile$ 
# file patterns (file name adaptations)
*jquery.min.js 
*angular.min.js 
*backbone.min.js 
*require.min.js 
*materialize.min.js 
*materialize.min.css 
*mootools.min.js 
*vimrc 
Vagrantfile 
# archives or compressed (extensions from dircolors defaults)
*.tar 
*.tgz 
*.arc 
*.arj 
*.taz 
*.lha 
*.lz4 
*.lzh 
*.lzma 
*.tlz 
*.txz 
*.tzo 
*.t7z 
*.zip 
*.z 
*.dz 
*.gz 
*.lrz 
*.lz 
*.lzo 
*.xz 
*.zst 
*.tzst 
*.bz2 
*.bz 
*.tbz 
*.tbz2 
*.tz 
*.deb 
*.rpm 
*.jar 
*.war 
*.ear 
*.sar 
*.rar 
*.alz 
*.ace 
*.zoo 
*.cpio 
*.7z 
*.rz 
*.cab 
*.wim 
*.swm 
*.dwm 
*.esd 
# image formats (extensions from dircolors defaults)
*.jpg 
*.jpeg 
*.mjpg 
*.mjpeg 
*.gif 
*.bmp 
*.pbm 
*.pgm 
*.ppm 
*.tga 
*.xbm 
*.xpm 
*.tif 
*.tiff 
*.png 
*.svg 
*.svgz 
*.mng 
*.pcx 
*.mov 
*.mpg 
*.mpeg 
*.m2v 
*.mkv 
*.webm 
*.ogm 
*.mp4 
*.m4v 
*.mp4v 
*.vob 
*.qt 
*.nuv 
*.wmv 
*.asf 
*.rm 
*.rmvb 
*.flc 
*.avi 
*.fli 
*.flv 
*.gl 
*.dl 
*.xcf 
*.xwd 
*.yuv 
*.cgm 
*.emf 
*.ogv 
*.ogx 
# audio formats (extensions from dircolors defaults)
*.aac 
*.au 
*.flac 
*.m4a 
*.mid 
*.midi 
*.mka 
*.mp3 
*.mpc 
*.ogg 
*.ra 
*.wav 
*.oga 
*.opus 
*.spx 
*.xspf 
# other formats
*.pdf 

80
home/apps/lf/default.nix Normal file
View File

@@ -0,0 +1,80 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ pistol ];
programs.lf = {
enable = true;
commands = {
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
editor-open = "$$EDITOR $f";
mkdir = ''
''${{
printf "Directory Name: "
read DIR
mkdir $DIR
}}
'';
};
keybindings = {
d = "delete";
x = "cut";
"<enter>" = "open";
"<c-g>" = "quit";
"<esc>" = "quit";
"H" = "set hidden!";
"\\\"" = "";
o = "";
c = "mkdir";
"." = "set hidden!";
"`" = "mark-load";
"\\'" = "mark-load";
"g~" = "cd";
do = "dragon-out";
gh = "cd";
"g/" = "/";
ee = "editor-open";
V = ''$''${pkgs.bat}/bin/bat --paging=always "$f"'';
};
settings = {
ratios = [ 1 1 2 ];
preview = true;
hidden = true;
drawbox = true;
icons = true;
ignorecase = true;
incsearch = true;
};
previewer.source = "${pkgs.pistol}/bin/pistol";
extraConfig = let
previewer = pkgs.writeShellScriptBin "pv.sh" ''
file=$1
w=$2
h=$3
x=$4
y=$5
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
exit 1
fi
${pkgs.pistol}/bin/pistol "$file"
'';
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
'';
in ''
set cleaner ${cleaner}/bin/clean.sh
set previewer ${previewer}/bin/pv.sh
'';
};
xdg.configFile."lf" = {
recursive = true;
source = ./config;
};
}

View File

@@ -0,0 +1,150 @@
{ pkgs, config, ... }: {
home.packages = with pkgs; [ neofetch ];
xdg.configFile."neofetch/ascii.txt".text = ''
''${c6}
'';
xdg.configFile."neofetch/config.conf".text = ''
# From: https://github.com/Chick2D/neofetch-themes/
# Made by https://github.com/Dan1jel
print_info() {
prin "\n"
info "\n \n OS" distro
info "\n \n Host" model
info "\n \n Kernel" kernel
info "\n \n Uptime" uptime
info "\n \n Packages" packages
info "\n \n Shell" shell
info "\n \n Resolution" resolution
info "\n \n DE" de
info "\n \n WM" wm
info "\n \n WM Theme" wm_theme
info "\n \n Theme" theme
info "\n \n Icons" icons
info "\n \n Terminal" term
info "\n \n Terminal Font" term_font
info "\n \n CPU" cpu
info "\n \n GPU" gpu
info "\n \n Memory" memory
info "\n \n Disk" disk
info "\n \n Battery" battery
info "\n \n Font" font
info "\n \n Song" song
[[ "$player" ]] && prin "\n \n Music Player" "$player"
info "\n \n Local IP" local_ip
prin "\n"
# prin "\n \n ''${cl0}''${cl1}''${cl2}''${cl3}''${cl4}''${cl5}''${cl6}''${cl7}"
prin "\n \n \n \n \n \n ''${cl0} \n \n ''${cl1} \n \n ''${cl2} \n \n ''${cl3} \n \n ''${cl4} \n \n ''${cl5} \n \n ''${cl6} \n \n ''${cl7}"
}
reset="\033[0m"
gray="\033[1;90m"
red="\033[1;31m"
green="\033[1;32m"
yellow="\033[1;33m"
blue="\033[1;34m"
magenta="\033[1;35m"
cyan="\033[1;36m"
white="\033[1;37m"
cl0="''${gray}"
cl1="''${red}"
cl2="''${green}"
cl3="''${yellow}"
cl4="''${blue}"
cl5="''${magenta}"
cl6="''${cyan}"
cl7="''${white}"
title_fqdn="off"
kernel_shorthand="on"
distro_shorthand="off"
os_arch="off"
uptime_shorthand="on"
memory_percent="off"
memory_unit="mib"
package_managers="on"
shell_path="off"
shell_version="on"
speed_type="bios_limit"
speed_shorthand="off"
cpu_brand="on"
cpu_speed="on"
cpu_cores="logical"
cpu_temp="off"
gpu_brand="on"
gpu_type="all"
refresh_rate="off"
gtk_shorthand="off"
gtk2="on"
gtk3="on"
de_version="on"
disk_show=('/storage/emulated' '/' '/server')
disk_subtitle="none"
disk_percent="on"
music_player="auto"
song_format="%artist% - %album% - %title%"
song_shorthand="off"
mpc_args=()
colors=(${toString config.theme.colors.primary-ansi-16-number} 1 ${
toString config.theme.colors.primary-ansi-16-number
} ${toString config.theme.colors.primary-ansi-16-number} 7)
bold="on"
underline_enabled="on"
underline_char="-"
separator=":"
block_range=(0 15)
color_blocks="on"
block_width=3
block_height=1
col_offset="auto"
bar_char_elapsed="-"
bar_char_total="="
bar_border="on"
bar_length=15
bar_color_elapsed="distro"
bar_color_total="distro"
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
image_backend="ascii"
image_source="$HOME/.config/neofetch/ascii.txt"
ascii_distro="auto"
ascii_colors=(distro)
ascii_bold="on"
image_loop="off"
thumbnail_dir="''${XDG_CACHE_HOME:-''${HOME}/.cache}/thumbnails/neofetch"
crop_mode="normal"
crop_offset="center"
image_size="auto"
gap=2
yoffset=0
xoffset=0
background_color=
stdout="off"
'';
}

132
home/apps/nvim/alpha.nix Normal file
View File

@@ -0,0 +1,132 @@
{ config, ... }: {
programs.nixvim.highlight = {
AlphaHeaderColor.fg = "#${config.theme.colors.primary-bg}";
AlphaTextColor.fg = "#${config.theme.colors.fg}";
AlphaShortcutColor.fg = "#${config.theme.colors.alt-fg}";
};
programs.nixvim.plugins.alpha = {
enable = true;
layout = [
{
type = "padding";
val = 4;
}
{
type = "text";
opts = {
position = "center";
hl = "AlphaHeaderColor";
};
val = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
}
{
type = "padding";
val = 4;
}
{
type = "group";
val = [
{
type = "button";
val = "󰭎 Find file";
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
opts = {
shortcut = "nf";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " New file";
on_press.__raw = "function() vim.cmd[[ene]] end";
opts = {
shortcut = "nn";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " NixOs Config";
on_press.__raw = "function() vim.cmd[[e ~/.config/nixos]] end";
opts = {
shortcut = "nc";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = " Recently used";
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
opts = {
shortcut = "no";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = "󰱽 Find text";
on_press.__raw = "function() vim.cmd[[Telescope live_grep]] end";
opts = {
shortcut = "nt";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
{
type = "button";
val = "󰩈 Quit Neovim";
on_press.__raw = "function() vim.cmd[[qa]] end";
opts = {
shortcut = "nq";
position = "center";
cursor = 3;
width = 50;
align_shortcut = "right";
hl_shortcut = "AlphaShortcutColor";
hl = "AlphaTextColor";
};
}
];
}
];
};
}

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.nvim-autopairs = { enable = true; }; }

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.bufferline = { enable = true; }; }

113
home/apps/nvim/cmp.nix Normal file
View File

@@ -0,0 +1,113 @@
{
programs.nixvim.plugins = {
luasnip.enable = true;
cmp-buffer = { enable = true; };
cmp-emoji = { enable = true; };
cmp-nvim-lsp = { enable = true; };
cmp-path = { enable = true; };
cmp_luasnip = { enable = true; };
cmp = {
enable = true;
settings = {
snippet.expand =
"function(args) require('luasnip').lsp_expand(args.body) end";
sources = [
{ name = "nvim_lsp"; }
{ name = "luasnip"; }
{ name = "buffer"; }
{ name = "nvim_lua"; }
{ name = "path"; }
];
formatting = {
fields = [ "abbr" "kind" "menu" ];
format =
# lua
''
function(_, item)
local icons = {
Namespace = "󰌗",
Text = "󰉿",
Method = "󰆧",
Function = "󰆧",
Constructor = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈚",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Table = "",
Object = "󰅩",
Tag = "",
Array = "[]",
Boolean = "",
Number = "",
Null = "󰟢",
String = "󰉿",
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
local icon = icons[item.kind] or ""
item.kind = string.format("%s %s", icon, item.kind or "")
return item
end
'';
};
window = {
completion = {
winhighlight =
"FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel";
scrollbar = true;
sidePadding = 0;
border = [ "" "" "" "" "" "" "" "" ];
};
documentation = {
border = [ "" "" "" "" "" "" "" "" ];
winhighlight =
"FloatBorder:CmpBorder,Normal:CmpPmenu,Search:PmenuSel";
};
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<Down>" = "cmp.mapping.select_next_item()";
"<Up>" = "cmp.mapping.select_prev_item()";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" =
"cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
};
};
};
};
}

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.comment = { enable = true; }; }

View File

@@ -0,0 +1,5 @@
{
programs.nixvim.plugins.copilot-vim = {
enable = true;
};
}

View File

@@ -0,0 +1,35 @@
{ pkgs, inputs, ... }: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
./auto-pairs.nix
./options.nix
#./bufferline.nix
./telescope.nix
./nvim-tree.nix
./lightline.nix
./git.nix
./cmp.nix
./none-ls.nix
./wilder.nix
./lsp.nix
./treesitter.nix
./toggleterm.nix
./copilot.nix
./obsidian.nix
./whichkey.nix
./alpha.nix
./keymaps.nix
./comment.nix
./oil.nix
./trouble.nix
];
programs.nixvim = {
enable = true;
colorschemes.catppuccin = {
enable = true;
settings = { transparent_background = true; };
};
};
}

6
home/apps/nvim/git.nix Normal file
View File

@@ -0,0 +1,6 @@
{
programs.nixvim.plugins.gitsigns = {
enable = true;
settings = { current_line_blame = false; };
};
}

View File

@@ -0,0 +1,71 @@
{
programs.nixvim.keymaps = [
{
key = "<leader>e";
action = "<CMD>Neotree toggle<CR>";
}
{
key = "<space>fm";
action = "<CMD>lua vim.lsp.buf.format()<CR>";
}
{
key = "<leader>ot";
action = "<cmd>lua require('obsidian').util.toggle_checkbox()<cr>";
}
{
key = "<leader>oo";
action = "<cmd>ObsidianQuickSwitch<cr>";
}
{
key = "<leader>on";
action = "<cmd>ObsidianNew<cr>";
}
{
key = "<leader>of";
action = "<cmd>ObsidianSearch<cr>";
}
{
key = "<leader>oi";
action = "<cmd>ObsidianPasteImg<cr>";
}
{
key = "<leader>E";
action = "<cmd>Oil<cr>";
}
{
key = "<leader>t";
action = "<cmd>TroubleToggle<cr>";
}
{
key = "<C-h>";
action = "<C-w>h";
}
{
key = "<C-j>";
action = "<C-w>j";
}
{
key = "<C-k>";
action = "<C-w>k";
}
{
key = "<C-l>";
action = "<C-w>l";
}
# Terminal Mappings
{
mode = "t";
key = "<esc>";
action = "<C-\\><C-n>";
}
];
}

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.lualine = { enable = true; }; }

24
home/apps/nvim/lsp.nix Normal file
View File

@@ -0,0 +1,24 @@
{
programs.nixvim.plugins = {
lsp-format.enable = true;
lsp = {
enable = true;
servers = {
bashls.enable = true;
clangd.enable = true;
gopls.enable = true;
nixd.enable = true;
tailwindcss.enable = true;
html.enable = true;
svelte.enable = true;
};
keymaps.lspBuf = {
"gd" = "definition";
"gD" = "references";
"gt" = "type_definition";
"gi" = "implementation";
"K" = "hover";
};
};
};
}

View File

@@ -0,0 +1,18 @@
{
programs.nixvim.plugins.none-ls = {
enable = true;
sources = {
diagnostics = {
golangci_lint.enable = true;
statix.enable = true;
};
formatting = {
gofmt.enable = true;
goimports.enable = true;
nixfmt.enable = true;
markdownlint.enable = true;
tidy.enable = true;
};
};
};
}

View File

@@ -0,0 +1,5 @@
{
programs.nixvim.plugins.neo-tree = {
enable = true;
};
}

View File

@@ -0,0 +1,9 @@
{
programs.nixvim.plugins.obsidian = {
enable = true;
settings = {
dir = "~/Nextcloud/obsidian";
disable_frontmatter = true;
};
};
}

6
home/apps/nvim/oil.nix Normal file
View File

@@ -0,0 +1,6 @@
{
programs.nixvim.plugins.oil = {
enable = true;
settings = { default_file_explorer = false; };
};
}

View File

@@ -0,0 +1,37 @@
{
programs.nixvim.globals.mapleader = " ";
programs.nixvim.opts = {
updatetime = 50; # Faster completion
number = true;
relativenumber = true;
autoindent = true;
clipboard = "unnamed,unnamedplus";
expandtab = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
smartindent = true;
breakindent = true;
ignorecase = true;
incsearch = true;
hlsearch = true;
smartcase = true;
wildmode = "list:longest";
completeopt = [ "menuone" "noselect" ];
signcolumn = "yes";
cursorline = true;
scrolloff = 8;
mouse = "a";
wrap = false;
swapfile = false;
undofile = true;
conceallevel = 2;
};
}

View File

@@ -0,0 +1,13 @@
{
programs.nixvim.plugins.telescope = {
enable = true;
keymaps = {
"<leader>fg" = "live_grep";
#"<C-p>" = {
# action = "git_files";
# desc = "Telescope Git Files";
#};
};
extensions.fzf-native = { enable = true; };
};
}

View File

@@ -0,0 +1,9 @@
{
programs.nixvim.plugins.toggleterm = {
enable = true;
settings = {
open_mapping = "[[<c-t>]]";
direction = "horizontal";
};
};
}

View File

@@ -0,0 +1,10 @@
{
programs.nixvim.plugins = {
treesitter = {
enable = true;
nixGrammars = true;
indent = true;
};
treesitter-context.enable = true;
};
}

View File

@@ -0,0 +1 @@
{ programs.nixvim.plugins.trouble = { enable = true; }; }

View File

@@ -0,0 +1,3 @@
{
programs.nixvim.plugins.which-key.enable=true;
}

View File

@@ -0,0 +1,6 @@
{
programs.nixvim.plugins.wilder = {
enable = true;
modes = [ ":" "/" "?" ];
};
}

View File

@@ -0,0 +1,261 @@
{ config, ... }: {
imports = [ ./duckduckgo-colorscheme.nix ./homepage/default.nix ];
programs.qutebrowser = {
enable = true;
searchEngines = {
"DEFAULT" = "https://duckduckgo.com/?q={}&ia=web";
"d" = "https://duckduckgo.com/?q={}&ia=web";
"g" = "https://google.com/search?q={}";
"y" = "https://youtube.com/results?search_query={}";
"ya" = "https://yandex.com/search/?text={}";
"n" = "https://mynixos.com/search?q={}";
"nixo" = "https://search.nixos.org/options?channel=unstable&query={}";
"nixp" = "https://search.nixos.org/packages?channel=unstable&query={}";
"gt" = "https://github.com/search?q={}&type=repositories";
};
quickmarks = {
home = "${config.home.homeDirectory}/.config/startpage/index.html";
mynixos = "https://mynixos.com";
github = "https://github.com";
outlook = "https://outlook.office.com/mail/";
office = "https://www.office.com/?auth=2";
teams = "https://teams.microsoft.com/_";
casa = "http://192.168.2.16:8081/#/";
proton = "https://mail.proton.me/u/0/inbox";
cloudflare-one = "https://one.dash.cloudflare.com/";
chatgpt = "https://chat.openai.com/";
nixvim = "https://nix-community.github.io/nixvim/";
hyprland = "https://wiki.hyprland.org/";
nerdfont = "https://www.nerdfonts.com/cheat-sheet";
youtube = "https://youtube.com/";
cloudflare = "https://dash.cloudflare.com/";
};
settings = {
url = {
default_page =
"${config.home.homeDirectory}/.config/startpage/index.html";
start_pages =
[ "${config.home.homeDirectory}/.config/startpage/index.html" ];
};
colors = {
tabs = {
odd.bg = "#${config.theme.colors.bg}";
odd.fg = "#${config.theme.colors.fg}";
even.bg = "#${config.theme.colors.bg}";
even.fg = "#${config.theme.colors.fg}";
selected = {
odd = {
bg = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
};
even = {
bg = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
};
};
indicator = {
error = "#${config.theme.colors.color1}";
start = "#${config.theme.colors.alt-bg}";
stop = "#${config.theme.colors.alt-bg}";
};
};
hints = {
bg = "#${config.theme.colors.alt-bg}";
fg = "#${config.theme.colors.alt-fg}";
match.fg = "#${config.theme.colors.bg}";
};
completion = {
category = {
bg = "#${config.theme.colors.bg}";
fg = "#${config.theme.colors.fg}";
border = {
top = "#${config.theme.colors.bg}";
bottom = "#${config.theme.colors.bg}";
};
};
odd.bg = "#${config.theme.colors.bg}";
even.bg = "#${config.theme.colors.bg}";
fg = [ "#FFFFFF" "#FFFFFF" "#FFFFFF" ];
match.fg = "#${config.theme.colors.primary-bg}";
item.selected = {
bg = "#${config.theme.colors.primary-bg}";
border.top = "#${config.theme.colors.primary-bg}";
border.bottom = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
match.fg = "#${config.theme.colors.primary-fg}";
};
};
statusbar = {
normal.bg = "#${config.theme.colors.bg}";
normal.fg = "#${config.theme.colors.fg}";
private.bg = "#${config.theme.colors.bg}";
private.fg = "#${config.theme.colors.fg}";
insert.bg = "#${config.theme.colors.primary-bg}";
insert.fg = "#${config.theme.colors.primary-fg}";
command = {
bg = "#${config.theme.colors.alt-bg}";
fg = "#${config.theme.colors.alt-fg}";
private.bg = "#${config.theme.colors.alt-bg}";
private.fg = "#${config.theme.colors.alt-fg}";
};
};
messages = {
info = {
bg = "#${config.theme.colors.alt-bg}";
fg = "#${config.theme.colors.alt-fg}";
border = "#${config.theme.colors.alt-bg}";
};
error = {
bg = "#${config.theme.colors.color1}";
fg = "#${config.theme.colors.alt-fg}";
border = "#${config.theme.colors.color1}";
};
};
#webpage.darkmode.enabled = true; # Enable dark mode for all websites (Weird on images)
webpage.preferred_color_scheme =
"dark"; # Enable dark mode for websites that support it
};
fonts = { default_family = "${config.theme.font}"; };
completion = {
height = "30%";
open_categories = [ "history" ];
scrollbar = {
padding = 0;
width = 0;
};
show = "always";
shrink = true;
timestamp_format = "";
web_history.max_items = 7;
};
content = {
autoplay = false;
javascript.clipboard = "access";
javascript.enabled = true;
pdfjs = true;
};
downloads = {
position = "bottom";
remove_finished = 0;
};
hints = {
border = "none";
radius = 1;
};
scrolling = {
bar = "never";
smooth = true;
};
tabs = {
show = "multiple";
last_close = "close";
mode_on_change = "restore";
close_mouse_button = "right";
};
zoom.default = "100%";
qt.force_software_rendering = "chromium";
};
keyBindings = {
normal = {
"gh" = "open ${config.home.homeDirectory}/.config/startpage/index.html";
" p" = "tab-move -";
" n" = "tab-move +";
" w" = "tab-close";
" 1" = "tab-focus 1";
" 2" = "tab-focus 2";
" 3" = "tab-focus 3";
" 4" = "tab-focus 4";
" 5" = "tab-focus 5";
" 6" = "tab-focus 6";
" 7" = "tab-focus 7";
" 8" = "tab-focus 8";
" 9" = "tab-focus 9";
" 0" = "tab-focus 10";
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
command = {
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
insert = {
"<Ctrl-w>" = "tab-close";
"<Ctrl-n>" = "open -w";
"<Ctrl-1>" = "tab-focus 1";
"<Ctrl-2>" = "tab-focus 2";
"<Ctrl-3>" = "tab-focus 3";
"<Ctrl-4>" = "tab-focus 4";
"<Ctrl-5>" = "tab-focus 5";
"<Ctrl-6>" = "tab-focus 6";
"<Ctrl-7>" = "tab-focus 7";
"<Ctrl-8>" = "tab-focus 8";
"<Ctrl-9>" = "tab-focus 9";
"<Ctrl-0>" = "tab-focus 10";
};
};
extraConfig = ''
config.unbind("gm")
config.unbind("gd")
config.unbind("gb")
config.unbind("tl")
config.unbind("gt")
c.tabs.padding = {"bottom": 6, "left": 7, "right": 7, "top": 6}
config.load_autoconfig(True)
'';
};
}

View File

@@ -0,0 +1,37 @@
{ config, ... }: {
xdg.configFile."duckduckgo-colorscheme.js".text = ''
// Go to DuckDuckGo settings page, open the console, paste the code and hit enter.
// based on https://ddg.codingcodax.dev/
// Cookies string for your theme
const cookie = '7=${config.theme.colors.bg}; j=${config.theme.colors.bg}; 9=${config.theme.colors.fg}; aa=${config.theme.colors.alt-fg}; 8=${config.theme.colors.color7}; x=${config.theme.colors.primary-bg}; 21=${config.theme.colors.alt-bg};';
// Converts cookie string into formatted JSON
const cookieToJSON = (cookieRaw) => {
const cookieJson = {};
const items = cookieRaw.split(/[ ,]+/);
items.forEach((item) => {
const parts = item.split('=');
cookieJson[parts[0]] = parts[1];
});
return cookieJson;
};
// Iterates over JSON, and adds to browser cookie store
const setCookies = (cookieJson) => {
Object.keys(cookieJson).forEach((key) => {
document.cookie = `''${key}=''${cookieJson [ key ]}`;
});
};
alert('The Nixy theme will be applied.');
// Call set cookies, passing in formated cookie data
setCookies(cookieToJSON(cookie));
// All done, reload page for changes to take effect :)
location.reload();
'';
}

View File

@@ -0,0 +1,297 @@
{ config, ... }:
let
bookmarks = ''
Bookmarks: [
{text: "MyNixOs", url: "https://mynixos.com", icon: "󱄅"},
{text: "Github", url: "https://github.com", icon: ""},
{text: "Proton", url: "https://mail.proton.me/u/0/inbox", icon: ""},
{text: "Cloudflare One", url: "https://one.dash.cloudflare.com/", icon: ""},
{text: "Chat GPT", url: "https://chat.openai.com/", icon: "󰭹"},
{text: "Nixvim", url: "https://nix-community.github.io/nixvim/", icon: ""},
{text: "Hyprland Wiki", url: "https://wiki.hyprland.org/", icon: "󰖬"},
{text: "Nerdfont", url: "https://www.nerdfonts.com/cheat-sheet", icon: ""},
{text: "Youtube", url: "https://youtube.com", icon: "󰗃"},
],
Home: [
{text: "Casa", url: "http://192.168.2.16:8081/#/", icon: "󰋜"},
{text: "Plex", url: "http://192.168.2.16:32400", icon: "󰚺"},
{text: "Nextcloud", url: "http://192.168.2.16:10081", icon: ""},
],
Work: [
{text: "Outlook", url: "https://outlook.office.com/mail/", icon: "󰴢"},
{text: "Office", url: "https://www.office.com/?auth=2", icon: "󰏆"},
{text: "Teams", url: "https://teams.microsoft.com/_", icon: "󰊻"},
],
'';
in {
xdg.configFile."startpage/index.html".text = ''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homepage</title>
<style>
h1,
h2,
h3,
p {
margin: 0;
padding: 0;
font-family: '${config.theme.font}', sans-serif;
}
.w-screen {
width: 100vw;
}
.overflow-hidden {
overflow: hidden;
}
.max-w-7xl {
max-width: 80rem;
}
.mx-auto {
margin-left: auto;
margin-right: auto;
}
.justify-between {
justify-content: space-between;
}
.items-center {
align-items: center;
}
.py-12 {
padding-top: 3rem;
padding-bottom: 3rem;
}
.px-2 {
padding-left: 0.5rem;
padding-right: 0.5rem;
}
.text-5xl {
font-size: 3rem;
line-height: 1;
}
.font-bold {
font-weight: 700;
}
.mb-4 {
margin-bottom: 1rem;
}
.flex {
display: flex;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-col {
flex-direction: column;
}
.flex-grow {
flex-grow: 1;
}
.gap-5 {
gap: 1.25rem;
}
.gap-05 {
gap: 0.125rem;
}
.justify-start {
justify-content: flex-start;
}
.items-start {
align-items: flex-start;
}
.hover\:opacity-60:hover {
opacity: 0.6;
}
.pb-10 {
padding-bottom: 2.5rem;
}
.p-10 {
padding: 2.5rem;
}
.text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
.text-lg {
font-size: 1.125rem;
line-height: 1.75rem;
}
.text-sm {
font-size: 0.875rem;
line-height: 1.25rem;
}
.text-4xl {
font-size: 2.25rem;
line-height: 2.5rem;
}
.px-5 {
padding-left: 1.25rem;
padding-right: 1.25rem;
}
.py-2 {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
}
a {
text-decoration: none;
}
a, a:visited, a:hover, a:active {
color: inherit;
}
</style>
</head>
<body class="w-screen" style="background-color: #${config.theme.colors.bg}; color: #${config.theme.colors.fg};">
<div class="max-w-7xl mx-auto p-10">
<div class="w-full flex justify-between" id="date-time">
<p class="text-xl"></p>
<p class="text-xl"></p>
</div>
<div class="w-full py-12 px-2" id="greeting">
<h1 class="text-5xl font-bold mb-4" style="color: #${config.theme.colors.primary-bg};"></h1>
</div>
<div id="link-list" class="flex gap-5 flex-col justify-start items-start"></div>
</div>
<script defer>
const linkLists = {
${bookmarks}
};
function getDomainFromUrl(url) {
let domain = url.replace(/(^\w+:|^)\/\//, "");
domain = domain.split('/')[0];
return domain;
}
const linkListContainer = document.getElementById('link-list');
for (const key in linkLists) {
if (Object.hasOwnProperty.call(linkLists, key)) {
const linkList = linkLists[key];
const title = document.createElement('h2');
title.textContent = key.charAt(0).toUpperCase() + key.slice(1);
title.className = "text-3xl font-bold"
linkListContainer.appendChild(title);
const list = document.createElement('div');
list.className = 'flex flex-wrap gap-5 justify-start';
linkList.forEach(link => {
const anchor = document.createElement('a');
anchor.href = link.url;
anchor.className = "px-5 py-2 hover:opacity-60 flex-grow"
const div = document.createElement('div');
div.className = 'flex flex-row gap-5 items-center';
let icon = document.createElement('p');
icon.textContent = link.icon || "";
icon.className = "text-4xl";
div.appendChild(icon);
const divNameUrl = document.createElement('div');
divNameUrl.className = 'flex flex-col gap-05';
const name = document.createElement('p');
name.textContent = link.text;
name.className = 'text-lg font-medium';
const url = document.createElement('p');
url.textContent = link.url;
url.className = 'text-sm';
url.style = "color: #${config.theme.colors.alt-fg};"
divNameUrl.appendChild(name);
divNameUrl.appendChild(url);
div.appendChild(divNameUrl);
anchor.appendChild(div);
list.appendChild(anchor);
});
linkListContainer.appendChild(list);
const spacer = document.createElement('div');
spacer.className = "pb-10"
linkListContainer.appendChild(spacer);
}
}
function updateDateTime() {
const dateTimeContainer = document.getElementById('date-time');
const currentDate = new Date();
const dateOptions = {weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'};
const timeOptions = {hour: '2-digit', minute: '2-digit'};
const formattedDate = currentDate.toLocaleDateString('en-US', dateOptions);
const formattedTime = currentDate.toLocaleTimeString('en-US', timeOptions);
const dateParagraph = dateTimeContainer.querySelector('p:nth-child(1)');
const timeParagraph = dateTimeContainer.querySelector('p:nth-child(2)');
dateParagraph.textContent = formattedDate;
timeParagraph.textContent = formattedTime;
}
updateDateTime();
setInterval(updateDateTime, 60000);
function updateGreeting() {
const greetingContainer = document.getElementById('greeting');
const currentDate = new Date();
const currentHour = currentDate.getHours();
let greetingText;
if (currentHour < 2) {
greetingText = "Good night! ";
} else if (currentHour < 5) {
greetingText = "Hello, night owl! 󰏒";
} else if (currentHour < 12) {
greetingText = "Good morning! ";
} else if (currentHour < 17) {
greetingText = "Good afternoon! ";
} else if (currentHour < 20) {
greetingText = "Good evening! ";
} else {
greetingText = "Good night! ";
}
const greetingHeader = greetingContainer.querySelector('h1');
greetingHeader.textContent = greetingText;
}
updateGreeting();
</script>
</body>
</html>
'';
}

View File

@@ -0,0 +1,40 @@
{ pkgs, config, lib, spicetify-nix, ... }:
let spicePkgs = spicetify-nix.packages.${pkgs.system}.default;
in {
imports = [ spicetify-nix.homeManagerModules.default ];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "spotify" ];
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.text;
colorScheme = "custom";
customColorScheme = {
text = "${config.theme.colors.fg}";
subtext = "${config.theme.colors.alt-fg}";
sidebar-text = "${config.theme.colors.alt-fg}";
main = "${config.theme.colors.bg}";
sidebar = "${config.theme.colors.bg}";
background = "${config.theme.colors.bg}";
player = "${config.theme.colors.bg}";
card = "${config.theme.colors.bg}";
shadow = "000000";
selected-row = "${config.theme.colors.alt-bg}";
button = "${config.theme.colors.primary-bg}";
button-active = "${config.theme.colors.primary-bg}";
button-disabled = "${config.theme.colors.alt-bg}";
tab-active = "${config.theme.colors.primary-bg}";
misc = "${config.theme.colors.alt-fg}";
};
enabledExtensions = with spicePkgs.extensions; [
playlistIcons
lastfm
historyShortcut
hidePodcasts
fullAppDisplay
shuffle
];
};
}

View File

@@ -0,0 +1,96 @@
{ config, ... }: {
programs.wofi = {
enable = true;
settings = {
allow_markup = true;
width = 450;
show = "drun";
prompt = "Apps";
normal_window = true;
layer = "top";
term = "foot";
height = "305px";
orientation = "vertical";
halign = "fill";
line_wrap = "off";
dynamic_lines = false;
allow_images = true;
image_size = 24;
exec_search = false;
hide_search = false;
parse_search = false;
insensitive = true;
hide_scroll = true;
no_actions = true;
sort_order = "default";
gtk_dark = true;
filter_rate = 100;
key_expand = "Tab";
key_exit = "Escape";
};
style = ''
/** ********** Fonts ********** **/
* {
font-family: "${config.theme.font}";
font-weight: 500;
font-size: 12px;
}
#window {
background-color: #${config.theme.colors.alt-bg};
color: #${config.theme.colors.alt-fg};
border-radius: ${toString config.theme.rounding}px;
}
#outer-box {
padding: 20px;
}
#input {
background-color: #${config.theme.colors.bg};
border: 0px solid #${config.theme.colors.primary-bg};
padding: 8px 12px;
}
#scroll {
margin-top: 20px;
}
#inner-box {}
#img {
padding-right: 8px;
}
#text {
color: #${config.theme.colors.color7};
}
#text:selected {
color: #${config.theme.colors.fg};
}
#entry {
padding: 6px;
}
#entry:selected {
background-color: #${config.theme.colors.primary-bg};
color: #${config.theme.colors.primary-fg};
}
#unselected {}
#selected {}
#input,
#entry:selected {
border-radius: ${toString (config.theme.rounding - 10)}px;
}
'';
};
}