Compare commits

...

57 Commits

Author SHA1 Message Date
8b1a4a265d [nb] Commit 2024-03-02 16:57:38 -08:00
7c62da7b0f Fireweed commit before install 2024-03-02 09:22:26 -08:00
6ce0d0c189 [nb] Commit 2024-03-01 20:01:17 -08:00
4ee5d31fcf Final commit before merge 2024-03-01 19:20:02 -08:00
8164b74643 [nb] Commit 2024-02-21 08:24:20 -08:00
3eb1788cac Clean up and consolidation edits 2024-02-12 21:25:27 -08:00
99e1d17811 making changes and needing to restart 2024-02-10 17:45:59 -08:00
a69333caa2 Created a media.nix package collection, and installed emacs 2024-02-10 10:35:38 -08:00
598c08a060 20240210 - Edited river, bash, waybar, and package collections 2024-02-10 09:31:53 -08:00
0173d9cdc3 Changed tmux config closer to original, removing the dracula plugin. 2024-02-09 06:56:43 -08:00
083aa025bc [nb] Commit 2024-02-07 20:41:59 -08:00
c4d43d21c8 [nb] Commit 2024-02-07 20:32:44 -08:00
660285c743 [nb] Commit 2024-01-24 21:38:01 -08:00
fcdf1058a5 Added cage compositor again to test. 2024-01-21 19:10:16 -08:00
450f9e382d Moved package collections into their own directory and created a dev.nix collection. 2024-01-20 10:53:04 -08:00
c1d0c467a9 [nb] Add: todos/20240120104042.todo.md 2024-01-20 10:40:42 -08:00
d0d24560d5 [nb] Commit 2024-01-20 10:40:39 -08:00
0ddb13b31a Removed nix-colors and gtk-nix, they were not working as well as I hoped. 2024-01-17 20:29:00 -08:00
4e6f7979b0 [nb] Add: todos/20240116194420.todo.md 2024-01-16 19:44:20 -08:00
c172f2d358 [nb] Commit 2024-01-16 19:43:56 -08:00
331084c19a Added waybar again 2024-01-15 19:30:48 -08:00
0591102ed7 [nb] Edit: todos/20240115093833.todo.md 2024-01-15 09:39:05 -08:00
abd4276cfb [nb] Add: todos/20240115093833.todo.md 2024-01-15 09:38:33 -08:00
23057f5ba6 [nb] Edit: todos/20240115093320.todo.md 2024-01-15 09:38:11 -08:00
9911b86478 [nb] Commit 2024-01-15 09:37:37 -08:00
2de9b8a6b3 [nb] Edit: todos/20240115093320.todo.md 2024-01-15 09:36:13 -08:00
d3bbb125de [nb] Edit: todos/20240115093320.todo.md 2024-01-15 09:33:42 -08:00
17603cfafd [nb] Add: todos/20240115093320.todo.md 2024-01-15 09:33:20 -08:00
041780e3d7 [nb] Edit: todos/20240115092910.todo.md 2024-01-15 09:30:12 -08:00
58dcf630a8 [nb] Reconcile Index 2024-01-15 09:29:41 -08:00
70e61193b4 [nb] Commit 2024-01-15 09:29:33 -08:00
7c71848893 [nb] Add: 20240115092910.todo.md 2024-01-15 09:29:10 -08:00
401b7c91a5 [nb] Commit 2024-01-15 09:29:09 -08:00
e09fcfffc1 [nb] Done: todos/20240114221107.todo.md 2024-01-15 08:43:19 -08:00
a3e71d894e [nb] Commit 2024-01-15 08:43:03 -08:00
c13d39843c Switched from way-displays to kanshi, seems to work much better. 2024-01-15 08:42:05 -08:00
d5aea5ccd3 [nb] Commit 2024-01-15 07:59:03 -08:00
e92617649f Cleaned up todo list with nb. 2024-01-14 22:19:04 -08:00
7a2345d3e3 [nb] Edit: todos/20240114221107.todo.md 2024-01-14 22:17:15 -08:00
4aea3d5fc8 [nb] Edit: todos/20240114221545.todo.md 2024-01-14 22:16:22 -08:00
e29e3e895f [nb] Add: todos/20240114221545.todo.md 2024-01-14 22:15:45 -08:00
d2532f713d [nb] Edit: todos/20240114221429.todo.md 2024-01-14 22:15:13 -08:00
35c53cfd5c [nb] Add: todos/20240114221429.todo.md 2024-01-14 22:14:29 -08:00
7c32ff5a6b [nb] Edit: todos/20240114221315.todo.md 2024-01-14 22:14:07 -08:00
8d795cb782 [nb] Add: todos/20240114221315.todo.md 2024-01-14 22:13:15 -08:00
a09b48feab [nb] Commit 2024-01-14 22:12:48 -08:00
f892218419 [nb] Edit: 20240114221107.todo.md 2024-01-14 22:11:44 -08:00
cf8e8f08f9 [nb] Add: 20240114221107.todo.md 2024-01-14 22:11:07 -08:00
1e687fa231 [nb] Add: 20240114220929.todo.md 2024-01-14 22:09:29 -08:00
5f6a23a104 [nb] Commit 2024-01-14 22:07:28 -08:00
2c50398ea8 Successful nix-colors implementation. Merging into master branch. 2024-01-14 21:32:29 -08:00
23ac64bf87 Switch from stylix which auto-generates themes to nix-colors which allows manual color assignment. Added gtk-nix flake to assist with nix-colors and gtk. 2024-01-14 19:09:07 -08:00
535fb8778b Made changes to river init key mappings, made changes to vimrc defaults, and added wf-recorder package. 2024-01-14 16:24:12 -08:00
34e40b502b Switched from grimblast to grim/slurp/swappy. 2024-01-14 12:07:06 -08:00
0202aab104 Changed some river keybindings and moved mako location to top-right. 2024-01-14 11:30:24 -08:00
ece09d9598 Removed auto-launch gui applications from river init, removed lf configuration, and added nixos-shell package. 2024-01-14 11:13:10 -08:00
3c28947c21 Removed the leading "ii" from .local/bin script names and ended them with ".sh". 2024-01-13 19:33:39 -08:00
118 changed files with 4041 additions and 4338 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
build.log
flake.lock
.index

14
.index Normal file
View File

@ -0,0 +1,14 @@
flake.lock
flake.nix
hosts
README.md
todos
cores
modules

20
.justfile Normal file
View File

@ -0,0 +1,20 @@
default: project-name
@just --list
project-name:
@grep "description" "./flake.nix" | awk '{$1=$1;print}'
debug:
nixos-rebuild switch --flake . --use-remote-sudo --show-trace --verbose
test:
nixos-rebuild test --flake ".#$(hostname)" --use-remote-sudo
switch: test
nixos-rebuild switch --flake ".#$(hostname)" --use-remote-sudo
update:
nixos-rebuild switch --flake --update-input nixpkgs ".#$(hostname)"
todo:
nb todos/

View File

@ -13,6 +13,10 @@ sudo nixos-rebuild switch --flake ".#<hostname>"
sudo nixos-rebuild switch --flake ".#<hostname>" --update-input nixpkgs --commit-lock-file
```
## How to install with single command
```
nix-shell -p git --command "nix run https://git.sdf.org/iiogama/confix --extra-experimental-features nix-command --extra-experimental-features flakes --flake .#fireweed"
## How to install new system with flake
### Method 1

106
cores/base/default.nix Normal file
View File

@ -0,0 +1,106 @@
# Base configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
boot = {
tmp.cleanOnBoot = true;
};
nix = {
settings.auto-optimise-store = true;
settings.allowed-users = [ "@wheel" ];
gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "--delete-older-than 30d";
};
package = pkgs.nixFlakes;
registry.nixpkgs.flake = inputs.nixpkgs;
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true;
networking.networkmanager.enable = true;
environment = {
defaultPackages = with pkgs; [
perl
rsync
strace
];
systemPackages = with pkgs; [
curl
ranger
wget
];
};
programs.git = {
enable = true;
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.mtr = {
enable = true;
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
programs.tmux = {
enable = true;
clock24 = true;
escapeTime = 250;
historyLimit = 8000;
keyMode = "vi";
newSession = false;
terminal = "screen-256color";
};
services.cron = {
enable = true;
systemCronJobs = [
# Clean logs older than 2d
"0 20 * * * root journalctl --vacuum-time=2d"
];
};
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
allowSFTP = false; # Don't set this if you need sftp
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
users.users.${user.name} = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
initialPassword = "hunter2";
};
time.timeZone = "${user.timezone}";
i18n = {
defaultLocale = "${user.locale}";
extraLocaleSettings = {
LC_ADDRESS = "${user.locale}";
LC_IDENTIFICATION = "${user.locale}";
LC_MEASUREMENT = "${user.locale}";
LC_MONETARY = "${user.locale}";
LC_NAME = "${user.locale}";
LC_NUMERIC = "${user.locale}";
LC_PAPER = "${user.locale}";
LC_TELEPHONE = "${user.locale}";
LC_TIME = "${user.locale}";
};
};
}

39
cores/base/home.nix Normal file
View File

@ -0,0 +1,39 @@
# Base home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
programs.home-manager.enable = true;
home.username = "${user.name}";
home.homeDirectory = "/home/${user.name}";
home.sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
xdg = {
enable = true;
cacheHome = "${config.home.homeDirectory}/.cache";
configHome = "${config.home.homeDirectory}/.config";
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
};
programs.git = {
enable = true;
userName = "${user.long}";
userEmail = "${user.email}";
ignores = [
"*~"
"*.swp"
];
extraConfig = {
global = {
init.defaultbranch = "main";
};
};
};
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp exts.pass-import ]);
settings = {
PASSWORD_STORE_DIR = "${config.xdg.dataHome}/password-store";
PASSWORD_STORE_CLIP_TIME = "60";
};
};
}

61
cores/cli/default.nix Normal file
View File

@ -0,0 +1,61 @@
# CLI configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
../base
];
environment = {
localBinInPath = true;
variables = {
LIBSEAT_BACKEND = "logind";
SYSTEMD_PAGER = "";
};
sessionVariables = rec {
INPUTRC = "$XDG_CONFIG_HOME/inputrc";
# Environmental variable needed for mosh connections
LC_CTYPE = "${user.locale}";
XDG_BIN_HOME = "$HOME/.local/bin";
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
};
};
services = {
udisks2 = {
enable = true;
mountOnMedia = true;
};
};
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
wireplumber.enable = true;
};
users.users.${user.name}.packages = with pkgs; [
bashmount
bottom
cifs-utils
eva
exiftool
gpg-tui
killall
links2
mediainfo
nb
nix-du
nmap
oed
pdfgrep
pinentry
ripgrep
tmux-xpanes
ueberzugpp
];
}

View File

@ -1,9 +1,11 @@
# CLI home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
../base/home.nix
];
home.shellAliases = {
wget = "wget --hsts-file=${config.xdg.configHome}/wget-hsts";
doas = "sudo";
ls = "ls -l";
ll = "ls -alF";
trim = "awk '{\$1=\$1;print}'";
@ -11,13 +13,6 @@
home.sessionPath = [
"${config.home.homeDirectory}/.local/share/go/bin"
];
xdg.configFile = {
"cava" = {
source = ./dots/cava;
target = "cava";
recursive = true;
};
};
xdg = {
userDirs = {
enable = true;
@ -32,35 +27,23 @@
videos = "${config.home.homeDirectory}/Videos";
};
};
programs = {
go = {
goPath = "${config.xdg.dataHome}/go";
};
neovim = {
extraConfig = ''
let g:limelight_conceal_ctermfg = 'block'
'';
plugins = with pkgs.vimPlugins; [
dracula-nvim
goyo-vim
limelight-vim
twilight-nvim
vim-nix
vimwiki
zen-mode-nvim
];
};
yt-dlp = {
extraConfig = ''
--update
'';
settings = {
embed-thumbnail = true;
embed-subs = true;
sub-langs = "all";
downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
};
programs.fzf = {
enable = true;
tmux.enableShellIntegration = true;
};
programs.go = {
goPath = "${config.xdg.dataHome}/go";
};
programs.yt-dlp = {
extraConfig = ''
--update
'';
settings = {
embed-thumbnail = true;
embed-subs = true;
sub-langs = "all";
downloader = "aria2c";
downloader-args = "aria2c:'-c -x8 -s8 -k1M'";
};
};
}

125
cores/gui/default.nix Normal file
View File

@ -0,0 +1,125 @@
# GUI configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
../cli
];
xdg = {
autostart.enable = true;
mime = {
enable = true;
defaultApplications = {
"image/*" = [
"imv.desktop"
];
"text/*" = [
"${user.browser}.desktop"
];
"video/*" = [
"mpv.desktop"
];
};
};
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
];
configPackages = [
pkgs.xdg-desktop-portal-wlr
];
wlr = {
enable = true;
};
};
};
environment = {
systemPackages = with pkgs; [
libnotify
networkmanagerapplet
xdragon
xdg-utils
];
variables = {
BROWSER = "${user.browser}";
TERMINAL = "${user.term}";
VISUAL = "$EDITOR";
};
sessionVariables = {
SYSTEMD_PAGER = "";
INPUTRC = "$XDG_CONFIG_HOME/inputrc";
LIBSEAT_BACKEND = "logind";
BEMENU_OPTS = ''
--fn 'Comic Mono 12' \
--tb '#6272a4' \
--tf '#f8f8f2' \
--fb '#282a36' \
--ff '#f8f8f2' \
--nb '#282a36' \
--nf '#6272a4' \
--hb '#44475a' \
--hf '#50fa7b' \
--sb '#44475a' \
--sf '#50fa7b' \
--scb '#282a36' \
--scf '#ff79c6' \
--hp '10' \
--binding 'vim' \
--vim-esc-exits \
--ignorecase --no-overlap
'';
};
};
fonts.packages = with pkgs; [
comic-mono
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
fira-code
fira-code-symbols
fira-code-nerdfont
dina-font
];
programs.dconf = {
enable = true;
};
programs.river = {
enable = true;
extraPackages = with pkgs; [
bemenu
bemoji
cliphist
foot
grim
kanshi
mako
pinentry-bemenu
river-tag-overlay
slurp
swappy
swaylock
swww
tessen
waybar
wev
wf-recorder
wl-clipboard
wtype
];
};
# Run the following to add the Flathub repo: `flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`
services.flatpak = {
enable = true;
};
services.dbus = {
enable = true;
};
services.seatd = {
enable = true;
};
users.users.${user.name}.packages = with pkgs; [
glib
xdg-desktop-portal-wlr
];
}

View File

@ -1,24 +1,27 @@
# GUI home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
../cli/home.nix
];
gtk = {
enable = true;
font = {
name = "Comic Mono";
};
iconTheme = {
name = "dracula-icon-theme";
package = pkgs.dracula-icon-theme;
};
theme = {
name = "dracula-theme";
package = pkgs.dracula-theme;
};
};
xdg = {
systemDirs.data = [
"/var/lib/flatpak/exports/share"
"${config.xdg.dataHome}/flatpak/exports/share"
];
};
gtk = {
enable = true;
theme = {
name = "Dracula";
package = pkgs.dracula-theme;
};
iconTheme = {
name = "Dracula-Icon-Theme";
package = pkgs.dracula-icon-theme;
};
font = {
name = "Comic Mono";
};
};
}

View File

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1701728041,
"narHash": "sha256-x0pyrI1vC8evVDxCxyO6olOyr4wlFg9+VS3C3p4xFYQ=",
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ac7216918cd65f3824ba7817dea8f22e61221eaf",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"lastModified": 1708984720,
"narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
"type": "github"
},
"original": {
@ -36,28 +36,10 @@
"type": "github"
}
},
"river-bsp-layout": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1,
"narHash": "sha256-9l80YSyV6CEKAJVnJ3LoUc88O/M0b9wKbj0mMGmL6gI=",
"path": "./packages/river-bsp-layout",
"type": "path"
},
"original": {
"path": "./packages/river-bsp-layout",
"type": "path"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"river-bsp-layout": "river-bsp-layout"
"nixpkgs": "nixpkgs"
}
}
},

View File

@ -10,17 +10,17 @@
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { self, nixpkgs, home-manager }:
outputs = { nixpkgs, home-manager, ... }@inputs:
let
system = "x86_64-linux";
user = {
name = "ii";
long = "iiogama";
email = "iiogama@0x212.org";
};
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
browser = "mullvad-browser";
term = "foot";
locale = "en_US.UTF-8";
timezone = "America/Los_Angeles";
};
lib = nixpkgs.lib;
in {

View File

@ -1,206 +0,0 @@
# All home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
programs.home-manager.enable = true;
home.username = "${user.name}";
home.homeDirectory = "/home/${user.name}";
home.sessionPath = [
"${config.home.homeDirectory}/.local/bin"
];
xdg = {
enable = true;
cacheHome = "${config.home.homeDirectory}/.cache";
configHome = "${config.home.homeDirectory}/.config";
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
};
home.file = {
"bash_login" = {
source = ./dots/bash_login;
target = ".bash_login";
};
"bash_logout" = {
source = ./dots/bash_logout;
target = ".bash_logout";
};
"bashrc" = {
source = ./dots/bashrc;
target = ".bashrc";
};
};
programs.fzf = {
enable = true;
tmux.enableShellIntegration = true;
};
programs.git = {
enable = true;
userName = "${user.long}";
userEmail = "${user.email}";
ignores = [
"*~"
"*.swp"
];
extraConfig = {
global = {
init.defaultbranch = "main";
};
};
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
extraConfig = ''
syntax enable
set nowrap
set linebreak
set number
set relativenumber
set splitbelow
set splitright
set tabstop=4
set shiftwidth=4
if filereadable(expand(".vim-project"))
source .vim-project
endif
'';
};
xdg.configFile."lf/icons".source = ./dots/icons;
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 = {
"\\\"" = "";
o = "";
c = "mkdir";
"." = "set hidden!";
"`" = "mark-load";
"\\'" = "mark-load";
"<enter>" = "open";
do = "dragon-out";
"g~" = "cd";
gh = "cd";
"g/" = "/";
ee = "editor-open";
V = ''''$${pkgs.bat}/bin/bat --paging=always "$f"'';
};
settings = {
preview = true;
hidden = true;
drawbox = true;
icons = true;
ignorecase = true;
};
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
'';
};
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp exts.pass-import ]);
settings = {
PASSWORD_STORE_DIR = "XDG_DATA_HOME/password-store";
PASSWORD_STORE_CLIP_TIME = "60";
};
};
programs.tmux = {
enable = true;
baseIndex = 1;
clock24 = true;
escapeTime = 250;
historyLimit = 8000;
keyMode = "vi";
mouse = false;
newSession = false;
prefix = "C-b";
terminal = "screen-256color";
extraConfig = ''
# Do not rename windows automatically
set-option -g allow-rename off
# Hide statusbar while using one window
set -g status off
set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"'
set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"'
set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"'
set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"'
# Reload tmux.conf
unbind r
bind r source-file $HOME/.config/tmux/tmux.conf \; display "tmux config reloaded"
# Rebind vertical/horizontal splitting
unbind %
unbind v
bind v split-window -h -c "#{pane_current_path}"
unbind '"'
unbind c
bind c split-window -v -c "#{pane_current_path}"
unbind Enter
bind Enter new-window
unbind Tab
bind Tab last-window
unbind l
# Rebind moving panes
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
# Set status bar postition
set -g status-position top
# Status bar theme
set -g status-style "fg=#50fa7b"
# Window theme
setw -g window-status-current-style "bg=#50fa7b fg=#282a36"
setw -g window-status-current-format " #I:#W#F "
setw -g window-status-format "[#I:#W#F]"
'';
plugins = with pkgs; [
tmuxPlugins.urlview
tmuxPlugins.yank
];
};
home.stateVersion = "23.05";
}

View File

@ -1,16 +0,0 @@
# Chat home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
xdg.configFile = {
"catgirl" = {
source = ./dots/catgirl;
target = "catgirl";
recursive = true;
};
"senpai" = {
source = ./dots/senpai;
target = "senpai";
recursive = true;
};
};
}

View File

@ -1,4 +0,0 @@
[[ -f ~/.bashrc ]] && . ~/.bashrc
if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec river
fi

View File

@ -1,3 +0,0 @@
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

View File

@ -1,126 +0,0 @@
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
set -o vi
unset HISTFILE
# Functions
function search() {
surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
}
function mkcd {
mkdir -p $1
cd $1
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
function fe() {
IFS='
'
files=$(fzf --query="$1" --multi --select-1 --exit-0)
[ -n "$files" ] && ${EDITOR} "${files}"
}
function _track() {
TRACK_DIR=${TRACK_DIR:-.}
local lis
lis=$(find "$TRACK_DIR"/*.csv -maxdepth 1 2>/dev/null | sed -e 's/.*\///' | sed -e 's/\..*$//')
local cur
cur=${COMP_WORDS[COMP_CWORD]}
COMPREPLY=( $(compgen -W "$lis" -- "$cur") )
}
function track() {
TRACK_DIR=${TRACK_DIR:-.}
if [ $# -eq 0 ]; then
find "$TRACK_DIR"/*.csv -maxdepth 1 2>/dev/null | sed -e 's/.*\///' | sed -e 's/\..*$//'
else
case "$1" in
-h|--help)
echo "track - track a thing"
echo " "
echo "usage: track # list things tracked"
echo "usage: track (-h or --help) # show this help"
echo "usage: track [thing] # show most recent value of thing"
echo "usage: track [thing] [value] # track new value of thing for today"
echo "usage: track [thing] [options]"
echo " options:"
echo " -a, --all # show all values of thing"
echo " -n, --number # show (number) values of thing"
echo " -d, --delete # delete thing tracking"
;;
*)
local f
local fn
f="$TRACK_DIR"/"$1".csv
fn="$1"
shift
if [ $# -eq 0 ]; then
if [ ! -f "$f" ]; then
echo "track: '$fn' not found"
else
tail -n 1 "$f" | column -s, -t | awk '{printf "\033[38;05;226m%s-\033[38;05;226m%s-\033[38;05;226m%s\t\033[38;05;46m%s\t\n", $1, $2, $3, $4;}'
fi
else
if [ ! -f "$f" ]; then
echo "year,month,day,$fn" > "$f"
fi
case "$1" in
-a|--all)
column -s, -t "$f" | awk '{printf "\033[38;05;226m%s-\033[38;05;226m%s-\033[38;05;226m%s\t\033[38;05;46m%s\t\n", $1, $2, $3, $4;}'
;;
-n|--number)
tail -n "$2" "$f" | column -s, -t | awk '{printf "\033[38;05;226m%s-\033[38;05;226m%s-\033[38;05;226m%s\t\033[38;05;46m%s\t\n", $1, $2, $3, $4;}'
;;
-d|--delete)
rm "$f"
;;
*)
local d
d=$(date '+%Y,%m,%d')
local l
l=$(sed -n "/$d/{=;}" "$f")
local c
c="${*//,/-}"
if [ -z "$l" ]; then
echo "$d,$c" >> "$f"
else
sed -i "$l c $d,$c" "$f"
fi
;;
esac
fi
;;
esac
fi
}
complete -F _track track
# Environmental Variables
# Uncomment the following line if you don't like systemctl's auto-paging feature:
export SYSTEMD_PAGER=
export BEMENU_OPTS="--tb '#6272a4'\
--tf '#f8f8f2'\
--fb '#282a36'\
--ff '#f8f8f2'\
--nb '#282a36'\
--nf '#6272a4'\
--hb '#44475a'\
--hf '#50fa7b'\
--sb '#44475a'\
--sf '#50fa7b'\
--scb '#282a36'\
--scf '#ff79c6'\
--fn 'Comic Mono 12'\
--hp '10'\
--binding 'vim'\
--vim-esc-exits\
--ignorecase\
--no-overlap"

View File

@ -1,4 +0,0 @@
nick = iiogama
real = iiogama
host = irc.darkscience.net
join = #darkscience

View File

@ -1,4 +0,0 @@
nick = iiogama
real = iiogama
host = irc.libera.chat
join = #nixos

View File

@ -1,4 +0,0 @@
nick = iiogama
real = iiogama
host = irc.sdf.org
join = #anonradio

View File

@ -1,4 +0,0 @@
nick = iiogama
real = iiogama
host = irc.snoonet.org
join = #chicoca

View File

@ -1,4 +0,0 @@
nick = iiogama
real = iiogama
host = irc.tilde.chat
join = #ascii.town

View File

@ -1,210 +0,0 @@
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
; mode = normal
# Accepts only non-negative values.
; framerate = 60
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
; autosens = 1
; overshoot = 20
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
; sensitivity = 100
# The number of bars (0-200). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
; bars = 0
; bar_width = 1
; bar_spacing = 1
# bar_height is only used for output in "noritake" format
; bar_height = 32
# For SDL width and space between bars is in pixels, defaults are:
; bar_width = 20
; bar_spacing = 5
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
; lower_cutoff_freq = 50
; higher_cutoff_freq = 10000
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
; sleep_timer = 0
[input]
# Audio capturing method. Possible methods are: 'pulse', 'alsa', 'fifo', 'sndio' or 'shmem'
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
; method = pulse
; source = auto
; method = alsa
; source = hw:Loopback,1
; method = fifo
; source = /tmp/mpd.fifo
; sample_rate = 44100
; sample_bits = 16
; method = shmem
; source = /squeezelite-AA:BB:CC:DD:EE:FF
; method = portaudio
; source = auto
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake' or 'sdl'.
# 'noncurses' uses a custom framebuffer technique and prints only changes
# from frame to frame in the terminal. 'ncurses' is default if supported.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
; method = ncurses
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
# which can make ncurses not look right.
; orientation = bottom
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
; channels = mono
; mono_option = average
; reverse = 0
# Raw output target. A fifo will be created if target does not exist.
; raw_target = /dev/stdout
# Raw data format. Can be 'binary' or 'ascii'.
; data_format = binary
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
; bit_format = 16bit
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
; ascii_max_range = 1000
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
; bar_delimiter = 59
; frame_delimiter = 10
# sdl window size and position. -1,-1 is centered.
; sdl_width = 1000
; sdl_height = 500
; sdl_x = -1
; sdl_y= -1
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
; xaxis = none
# enable alacritty synchronized updates. 1 = on, 0 = off
# removes flickering in alacritty terminal emeulator.
# defaults to off since the behaviour in other terminal emulators is unknown
; alacritty_sync = 0
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within ''). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
; background = default
; foreground = default
# SDL only support hex code colors, these are the default:
; background = '#111111'
; foreground = '#33cccc'
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
; gradient = 0
; gradient_count = 8
; gradient_color_1 = '#59cc33'
; gradient_color_2 = '#80cc33'
; gradient_color_3 = '#a6cc33'
; gradient_color_4 = '#cccc33'
; gradient_color_5 = '#cca633'
; gradient_color_6 = '#cc8033'
; gradient_color_7 = '#cc5933'
; gradient_color_8 = '#cc3333'
[smoothing]
# Percentage value for integral smoothing. Takes values from 0 - 100.
# Higher values means smoother, but less precise. 0 to disable.
# DEPRECATED as of 0.8.0, use noise_reduction instead
; integral = 77
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
; monstercat = 0
; waves = 0
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
# DEPRECATED as of 0.8.0, use noise_reduction instead
; gravity = 100
# In bar height, bars that would have been lower that this will not be drawn.
# DEPRECATED as of 0.8.0
; ignore = 0
# Noise reduction, float 0 - 1. default 0.77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 1 will be very slow and smooth, 0 will be fast but noisy.
; noise_reduction = 0.77
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more then one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 1
; 3 = 1 # midtone
; 4 = 1
; 5 = 1 # treble

View File

@ -1,79 +0,0 @@
#version 330
in vec2 fragCoord;
out vec4 fragColor;
// bar values. defaults to left channels first (low to high), then right (high to low).
uniform float bars[512];
uniform int bars_count; // number of bars (left + right) (configurable)
uniform int bar_width; // bar width (configurable), not used here
uniform int bar_spacing; // space bewteen bars (configurable)
uniform vec3 u_resolution; // window resolution
//colors, configurable in cava config file (r,g,b) (0.0 - 1.0)
uniform vec3 bg_color; // background color
uniform vec3 fg_color; // foreground color
uniform int gradient_count;
uniform vec3 gradient_colors[8]; // gradient colors
vec3 normalize_C(float y,vec3 col_1, vec3 col_2, float y_min, float y_max)
{
//create color based on fraction of this color and next color
float yr = (y - y_min) / (y_max - y_min);
return col_1 * (1.0 - yr) + col_2 * yr;
}
void main()
{
// find which bar to use based on where we are on the x axis
float x = u_resolution.x * fragCoord.x;
int bar = int(bars_count * fragCoord.x);
//calculate a bar size
float bar_size = u_resolution.x / bars_count;
//the y coordinate and bar values are the same
float y = bars[bar];
// make sure there is a thin line at bottom
if (y * u_resolution.y < 1.0)
{
y = 1.0 / u_resolution.y;
}
//draw the bar up to current height
if (y > fragCoord.y)
{
//make some space between bars basen on settings
if (x > (bar + 1) * (bar_size) - bar_spacing)
{
fragColor = vec4(bg_color,1.0);
}
else
{
if (gradient_count == 0)
{
fragColor = vec4(fg_color,1.0);
}
else
{
//find which color in the configured gradient we are at
int color = int((gradient_count - 1) * fragCoord.y);
//find where on y this and next color is supposed to be
float y_min = color / (gradient_count - 1.0);
float y_max = (color + 1.0) / (gradient_count - 1.0);
//make color
fragColor = vec4(normalize_C(fragCoord.y, gradient_colors[color], gradient_colors[color + 1], y_min, y_max), 1.0);
}
}
}
else
{
fragColor = vec4(bg_color,1.0);
}
}

View File

@ -1,34 +0,0 @@
#version 330
in vec2 fragCoord;
out vec4 fragColor;
// bar values. defaults to left channels first (low to high), then right (high to low).
uniform float bars[512];
uniform int bars_count; // number of bars (left + right) (configurable)
uniform vec3 u_resolution; // window resolution, not used here
//colors, configurable in cava config file
uniform vec3 bg_color; // background color(r,g,b) (0.0 - 1.0), not used here
uniform vec3 fg_color; // foreground color, not used here
void main()
{
// find which bar to use based on where we are on the x axis
int bar = int(bars_count * fragCoord.x);
float bar_y = 1.0 - abs((fragCoord.y - 0.5)) * 2.0;
float y = (bars[bar]) * bar_y;
float bar_x = (fragCoord.x - float(bar) / float(bars_count)) * bars_count;
float bar_r = 1.0 - abs((bar_x - 0.5)) * 2;
bar_r = bar_r * bar_r * 2;
// set color
fragColor.r = fg_color.x * y * bar_r;
fragColor.g = fg_color.y * y * bar_r;
fragColor.b = fg_color.z * y * bar_r;
}

View File

@ -1,14 +0,0 @@
#version 330
// Input vertex data, different for all executions of this shader.
layout(location = 0) in vec3 vertexPosition_modelspace;
// Output data ; will be interpolated for each fragment.
out vec2 fragCoord;
void main()
{
gl_Position = vec4(vertexPosition_modelspace,1);
fragCoord = (vertexPosition_modelspace.xy+vec2(1,1))/2.0;
}

View File

@ -1,436 +0,0 @@
# See dunst(5) for all configuration options
[global]
### Display ###
# Which monitor should the notifications be displayed on.
monitor = 0
# Display notification on focused monitor. Possible modes are:
# mouse: follow mouse pointer
# keyboard: follow window with keyboard focus
# none: don't follow anything
#
# "keyboard" needs a window manager that exports the
# _NET_ACTIVE_WINDOW property.
# This should be the case for almost all modern window managers.
#
# If this option is set to mouse or keyboard, the monitor option
# will be ignored.
follow = mouse
### Geometry ###
# dynamic width from 0 to 300
# width = (0, 300)
# constant width of 300
width = 300
# The maximum height of a single notification, excluding the frame.
height = 300
# Position the notification in the top right corner
origin = bottom-right
# Offset from the origin
offset = 20x20
# Scale factor. It is auto-detected if value is 0.
scale = 0
# Maximum number of notification (0 means no limit)
notification_limit = 0
### Progress bar ###
# Turn on the progess bar. It appears when a progress hint is passed with
# for example dunstify -h int:value:12
progress_bar = true
# Set the progress bar height. This includes the frame, so make sure
# it's at least twice as big as the frame width.
progress_bar_height = 10
# Set the frame width of the progress bar
progress_bar_frame_width = 1
# Set the minimum width for the progress bar
progress_bar_min_width = 150
# Set the maximum width for the progress bar
progress_bar_max_width = 300
# Show how many messages are currently hidden (because of
# notification_limit).
indicate_hidden = yes
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.). (X11 only)
transparency = 15
# Draw a line of "separator_height" pixel height between two
# notifications.
# Set to 0 to disable.
separator_height = 1
# Padding between text and separator.
padding = 8
# Horizontal padding.
horizontal_padding = 10
# Padding between text and icon.
text_icon_padding = 0
# Defines width in pixels of frame around the notification window.
# Set to 0 to disable.
frame_width = 1
# Defines color of the frame around the notification window.
frame_color = "#bd93f9"
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = frame
# Sort messages by urgency.
sort = yes
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
# Set to 0 to disable.
# A client can set the 'transient' hint to bypass this. See the rules
# section for how to disable this if necessary
idle_threshold = 120
### Text ###
font = Comic Mono 11
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
line_height = 0
# Possible values are:
# full: Allow a small subset of html markup in notifications:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
#
# strip: This setting is provided for compatibility with some broken
# clients that send markup even though it's not enabled on the
# server. Dunst will try to strip the markup but the parsing is
# simplistic so using this option outside of matching rules for
# specific applications *IS GREATLY DISCOURAGED*.
#
# no: Disable markup parsing, incoming notifications will be treated as
# plain text. Dunst will not advertise that it has the body-markup
# capability if this is set as a global setting.
#
# It's important to note that markup inside the format option will be parsed
# regardless of what this is set to.
markup = full
# The format of the message. Possible variables are:
# %a appname
# %s summary
# %b body
# %i iconname (including its path)
# %I iconname (without its path)
# %p progress value if set ([ 0%] to [100%]) or nothing
# %n progress value if set without any extra characters
# %% Literal %
# Markup is allowed
format = "%s %p\n%b"
# Alignment of message text.
# Possible values are "left", "center" and "right".
alignment = left
# Vertical alignment of message text and icon.
# Possible values are "top", "center" and "bottom".
vertical_alignment = center
# Show age of message if message is older than show_age_threshold
# seconds.
# Set to -1 to disable.
show_age_threshold = 60
# Specify where to make an ellipsis in long lines.
# Possible values are "start", "middle" and "end".
ellipsize = middle
# Ignore newlines '\n' in notifications.
ignore_newline = no
# Stack together notifications with the same content
stack_duplicates = true
# Hide the count of stacked notifications with the same content
hide_duplicate_count = false
# Display indicators for URLs (U) and actions (A).
show_indicators = yes
### Icons ###
# Align icons left/right/off
icon_position = left
# Scale small icons up to this size, set to 0 to disable. Helpful
# for e.g. small files or high-dpi screens. In case of conflict,
# max_icon_size takes precedence over this.
min_icon_size = 0
# Scale larger icons down to this size, set to 0 to disable
max_icon_size = 64
# Paths to default icons.
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
### History ###
# Should a notification popped up from history be sticky or timeout
# as if it would normally do.
sticky_history = yes
# Maximum amount of notifications kept in history
history_length = 20
### Misc/Advanced ###
# dmenu path.
dmenu = /usr/bin/dmenu -p dunst:
# Browser for opening urls in context menu.
browser = /usr/bin/firefox -new-tab
# Always run rule-defined scripts, even if the notification is suppressed
always_run_script = true
# Define the title of the windows spawned by dunst
title = Dunst
# Define the class of the windows spawned by dunst
class = Dunst
# Define the corner radius of the notification window
# in pixel size. If the radius is 0, you have no rounded
# corners.
# The radius will be automatically lowered if it exceeds half of the
# notification height to avoid clipping text and/or icons.
corner_radius = 0
# Ignore the dbus closeNotification message.
# Useful to enforce the timeout set by dunst configuration. Without this
# parameter, an application may close the notification sent before the
# user defined timeout.
ignore_dbusclose = false
### Wayland ###
# These settings are Wayland-specific. They have no effect when using X11
# Uncomment this if you want to let notications appear under fullscreen
# applications (default: overlay)
# layer = top
# Set this to true to use X11 output on Wayland.
force_xwayland = false
### Legacy
# Use the Xinerama extension instead of RandR for multi-monitor support.
# This setting is provided for compatibility with older nVidia drivers that
# do not support RandR and using it on systems that support RandR is highly
# discouraged.
#
# By enabling this setting dunst will not be able to detect when a monitor
# is connected or disconnected which might break follow mode if the screen
# layout changes.
force_xinerama = false
### mouse
# Defines list of actions for each mouse event
# Possible values are:
# * none: Don't do anything.
# * do_action: Invoke the action determined by the action_name rule. If there is no
# such action, open the context menu.
# * open_url: If the notification has exactly one url, open it. If there are multiple
# ones, open the context menu.
# * close_current: Close current notification.
# * close_all: Close all notifications.
# * context: Open context menu for the notification.
# * context_all: Open context menu for all notifications.
# These values can be strung together for each mouse event, and
# will be executed in sequence.
mouse_left_click = close_current
mouse_middle_click = do_action, close_current
mouse_right_click = close_all
# Experimental features that may or may not work correctly. Do not expect them
# to have a consistent behaviour across releases.
[experimental]
# Calculate the dpi to use on a per-monitor basis.
# If this setting is enabled the Xft.dpi value will be ignored and instead
# dunst will attempt to calculate an appropriate dpi value for each monitor
# using the resolution and physical size. This might be useful in setups
# where there are multiple screens with very different dpi values.
per_monitor_dpi = false
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#282a36"
foreground = "#6272a4"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#new_icon = /path/to/icon
[urgency_normal]
background = "#282a36"
foreground = "#50fa7b"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#new_icon = /path/to/icon
[urgency_critical]
background = "#ff5555"
foreground = "#f8f8f2"
frame_color = "#ff5555"
timeout = 0
# Icon for notifications with critical urgency, uncomment to enable
#new_icon = /path/to/icon
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
#
# Messages can be matched by
# appname (discouraged, see desktop_entry)
# body
# category
# desktop_entry
# icon
# match_transient
# msg_urgency
# stack_tag
# summary
#
# and you can override the
# background
# foreground
# format
# frame_color
# fullscreen
# new_icon
# set_stack_tag
# set_transient
# set_category
# timeout
# urgency
# skip_display
# history_ignore
# action_name
# word_wrap
# ellipsize
# alignment
#
# Shell-like globbing will get expanded.
#
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
# GLib based applications export their desktop-entry name. In comparison to the appname,
# the desktop-entry won't get localized.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
# Disable the transient hint so that idle_threshold cannot be bypassed from the
# client
#[transient_disable]
# match_transient = yes
# set_transient = no
#
# Make the handling of transient notifications more strict by making them not
# be placed in history.
#[transient_history_ignore]
# match_transient = yes
# history_ignore = yes
# fullscreen values
# show: show the notifications, regardless if there is a fullscreen window opened
# delay: displays the new notification, if there is no fullscreen window active
# If the notification is already drawn, it won't get undrawn.
# pushback: same as delay, but when switching into fullscreen, the notification will get
# withdrawn from screen again and will get delayed like a new notification
#[fullscreen_delay_everything]
# fullscreen = delay
#[fullscreen_show_critical]
# msg_urgency = critical
# fullscreen = show
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# skip_display = true
#[history-ignore]
# # This notification will not be saved in history
# summary = "foobar"
# history_ignore = yes
#[skip-display]
# # This notification will not be displayed, but will be included in the history
# summary = "foobar"
# skip_display = yes
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
#[stack-volumes]
# appname = "some_volume_notifiers"
# set_stack_tag = "volume"
#
# vim: ft=cfg

View File

@ -1,23 +0,0 @@
font=Comic Mono:size=11
[colors]
alpha=1.0
foreground=f8f8f2
background=282a36
## Normal/regular colors (color palette 0-7)
regular0=000000
regular1=ff5555
regular2=50fa7b
regular3=f1fa8c
regular4=bd93f9
regular5=ff79c6
regular6=8be9fd
regular7=bfbfbf
## Bright colors (color palette 8-15)
bright0=4d4d4d
bright1=ff6367
bright2=5af78e
bright3=f4f99d
bright4=caa9fa
bright5=ff92d0
bright6=9aedfe
bright7=e63636

View File

@ -1,357 +0,0 @@
# 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 
*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 
*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

@ -1,4 +0,0 @@
#!/bin/sh
if [ -n "$FIFO_UEBERZUG" ]; then
printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
fi

View File

@ -1,31 +0,0 @@
# Change working dir in shell to last dir in lf on exit (adapted from ranger).
#
# You need to either copy the content of this file to your shell rc file
# (e.g. ~/.bashrc) or source this file directly:
#
# LFCD="/path/to/lfcd.sh"
# if [ -f "$LFCD" ]; then
# source "$LFCD"
# fi
#
# You may also like to assign a key to this command:
#
# bind '"\C-o":"lfcd\C-m"' # bash
# bindkey -s '^o' 'lfcd\n' # zsh
#
lfcd () {
tmp="$(mktemp)"
lf -last-dir-path="$tmp" "$@"
#./lfrun
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
rm -f "$tmp"
if [ -d "$dir" ]; then
if [ "$dir" != "$(pwd)" ]; then
cd "$dir"
fi
fi
fi
}

View File

@ -1,195 +0,0 @@
#!/bin/bash
set previewer ~/.config/lf/preview
set cleaner ~/.config/lf/cleaner
set preview true
set hidden true
set drawbox true
set icons true
set ignorecase true
cmd dragon-out %dragon-drop -a -x "$fx"
cmd dragon-multiple %dragon-drop -a $fx
cmd dragon-copy %dragoncopy
cmd dragon-in %dragonmove
# Custom Functions
cmd open ${{
case $(file --mime-type "$f" -bL) in
text/*|application/json) $EDITOR "$f";;
application/pdf) mupdf "$f";;
application/vnd.openxmlformats-officedocument.wordprocessingml.document) onlyoffice-desktopeditors "$f";;
image/*) feh "$f";;
video/*) mpv "$f";;
*) xdg-open "$f" ;;
esac
}}
cmd bulkrename $vidir
cmd bulk-rename ${{
index=$(mktemp /tmp/lf-bulk-rename-index.XXXXXXXXXX)
if [ -n "${fs}" ]; then
echo "$fs" > $index
else
echo "$(ls "$(dirname $f)" | tr ' ' "\n")" > $index
fi
index_edit=$(mktemp /tmp/lf-bulk-rename.XXXXXXXXXX)
cat $index > $index_edit
$EDITOR $index_edit
if [ $(cat $index | wc -l) -eq $(cat $index_edit | wc -l) ]; then
max=$(($(cat $index | wc -l)+1))
counter=1
while [ $counter -le $max ]; do
a="$(cat $index | sed "${counter}q;d")"
b="$(cat $index_edit | sed "${counter}q;d")"
counter=$(($counter+1))
[ "$a" = "$b" ] && continue
[ -e "$b" ] && echo "File exists: $b" && continue
mv "$a" "$b"
done
else
echo "Number of lines must stay the same"
fi
rm $index $index_edit
}}
cmd mkdir ${{
printf "Directory Name: "
read var
mkdir -p $var
}}
cmd chmod ${{
printf "Mode Bits: "
read var
for file in "$fx"
do
chmod $var $file
done
lf -remote 'send reload'
}}
cmd q ${{
exit
}}
cmd ex ${{
case "$f" in
*.zip) unzip "$f" ;;
*.tar.gz) tar -xzvf "$f" ;;
*.tar.bz2) tar -xjvf "$f" ;;
*.tar) tar -xvf "$f" ;;
*.bz2) bunzip2 "$f" ;;
*.rar) unrar x "$f" ;;
*.gz) gunzip "$f" ;;
*.tbz2) tar xjf "$f" ;;
*.tgz) tar xzf "$f" ;;
*.Z) uncompress "$f" ;;
*.7z) 7z x "$f" ;;
*.deb) ar x "$f" ;;
*.tar.xz) tar xf "$f" ;;
*.tar.zst) tar xf "$f" ;;
*) echo "Unsupported format" ;;
esac
}}
cmd zip %zip -r "$f" "$f"
cmd tar %tar cvf "$f.tar" "$f"
cmd targz %tar cvzf "$f.tar.gz" "$f"
cmd tarbz2 %tar cjvf "$f.tar.bz2" "$f"
# Trash cli bindings
cmd trash ${{
files=$(printf "$fx" | tr '\n' ';')
while [ "$files" ]; do
# extract the substring from start of string up to delimiter.
# this is the first "element" of the string.
file=${files%%;*}
trash-put "$(basename "$file")"
# if there's only one element left, set `files` to an empty string.
# this causes us to exit this `while` loop.
# else, we delete the first "element" of the string from files, and move onto the next.
if [ "$files" = "$file" ]; then
files=''
else
files="${files#*;}"
fi
done
}}
cmd mkdirfile ${{
printf "File name: "
read var
lastchar=$(echo "$var" | rev | cut -c 1 | rev)
if [ "$lastchar" = "/" ]; then
mkdir -p "$var"
else
path="$(echo "$var" | rev | cut -d'/' -f 2- | rev)"
mkdir -p "$path"
touch "$path/$(echo "$var" | rev | cut -d'/' -f 1 | rev)"
fi
}}
cmd stripspace %stripspace "$f"
# Unassigning default
map '"'
map o
map d
map e
map f
map c
# Open in editor
map ee $$EDITOR "$f"
map E $devour neovide --nofork --multigrid "$f"
# Archives
map az zip
map at tar
map ab targz
map ag targz
map au unarchive
# Basics
map . set hidden!
map D delete
map p paste
map dd cut
map y copy
map ` mark-load
map \' mark-load
map <enter> open
map c mkdirfile
map ch chmod
map a rename
map A bulk-rename
map r reload
map C clear
map U unselect
# dragon
map do dragon-out
map dM dragon-multiple
map dc dragon-copy
map di dragon-in
map g~ cd
map gh cd
map gD cd ~/Downloads
map gc cd ~/.config
map gd cd ~/dotfiles
map gM cd ~/Music
map g/ cd /
map gp cd ~/Projects
map gs cd ~/scripts
map gS cd ~/.local/share
map gm cd /run/media
map gu cd ~/uni

View File

@ -1 +0,0 @@
/nix/store/5als7sqax02sk6wcqqrm8wvqkva6ra4v-home-manager-files/.config/lf/lfrc

View File

@ -1,84 +0,0 @@
#!/bin/sh
image() {
if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then
printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
exit 1
else
chafa "$1" -s "$4x"
fi
}
batorcat() {
file="$1"
shift
if command -v bat > /dev/null 2>&1
then
bat --color=always --style=plain --theme="base16" --pager=never "$file""$@"
else
cat "$file"
fi
}
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
*.tgz|*.tar.gz) tar tzf "$1" ;;
*.tar.bz2|*.tbz2) tar tjf "$1" ;;
*.tar.txz|*.txz) xz --list "$1" ;;
*.tar) tar tf "$1" ;;
*.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;;
*.rar) unrar l "$1" ;;
*.7z) 7z l "$1" ;;
*.[1-8]) man "$1" | col -b ;;
*.o) nm "$1";;
*.torrent) transmission-show "$1" ;;
*.iso) iso-info --no-header -l "$1" ;;
*.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;;
*.doc) catdoc "$1" ;;
*.docx) docx2txt "$1" - ;;
*.xls|*.xlsx)
ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
;;
*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
exiftool "$1"
;;
*.pdf)
[ ! -f "${CACHE}.jpg" ] && \
pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
;;
*.epub)
[ ! -f "$CACHE" ] && \
epub-thumbnailer "$1" "$CACHE" 1024
image "$CACHE" "$2" "$3" "$4" "$5"
;;
*.html)
[ ! -f "$CACHE" ] && \
wkhtmltopdf "$1" - | pdftoppm -jpeg -f 1 -singlefile - "$CACHE"
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
;;
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
[ ! -f "${CACHE}.jpg" ] && \
ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
;;
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif)
image "$1" "$2" "$3" "$4" "$5"
;;
*.ino)
batorcat --language=cpp "$1"
;;
*.md)
glow -s dark "$1"
;;
*.json)
cat "$1" | jq
;;
*)
batorcat "$1"
;;
esac
exit 0

View File

@ -1,21 +0,0 @@
max-history=10
max-visible=5
anchor=bottom-right
font=Comic Mono 12
background-color=#282a36
text-color=#50fa7b
border-color=#282a36
default-timeout=10000
[urgency=low]
border-color=#282a36
text-color=#6272a4
[urgency=normal]
border-color=#bd93f9
text-color=#50fa7b
[urgency=high]
background-color=#ff5555
border-color=#ff5555
text-color=#f8f8f2

View File

@ -1,158 +0,0 @@
#!/bin/sh
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Autostart
riverctl spawn "way-displays > /tmp/way-displays.${XDG_VTNR}.${USER}.log 2>&1"
riverctl spawn "swww init"
riverctl spawn "swww img $HOME/Pictures/wallpapers/bliss-night.png --transition-type simple"
riverctl spawn "wl-paste --type text --watch cliphist store"
riverctl spawn "wl-paste --type image --watch cliphist store"
riverctl spawn "mako"
riverctl spawn "mullvad-gui"
riverctl spawn "mullvad-browser"
riverctl spawn "librewolf"
riverctl spawn "thunderbird"
riverctl spawn "steam"
riverctl spawn "discord"
riverctl spawn "signal-desktop"
# Theme
riverctl background-color 0x282a36
riverctl border-color-focused 0xbd93f9
riverctl border-color-unfocused 0x282a36
# Launch Shortcuts
riverctl map normal Super Return spawn "foot iitmux"
riverctl map normal Super+Shift Return spawn "foot"
riverctl map normal Super Space spawn "iiwmenu"
# Focus Controls
riverctl map normal Super H focus-view previous
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
riverctl map normal Super L focus-view next
riverctl map normal Alt Tab focus-view next
riverctl map normal Alt+Shift Tab focus-view previous
riverctl map normal Super Tab focus-output next
riverctl map normal Super Bracketright focus-output next
riverctl map normal Super Bracketleft focus-output previous
# Move Controls
riverctl map normal Super+Shift H zoom
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
riverctl map normal Super+Shift L swap next
riverctl map normal Super+Shift Tab send-to-output next
riverctl map normal Super+Shift Bracketright send-to-output next
riverctl map normal Super+Shift Bracketleft send-to-output previous
# Layout Controls
riverctl map normal Super+Alt H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super+Alt L send-layout-cmd rivertile "main-ratio +0.05"
riverctl map normal Super I send-layout-cmd rivertile "main-count +1"
riverctl map normal Super D send-layout-cmd rivertile "main-count -1"
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Floating Controls
riverctl map normal Super F toggle-float
riverctl map normal Super+Control H move left 100
riverctl map normal Super+Control J move down 100
riverctl map normal Super+Control K move up 100
riverctl map normal Super+Control L move right 100
riverctl map normal Super+Shift+Control H snap left
riverctl map normal Super+Shift+Control J snap down
riverctl map normal Super+Shift+Control K snap up
riverctl map normal Super+Shift+Control L snap right
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
riverctl map-pointer normal Super BTN_LEFT move-view
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Close focused view
riverctl map normal Super W close
riverctl map normal Super Q close
# Exit River
riverctl map normal Super+Shift Q exit
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i set-focused-tags $tags
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i set-view-tags $tags
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i toggle-focused-tags $tags
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i toggle-view-tags $tags
done
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 set-focused-tags $all_tags
riverctl map normal Super+Shift 0 set-view-tags $all_tags
# Toggle fullscreen
riverctl map normal None F11 toggle-fullscreen
riverctl map normal Super Z toggle-fullscreen
# Declare a passthrough mode. This mode has only a single mapping to return to
# normal mode. This makes it useful for testing a nested wayland compositor
riverctl declare-mode passthrough
# Super+F11 to enter passthrough mode
riverctl map normal Super F11 enter-mode passthrough
# Super+F11 to return to normal mode
riverctl map passthrough Super F11 enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
riverctl map $mode None XF86Eject spawn 'eject -T'
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id 'float*' -title 'foo' float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "bar" csd
# Global Configuration Settings
riverctl default-layout rivertile
rivertile -view-padding 10 -outer-padding 10 &
riverctl attach-mode bottom
riverctl hide-cursor timeout 10000
riverctl hide-cursor when-typing enabled
riverctl set-cursor-warp on-focus-change
riverctl focus-follows-cursor always

View File

@ -1,6 +0,0 @@
#!/usr/bin/env sh
escape() {
printf "%s" "$1" | sed 's#\#\\#g'
}
notify-desktop "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"

View File

@ -1,6 +0,0 @@
#address irc.pico.sh:6697
address ma.sdf.org:36036
tls false
nickname iiogama
password-cmd pass irc-pico
highlight

View File

@ -1,28 +0,0 @@
color=282a36
inside-color=1F202A
line-color=1F202A
ring-color=bd93f9
text-color=f8f8f2
layout-bg-color=1F202A
layout-text-color=f8f8f2
inside-clear-color=6272a4
line-clear-color=1F202A
ring-clear-color=6272a4
text-clear-color=1F202A
inside-ver-color=bd93f9
line-ver-color=1F202A
ring-ver-color=bd93f9
text-ver-color=1F202A
inside-wrong-color=ff5555
line-wrong-color=1F202A
ring-wrong-color=ff5555
text-wrong-color=1F202A
bs-hl-color=ff5555
key-hl-color=50fa7b
text-caps-lock-color=f8f8f2

View File

@ -1,151 +0,0 @@
#!/usr/bin/env sh
#
# program launchers
# terminal emulator
super + Return
st
# terminal emulator with tmux session menu
super + shift + Return
st -e "iitmux"
# program launcher
super + @space
iixmenu
# screenshot shortcut
super + shift + s
scrot "$HOME/Pictures/screenshots/$(date +%Y%m%d%H%M%S).jpg" -q 100 -s
# clipmenu shortcut
super + v
clipmenu
# volume controls
super + shift + bracket{left,right}
notify-desktop "Volume is now $(amixer sset Master 5%{-,+} | awk -F '[][]' '/Right:/ \{ print $2 \}')"
# make sxhkd reload its configuration files:
super + r
pkill -USR1 -x sxhkd; notify-desktop "sxhkd config reloaded"
super + shift + r
bspc wm -r; notify-desktop "bspwm config reloaded"
# close and kill
super + w
bspc node -c
super + q
test "$(printf 'Yes\nNo\n' | dmenu -i -p 'Kill node? ')" = "Yes" && bspc node -k
# alternate between the tiled and monocle layout
super + z
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,f}
bspc node -t {\~tiled,\~pseudo_tiled,\~floating}
F11
bspc node -t \~fullscreen
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
#
# focus the next/previous window in the current desktop
alt + {_,shift +} Tab
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local; notify-desktop "Workspace" "$(bspc query -D -d focused --names)"
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last; notify-desktop "Workspace" "$(bspc query -D -d focused --names)"
# send node to last desktop
super + shift + Tab
bspc node -d last --follow; notify-desktop "Workspace" "$(bspc query -D -d focused --names)"
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}' --follow; notify-desktop "Workspace" "$(bspc query -D -d focused --names)"
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east} && st
super + shift + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand/contract a window
super + alt + {h,j,k,l}
bspc node -z {left -20 0 || bspc node -z right -20 0, \
bottom 0 20 || bspc node -z top 0 20, \
top 0 -20 || bspc node -z bottom 0 -20, \
right 20 0 || bspc node -z left 20 0}
# move a floating window
super + {Left,Down,Up,Right}
bspc node -v {-40 0,0 40,0 -40,40 0}
# Move current window to a pre-selected space
super + m
bspc node -n last.!automatic
# Sticky and floating
super + s
bspc node -t floating -g sticky

View File

@ -1,80 +0,0 @@
# Default cfg.yaml for way-displays.
# Copy this to ~/.config/way-displays/cfg.yaml and edit it to your liking.
#
# See https://github.com/alex-courtis/way-displays/blob/master/doc/CONFIGURATION.md
# Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom)
ARRANGE: ROW
# Align ROWs at the TOP (default), MIDDLE or BOTTOM
# Align COLUMNs at the LEFT (default), MIDDLE or RIGHT
ALIGN: TOP
# The default ORDER is simply the order in which the displays are discovered.
# Define your own.
ORDER:
- 'DP-1'
- 'DP-2'
# Enable scaling, overrides AUTO_SCALE and SCALE
SCALING: TRUE
# The default is to scale each display by DPI.
# This may be disabled and scale 1 will be used, unless a SCALE has been specified.
AUTO_SCALE: TRUE
# Auto scale may be overridden for each display.
SCALE:
#- NAME_DESC: 'monitor description'
# SCALE: 1.75
# Override the preferred mode.
# WARNING: this may result in an unusable display. See https://github.com/alex-courtis/way-displays#known-issues-with-workarounds
# for a possible workaround.
MODE:
# Resolution and refresh
#- NAME_DESC: HDMI-A-1
# WIDTH: 1920
# HEIGHT: 1080
# HZ: 60
# Resolution with highest refresh
#- NAME_DESC: 'monitor description'
# WIDTH: 2560
# HEIGHT: 1440
# Highest available
- NAME_DESC: DP-1
MAX: TRUE
- NAME_DESC: DP-2
MAX: TRUE
# Rotate or translate the display.
# 90, 180, 270, FLIPPED, FLIPPED-90, FLIPPED-180, FLIPPED-270
TRANSFORM:
# - NAME_DESC: 'monitor description'
# TRANSFORM: 270
# VRR / adaptive sync is enabled by default. Disable it per display.
VRR_OFF:
# - DP-2
# - '!.*my monitor.*'
# Laptop displays usually start with eDP e.g. eDP-1. This may be overridden if
# your laptop is different.
#LAPTOP_DISPLAY_PREFIX: 'eDP'
# One of: ERROR, WARNING, INFO (default), DEBUG
LOG_THRESHOLD: INFO
# Disable the specified displays.
DISABLED:
#- "eDP-1"

View File

@ -1,16 +0,0 @@
#!/usr/bin/env sh
test -z "$DBUS_SESSION_BUS_ADDRESS" && eval $(dbus-launch --exit-with-session --sh-syntax)
systemctl --user import-environment DISPLAY XAUTHORITY
command -v dbus-update-activation-environment >/dev/null 2>&1 && dbus-update-activation-environment DISPLAY XAUTHORITY
xrdb ~/.Xresources &
xrandr --output DP-1 --primary --mode 2560x1440 --pos 0x0 --rotate normal --rate "164.99" --output DP-2 --mode 2560x1440 --pos 2560x0 --rotate normal --rate "164.99" --output DP-3 --off --output HDMI-1 --off --output HDMI-1-2 --off &
picom &
hsetroot -solid "#282a36" &
xbanish &
dunst &
clipmenud &
trayer --edge bottom --align right --margin 0 --widthtype request --SetDockType true --transparent true --alpha 255 &
nm-applet &
mullvad-gui &
sxhkd &
exec bspwm

View File

@ -1,34 +0,0 @@
# Wayland home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./gui.nix
];
xdg.configFile = {
"foot" = {
source = ./dots/foot;
target = "foot";
recursive = true;
};
"mako" = {
source = ./dots/mako;
target = "mako";
recursive = true;
};
"river" = {
source = ./dots/river;
target = "river";
recursive = true;
};
"swaylock" = {
source = ./dots/swaylock;
target = "swaylock";
recursive = true;
};
"way-displays" = {
source = ./dots/way-displays;
target = "way-displays";
recursive = true;
};
};
}

View File

@ -1,80 +0,0 @@
# Xorg home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./gui.nix
];
xresources.properties = {
"*.foreground" = "#f8f8f2";
"*.background" = "#282a36";
"*.color0" = "#000000";
"*.color8" = "#4d4d4d";
"*.color1" = "#ff5555";
"*.color9" = "#ff6367";
"*.color2" = "#50fa7b";
"*.color10" = "#5af78e";
"*.color3" = "#f1fa8c";
"*.color11" = "#f4f99d";
"*.color4" = "#bd93f9";
"*.color12" = "#caa9fa";
"*.color5" = "#ff79c6";
"*.color13" = "#ff92d0";
"*.color6" = "#8be9fd";
"*.color14" = "#9aedfe";
"*.color7" = "#bfbfbf";
"*.color15" = "#e63636";
"*backarrowKeyIsErase" = true;
"XTerm*renderFont" = true;
"XTerm*faceName" = "ComicMono";
"XTerm*faceSize" = 10;
"XTerm*utf8" = true;
"XTerm*ptyInitialErase" = true;
"XTerm*backarrowKeyIsErase" = false;
};
home.file = {
"xinitrc" = {
source = ./dots/xinitrc;
target = ".xinitrc";
};
};
xsession.windowManager.bspwm = {
enable = true;
rules = {
"trayer:panel:" = {
border = false;
manage = false;
};
"xdragon:Xdragon:" = {
state = "floating";
sticky = true;
};
};
settings = {
automatic_scheme = "alternate";
split_ratio = 0.60;
focus_follows_pointer = true;
pointer_follows_focus = true;
border_width = 1;
top_padding = 0;
window_gap = 24;
borderless_monocle = false;
gapless_monocle = false;
focused_border_color = "#bd93f9";
normal_border_color = "#282a36";
presel_feedback_color = "#282a36";
};
};
xdg.configFile = {
"dunst" = {
source = ./dots/dunst;
target = "dunst";
recursive = true;
};
"sxhkd" = {
source = ./dots/sxhkd;
target = "sxhkd";
recursive = true;
executable = true;
};
};
}

View File

@ -0,0 +1,30 @@
# Base configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
let
hostname="nixos";
in
{
imports = [
./hardware-configuration.nix
];
boot = {
loader.grub = {
enable = true;
device = "/dev/vda";
useOSProber = true;
};
# Hardware-configuration edits
kernel.sysctl."net.ipv4.ip_forward" = 1;
};
networking = {
hostName = "${hostname}";
firewall = {
enable = true;
};
};
environment = {
systemPackages = with pkgs; [
cloud-utils
];
};
}

View File

@ -6,33 +6,26 @@ in
{
imports = [
./hardware-configuration.nix
../../modules/nixos/full.nix
];
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
timeout = 2;
};
tmp.cleanOnBoot = true;
};
networking = {
hostName = "${hostname}";
firewall = {
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
};
wireless.enable = false;
};
environment = {
systemPackages = with pkgs; [
virtiofsd
];
};
virtualisation.libvirtd.enable = true;
services = {
greetd = {
enable = true;
settings = {
default_session = {
#command = "${pkgs.greetd.tuigreet}/bin/tuigreet -c river";
command = "${pkgs.greetd.greetd}/bin/agreety --cmd river";
};
};
};
davfs2 = {
enable = true;
};
@ -40,14 +33,6 @@ in
enable = true;
package = pkgs.mullvad-vpn;
};
transmission = {
enable = true;
openFirewall = true;
};
udisks2 = {
enable = true;
mountOnMedia = true;
};
borgbackup = {
jobs."daily" = {
paths = [
@ -72,12 +57,18 @@ in
};
};
};
programs.virt-manager.enable = true;
users.users.${user.name} = {
extraGroups = [ "davfs2" "libvirtd" "transmission" ];
extraGroups = [ "davfs2" ];
packages = with pkgs; [
mixxx
polychromatic
bitwarden
btfs
cava
lavat
nushell
python311Packages.eyeD3
tagutil
#greetd.tuigreet
];
};
system.stateVersion = "23.11";
}

View File

@ -10,6 +10,17 @@
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
boot.extraModulePackages = [ ];
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
timeout = 2;
};
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/c9833e85-0ea9-45a9-b65d-039c8c4f71f3";
fsType = "ext4";

View File

@ -1,68 +1,39 @@
# Buckwheat home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
xsession.windowManager.bspwm = {
monitors = {
DP-1 = [
"1"
"2"
"3"
"4"
"5"
];
DP-2 = [
"6"
"7"
"8"
"9"
"0"
];
};
};
imports = [
../../modules/home-manager/bash.nix
../../modules/home-manager/cava.nix
../../modules/home-manager/foot.nix
../../modules/home-manager/mako.nix
../../modules/home-manager/neovim.nix
../../modules/home-manager/river.nix
../../modules/home-manager/senpai.nix
../../modules/home-manager/swappy.nix
../../modules/home-manager/swaylock.nix
../../modules/home-manager/tmux.nix
../../modules/home-manager/waybar.nix
];
services = {
udiskie = {
kanshi = {
enable = true;
automount = true;
notify = true;
settings = {
program_options = {
udisks_version = 2;
profiles = {
default = {
outputs = [
{
criteria = "DP-1";
position = "0,0";
mode = "2560x1440@164.99Hz";
}
{
criteria = "DP-2";
position = "2560,0";
mode = "2560x1440@164.99Hz";
}
];
};
icon_names.media = [
"media-optical"
];
};
};
};
systemd.user.services = {
cmus-library-refresh = {
Unit = {
Description = "cmus library refresh to add any new songs";
};
Service = {
Type = "oneshot";
ExecStart = toString (
pkgs.writeShellScript "cmus-library-refresh" ''
set -eou pipefail
${pkgs.bash}/bin/bash "/home/${user.name}/.local/bin/cmus_library_refresh.sh";
''
);
};
Install.WantedBy = [ "default.target" ];
};
};
systemd.user.timers = {
cmus_library_refresh = {
Unit = {
Description = "cmus library refresh to add any new songs";
Documentation = [ "man:cmus-remote(1)" ];
};
Timer = {
Unit = "cmus_library_refresh";
OnBootSec = "5m";
OnUnitActiveSec = "1h";
};
Install.WantedBy = [ "timers.target" ];
};
};
home.stateVersion = "23.11";
}

View File

@ -5,23 +5,15 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../nixos/all.nix
../nixos/cli.nix
../nixos/chat.nix
../nixos/wayland.nix
../nixos/gaming.nix
../nixos/office.nix
../cores/gui
./buckwheat/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.extraSpecialArgs = { inherit user inputs; };
home-manager.users.${user.name} = {
imports = [
../home-manager/all.nix
../home-manager/cli.nix
../home-manager/chat.nix
../home-manager/wayland.nix
../cores/gui/home.nix
./buckwheat/home.nix
];
};
@ -32,11 +24,7 @@
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../nixos/all.nix
../nixos/cli.nix
../nixos/xorg.nix
../nixos/office.nix
../nixos/pentest.nix
../cores/gui
./fireweed/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
@ -44,31 +32,45 @@
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user.name} = {
imports = [
../home-manager/all.nix
../home-manager/cli.nix
../home-manager/xorg.nix
../cores/gui/home.nix
./fireweed/home.nix
];
};
}
];
};
vm = lib.nixosSystem {
clover = lib.nixosSystem {
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../nixos/all.nix
../nixos/cli.nix
./vm/configuration.nix
../cores/gui
./clover/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user.name} = {
imports = [
../home-manager/all.nix
../home-manager/cli.nix
./vm/home.nix
../cores/gui/home.nix
./clover/home.nix
];
};
}
];
};
base = lib.nixosSystem {
inherit system;
specialArgs = { inherit user inputs; };
modules = [
../cores/base
./base/configuration.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user.name} = {
imports = [
../cores/base/home.nix
];
};
}

View File

@ -6,6 +6,7 @@ in
{
imports = [
./hardware-configuration.nix
../../modules/nixos/full.nix
];
boot = {
loader = {
@ -27,35 +28,21 @@ in
networking = {
hostName = "${hostname}"; # Define your hostname.
firewall = {
# To disable the firewall altogether:
# enable = false;
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
};
# Proxy configuration
# proxy = {
# default = "http://user:password@proxy:port/";
# noProxy = "127.0.0.1,localhost,internal.domain";
# };
};
users.users.${user.name} = {
extraGroups = [ "davfs2" ];
packages = with pkgs; [
];
};
services = {
davfs2 = {
cage = {
enable = true;
program = "${pkgs.foot}/bin/foot";
user = "${user.name}";
};
mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
udisks2 = {
enable = true;
mountOnMedia = true;
};
# Enable automatic login for the user.
# getty.autologinUser = "${user.name}";
};
system.stateVersion = "24.05";
}

View File

@ -1,19 +1,11 @@
# Fireweed home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
services = {
udiskie = {
enable = true;
automount = true;
notify = true;
settings = {
program_options = {
udisks_version = 2;
};
icon_names.media = [
"media-optical"
];
};
};
};
imports = [
../../modules/home-manager/bash.nix
../../modules/home-manager/foot.nix
../../modules/home-manager/neovim.nix
../../modules/home-manager/tmux.nix
];
home.stateVersion = "23.11";
}

View File

@ -1,47 +0,0 @@
# NixOS VM configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
let
hostname="nixos";
in
{
imports = [
./hardware-configuration.nix
];
boot = {
loader.grub = {
enable = true;
device = "/dev/vda";
useOSProber = true;
};
# Hardware-configuration edits
kernel.sysctl."net.ipv4.ip_forward" = 1;
# Clean /tmp at boot
tmp.cleanOnBoot = true;
};
networking = {
hostName = "${hostname}"; # Define your hostname.
firewall = {
# To disable the firewall altogether:
# enable = false;
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
};
# Proxy configuration
# proxy = {
# default = "http://user:password@proxy:port/";
# noProxy = "127.0.0.1,localhost,internal.domain";
# };
};
users.users.${user.name} = {
extraGroups = [
];
packages = with pkgs; [
];
};
services = {
# Enable automatic login for the user.
getty.autologinUser = "${user.name}";
};
}

View File

@ -1,123 +0,0 @@
# Buckwheat configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
let
hostname="buckwheat";
in
{
imports = [
./hardware-configuration.nix
];
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
efi.efiSysMountPoint = "/boot/efi";
timeout = 2;
};
# Hardware-configuration edits
kernel.sysctl."net.ipv4.ip_forward" = 1;
# Clean /tmp at boot
tmp.cleanOnBoot = true;
};
networking = {
hostName = "${hostname}"; # Define your hostname.
firewall = {
# To disable the firewall altogether:
# enable = false;
allowedTCPPorts = [ 445 139 ];
allowedUDPPorts = [ 137 138 ];
};
# Proxy configuration
# proxy = {
# default = "http://user:password@proxy:port/";
# noProxy = "127.0.0.1,localhost,internal.domain";
# };
};
users.users.${user.name} = {
extraGroups = [ "davfs2" "libvirtd" "transmission" ];
packages = with pkgs; [
mixxx
virt-manager
];
};
services = {
davfs2 = {
enable = true;
};
mullvad-vpn = {
enable = true;
package = pkgs.mullvad-vpn;
};
transmission = {
enable = true;
openFirewall = true;
};
udisks2 = {
enable = true;
mountOnMedia = true;
};
# Enable automatic login for the user.
# getty.autologinUser = "${user.name}";
};
virtualisation.libvirtd.enable = true;
# Borg backup configuration
services.borgbackup.jobs."daily" = {
paths = [
"/home"
];
exclude = [
"/home/*/go/bin"
"/home/*/go/pkg"
];
repo = "/mnt/daily/buckwheat";
encryption = {
mode = "repokey-blake2";
passCommand = "cat /root/borgbackup/passphrase";
};
compression = "auto,lzma";
startAt = "daily";
prune.keep = {
within = "7d";
};
};
services.borgbackup.jobs."weekly" = {
paths = [
"/home"
];
exclude = [
"/home/*/go/bin"
"/home/*/go/pkg"
];
repo = "/mnt/weekly/buckwheat";
encryption = {
mode = "repokey-blake2";
passCommand = "cat /root/borgbackup/passphrase";
};
compression = "auto,lzma";
startAt = "weekly";
};
#services.borgbackup.jobs."borgbase" = {
# paths = [
# "/home"
# ];
# exclude = [
# "/home/*/go/bin"
# "/home/*/go/pkg"
# ];
# repo = "<repo_hash>.repo.borgbase.com:repo";
# encryption = {
# mode = "repokey-blake2";
# passCommand = "cat /root/borgbackup/passphrase";
# };
# environment.BORG_RSH = "ssh -i /root/borgbackup/ssh_key";
# compression = "auto,lzma";
# startAt = "daily";
#};
}

View File

@ -1,6 +0,0 @@
# NixOS VM home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
services = {
};
}

View File

@ -0,0 +1,80 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "downloads"; # Define your hostname.
networking.firewall.enable = false;
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.ii = {
isNormalUser = true;
description = "iiogama";
extraGroups = [ "networkmanager" "transmission" "wheel" ];
packages = with pkgs; [];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
cloud-utils
git
vim
rsync
wget
];
services.mullvad-vpn = {
enable = true;
};
services.openssh = {
enable = true;
};
services.transmission = {
enable = true;
settings = {
rpc-bind-address = "0.0.0.0";
rpc-whitelist-enabled = true;
rpc-whitelist = "192.168.1.2";
};
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -0,0 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/dafe55ed-a1e2-4e0e-a885-4748f625350f";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -0,0 +1,74 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
networking.hostName = "downloads"; # Define your hostname.
networking.firewall.enable = true;
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Define a user account. Don't forget to set a password with passwd.
users.users.ii = {
isNormalUser = true;
description = "iiogama";
extraGroups = [ "networkmanager" "transmission" "wheel" ];
packages = with pkgs; [];
};
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
cloud-utils
git
vim
rsync
wget
];
services.openssh = {
enable = true;
};
services.jellyfin = {
enable = true;
};
services.jellyseerr = {
enable = true;
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

View File

@ -0,0 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/dafe55ed-a1e2-4e0e-a885-4748f625350f";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@ -0,0 +1,126 @@
{ pkgs, config, user, ... }:
{
home.file = {
".bash_login" = {
enable = true;
text = ''
[[ -f ~/.bashrc ]] && . ~/.bashrc
#if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
# exec river
#fi
'';
};
".bash_logout" = {
enable = true; text = ''
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
'';
};
".bashrc" = {
enable = true;
text = ''
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
set -o vi
unset HISTFILE
# Aliases
alias mkfoo='. $HOME/.local/bin/mkfoo.sh'
alias ed='ed -p "> "'
alias info='info --vi-keys'
alias matrix="unimatrix -f -l ocCgGkS -s 93"
alias ematrix="unimatrix -c yellow -l 'e'"
# Functions
function ranstr() {
COUNT=$1
head -c $COUNT /dev/random | base64 | head -c $COUNT
}
function get-ssh() {
if [ ! -f $HOME/.ssh/id_ed25519.pub ]; then
ssh-keygen -t ed25519 -C "${user.email}"
fi
cat $HOME/.ssh/id_ed25519.pub
}
function home() {
cd
clear
}
function search() {
surfraw $(surfraw -elvi | fzf | awk '{print $1;}')
}
function mkcd {
mkdir -p $1
cd $1
}
# fe [FUZZY PATTERN] - Open the selected file with the default editor
# - Bypass fuzzy finder if there's only one match (--select-1)
# - Exit if there's no match (--exit-0)
function fe() {
IFS='
'
files=$(fzf --query="$1" --multi --select-1 --exit-0)
[ -n "$files" ] && "$EDITOR" "$files"
}
# Environmental Variables
# Uncomment the following line if you don't like systemctl's auto-paging feature:
export PS1="\n\u@\h:\w (\j)\n$? \$ "
#export SYSTEMD_PAGER=
#export INPUTRC="$XDG_CONFIG_HOME/inputrc"
#export LIBSEAT_BACKEND=logind
#export BEMENU_OPTS="--fn 'Comic Mono 12'\
# --tb '#6272a4'\
# --tf '#f8f8f2'\
# --fb '#282a36'\
# --ff '#f8f8f2'\
# --nb '#282a36'\
# --nf '#6272a4'\
# --hb '#44475a'\
# --hf '#50fa7b'\
# --sb '#44475a'\
# --sf '#50fa7b'\
# --scb '#282a36'\
# --scf '#ff79c6'\
# --hp '10'\
# --binding 'vim'\
# --vim-esc-exits\
# --ignorecase\
# --no-overlap"
eval "$(zoxide init bash)"
'';
};
};
xdg.configFile = {
"inputrc" = {
enable = true;
executable = true;
text = ''
$include /etc/inputrc
set completion-ignore-case on
set completion-map-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on
set completion-query-items 0
set bell-style none
set blink-matching-paren on
set colored-completion-prefix on
set colored-stats on
set completion-prefix-display-length 5
set menu-complete-display-prefix on
set horizontal-scroll-mode on
set mark-directories on
set skip-completed-text on
set visibile-stats on
$if Bash
set completion-map-case on
$end
"\t": menu-complete
"\e[Z": menu-complete-backward
'';
};
};
}

View File

@ -0,0 +1,221 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"cava/config" = {
enable = true;
executable = false;
text = ''
## Configuration file for CAVA. Default values are commented out. Use either ';' or '#' for commenting.
[general]
# Smoothing mode. Can be 'normal', 'scientific' or 'waves'. DEPRECATED as of 0.6.0
; mode = normal
# Accepts only non-negative values.
; framerate = 60
# 'autosens' will attempt to decrease sensitivity if the bars peak. 1 = on, 0 = off
# new as of 0.6.0 autosens of low values (dynamic range)
# 'overshoot' allows bars to overshoot (in % of terminal height) without initiating autosens. DEPRECATED as of 0.6.0
; autosens = 1
; overshoot = 20
# Manual sensitivity in %. If autosens is enabled, this will only be the initial value.
# 200 means double height. Accepts only non-negative values.
; sensitivity = 100
# The number of bars (0-200). 0 sets it to auto (fill up console).
# Bars' width and space between bars in number of characters.
; bars = 0
; bar_width = 1
; bar_spacing = 1
# bar_height is only used for output in "noritake" format
; bar_height = 32
# For SDL width and space between bars is in pixels, defaults are:
; bar_width = 20
; bar_spacing = 5
# Lower and higher cutoff frequencies for lowest and highest bars
# the bandwidth of the visualizer.
# Note: there is a minimum total bandwidth of 43Mhz x number of bars.
# Cava will automatically increase the higher cutoff if a too low band is specified.
; lower_cutoff_freq = 50
; higher_cutoff_freq = 10000
# Seconds with no input before cava goes to sleep mode. Cava will not perform FFT or drawing and
# only check for input once per second. Cava will wake up once input is detected. 0 = disable.
; sleep_timer = 0
[input]
# Audio capturing method. Possible methods are: 'pulse', 'alsa', 'fifo', 'sndio' or 'shmem'
# Defaults to 'pulse', 'alsa' or 'fifo', in that order, dependent on what support cava was built with.
#
# All input methods uses the same config variable 'source'
# to define where it should get the audio.
#
# For pulseaudio 'source' will be the source. Default: 'auto', which uses the monitor source of the default sink
# (all pulseaudio sinks(outputs) have 'monitor' sources(inputs) associated with them).
#
# For alsa 'source' will be the capture device.
# For fifo 'source' will be the path to fifo-file.
# For shmem 'source' will be /squeezelite-AA:BB:CC:DD:EE:FF where 'AA:BB:CC:DD:EE:FF' will be squeezelite's MAC address
; method = pulse
; source = auto
; method = alsa
; source = hw:Loopback,1
; method = fifo
; source = /tmp/mpd.fifo
; sample_rate = 44100
; sample_bits = 16
; method = shmem
; source = /squeezelite-AA:BB:CC:DD:EE:FF
; method = portaudio
; source = auto
[output]
# Output method. Can be 'ncurses', 'noncurses', 'raw', 'noritake' or 'sdl'.
# 'noncurses' uses a custom framebuffer technique and prints only changes
# from frame to frame in the terminal. 'ncurses' is default if supported.
#
# 'raw' is an 8 or 16 bit (configurable via the 'bit_format' option) data
# stream of the bar heights that can be used to send to other applications.
# 'raw' defaults to 200 bars, which can be adjusted in the 'bars' option above.
#
# 'noritake' outputs a bitmap in the format expected by a Noritake VFD display
# in graphic mode. It only support the 3000 series graphical VFDs for now.
#
# 'sdl' uses the Simple DirectMedia Layer to render in a graphical context.
; method = ncurses
# Orientation of the visualization. Can be 'bottom', 'top', 'left' or 'right'.
# Default is 'bottom'. Other orientations are only supported on sdl and ncruses
# output. Note: many fonts have weird glyphs for 'top' and 'right' characters,
# which can make ncurses not look right.
; orientation = bottom
# Visual channels. Can be 'stereo' or 'mono'.
# 'stereo' mirrors both channels with low frequencies in center.
# 'mono' outputs left to right lowest to highest frequencies.
# 'mono_option' set mono to either take input from 'left', 'right' or 'average'.
# set 'reverse' to 1 to display frequencies the other way around.
; channels = mono
; mono_option = average
; reverse = 0
# Raw output target. A fifo will be created if target does not exist.
; raw_target = /dev/stdout
# Raw data format. Can be 'binary' or 'ascii'.
; data_format = binary
# Binary bit format, can be '8bit' (0-255) or '16bit' (0-65530).
; bit_format = 16bit
# Ascii max value. In 'ascii' mode range will run from 0 to value specified here
; ascii_max_range = 1000
# Ascii delimiters. In ascii format each bar and frame is separated by a delimiters.
# Use decimal value in ascii table (i.e. 59 = ';' and 10 = '\n' (line feed)).
; bar_delimiter = 59
; frame_delimiter = 10
# sdl window size and position. -1,-1 is centered.
; sdl_width = 1000
; sdl_height = 500
; sdl_x = -1
; sdl_y= -1
# set label on bars on the x-axis. Can be 'frequency' or 'none'. Default: 'none'
# 'frequency' displays the lower cut off frequency of the bar above.
# Only supported on ncurses and noncurses output.
; xaxis = none
# enable alacritty synchronized updates. 1 = on, 0 = off
# removes flickering in alacritty terminal emeulator.
# defaults to off since the behaviour in other terminal emulators is unknown
; alacritty_sync = 0
[color]
# Colors can be one of seven predefined: black, blue, cyan, green, magenta, red, white, yellow.
# Or defined by hex code '#xxxxxx' (hex code must be within single quotes). User defined colors requires
# a terminal that can change color definitions such as Gnome-terminal or rxvt.
# default is to keep current terminal color
; background = default
; foreground = default
# SDL only support hex code colors, these are the default:
; background = '#111111'
; foreground = '#33cccc'
# Gradient mode, only hex defined colors are supported,
# background must also be defined in hex or remain commented out. 1 = on, 0 = off.
# You can define as many as 8 different colors. They range from bottom to top of screen
; gradient = 0
; gradient_count = 8
; gradient_color_1 = '#59cc33'
; gradient_color_2 = '#80cc33'
; gradient_color_3 = '#a6cc33'
; gradient_color_4 = '#cccc33'
; gradient_color_5 = '#cca633'
; gradient_color_6 = '#cc8033'
; gradient_color_7 = '#cc5933'
; gradient_color_8 = '#cc3333'
[smoothing]
# Percentage value for integral smoothing. Takes values from 0 - 100.
# Higher values means smoother, but less precise. 0 to disable.
# DEPRECATED as of 0.8.0, use noise_reduction instead
; integral = 77
# Disables or enables the so-called "Monstercat smoothing" with or without "waves". Set to 0 to disable.
; monstercat = 0
; waves = 0
# Set gravity percentage for "drop off". Higher values means bars will drop faster.
# Accepts only non-negative values. 50 means half gravity, 200 means double. Set to 0 to disable "drop off".
# DEPRECATED as of 0.8.0, use noise_reduction instead
; gravity = 100
# In bar height, bars that would have been lower that this will not be drawn.
# DEPRECATED as of 0.8.0
; ignore = 0
# Noise reduction, float 0 - 1. default 0.77
# the raw visualization is very noisy, this factor adjusts the integral and gravity filters to keep the signal smooth
# 1 will be very slow and smooth, 0 will be fast but noisy.
; noise_reduction = 0.77
[eq]
# This one is tricky. You can have as much keys as you want.
# Remember to uncomment more then one key! More keys = more precision.
# Look at readme.md on github for further explanations and examples.
; 1 = 1 # bass
; 2 = 1
; 3 = 1 # midtone
; 4 = 1
; 5 = 1 # treble
'';
};
};
}

View File

@ -0,0 +1,42 @@
{ pkgs, config, ... }:
{
programs.foot = {
enable = true;
settings = {
main = {
font = "Comic Mono:size=12";
};
colors = {
alpha = 1.0;
background = "282a36";
foreground = "f8f8f2";
regular0 = "21222c";
regular1 = "ff5555";
regular2 = "50fa7b";
regular3 = "f1fa8c";
regular4 = "bd93f9";
regular5 = "ff79c6";
regular6 = "8be9fd";
regular7 = "f8f8f2";
bright0 = "6272a4";
bright1 = "ff6e6e";
bright2 = "69ff94";
bright3 = "ffffa5";
bright4 = "d6acff";
bright5 = "ff92df";
bright6 = "a4ffff";
bright7 = "ffffff";
selection-foreground = "ffffff";
selection-background = "44475a";
urls = "8be9fd";
};
url = {
launch = "xdg-open $\{url\}";
protocols = "http, https, ftp, ftps, file, gemini, gopher";
};
key-bindings = {
show-urls-copy = "Control+Shift+y";
};
};
};
}

View File

@ -0,0 +1,7 @@
{ pkgs, config, ... }:
{
programs.gpg = {
enable = true;
homedir = "${config.xdg.dataHome}/gnupg";
};
}

View File

@ -0,0 +1,29 @@
{ pkgs, config, ... }:
{
services.mako = {
enable = true;
backgroundColor = "#282A36";
borderColor = "#BD93F9";
borderRadius = 5;
borderSize = 2;
margin = "13";
textColor = "#F8F8F2";
anchor = "bottom-right";
layer = "overlay";
maxVisible = 5;
font = "Comic Mono 12";
defaultTimeout = 10000;
extraConfig = ''
[urgency=low]
border-color=#282A36
text-color=#F8F8F2
[urgency=normal]
border-color=#BD93F9
text-color=#F8F8F2
[urgency=high]
background-color=#FF5555
border-color=#FF5555
text-color=#F8F8F2
'';
};
}

View File

@ -0,0 +1,30 @@
{ pkgs, config, user, ... }:
{
home = {
file = {
".nbrc" = {
enable = true;
text = ''
#!/usr/bin/env bash
###############################################################################
# .nbrc
#
# Configuration file for `nb`, a command line note-taking, bookmarking,
# and knowledge base application with encryption, search, Git-backed syncing,
# and more in a single portable script.
#
# Edit this file manually or manage settings using the `nb settings`
# subcommand. Configuration options are set as environment variables, eg:
# export NB_ENCRYPTION_TOOL=gpg
#
# https://github.com/xwmx/nb
###############################################################################
export NB_DIR="${NB_DIR:-/home/ii/Documents/notes}" # Set by `nb` • Fri Nov 3 10:12:09 PM PDT 2023
export NB_COLOR_THEME="${NB_COLOR_THEME:-unicorn}" # Set by `nb` • Sun Nov 5 04:21:55 PM PST 2023
'';
};
};
};
}

View File

@ -0,0 +1,37 @@
# CLI home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
programs.neovim = {
enable = true;
extraConfig = ''
syntax enable
set wrap
set nospell
set linebreak
set number
set relativenumber
set splitbelow
set splitright
set tabstop=4
set shiftwidth=4
let mapleader = " "
if filereadable(expand(".vim-project"))
source .vim-project
endif
let g:limelight_conceal_ctermfg = 'block'
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
'';
plugins = with pkgs.vimPlugins; [
goyo-vim
limelight-vim
plenary-nvim
telescope-nvim
vim-numbertoggle
vim-nix
vimwiki
];
};
}

View File

@ -0,0 +1,202 @@
{ pkgs, config, ... }:
{
wayland.windowManager.river = {
enable = true;
extraSessionVariables = {
MINIMIZED = "$((1 << 20))";
ALL_TAGS = "$(((1 << 32) - 1))";
ALL_BUT_MINIMIZED = "$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))";
};
settings = {
background-color = "0x282A36";
border-color-focused = "0xBD93F9";
border-color-unfocused = "0x282A36";
border-width = 2;
declare-mode = [
"locked"
"normal"
"passthrough"
"command"
];
set-repeat = "50 300";
default-layout = "rivertile";
attach-mode = "bottom";
hide-cursor = {
timeout = "10000";
when-typing = "enabled";
};
set-cursor-warp = "on-focus-change";
focus-follows-cursor = "always";
rule-add = {
"'bar'" = "csd";
"-app-id" = {
"'float*'" = {
"-title" = {
"'foo'" = "float";
};
};
};
};
spawn = [
"'dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river'"
"'systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river'"
"kanshi"
"waybar"
"'river-tag-overlay --border-width 0 --square-inactive-background-colour 0x282A36 --square-inactive-border-colour 0x282A36 --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000'"
"mako"
"'wl-paste --type text --watch cliphist store'"
"'wl-paste --type image --watch cliphist store'"
"mullvad-gui"
"nm-applet"
];
map-pointer = {
normal = {
"Super BTN_LEFT" = "move-view";
"Super BTN_RIGHT" = "resize-view";
};
};
map = {
command = {
"None 1" = "spawn 'mullvad-browser'";
"None 2" = "spawn 'librewolf'";
"None 3" = "spawn 'libreoffice'";
"None 4" = "spawn 'thunderbird'";
"None 5" = "spawn 'discord'";
"None 6" = "spawn 'signal-desktop'";
"None 9" = "spawn 'steam'";
"None Z" = "spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'";
"None+Shift Comma" = "spawn 'playerctl previous; riverctl enter-mode normal'";
"None Space" = "spawn 'playerctl play-pause; riverctl enter-mode normal'";
"None+Shift Period" = "spawn 'playerctl next; riverctl enter-mode normal'";
"None Escape" = "enter-mode normal";
};
locked = {
"None XF86Eject" = "spawn 'eject -T'";
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
"None XF86AudioMute" = "spawn 'pamixer --toggle-mute'";
"None XF86AudioMedia" = "spawn 'playerctl play-pause'";
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None XF86AudioPrev" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
"None XF86MonBrightnessUp" = "spawn 'light -A 5'";
"None XF86MonBrightnessDown" = "spawn 'light -U 5'";
};
normal = {
# Launch Shortcuts
"Super Return" = "spawn 'foot tmux.sh'";
"Super+Shift Return" = "spawn foot";
"Super Space" = "spawn 'wmenu.sh'";
"Super+Shift S" = "spawn 'grim -g $(slurp) - | swappy -f -'";
"Super+Shift V" = "spawn 'cliphist list | bemenu -p Cliphist -l 10 | cliphist decode | wl-copy'";
# Focus Controls
"Super H" = "focus-view previous";
"Super J" = "focus-view next";
"Super K" = "focus-view previous";
"Super L" = "focus-view next";
"Alt Tab" = "focus-view next";
"Alt+Shift Tab" = "focus-view previous";
"Super P" = "focus-previous-tags";
"Super Tab" = "focus-output next";
"Super U" = "focus-output next";
"Super+Shift U" = "send-to-output next";
# Move Controls
"Super+Shift H" = "swap previous";
"Super+Shift J" = "swap next";
"Super+Shift K" = "swap previous";
"Super+Shift L" = "swap next";
"Super+Shift Space" = "zoom";
"Super+Shift P" = "send-to-previous-tags";
"Super+Shift Tab" = "send-to-output next";
# Layout Controls
"Super+Alt H" = "send-layout-cmd rivertile 'main-ratio -0.05'";
"Super+Alt L" = "send-layout-cmd rivertile 'main-ratio +0.05'";
"Super I" = "send-layout-cmd rivertile 'main-count +1'";
"Super+Shift I" = "send-layout-cmd rivertile 'main-count -1'";
"Super Up" = "send-layout-cmd rivertile 'main-location top'";
"Super Right" = "send-layout-cmd rivertile 'main-location right'";
"Super Down" = "send-layout-cmd rivertile 'main-location bottom'";
"Super Left" = "send-layout-cmd rivertile 'main-location left'";
# Floating Controls
"Super+Shift F" = "toggle-float";
"Super+Control H" = "move left 100";
"Super+Control J" = "move down 100";
"Super+Control K" = "move up 100";
"Super+Control L" = "move right 100";
"Super+Shift+Control H" = "snap left";
"Super+Shift+Control J" = "snap down";
"Super+Shift+Control K" = "snap up";
"Super+Shift+Control L" = "snap right";
"Super+Alt+Shift H" = "resize horizontal -100";
"Super+Alt+Shift J" = "resize vertical 100";
"Super+Alt+Shift K" = "resize vertical -100";
"Super+Alt+Shift L" = "resize horizontal 100";
"Super W" = "close";
"Super Q" = "close";
"Super+Shift Q" ="exit";
"Super 1" = "spawn 'riverctl set-focused-tags 1'";
"Super 2" = "spawn 'riverctl set-focused-tags 2'";
"Super 3" = "spawn 'riverctl set-focused-tags 4'";
"Super 4" = "spawn 'riverctl set-focused-tags 8'";
"Super 5" = "spawn 'riverctl set-focused-tags 16'";
"Super 6" = "spawn 'riverctl set-focused-tags 32'";
"Super 7" = "spawn 'riverctl set-focused-tags 64'";
"Super 8" = "spawn 'riverctl set-focused-tags 128'";
"Super 9" = "spawn 'riverctl set-focused-tags 256'";
"Super+Shift 1" = "spawn 'riverctl set-view-tags 1'";
"Super+Shift 2" = "spawn 'riverctl set-view-tags 2'";
"Super+Shift 3" = "spawn 'riverctl set-view-tags 4'";
"Super+Shift 4" = "spawn 'riverctl set-view-tags 8'";
"Super+Shift 5" = "spawn 'riverctl set-view-tags 16'";
"Super+Shift 6" = "spawn 'riverctl set-view-tags 32'";
"Super+Shift 7" = "spawn 'riverctl set-view-tags 64'";
"Super+Shift 8" = "spawn 'riverctl set-view-tags 128'";
"Super+Shift 9" = "spawn 'riverctl set-view-tags 256'";
"Super+Control 1" = "spawn 'riverctl toggle-focused-tags 1'";
"Super+Control 2" = "spawn 'riverctl toggle-focused-tags 2'";
"Super+Control 3" = "spawn 'riverctl toggle-focused-tags 4'";
"Super+Control 4" = "spawn 'riverctl toggle-focused-tags 8'";
"Super+Control 5" = "spawn 'riverctl toggle-focused-tags 16'";
"Super+Control 6" = "spawn 'riverctl toggle-focused-tags 32'";
"Super+Control 7" = "spawn 'riverctl toggle-focused-tags 64'";
"Super+Control 8" = "spawn 'riverctl toggle-focused-tags 128'";
"Super+Control 9" = "spawn 'riverctl toggle-focused-tags 256'";
"Super+Shift+Control 1" = "spawn 'riverctl toggle-view-tags 1'";
"Super+Shift+Control 2" = "spawn 'riverctl toggle-view-tags 2'";
"Super+Shift+Control 3" = "spawn 'riverctl toggle-view-tags 4'";
"Super+Shift+Control 4" = "spawn 'riverctl toggle-view-tags 8'";
"Super+Shift+Control 5" = "spawn 'riverctl toggle-view-tags 16'";
"Super+Shift+Control 6" = "spawn 'riverctl toggle-view-tags 32'";
"Super+Shift+Control 7" = "spawn 'riverctl toggle-view-tags 64'";
"Super+Shift+Control 8" = "spawn 'riverctl toggle-view-tags 128'";
"Super+Shift+Control 9" = "spawn 'riverctl toggle-view-tags 256'";
"Super 0" = "spawn 'riverctl set-focused-tags $ALL_TAGS'";
"Super+Shift 0" = "spawn 'riverctl set-view-tags $ALL_TAGS'";
"Super M" = "toggle-focused-tags $MINIMIZED";
"Super+Shift M" = "set-view-tags $MINIMIZED";
"None F11" = "toggle-fullscreen";
"Super F" = "toggle-fullscreen";
"None XF86Eject" = "spawn 'eject -T'";
"None XF86AudioRaiseVolume" = "spawn 'pamixer -i 5'";
"None XF86AudioLowerVolume" = "spawn 'pamixer -d 5'";
"None XF86AudioMute" = "spawn 'pamixer --toggle-mute'";
"None XF86AudioMedia" = "spawn 'playerctl play-pause'";
"None XF86AudioPlay" = "spawn 'playerctl play-pause'";
"None XF86AudioPrev" = "spawn 'playerctl previous'";
"None XF86AudioNext" = "spawn 'playerctl next'";
"None XF86MonBrightnessUp" = "spawn 'light -A 5'";
"None XF86MonBrightnessDown" = "spawn 'light -U 5'";
"Super F11" = "enter-mode passthrough";
"Super B" = "enter-mode command";
};
passthrough = {
"Super F11" = "enter-mode normal";
};
};
};
extraConfig = ''
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
rivertile -view-padding 10 -outer-padding 10 &
'';
};
}

View File

@ -0,0 +1,195 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"river/init" = {
enable = true;
executable = true;
text = ''
#!/usr/bin/env sh
# See the river(1), riverctl(1), and rivertile(1) man pages for complete
# documentation.
# Variables
TERMINAL="foot"
LOCKSCREEN="swaylock"
# Autostart
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl spawn "kanshi"
riverctl spawn "waybar"
riverctl spawn "river-tag-overlay --border-width 0 --square-inactive-background-colour "0x282A36" --square-inactive-border-colour "0x282A36" --square-padding 0 --square-inner-padding 4 --square-size 18 --anchors 1:0:0:1 --timeout 2000"
riverctl spawn "mako"
riverctl spawn "wl-paste --type text --watch cliphist store"
riverctl spawn "wl-paste --type image --watch cliphist store"
riverctl spawn "mullvad-gui"
riverctl spawn "nm-applet"
# Theme
riverctl background-color 0x282A36
riverctl border-color-focused 0xBD93F9
riverctl border-color-unfocused 0x282A36
# Launch Shortcuts
riverctl map normal Super Return spawn "$TERMINAL tmux.sh"
riverctl map normal Super+Shift Return spawn "$TERMINAL"
riverctl map normal Super Space spawn 'wmenu.sh'
riverctl map normal Super+Shift S spawn 'grim -g "$(slurp)" - | swappy -f -'
riverctl map normal Super+Shift V spawn "cliphist list | bemenu -p 'Cliphist ' -l 10 | cliphist decode | wl-copy"
# Focus Controls
riverctl map normal Super H focus-view previous
riverctl map normal Super J focus-view next
riverctl map normal Super K focus-view previous
riverctl map normal Super L focus-view next
riverctl map normal Alt Tab focus-view next
riverctl map normal Alt+Shift Tab focus-view previous
riverctl map normal Super P focus-previous-tags
riverctl map normal Super Tab focus-output next
riverctl map normal Super U focus-output next
riverctl map normal Super+Shift U send-to-output next
# Move Controls
riverctl map normal Super+Shift H swap previous
riverctl map normal Super+Shift J swap next
riverctl map normal Super+Shift K swap previous
riverctl map normal Super+Shift L swap next
riverctl map normal Super+Shift Space zoom
riverctl map normal Super+Shift P send-to-previous-tags
riverctl map normal Super+Shift Tab send-to-output next
# Layout Controls
riverctl map normal Super+Alt H send-layout-cmd rivertile "main-ratio -0.05"
riverctl map normal Super+Alt L send-layout-cmd rivertile "main-ratio +0.05"
riverctl map normal Super I send-layout-cmd rivertile "main-count +1"
riverctl map normal Super+Shift I send-layout-cmd rivertile "main-count -1"
riverctl map normal Super Up send-layout-cmd rivertile "main-location top"
riverctl map normal Super Right send-layout-cmd rivertile "main-location right"
riverctl map normal Super Down send-layout-cmd rivertile "main-location bottom"
riverctl map normal Super Left send-layout-cmd rivertile "main-location left"
# Floating Controls
riverctl map normal Super+Shift F toggle-float
riverctl map normal Super+Control H move left 100
riverctl map normal Super+Control J move down 100
riverctl map normal Super+Control K move up 100
riverctl map normal Super+Control L move right 100
riverctl map normal Super+Shift+Control H snap left
riverctl map normal Super+Shift+Control J snap down
riverctl map normal Super+Shift+Control K snap up
riverctl map normal Super+Shift+Control L snap right
riverctl map normal Super+Alt+Shift H resize horizontal -100
riverctl map normal Super+Alt+Shift J resize vertical 100
riverctl map normal Super+Alt+Shift K resize vertical -100
riverctl map normal Super+Alt+Shift L resize horizontal 100
riverctl map-pointer normal Super BTN_LEFT move-view
riverctl map-pointer normal Super BTN_RIGHT resize-view
# Close focused view
riverctl map normal Super W close
riverctl map normal Super Q close
# Exit River
riverctl map normal Super+Shift Q exit
for i in $(seq 1 9)
do
tags=$((1 << ($i - 1)))
# Super+[1-9] to focus tag [0-8]
riverctl map normal Super $i spawn "riverctl set-focused-tags $tags"
# Super+Shift+[1-9] to tag focused view with tag [0-8]
riverctl map normal Super+Shift $i spawn "riverctl set-view-tags $tags"
# Super+Control+[1-9] to toggle focus of tag [0-8]
riverctl map normal Super+Control $i spawn "riverctl toggle-focused-tags $tags"
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
riverctl map normal Super+Shift+Control $i spawn "riverctl toggle-view-tags $tags"
done
MINIMIZED=$((1 << 20 ))
riverctl map normal Super M toggle-focused-tags ''${MINIMIZED}
riverctl map normal Super+Shift M set-view-tags ''${MINIMIZED}
ALL_BUT_MINIMIZED=$(( ((1 << 32) - 1 ) ^ $MINIMIZED ))
riverctl spawn-tagmask ''${ALL_BUT_MINIMIZED}
# Super+0 to focus all tags
# Super+Shift+0 to tag focused view with all tags
all_tags=$(((1 << 32) - 1))
riverctl map normal Super 0 spawn "riverctl set-focused-tags $all_tags"
riverctl map normal Super+Shift 0 spawn "riverctl set-view-tags $all_tags"
# Toggle fullscreen
riverctl map normal None F11 toggle-fullscreen
riverctl map normal Super F toggle-fullscreen
# Passthrough Mode
riverctl declare-mode passthrough
riverctl map normal Super F11 enter-mode passthrough
riverctl map passthrough Super F11 enter-mode normal
# Command Mode
riverctl declare-mode command
riverctl map normal Super B enter-mode command
riverctl map command None+Shift Comma spawn 'playerctl previous'
riverctl map command None Space spawn 'playerctl play-pause'
riverctl map command None+Shift Period spawn 'playerctl next'
riverctl map command None 1 spawn 'mullvad-browser'
riverctl map command None 2 spawn 'librewolf'
riverctl map command None 3 spawn 'libreoffice'
riverctl map command None 4 spawn 'thunderbird'
riverctl map command None 5 spawn 'discord'
riverctl map command None 6 spawn 'signal-desktop'
riverctl map command None 9 spawn 'steam'
riverctl map command None Z spawn 'riverctl toggle-fullscreen; riverctl enter-mode normal'
riverctl map command None Escape enter-mode normal
# Various media key mapping examples for both normal and locked mode which do
# not have a modifier
for mode in normal locked
do
riverctl map $mode None XF86Eject spawn 'eject -T'
# Control pulse audio volume with pamixer (https://github.com/cdemoulins/pamixer)
riverctl map $mode None XF86AudioRaiseVolume spawn 'pamixer -i 5'
riverctl map $mode None XF86AudioLowerVolume spawn 'pamixer -d 5'
riverctl map $mode None XF86AudioMute spawn 'pamixer --toggle-mute'
# Control MPRIS aware media players with playerctl (https://github.com/altdesktop/playerctl)
riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPlay spawn 'playerctl play-pause'
riverctl map $mode None XF86AudioPrev spawn 'playerctl previous'
riverctl map $mode None XF86AudioNext spawn 'playerctl next'
# Control screen backlight brightness with light (https://github.com/haikarainen/light)
riverctl map $mode None XF86MonBrightnessUp spawn 'light -A 5'
riverctl map $mode None XF86MonBrightnessDown spawn 'light -U 5'
done
# Set keyboard repeat rate
riverctl set-repeat 50 300
# Make all views with an app-id that starts with "float" and title "foo" start floating.
riverctl rule-add -app-id 'float*' -title 'foo' float
# Make all views with app-id "bar" and any title use client-side decorations
riverctl rule-add -app-id "bar" csd
# Global Configuration Settings
riverctl default-layout rivertile
rivertile -view-padding 10 -outer-padding 10 &
riverctl attach-mode bottom
riverctl hide-cursor timeout 10000
riverctl hide-cursor when-typing enabled
riverctl set-cursor-warp on-focus-change
riverctl focus-follows-cursor always
riverctl focus-output DP-1
riverctl send-layout-cmd rivertile "main-location right"
riverctl focus-output DP-2
riverctl send-layout-cmd rivertile "main-location left"
'';
};
};
}

View File

@ -0,0 +1,28 @@
{ pkgs, config, user, ... }:
{
xdg.configFile = {
"senpai/senpai.scfg" = {
enable = true;
executable = true;
text = ''
address ma.sdf.org:36036
tls false
nickname ${user.long}
password-cmd pass irc-pico
highlight
'';
};
};
xdg.configFile = {
"senpai/highlight" = {
enable = true;
text = ''
#!/usr/bin/env sh
escape() {
printf "%s" "$1" | sed 's#\#\\#g'
}
notify-desktop "[$BUFFER] $SENDER" "$(escape "$MESSAGE")"
'';
};
};
}

View File

@ -0,0 +1,15 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"swappy/config" = {
enable = true;
text = ''
[Default]
save_dir=$HOME/Pictures/screenshots
line_size=5
text_size=20
text_font=Comic Mono
'';
};
};
}

View File

@ -0,0 +1,30 @@
{ pkgs, config, ... }:
{
programs.swaylock = {
enable = true;
settings = {
color = "282a36";
inside-color = "1F202A";
line-color = "1F202A";
ring-color = "bd93f9";
text-color = "f8f8f2";
layout-bg-color = "1F202A";
layout-text-color = "f8f8f2";
inside-clear-color = "6272a4";
line-clear-color = "1F202A";
ring-clear-color = "6272a4";
text-clear-color = "1F202A";
inside-ver-color = "bd93f9";
line-ver-color = "1F202A";
ring-ver-color = "bd93f9";
text-ver-color = "1F202A";
inside-wrong-color = "ff5555";
line-wrong-color = "1F202A";
ring-wrong-color = "ff5555";
text-wrong-color = "1F202A";
bs-hl-color = "ff5555";
key-hl-color = "50fa7b";
text-caps-lock-color = "f8f8f2";
};
};
}

View File

@ -0,0 +1,56 @@
{ pkgs, config, ... }:
{
programs.tmux = {
enable = true;
baseIndex = 1;
prefix = "C-b";
mouse = false;
extraConfig = ''
# Do not rename windows automatically
set-option -g allow-rename off
# Hide statusbar while using one window
set -g status off
set-hook -g after-new-window 'if "[ #{session_windows} -gt 1 ]" "set status on"'
set-hook -g after-kill-pane 'if "[ #{session_windows} -lt 2 ]" "set status off"'
set-hook -g pane-exited 'if "[ #{session_windows} -lt 2 ]" "set status off"'
set-hook -g window-layout-changed 'if "[ #{session_windows} -lt 2 ]" "set status off"'
# Reload tmux.conf
unbind r
bind r source-file $HOME/.config/tmux/tmux.conf \; display "tmux config reloaded"
# Rebind vertical/horizontal splitting
unbind %
unbind v
bind v split-window -h -c "#{pane_current_path}"
unbind '"'
unbind c
bind c split-window -v -c "#{pane_current_path}"
unbind Enter
bind Enter new-window
unbind Tab
bind Tab last-window
unbind l
# Rebind moving panes
bind -n C-h select-pane -L
bind -n C-j select-pane -D
bind -n C-k select-pane -U
bind -n C-l select-pane -R
bind -n M-h select-pane -L
bind -n M-j select-pane -D
bind -n M-k select-pane -U
bind -n M-l select-pane -R
set -g status-position top
set -g status-left "[#S] "
set -g status-right "#{=21:pane_title}"
set -g status-style "bg=#282a36 fg=#f8f8f2"
setw -g window-status-current-style "bg=#BD93F9 fg=#282a36"
setw -g window-status-current-format " #I:#W #F "
setw -g window-status-format "#I:#W #F"
'';
};
}

View File

@ -0,0 +1,69 @@
{ pkgs, config, ... }:
{
xdg.configFile = {
"waybar/config" = {
enable = true;
executable = false;
text = ''
[{
"exclusive": false,
"position": "top",
"height": 20,
"fixed-center": false,
"modules-right": [
"tray",
"clock"
],
"clock": {
"format": "{:%H:%M:%S}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}",
"interval": 1
},
"tray": {
"icon-size": 16,
"spacing": 4,
"show-passive-items": true,
"reverse-direction": true
}
},
{
"exclusive": false,
"position": "bottom",
"height": 20,
"fixed-center": false,
"modules-left": [
"river/mode"
]
}]
'';
};
"waybar/style.css" = {
enable = true;
executable = false;
text = ''
* {
background: transparent;
color: #F2F2F8;
font-size: 15px;
}
#user {
background: #282A36;
padding: 0 8 0 8;
}
#clock {
background: #282A36;
padding: 0 8 0 8;
}
#mode {
background: #282A36;
padding: 0 8 0 8;
}
#tray {
background: #282A36;
padding: 0 4 0 8;
}
'';
};
};
}

View File

@ -0,0 +1,15 @@
# Browser packages configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
users.users.${user.name}.packages = with pkgs; [
lagrange
librewolf
luakit
mullvad-browser
offpunk
#onionshare-gui
surfraw
tor-browser-bundle-bin
xurls
];
}

View File

@ -1,13 +1,14 @@
# Office packages configuration.nix
# Chat packages configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
users.users.${user.name}.packages = with pkgs; [
catgirl
discord
profanity
sic
senpai
sic
signal-desktop
tut
simplex-chat-desktop
toot
yai
];
}

View File

@ -0,0 +1,9 @@
# ClamAV Nixos Configuration
{ config, lib, pkgs, ... }:
{
services.clamav = {
daemon.enable = true;
daemon.settings = {
};
};
}

View File

@ -1,5 +1,5 @@
# All configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
# Enlessh Nixos Configuration
{ config, lib, pkgs, ... }:
{
services = {
openssh = {
@ -31,5 +31,5 @@
"-v"
];
};
}
};
}

View File

@ -0,0 +1,7 @@
# Defense Packages Configuration
{ config, lib, pkgs, ... }:
{
users.users.${user.name}.packages = with pkgs; [
lynis
];
}

13
modules/nixos/full.nix Normal file
View File

@ -0,0 +1,13 @@
# Full Program Installation
{
imports = [
./browsers
./chat
./games
./media
./misc
./networking
./office
./virtualisation
];
}

View File

@ -0,0 +1,7 @@
# Gaming configuration.nix
{
imports = [
./games.nix
./steam.nix
];
}

View File

@ -0,0 +1,9 @@
# Games
{ pkgs, user, ... }:
{
users.users.${user.name}.packages = with pkgs; [
dnd-tools
dosbox-staging
minecraft
];
}

View File

@ -1,4 +1,4 @@
# Gaming configuration.nix
# Steam Configuration
{ config, lib, pkgs, inputs, user, ... }:
{
hardware.steam-hardware.enable = true;
@ -10,9 +10,4 @@
};
gamemode.enable = true;
};
users.users.${user.name}.packages = with pkgs; [
dnd-tools
dosbox-staging
minecraft
];
}

View File

@ -0,0 +1,25 @@
# Media packages configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
users.users.${user.name}.packages = with pkgs; [
ani-cli
cmus
ffmpeg
imagemagick
imv
lsix
mangal
mpv
playerctl
yt-dlp
ytfzf
];
nixpkgs.overlays = [
(self: super: {
mpv = super.mpv.override {
scripts = [ self.mpvScripts.mpris ];
#scripts = [ self.mpvScripts.visualizer ];
};
})
];
}

View File

@ -0,0 +1,41 @@
# Misc Tools
{ config, lib, pkgs, user, ... }:
{
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
];
};
users.users.${user.name}.packages = with pkgs; [
dua
dstat
fdupes
fq
fx
gitui
glow
gparted
gron
gum
hexyl
htmlq
hugo
jo
john
jq
just
lazygit
lynis
recutils
shellcheck
ssss
tealdeer
unimatrix
unrar
unzip
up
yank
yq-go
zoxide
];
}

View File

@ -5,16 +5,28 @@
enable = true;
};
users.users.${user.name}.packages = with pkgs; [
burpsuite
# burpsuite
curlie
dig
dogdns
gping
httpie
iftop
ipcalc
iptraf-ng
metasploit
mosh
nethogs
nikto
sherlock
# sherlock
sipcalc
snort
snscrape
social-engineer-toolkit
sqlmap
termshark
thc-hydra
trippy
tshark
wpscan
yersinia

View File

@ -1,12 +1,17 @@
# Office packages configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./samba.nix
];
users.users.${user.name}.packages = with pkgs; [
ledger
libreoffice
#obsidian
mdp
mupdf
pandoc
pdftk
qcal
#sc-im
thunderbird
];

View File

@ -1,15 +1,6 @@
# CLI configuration.nix
# SMB configuration
{ config, lib, pkgs, inputs, user, ... }:
{
environment = {
localBinInPath = true;
variables = {
GOPROXY = "direct";
#MAILRC="$XDG_CONFIG_HOME/mail/mailrc"
#allowing environmental variable is needed for a mosh connection
LC_CTYPE = "en_US.UTF-8";
};
};
services = {
samba = {
enable = true;
@ -57,71 +48,4 @@
};
};
};
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
#jack.enable = true;
wireplumber.enable = true;
};
users.users.${user.name}.packages = with pkgs; [
btfs
cava
cifs-utils
cmus
curlie
dig
dogdns
dstat
dua
exiftool
ffmpeg
fq
fx
gitui
glow
gpg-tui
gping
gron
gum
hexyl
htmlq
hugo
iftop
imagemagick
ipcalc
ipfetch
iptraf-ng
jo
john
jq
killall
lynis
mdp
mediainfo
mosh
nb
nethogs
oed
pdfgrep
phetch
recutils
shellcheck
sipcalc
ssss
surfraw
tmux-xpanes
unrar
unzip
up
ueberzugpp
yai
yank
yq-go
yt-dlp
];
}

View File

@ -0,0 +1,18 @@
# Virtualisation configuration
{ config, lib, pkgs, user, ... }:
{
virtualisation.libvirtd.enable = true;
programs = {
virt-manager.enable = true;
};
environment = {
systemPackages = with pkgs; [
nixos-shell
quickemu
virtiofsd
];
};
users.users.${user.name} = {
extraGroups = [ "libvirtd" ];
};
}

View File

@ -0,0 +1 @@
/target

View File

@ -0,0 +1,472 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "aho-corasick"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a"
dependencies = [
"memchr",
]
[[package]]
name = "anstream"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea"
[[package]]
name = "anstyle-parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd"
dependencies = [
"anstyle",
"windows-sys",
]
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "clap"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d"
dependencies = [
"clap_builder",
"clap_derive",
"once_cell",
]
[[package]]
name = "clap_builder"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961"
[[package]]
name = "colorchoice"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
[[package]]
name = "convert_case"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca"
dependencies = [
"unicode-segmentation",
]
[[package]]
name = "equivalent"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1"
[[package]]
name = "hashbrown"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "indexmap"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
dependencies = [
"equivalent",
"hashbrown",
]
[[package]]
name = "libc"
version = "0.2.147"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
[[package]]
name = "log"
version = "0.4.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"
[[package]]
name = "memoffset"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
dependencies = [
"autocfg",
]
[[package]]
name = "nix"
version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
dependencies = [
"bitflags",
"cfg-if",
"libc",
"memoffset",
"static_assertions",
]
[[package]]
name = "once_cell"
version = "1.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "proc-macro-crate"
version = "1.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
dependencies = [
"once_cell",
"toml_edit",
]
[[package]]
name = "proc-macro2"
version = "1.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b368fba921b0dce7e60f5e04ec15e565b3303972b42bcfde1d0713b881959eb"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quick-xml"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51"
dependencies = [
"memchr",
]
[[package]]
name = "quote"
version = "1.0.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488"
dependencies = [
"proc-macro2",
]
[[package]]
name = "regex"
version = "1.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"
[[package]]
name = "river-bsp-layout"
version = "1.1.1"
dependencies = [
"clap",
"regex",
"river-layout-toolkit",
]
[[package]]
name = "river-layout-toolkit"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7bd322da0212ac776c0096a3ff7727b4169eb4dac2dca21c6e12505b9dce8d3"
dependencies = [
"log",
"thiserror",
"wayrs-client",
]
[[package]]
name = "static_assertions"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "2.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "toml_datetime"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"
[[package]]
name = "toml_edit"
version = "0.19.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "266f016b7f039eec8a1a80dfe6156b633d208b9fccca5e4db1d6775b0c4e34a7"
dependencies = [
"indexmap",
"toml_datetime",
"winnow",
]
[[package]]
name = "unicode-ident"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0"
[[package]]
name = "unicode-segmentation"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"
[[package]]
name = "utf8parse"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a"
[[package]]
name = "wayrs-client"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4b6f89c575e1d2c7e2a3dec9edb025fffdec377dbdc60942f90edb6cfc7ef715"
dependencies = [
"nix",
"thiserror",
"wayrs-scanner",
]
[[package]]
name = "wayrs-scanner"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8267a5e3ec9d13e8b4d24d0643aac9492faeac8769cdae71930998430e057a99"
dependencies = [
"convert_case",
"proc-macro-crate",
"proc-macro2",
"quick-xml",
"quote",
"syn",
]
[[package]]
name = "windows-sys"
version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
[[package]]
name = "windows_aarch64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
[[package]]
name = "windows_i686_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
[[package]]
name = "windows_i686_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
[[package]]
name = "windows_x86_64_gnu"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
[[package]]
name = "windows_x86_64_msvc"
version = "0.48.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
[[package]]
name = "winnow"
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
dependencies = [
"memchr",
]

View File

@ -0,0 +1,18 @@
[package]
name = "river-bsp-layout"
version = "1.1.1"
edition = "2021"
author = "AJ Reifsnyder <ajreifsnyder@protonmail.com>"
about = "Binary space partitioned layout for the tiling Wayland compositor River."
license = "GPL-3.0"
description = "Binary space partitioned layout for the tiling Wayland compositor River."
homepage = "https://github.com/areif-dev/river-bsp-layout"
repository = "https://github.com/areif-dev/river-bsp-layout"
readme = "README.md"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = { version = "4.4", features = ["derive"] }
regex = "1.9"
river-layout-toolkit = "0.1"

View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
River BSP Layout is a layout generator that tiles windows in a grid
Copyright (C) 2023 AJ Reifsnyder
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
River BSP Layout Copyright (C) 2023 AJ Reifsnyder
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -0,0 +1,70 @@
# river-bsp-layout
Custom River layout manager that creates a Binary Space Partition / Grid layout using river-layout-toolkit
3 Window Example:
```
+----------------+----------------+
| | |
| | |
| +----------------+
| | |
| | |
+----------------+----------------+
```
4 Window Example:
```
+----------------+----------------+
| | |
| | |
+----------------+----------------+
| | |
| | |
+----------------+----------------+
```
## Installing
```bash
cargo install river-bsp-layout --locked
```
## Building
* Make sure you have `cargo` installed. The recommended means of installation is with `rustup.sh` from https://www.rust-lang.org/tools/install
* Clone this repo with `git clone https://github.com/areif-dev/river-bsp-layout`
* Enter the cloned directory `cd river-bsp-layout`
* run `cargo build --release`
* Move the compiled binary from `target/release/river-bsp-layout` to any directory in your `$PATH`
* With `cargo` installed, one option would be to move the the binary to `$HOME/.cargo/bin`
## CLI
`river-bsp-layout` currently accepts two options:
* `--inner-gap` or `-i`: Number of pixels to place between each adjacent container
* Defaults to 5
* `--outer-gap` or `-o`: Number of pixels to place between the edge of the display and the edge of each container
* Defaults to 5
## riverctl Commands
`river-bsp-layout` supports two commands sent from `riverctl send-layout-cmd`:
* `riverctl send-layout-cmd bsp-layout "outer-gap #"` will change the outer gap to `#` if `#` is a positive integer
* `riverctl send-layout-cmd bsp-layout "inner-gap #"` will change the inner gap to `#` if `#` is a positive integer
## Starting from River init
Assuming you are using a default `bash` init script, replace the following lines at the end of the file
```bash
riverctl default-layout rivertile
rivertile -view-padding 6 -outer-padding 6 &
```
with
```bash
riverctl default-layout bsp-layout
river-bsp-layout --inner-gap 10 --outer-gap 10 &
```

View File

@ -0,0 +1,9 @@
{ pkgs ? import <nixpkgs> { } }:
let manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
in
pkgs.rustPlatform.buildRustPackage rec {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
}

View File

@ -0,0 +1,75 @@
The following open source libraries are used by River BSP Layout:
- `clap` - https://github.com/clap-rs/clap
Copyright (c) Individual contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- `regex` - https://github.com/rust-lang/regex
Copyright (c) 2014 The Rust Project Developers
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
- `river-layout-toolkit` - https://github.com/MaxVerevkin/river-layout-toolkit
MIT License
Copyright (c) 2022 Max Verevkin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,20 @@
# river-bsp-layout.url = "github:areif-dev/river-bsp-layout";
{
description = "river-bsp-layout";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgsFor = nixpkgs.legacyPackages;
in {
packages = forAllSystems (system: {
default = pkgsFor.${system}.callPackage ./default.nix { };
});
devShells = forAllSystems (system: {
default = pkgsFor.${system}.callPackage ./shell.nix { };
});
};
}

View File

@ -0,0 +1,11 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
# Get dependencies from the main package
inputsFrom = [ (pkgs.callPackage ./default.nix { }) ];
# Additional tooling
buildInputs = with pkgs; [
rust-analyzer # LSP Server
rustfmt # Formatter
clippy # Linter
];
}

View File

@ -0,0 +1,561 @@
use regex::Regex;
use river_layout_toolkit::{GeneratedLayout, Layout, Rectangle};
use std::fmt::Display;
/// Wrapper for errors relating to the creation or operation of a `BSPLayout`
#[non_exhaustive]
#[derive(Debug)]
pub enum BSPLayoutError {
/// Encountered when a failure occurs in `user_cmd`
CmdError(String),
}
impl Display for BSPLayoutError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}", self)
}
}
impl std::error::Error for BSPLayoutError {}
/// Create a Binary Space Partitioned layout. Specifically, this layout recursively
/// divides the screen in half. The split will alternate between vertical and horizontal
/// based on which side of the container is longer. This will result in a grid like
/// layout with more-or-less equal sized windows even distributed across the screen
pub struct BSPLayout {
/// Number of pixels to put between the edge of the display and each window
pub outer_gap: u32,
/// Number of pixels to put between the inside edge of adjacent windows
pub inner_gap: u32,
}
impl BSPLayout {
/// Initialize a new instance of BSPLayout with given inner and outer gaps
///
/// # Arguments
///
/// * `outer_gap` - Number of pixels to put between the edge of the display and the outside
/// edge of the nearest windows
///
/// * `inner_gap` - Number of pixels to put between the inside edge of adjacent windows
///
/// # Returns
///
/// A new `BSPLayout`
pub fn new(outer_gap: u32, inner_gap: u32) -> BSPLayout {
BSPLayout {
outer_gap,
inner_gap,
}
}
/// Perform the recursive division by two to evenly divide the screen as best
/// as possible
///
/// # Arguments
///
/// * `origin_x` - The x position of the top left of the space to be divided
/// relative to the entire display. For example, if you are dividing the entire
/// display, then the top left corner is 0, 0. If you are dividing the right
/// half of a 1920x1080 monitor, then the top left corner would be at 960, 0
///
/// * `origin_y` - The y position of the top left of the space to be divided
/// relative to the entire display. For example, if you are dividing the entire
/// display, then the top left corner is 0, 0. If you are dividing the bottom
/// half of a 1920x1080 monitor, then the top left corner would be at 0, 540
///
/// * `canvas_width` - The width in pixels of the area being divided. If you
/// are dividing all of a 1920x1080 monitor, then the `canvas_width` would be 1920.
/// If you are dividing the right half of the monitor, then the width is 960.
///
/// * `canvas_height` - The height in pixels of the area being divided. If you
/// are dividing all of a 1920x1080 monitor, then the height would be 1080.
/// If you are dividing the bottom half of the monitor, then the height is 540.
///
/// * `view_count` - How many windows / containers / apps / division the function
/// needs to make in total.
///
/// # Returns
///
/// A `GeneratedLayout` with `view_count` cells evenly distributed across the screen
/// in a grid
fn handle_layout_helper(
&self,
origin_x: i32,
origin_y: i32,
canvas_width: u32,
canvas_height: u32,
view_count: u32,
) -> GeneratedLayout {
let mut layout = GeneratedLayout {
layout_name: "bsp-layout".to_string(),
views: Vec::with_capacity(view_count as usize),
};
// Exit condition. When there is only one window left, it should take up the
// entire available canvas
if view_count == 1 {
layout.views.push(Rectangle {
x: origin_x,
y: origin_y,
width: canvas_width,
height: canvas_height,
});
return layout;
}
let half_view_count = view_count / 2;
let views_remaining = view_count % 2; // In case there are odd number of views
let h1_width: u32;
let h1_height: u32;
let h2_width: u32;
let h2_height: u32;
let h2_x: i32;
let h2_y: i32;
if canvas_width >= canvas_height {
/* Vertical Split */
// In case the width of the area is odd, add one extra pixel if needed
h1_width =
canvas_width / 2 + canvas_width % 2 - self.inner_gap / 2 - self.inner_gap % 2;
h1_height = canvas_height;
h2_width = canvas_width / 2 - self.inner_gap / 2;
h2_height = canvas_height;
h2_x = h1_width as i32 + origin_x + self.inner_gap as i32;
h2_y = origin_y;
} else {
/* Horizontal Split */
h1_width = canvas_width;
h1_height =
canvas_height / 2 + canvas_height % 2 - self.inner_gap / 2 - self.inner_gap % 2;
h2_width = canvas_width;
// In case the width of the area is odd, add one extra pixel if needed
h2_height = canvas_height / 2 - self.inner_gap / 2;
h2_x = origin_x;
h2_y = h1_height as i32 + origin_y + self.inner_gap as i32;
}
/* Recursively split the two halves of the window */
let mut first_half =
self.handle_layout_helper(origin_x, origin_y, h1_width, h1_height, half_view_count);
let mut sec_half = self.handle_layout_helper(
h2_x,
h2_y,
h2_width,
h2_height,
half_view_count + views_remaining,
);
layout.views.append(&mut first_half.views);
layout.views.append(&mut sec_half.views);
layout
}
}
impl Layout for BSPLayout {
type Error = BSPLayoutError;
const NAMESPACE: &'static str = "bsp-layout";
/// Handle commands passed to the layout with `send-layout-cmd`. Currently supports
/// "outer-gap #" and "inner-gap #", which will set set the outer and inner gaps
/// of the window at runtime
///
/// # Examples
///
/// ```
/// use river_bsp_layout::BSPLayout;
/// use river_layout_toolkit::Layout;
///
/// // Initialize layout with 0 gaps
/// let mut bsp = BSPLayout::new(0, 0);
///
/// // Set gap between windows and the monitor edge to be 5 pixels
/// let res = bsp.user_cmd("outer-gap 5".to_string(), None, "eDP-1").unwrap();
/// assert_eq!(bsp.outer_gap, 5);
/// ```
///
/// # Errors
///
/// Will return `BSPLayoutError::CmdError` if an unrecognized command is passed
/// or if an invalid argument is passed to a valid command.
fn user_cmd(
&mut self,
_cmd: String,
_tags: Option<u32>,
_output: &str,
) -> Result<(), Self::Error> {
let outer_re = Regex::new(r"^outer-gap \d+$").unwrap();
let inner_re = Regex::new(r"^inner-gap \d+$").unwrap();
if outer_re.is_match(&_cmd) {
let new_gap_str = match _cmd.split(" ").last() {
Some(s) => s,
None => {
return Err(BSPLayoutError::CmdError(
"outer-gap missing argument".to_string(),
));
}
};
let new_gap = match new_gap_str.parse::<u32>() {
Ok(i) => i,
Err(_) => {
return Err(BSPLayoutError::CmdError(
"Could not parse u32 from outer-gap argument".to_string(),
));
}
};
self.outer_gap = new_gap;
} else if inner_re.is_match(&_cmd) {
let new_gap_str = match _cmd.split(" ").last() {
Some(s) => s,
None => {
return Err(BSPLayoutError::CmdError(
"inner-gap missing argument".to_string(),
))
}
};
let new_gap = match new_gap_str.parse::<u32>() {
Ok(i) => i,
Err(_) => {
return Err(BSPLayoutError::CmdError(
"Could not parse u32 from inner-gap argument".to_string(),
))
}
};
self.inner_gap = new_gap;
} else {
return Err(BSPLayoutError::CmdError(format!(
"Command not recognized: {}",
_cmd
)));
}
Ok(())
}
/// Create the geometry for the `BSPLayout`
///
/// # Arguments
///
/// * `view_count` - The number of views / windows / containers to divide the screen into
/// * `usable_width` - How many pixels wide the whole display is
/// * `usable_height` - How many pixels tall the whole display is
/// * `_tags` - Int representing which tags are currently active based on which
/// bit is toggled
/// * `_output` - The name of the output to generate the layout on
///
/// # Examples
///
/// ```
/// use river_bsp_layout::BSPLayout;
/// use river_layout_toolkit::Layout;
///
/// let mut bsp = BSPLayout::new(10, 10);
/// bsp.generate_layout(2, 1920, 1080, 0b000000001, "eDP-1").unwrap();
/// ```
fn generate_layout(
&mut self,
view_count: u32,
usable_width: u32,
usable_height: u32,
_tags: u32,
_output: &str,
) -> Result<GeneratedLayout, Self::Error> {
let layout = self.handle_layout_helper(
self.outer_gap as i32,
self.outer_gap as i32,
usable_width - self.outer_gap * 2,
usable_height - self.outer_gap * 2,
view_count,
);
Ok(layout)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_handle_layout_helper_one_container() {
let bsp = BSPLayout::new(0, 0);
let layout = bsp.handle_layout_helper(0, 0, 1920, 1080, 1);
assert_eq!(layout.views.len(), 1);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(0, 0, 1920, 1080)
);
}
#[test]
fn test_handle_layout_helper_two_containers() {
let bsp = BSPLayout::new(0, 0);
let layout = bsp.handle_layout_helper(0, 0, 1920, 1080, 2);
assert_eq!(layout.views.len(), 2);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(0, 0, 960, 1080)
);
let second_view = layout.views.get(1).unwrap();
assert_eq!(
(
second_view.x,
second_view.y,
second_view.width,
second_view.height
),
(960, 0, 960, 1080)
);
}
#[test]
fn test_handle_layout_helper_three_containers() {
let bsp = BSPLayout::new(0, 0);
let layout = bsp.handle_layout_helper(0, 0, 1920, 1080, 3);
assert_eq!(layout.views.len(), 3);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(0, 0, 960, 1080)
);
let second_view = layout.views.get(1).unwrap();
assert_eq!(
(
second_view.x,
second_view.y,
second_view.width,
second_view.height
),
(960, 0, 960, 540)
);
let third_view = layout.views.get(2).unwrap();
assert_eq!(
(
third_view.x,
third_view.y,
third_view.width,
third_view.height
),
(960, 540, 960, 540)
);
}
#[test]
fn test_handle_layout_helper_four_containers() {
let bsp = BSPLayout::new(0, 0);
let layout = bsp.handle_layout_helper(0, 0, 1920, 1080, 4);
assert_eq!(layout.views.len(), 4);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(0, 0, 960, 540)
);
let second_view = layout.views.get(1).unwrap();
assert_eq!(
(
second_view.x,
second_view.y,
second_view.width,
second_view.height
),
(0, 540, 960, 540)
);
let third_view = layout.views.get(2).unwrap();
assert_eq!(
(
third_view.x,
third_view.y,
third_view.width,
third_view.height
),
(960, 0, 960, 540)
);
let fourth_view = layout.views.get(3).unwrap();
assert_eq!(
(
fourth_view.x,
fourth_view.y,
fourth_view.width,
fourth_view.height
),
(960, 540, 960, 540)
);
}
#[test]
fn test_generate_layout_no_gaps() {
let mut bsp = BSPLayout::new(0, 0);
let layout = bsp.generate_layout(4, 1920, 1080, 1, "eDP-1").unwrap();
assert_eq!(layout.views.len(), 4);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(0, 0, 960, 540)
);
let second_view = layout.views.get(1).unwrap();
assert_eq!(
(
second_view.x,
second_view.y,
second_view.width,
second_view.height
),
(0, 540, 960, 540)
);
let third_view = layout.views.get(2).unwrap();
assert_eq!(
(
third_view.x,
third_view.y,
third_view.width,
third_view.height
),
(960, 0, 960, 540)
);
let fourth_view = layout.views.get(3).unwrap();
assert_eq!(
(
fourth_view.x,
fourth_view.y,
fourth_view.width,
fourth_view.height
),
(960, 540, 960, 540)
);
}
#[test]
fn test_generate_layout_with_gaps() {
let mut bsp = BSPLayout::new(10, 20);
let layout = bsp.generate_layout(4, 1920, 1080, 1, "eDP-1").unwrap();
assert_eq!(layout.views.len(), 4);
let first_view = layout.views.get(0).unwrap();
assert_eq!(
(
first_view.x,
first_view.y,
first_view.width,
first_view.height
),
(10, 10, 940, 520)
);
let second_view = layout.views.get(1).unwrap();
assert_eq!(
(
second_view.x,
second_view.y,
second_view.width,
second_view.height
),
(10, 550, 940, 520)
);
let third_view = layout.views.get(2).unwrap();
assert_eq!(
(
third_view.x,
third_view.y,
third_view.width,
third_view.height
),
(970, 10, 940, 520)
);
let fourth_view = layout.views.get(3).unwrap();
assert_eq!(
(
fourth_view.x,
fourth_view.y,
fourth_view.width,
fourth_view.height
),
(970, 550, 940, 520)
);
}
#[test]
fn test_send_outer_gaps() {
let mut bsp = BSPLayout::new(0, 0);
bsp.user_cmd("outer-gap 5".to_string(), None, "eDP-1")
.unwrap();
assert_eq!(bsp.inner_gap, 0);
assert_eq!(bsp.outer_gap, 5);
}
#[test]
fn test_send_inner_gaps() {
let mut bsp = BSPLayout::new(0, 0);
bsp.user_cmd("inner-gap 5".to_string(), None, "eDP-1")
.unwrap();
assert_eq!(bsp.inner_gap, 5);
assert_eq!(bsp.outer_gap, 0);
}
#[test]
fn test_invalid_user_command() {
let mut bsp = BSPLayout::new(0, 0);
let res = bsp.user_cmd("foo-bar 5678".to_string(), None, "eDP-1");
assert!(res.is_err());
}
}

View File

@ -0,0 +1,24 @@
use clap::Parser;
use river_bsp_layout::BSPLayout;
use river_layout_toolkit::run;
/// Layout manager for Wayland tiling compositor River. Creates a grid like Binary Space
/// Partitioned layout where each window is made as equal in size as possible while still
/// occupying all available space in the display
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Cli {
/// The size of the gap between adjacent windows. In pixels
#[arg(short, long, default_value_t = 5)]
inner_gap: u32,
/// The size of the gap between windows and the edge of the screen. In pixels
#[arg(short, long, default_value_t = 5)]
outer_gap: u32,
}
fn main() {
let cli = Cli::parse();
let layout = BSPLayout::new(cli.outer_gap, cli.inner_gap);
run(layout).unwrap();
}

View File

@ -1,127 +0,0 @@
# All configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
nix = {
settings.auto-optimise-store = true;
settings.allowed-users = [ "@wheel" ];
gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "--delete-older-than 30d";
};
package = pkgs.nixFlakes;
registry.nixpkgs.flake = inputs.nixpkgs;
extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
};
nixpkgs.config.allowUnfree = true;
networking.networkmanager.enable = true;
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
services = {
cron = {
enable = true;
systemCronJobs = [
# Clean logs older than 2d
"0 20 * * * root journalctl --vacuum-time=2d"
];
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
allowSFTP = false; # Don't set this if you need sftp
extraConfig = ''
AllowTcpForwarding yes
X11Forwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
AuthenticationMethods publickey
'';
};
};
# Define a user account. Don't forget to set a password with passwd
users.users.${user.name} = {
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
initialPassword = "hunter2";
packages = with pkgs; [
eva
gotop
links2
nix-du
nmap
ranger
];
};
programs = {
mtr.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
git = {
enable = true;
};
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
tmux = {
enable = true;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment = {
defaultPackages = with pkgs; [
perl
rsync
strace
];
systemPackages = with pkgs; [
curl
wget
];
};
system = {
#autoUpgrade = {
# enable = true;
# allowReboot = false;
# channel = "https://channels.nixos.org/nixos-unstable";
# flake = "<git repo url>";
# flags = [
# "--update-input"
# "nixpkgs"
# "--commit-lockfile"
# ];
#};
stateVersion = "22.11";
};
}

Some files were not shown because too many files have changed in this diff Show More