This commit is contained in:
Hadi 2024-03-13 23:32:40 +01:00
parent 6ed623bd6f
commit 8bda501d16
12 changed files with 652 additions and 14 deletions

View File

@ -2,13 +2,76 @@
This is my dotfiles repo. It's a work in progress, and I'm still learning how to use nix. This is my dotfiles repo. It's a work in progress, and I'm still learning how to use nix.
Every things that you *must* change got a "CHANGEME" comment. # Images
You can search for it with ripgrep: `rg "CHANGEME"`
![1](img/1.png)
![2](img/2.png)
![3](img/3.png)
# Apps
- File manager:
- lf
- thunar
- Terminal: kitty
- Shell: zsh
- Prompt: starship
- Bat, eza, zoxide, fzf, ripgrep
- Editor: nixvim
- Browser: qutebrowser
- Music: spictify
- Bar: waybar
- Notifications: dunst
- Launcher: wofi
- WM: Hyprland
- hyprlock
- hyprpaper
- hypridle
- wlogout
- DM: Tuigreet
# Themes & Colors
Themes and colors are managed by the `home/variable/theme` folder.
# Scripts
## Nix/NixOs shortcuts
- `nixy-edit`
- `nixy-rebuild`
- `nixy-gc`
- `nixy-update`
## Brightness control
- `brightness-up`
- `brightness-down`
- `brightness-change <up/down> <increment>`
## Sound control
- `sound-up`
- `sound-down`
- `sound-toggle`
- `sound-output`
- `sound-change <up/down/mute> <increment>`
# Installation
```sh
git clone https://github.com/anotherhadi/nixy ~/.config/nixos
```
- Every things that you *must* change got a "CHANGEME" comment. You can search for it with ripgrep: `rg "CHANGEME"`
- Change the `nixos/configuration.nix` file to match your system
- Copy your `hardware-configuration.nix` file to the `nixos` folder
```sh
sudo nixos-rebuild switch --flake ~/.config/nixos#nixy
```
# TODOLIST # TODOLIST
- [ ] Variable user & homeDir - [ ] Variable user & homeDir
- [ ] Ricing things
- [ ] Peaclock
- [ ] Find a tui app for white noises (does that exist ? If not, I'll build my own)
- [ ] Custom GTK & Qt Theme based on the colorscheme - [ ] Custom GTK & Qt Theme based on the colorscheme

View File

@ -71,8 +71,8 @@
foreground = "#" + config.theme.colors.color0; foreground = "#" + config.theme.colors.color0;
}; };
urgency_low = { urgency_low = {
background = "#" + config.theme.colors.color3; background = "#" + config.theme.colors.alt-bg;
foreground = "#" + config.theme.colors.color0; foreground = "#" + config.theme.colors.alt-fg;
}; };
urgency_normal = { urgency_normal = {
background = "#" + config.theme.colors.alt-bg; background = "#" + config.theme.colors.alt-bg;

View File

@ -47,6 +47,11 @@
wget wget
ripgrep ripgrep
# Just cool
cbonsai
pipes
cmatrix
# Backup # Backup
vscode vscode
firefox firefox

View File

@ -3,6 +3,7 @@
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ]; imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
hyprshot
xdg-desktop-portal-hyprland xdg-desktop-portal-hyprland
wlr-randr wlr-randr
wl-clipboard wl-clipboard
@ -27,6 +28,7 @@
settings = { settings = {
"$mod" = "SUPER"; "$mod" = "SUPER";
"$shiftMod" = "SUPER_SHIFT";
"$menu" = "menu"; "$menu" = "menu";
"$powermenu" = "${pkgs.wlogout}/bin/wlogout"; "$powermenu" = "${pkgs.wlogout}/bin/wlogout";
@ -46,7 +48,7 @@
"$mod, T, togglefloating," "$mod, T, togglefloating,"
"$mod, F, fullscreen" "$mod, F, fullscreen"
"$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser" "$mod, B, exec, ${pkgs.qutebrowser}/bin/qutebrowser"
"$mod, C, exec, ${pkgs.kitty}/bin/kitty --class floating peaclock" "$mod, C, exec, ${pkgs.kitty}/bin/kitty --class peaclock peaclock"
"$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock" "$mod, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
"$mod, SPACE, exec, $menu" "$mod, SPACE, exec, $menu"
"$mod, X, exec, $powermenu" "$mod, X, exec, $powermenu"
@ -54,6 +56,9 @@
"$mod, right, movefocus, r" "$mod, right, movefocus, r"
"$mod, up, movefocus, u" "$mod, up, movefocus, u"
"$mod, down, movefocus, d" "$mod, down, movefocus, d"
"$mod, PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m window -o ~/Pictures/screenshots"
", PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m output -o ~/Pictures/screenshots"
"$shiftMod, PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m region -o ~/Pictures/screenshots"
] ++ (builtins.concatLists (builtins.genList (i: ] ++ (builtins.concatLists (builtins.genList (i:
let ws = i + 1; let ws = i + 1;
in [ in [
@ -129,7 +134,7 @@
}; };
input = { input = {
kb_layout = "fr"; kb_layout = "fr"; # CHANGEME
kb_options = "caps:escape"; kb_options = "caps:escape";
follow_mouse = 1; follow_mouse = 1;
@ -144,6 +149,15 @@
}; };
}; };
windowrulev2 = [
"float, class:peaclock"
"move 2% 78%, class:peaclock"
"size 30% 20%, class:peaclock"
"float, title:Bluetooth Devices"
"move 20% 20%, title:Bluetooth Devices"
"size 60% 60%, title:Bluetooth Devices"
];
}; };
}; };
} }

174
home/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/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 

View File

@ -4,21 +4,29 @@
programs.lf = { programs.lf = {
enable = true; enable = true;
keybindings = { keybindings = {
# I find x to be a better cut, and save d for delete
d = "delete"; d = "delete";
x = "cut"; x = "cut";
"<enter>" = "open"; "<enter>" = "open";
"<c-g>" = "quit"; "<c-g>" = "quit";
"<esc>" = "quit"; "<esc>" = "quit";
"H" = "set hidden!";
}; };
settings = { ratios = [ 1 1 2 ]; };
previewer.source = "${pkgs.pistol}/bin/pistol"; previewer.source = "${pkgs.pistol}/bin/pistol";
extraConfig = '' extraConfig = ''
set hidden
set nodirfirst set nodirfirst
set incsearch set incsearch
set icons
set drawbox
''; '';
}; };
xdg.configFile."lf" = {
recursive = true;
source = ./config;
};
} }

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}'";
};
};
};
}

View File

@ -1 +1 @@
{ imports = [ ./sshconfig.nix ]; } { imports = [ ./sshconfig.nix ./cava/default.nix ]; }

BIN
img/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

BIN
img/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

BIN
img/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB