Compare commits

..

4 Commits

119 changed files with 4357 additions and 2106 deletions

1
.gitignore vendored
View File

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

14
.index
View File

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

View File

@ -1,20 +0,0 @@
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,10 +13,6 @@ 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

View File

@ -1,106 +0,0 @@
# 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}";
};
};
}

View File

@ -1,39 +0,0 @@
# 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";
};
};
}

View File

@ -1,61 +0,0 @@
# 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,125 +0,0 @@
# 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

@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1708806879,
"narHash": "sha256-MSbxtF3RThI8ANs/G4o1zIqF5/XlShHvwjl9Ws0QAbI=",
"lastModified": 1701728041,
"narHash": "sha256-x0pyrI1vC8evVDxCxyO6olOyr4wlFg9+VS3C3p4xFYQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "4ee704cb13a5a7645436f400b9acc89a67b9c08a",
"rev": "ac7216918cd65f3824ba7817dea8f22e61221eaf",
"type": "github"
},
"original": {
@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1708984720,
"narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
"lastModified": 1703013332,
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
"type": "github"
},
"original": {

View File

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

206
home-manager/all.nix Normal file
View File

@ -0,0 +1,206 @@
# 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";
}

16
home-manager/chat.nix Normal file
View File

@ -0,0 +1,16 @@
# 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,11 +1,9 @@
# 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}'";
@ -13,6 +11,13 @@
home.sessionPath = [
"${config.home.homeDirectory}/.local/share/go/bin"
];
xdg.configFile = {
"cava" = {
source = ./dots/cava;
target = "cava";
recursive = true;
};
};
xdg = {
userDirs = {
enable = true;
@ -27,23 +32,35 @@
videos = "${config.home.homeDirectory}/Videos";
};
};
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'";
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'";
};
};
};
}

View File

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

View File

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

126
home-manager/dots/bashrc Normal file
View File

@ -0,0 +1,126 @@
# .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

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

View File

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

4
home-manager/dots/catgirl/sdf Executable file
View File

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

View File

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

View File

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

View File

@ -0,0 +1,210 @@
## 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

@ -0,0 +1,79 @@
#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

@ -0,0 +1,34 @@
#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

@ -0,0 +1,14 @@
#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;
}

436
home-manager/dots/dunst/dunstrc Executable file
View File

@ -0,0 +1,436 @@
# 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

@ -0,0 +1,23 @@
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

357
home-manager/dots/icons Normal file
View File

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

4
home-manager/dots/lf/cleaner Executable file
View File

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

31
home-manager/dots/lf/lfcd.sh Executable file
View File

@ -0,0 +1,31 @@
# 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
}

195
home-manager/dots/lf/lfrc Normal file
View File

@ -0,0 +1,195 @@
#!/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

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

84
home-manager/dots/lf/preview Executable file
View File

@ -0,0 +1,84 @@
#!/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

@ -0,0 +1,21 @@
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

158
home-manager/dots/river/init Executable file
View File

@ -0,0 +1,158 @@
#!/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

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

View File

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

View File

@ -0,0 +1,28 @@
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,151 @@
#!/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

@ -0,0 +1,80 @@
# 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"

16
home-manager/dots/xinitrc Normal file
View File

@ -0,0 +1,16 @@
#!/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,27 +1,24 @@
# 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";
};
};
}

34
home-manager/wayland.nix Normal file
View File

@ -0,0 +1,34 @@
# 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;
};
};
}

80
home-manager/xorg.nix Normal file
View File

@ -0,0 +1,80 @@
# 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

@ -1,30 +0,0 @@
# 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,26 +6,33 @@ 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;
};
@ -33,6 +40,14 @@ in
enable = true;
package = pkgs.mullvad-vpn;
};
transmission = {
enable = true;
openFirewall = true;
};
udisks2 = {
enable = true;
mountOnMedia = true;
};
borgbackup = {
jobs."daily" = {
paths = [
@ -57,18 +72,12 @@ in
};
};
};
programs.virt-manager.enable = true;
users.users.${user.name} = {
extraGroups = [ "davfs2" ];
extraGroups = [ "davfs2" "libvirtd" "transmission" ];
packages = with pkgs; [
bitwarden
btfs
cava
lavat
nushell
python311Packages.eyeD3
tagutil
#greetd.tuigreet
mixxx
polychromatic
];
};
system.stateVersion = "23.11";
}

View File

@ -10,17 +10,6 @@
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,39 +1,68 @@
# Buckwheat home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
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
];
xsession.windowManager.bspwm = {
monitors = {
DP-1 = [
"1"
"2"
"3"
"4"
"5"
];
DP-2 = [
"6"
"7"
"8"
"9"
"0"
];
};
};
services = {
kanshi = {
udiskie = {
enable = true;
profiles = {
default = {
outputs = [
{
criteria = "DP-1";
position = "0,0";
mode = "2560x1440@164.99Hz";
}
{
criteria = "DP-2";
position = "2560,0";
mode = "2560x1440@164.99Hz";
}
];
automount = true;
notify = true;
settings = {
program_options = {
udisks_version = 2;
};
icon_names.media = [
"media-optical"
];
};
};
};
home.stateVersion = "23.11";
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" ];
};
};
}

View File

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

View File

@ -6,7 +6,6 @@ in
{
imports = [
./hardware-configuration.nix
../../modules/nixos/full.nix
];
boot = {
loader = {
@ -28,21 +27,35 @@ in
networking = {
hostName = "${hostname}"; # Define your hostname.
firewall = {
enable = true;
allowedTCPPorts = [];
allowedUDPPorts = [];
# 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" ];
packages = with pkgs; [
];
};
services = {
cage = {
davfs2 = {
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,11 +1,19 @@
# Fireweed home.nix
{ config, lib, pkgs, inputs, user, ... }:
{
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";
services = {
udiskie = {
enable = true;
automount = true;
notify = true;
settings = {
program_options = {
udisks_version = 2;
};
icon_names.media = [
"media-optical"
];
};
};
};
}

View File

@ -0,0 +1,47 @@
# 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}";
};
}

123
hosts/vm/configuration.nix_ Normal file
View File

@ -0,0 +1,123 @@
# 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";
#};
}

6
hosts/vm/home.nix Normal file
View File

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

View File

@ -1,80 +0,0 @@
# 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

@ -1,31 +0,0 @@
# 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

@ -1,74 +0,0 @@
# 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

@ -1,31 +0,0 @@
# 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

@ -1,126 +0,0 @@
{ 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

@ -1,221 +0,0 @@
{ 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

@ -1,42 +0,0 @@
{ 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

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

View File

@ -1,29 +0,0 @@
{ 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

@ -1,30 +0,0 @@
{ 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

@ -1,37 +0,0 @@
# 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

@ -1,202 +0,0 @@
{ 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

@ -1,195 +0,0 @@
{ 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

@ -1,28 +0,0 @@
{ 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

@ -1,15 +0,0 @@
{ 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

@ -1,30 +0,0 @@
{ 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

@ -1,56 +0,0 @@
{ 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

@ -1,69 +0,0 @@
{ 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

@ -1,15 +0,0 @@
# 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,9 +0,0 @@
# ClamAV Nixos Configuration
{ config, lib, pkgs, ... }:
{
services.clamav = {
daemon.enable = true;
daemon.settings = {
};
};
}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,25 +0,0 @@
# 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

@ -1,41 +0,0 @@
# 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

@ -1,18 +0,0 @@
# 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" ];
};
}

127
nixos/all.nix Normal file
View File

@ -0,0 +1,127 @@
# 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";
};
}

View File

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

View File

@ -1,6 +1,15 @@
# SMB configuration
# CLI configuration.nix
{ 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;
@ -48,4 +57,71 @@
};
};
};
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

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

63
nixos/gui.nix Normal file
View File

@ -0,0 +1,63 @@
# GUI configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
environment = {
variables = {
VISUAL = "$EDITOR";
BROWSER = "mullvad-browser";
};
};
xdg.mime = {
enable = true;
defaultApplications = {
"image/*" = [
"feh.desktop"
];
"text/*" = [
"mullvad-browser.desktop"
];
"video/*" = [
"mpv.desktop"
];
};
};
services = {
# To add the Flathub repo, run:
# $ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak.enable = true;
dbus.enable = true;
};
fonts.packages = with pkgs; [
comic-mono
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
fira-code
fira-code-symbols
dina-font
];
programs = {
dconf.enable = true;
};
users.users.${user.name}.packages = with pkgs; [
ani-cli
bashmount
glib
lagrange
librewolf
mangal
mpv
mullvad-browser
mupdf
#onionshare-gui
tor-browser-bundle-bin
#urlview
ytfzf
];
environment.systemPackages = with pkgs; [
libnotify
networkmanagerapplet
xdg-utils
xdragon
];
}

View File

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

View File

@ -0,0 +1,23 @@
/* See LICENSE file for copyright and license details. */
/* Default settings; can be overriden by command line. */
static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */
/* -fn option overrides fonts[0]; default X11 font or font set */
static const char *fonts[] = {
"Comic Mono:size=11"
};
static const char *prompt = NULL; /* -p option; prompt to the left of input field */
static const char *colors[SchemeLast][2] = {
/* fg bg */
[SchemeNorm] = { "#f8f8f2", "#282a36" },
[SchemeSel] = { "#f8f8f2", "#bd93f9" },
[SchemeOut] = { "#000000", "#00ffff" },
};
/* -l option; if nonzero, dmenu uses vertical list with given number of lines */
static unsigned int lines = 0;
/*
* Characters not considered part of a word while deleting words
* for example: " /?\"&[]"
*/
static const char worddelimiters[] = " ";

View File

@ -0,0 +1,12 @@
/* user and group to drop privileges to */
static const char *user = "nobody";
static const char *group = "nogroup";
static const char *colorname[NUMCOLS] = {
[INIT] = "black", /* after initialization */
[INPUT] = "#bd93f9", /* during input */
[FAILED] = "#ff5555", /* wrong password */
};
/* treat a cleared input like a wrong password (color) */
static const int failonclear = 1;

474
nixos/patches/st/config.h Normal file
View File

@ -0,0 +1,474 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Comic Mono:pixelsize=13:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"#000000",
"#ff5555",
"#50fa7b",
"#f1fa8c",
"#bd93f9",
"#ff79c6",
"#8be9fd",
"#bfbfbf",
/* 8 bright colors */
"#4d4d4d",
"#ff6367",
"#5af78e",
"#f4f99d",
"#caa9fa",
"#ff92d0",
"#9aedfe",
"#e63636",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"#f8f8f2", /* default foreground colour */
"#282a36", /* default background colour */
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 258;
unsigned int defaultbg = 259;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
* 2: Block ("")
* 4: Underline ("_")
* 6: Bar ("|")
* 7: Snowman ("")
*/
static unsigned int cursorshape = 2;
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

View File

@ -0,0 +1,474 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Comic Mono:pixelsize=13:antialias=true:autohint=true";
static int borderpx = 2;
/*
* What program is execed by st depends of these precedence rules:
* 1: program passed with -e
* 2: scroll and/or utmp
* 3: SHELL environment variable
* 4: value of shell in /etc/passwd
* 5: value of shell in config.h
*/
static char *shell = "/bin/sh";
char *utmp = NULL;
/* scroll program: to enable use a string like "scroll" */
char *scroll = NULL;
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";
/* Kerning / character bounding-box multipliers */
static float cwscale = 1.0;
static float chscale = 1.0;
/*
* word delimiter string
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
/* allow certain non-interactive (insecure) window operations such as:
setting the clipboard text */
int allowwindowops = 0;
/*
* draw latency range in ms - from new content/keypress/etc until drawing.
* within this range, st draws when content stops arriving (idle). mostly it's
* near minlatency, but it waits longer for slow updates to avoid partial draw.
* low minlatency will tear/flicker more, as it can "detect" idle too early.
*/
static double minlatency = 8;
static double maxlatency = 33;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
* attribute.
*/
static unsigned int blinktimeout = 800;
/*
* thickness of underline and bar cursors
*/
static unsigned int cursorthickness = 2;
/*
* bell volume. It must be a value between -100 and 100. Use 0 for disabling
* it
*/
static int bellvolume = 0;
/* default TERM value */
char *termname = "st-256color";
/*
* spaces per tab
*
* When you are changing this value, don't forget to adapt the »it« value in
* the st.info and appropriately install the st.info in the environment where
* you use this st version.
*
* it#$tabspaces,
*
* Secondly make sure your kernel is not expanding tabs. When running `stty
* -a` »tab0« should appear. You can tell the terminal to not expand tabs by
* running following command:
*
* stty tabs
*/
unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"#000000",
"#ff5555",
"#50fa7b",
"#f1fa8c",
"#bd93f9",
"#ff79c6",
"#8be9fd",
"#bfbfbf",
/* 8 bright colors */
"#4d4d4d",
"#ff6367",
"#5af78e",
"#f4f99d",
"#caa9fa",
"#ff92d0",
"#9aedfe",
"#e63636",
[255] = 0,
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
"#f8f8f2", /* default foreground colour */
"#282a36", /* default background colour */
};
/*
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 258;
unsigned int defaultbg = 259;
unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
/*
* Default shape of cursor
* 2: Block ("")
* 4: Underline ("_")
* 6: Bar ("|")
* 7: Snowman ("")
*/
static unsigned int cursorshape = 2;
/*
* Default columns and rows numbers
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
/*
* Default colour and shape of the mouse cursor
*/
static unsigned int mouseshape = XC_xterm;
static unsigned int mousefg = 7;
static unsigned int mousebg = 0;
/*
* Color used to display font attributes when fontconfig selected a font which
* doesn't match the ones requested.
*/
static unsigned int defaultattr = 11;
/*
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
* Note that if you want to use ShiftMask with selmasks, set this to an other
* modifier, set to 0 to not use it.
*/
static uint forcemousemod = ShiftMask;
/*
* Internal mouse shortcuts.
* Beware that overloading Button1 will disable the selection.
*/
static MouseShortcut mshortcuts[] = {
/* mask button function argument release */
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
{ ShiftMask, Button4, ttysend, {.s = "\033[5;2~"} },
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
{ ShiftMask, Button5, ttysend, {.s = "\033[6;2~"} },
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
};
/* Internal keyboard shortcuts. */
#define MODKEY Mod1Mask
#define TERMMOD (ControlMask|ShiftMask)
static Shortcut shortcuts[] = {
/* mask keysym function argument */
{ XK_ANY_MOD, XK_Break, sendbreak, {.i = 0} },
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
{ TERMMOD, XK_Prior, zoom, {.f = +1} },
{ TERMMOD, XK_Next, zoom, {.f = -1} },
{ TERMMOD, XK_Home, zoomreset, {.f = 0} },
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
{ TERMMOD, XK_V, clippaste, {.i = 0} },
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
};
/*
* Special keys (change & recompile st.info accordingly)
*
* Mask value:
* * Use XK_ANY_MOD to match the key no matter modifiers state
* * Use XK_NO_MOD to match the key alone (no modifiers)
* appkey value:
* * 0: no value
* * > 0: keypad application mode enabled
* * = 2: term.numlock = 1
* * < 0: keypad application mode disabled
* appcursor value:
* * 0: no value
* * > 0: cursor application mode enabled
* * < 0: cursor application mode disabled
*
* Be careful with the order of the definitions because st searches in
* this table sequentially, so any XK_ANY_MOD must be in the last
* position for a key.
*/
/*
* If you want keys other than the X11 function keys (0xFD00 - 0xFFFF)
* to be mapped below, add them to this array.
*/
static KeySym mappedkeys[] = { -1 };
/*
* State bits to ignore when matching key or button events. By default,
* numlock (Mod2Mask) and keyboard layout (XK_SWITCH_MOD) are ignored.
*/
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
/*
* This is the huge key array which defines all compatibility to the Linux
* world. Please decide about changes wisely.
*/
static Key key[] = {
/* keysym mask string appkey appcursor */
{ XK_KP_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_KP_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_KP_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_KP_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_KP_Up, XK_ANY_MOD, "\033Ox", +1, 0},
{ XK_KP_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_KP_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_KP_Down, XK_ANY_MOD, "\033Or", +1, 0},
{ XK_KP_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_KP_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_KP_Left, XK_ANY_MOD, "\033Ot", +1, 0},
{ XK_KP_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_KP_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_KP_Right, XK_ANY_MOD, "\033Ov", +1, 0},
{ XK_KP_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_KP_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_KP_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_KP_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_KP_Begin, XK_ANY_MOD, "\033[E", 0, 0},
{ XK_KP_End, ControlMask, "\033[J", -1, 0},
{ XK_KP_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_KP_End, ShiftMask, "\033[K", -1, 0},
{ XK_KP_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_KP_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_KP_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_KP_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_KP_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_KP_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[L", -1, 0},
{ XK_KP_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_KP_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_KP_Delete, ControlMask, "\033[M", -1, 0},
{ XK_KP_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_KP_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_KP_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_KP_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_KP_Multiply, XK_ANY_MOD, "\033Oj", +2, 0},
{ XK_KP_Add, XK_ANY_MOD, "\033Ok", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\033OM", +2, 0},
{ XK_KP_Enter, XK_ANY_MOD, "\r", -1, 0},
{ XK_KP_Subtract, XK_ANY_MOD, "\033Om", +2, 0},
{ XK_KP_Decimal, XK_ANY_MOD, "\033On", +2, 0},
{ XK_KP_Divide, XK_ANY_MOD, "\033Oo", +2, 0},
{ XK_KP_0, XK_ANY_MOD, "\033Op", +2, 0},
{ XK_KP_1, XK_ANY_MOD, "\033Oq", +2, 0},
{ XK_KP_2, XK_ANY_MOD, "\033Or", +2, 0},
{ XK_KP_3, XK_ANY_MOD, "\033Os", +2, 0},
{ XK_KP_4, XK_ANY_MOD, "\033Ot", +2, 0},
{ XK_KP_5, XK_ANY_MOD, "\033Ou", +2, 0},
{ XK_KP_6, XK_ANY_MOD, "\033Ov", +2, 0},
{ XK_KP_7, XK_ANY_MOD, "\033Ow", +2, 0},
{ XK_KP_8, XK_ANY_MOD, "\033Ox", +2, 0},
{ XK_KP_9, XK_ANY_MOD, "\033Oy", +2, 0},
{ XK_Up, ShiftMask, "\033[1;2A", 0, 0},
{ XK_Up, Mod1Mask, "\033[1;3A", 0, 0},
{ XK_Up, ShiftMask|Mod1Mask,"\033[1;4A", 0, 0},
{ XK_Up, ControlMask, "\033[1;5A", 0, 0},
{ XK_Up, ShiftMask|ControlMask,"\033[1;6A", 0, 0},
{ XK_Up, ControlMask|Mod1Mask,"\033[1;7A", 0, 0},
{ XK_Up,ShiftMask|ControlMask|Mod1Mask,"\033[1;8A", 0, 0},
{ XK_Up, XK_ANY_MOD, "\033[A", 0, -1},
{ XK_Up, XK_ANY_MOD, "\033OA", 0, +1},
{ XK_Down, ShiftMask, "\033[1;2B", 0, 0},
{ XK_Down, Mod1Mask, "\033[1;3B", 0, 0},
{ XK_Down, ShiftMask|Mod1Mask,"\033[1;4B", 0, 0},
{ XK_Down, ControlMask, "\033[1;5B", 0, 0},
{ XK_Down, ShiftMask|ControlMask,"\033[1;6B", 0, 0},
{ XK_Down, ControlMask|Mod1Mask,"\033[1;7B", 0, 0},
{ XK_Down,ShiftMask|ControlMask|Mod1Mask,"\033[1;8B",0, 0},
{ XK_Down, XK_ANY_MOD, "\033[B", 0, -1},
{ XK_Down, XK_ANY_MOD, "\033OB", 0, +1},
{ XK_Left, ShiftMask, "\033[1;2D", 0, 0},
{ XK_Left, Mod1Mask, "\033[1;3D", 0, 0},
{ XK_Left, ShiftMask|Mod1Mask,"\033[1;4D", 0, 0},
{ XK_Left, ControlMask, "\033[1;5D", 0, 0},
{ XK_Left, ShiftMask|ControlMask,"\033[1;6D", 0, 0},
{ XK_Left, ControlMask|Mod1Mask,"\033[1;7D", 0, 0},
{ XK_Left,ShiftMask|ControlMask|Mod1Mask,"\033[1;8D",0, 0},
{ XK_Left, XK_ANY_MOD, "\033[D", 0, -1},
{ XK_Left, XK_ANY_MOD, "\033OD", 0, +1},
{ XK_Right, ShiftMask, "\033[1;2C", 0, 0},
{ XK_Right, Mod1Mask, "\033[1;3C", 0, 0},
{ XK_Right, ShiftMask|Mod1Mask,"\033[1;4C", 0, 0},
{ XK_Right, ControlMask, "\033[1;5C", 0, 0},
{ XK_Right, ShiftMask|ControlMask,"\033[1;6C", 0, 0},
{ XK_Right, ControlMask|Mod1Mask,"\033[1;7C", 0, 0},
{ XK_Right,ShiftMask|ControlMask|Mod1Mask,"\033[1;8C",0, 0},
{ XK_Right, XK_ANY_MOD, "\033[C", 0, -1},
{ XK_Right, XK_ANY_MOD, "\033OC", 0, +1},
{ XK_ISO_Left_Tab, ShiftMask, "\033[Z", 0, 0},
{ XK_Return, Mod1Mask, "\033\r", 0, 0},
{ XK_Return, XK_ANY_MOD, "\r", 0, 0},
{ XK_Insert, ShiftMask, "\033[4l", -1, 0},
{ XK_Insert, ShiftMask, "\033[2;2~", +1, 0},
{ XK_Insert, ControlMask, "\033[L", -1, 0},
{ XK_Insert, ControlMask, "\033[2;5~", +1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[4h", -1, 0},
{ XK_Insert, XK_ANY_MOD, "\033[2~", +1, 0},
{ XK_Delete, ControlMask, "\033[M", -1, 0},
{ XK_Delete, ControlMask, "\033[3;5~", +1, 0},
{ XK_Delete, ShiftMask, "\033[2K", -1, 0},
{ XK_Delete, ShiftMask, "\033[3;2~", +1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[P", -1, 0},
{ XK_Delete, XK_ANY_MOD, "\033[3~", +1, 0},
{ XK_BackSpace, XK_NO_MOD, "\177", 0, 0},
{ XK_BackSpace, Mod1Mask, "\033\177", 0, 0},
{ XK_Home, ShiftMask, "\033[2J", 0, -1},
{ XK_Home, ShiftMask, "\033[1;2H", 0, +1},
{ XK_Home, XK_ANY_MOD, "\033[H", 0, -1},
{ XK_Home, XK_ANY_MOD, "\033[1~", 0, +1},
{ XK_End, ControlMask, "\033[J", -1, 0},
{ XK_End, ControlMask, "\033[1;5F", +1, 0},
{ XK_End, ShiftMask, "\033[K", -1, 0},
{ XK_End, ShiftMask, "\033[1;2F", +1, 0},
{ XK_End, XK_ANY_MOD, "\033[4~", 0, 0},
{ XK_Prior, ControlMask, "\033[5;5~", 0, 0},
{ XK_Prior, ShiftMask, "\033[5;2~", 0, 0},
{ XK_Prior, XK_ANY_MOD, "\033[5~", 0, 0},
{ XK_Next, ControlMask, "\033[6;5~", 0, 0},
{ XK_Next, ShiftMask, "\033[6;2~", 0, 0},
{ XK_Next, XK_ANY_MOD, "\033[6~", 0, 0},
{ XK_F1, XK_NO_MOD, "\033OP" , 0, 0},
{ XK_F1, /* F13 */ ShiftMask, "\033[1;2P", 0, 0},
{ XK_F1, /* F25 */ ControlMask, "\033[1;5P", 0, 0},
{ XK_F1, /* F37 */ Mod4Mask, "\033[1;6P", 0, 0},
{ XK_F1, /* F49 */ Mod1Mask, "\033[1;3P", 0, 0},
{ XK_F1, /* F61 */ Mod3Mask, "\033[1;4P", 0, 0},
{ XK_F2, XK_NO_MOD, "\033OQ" , 0, 0},
{ XK_F2, /* F14 */ ShiftMask, "\033[1;2Q", 0, 0},
{ XK_F2, /* F26 */ ControlMask, "\033[1;5Q", 0, 0},
{ XK_F2, /* F38 */ Mod4Mask, "\033[1;6Q", 0, 0},
{ XK_F2, /* F50 */ Mod1Mask, "\033[1;3Q", 0, 0},
{ XK_F2, /* F62 */ Mod3Mask, "\033[1;4Q", 0, 0},
{ XK_F3, XK_NO_MOD, "\033OR" , 0, 0},
{ XK_F3, /* F15 */ ShiftMask, "\033[1;2R", 0, 0},
{ XK_F3, /* F27 */ ControlMask, "\033[1;5R", 0, 0},
{ XK_F3, /* F39 */ Mod4Mask, "\033[1;6R", 0, 0},
{ XK_F3, /* F51 */ Mod1Mask, "\033[1;3R", 0, 0},
{ XK_F3, /* F63 */ Mod3Mask, "\033[1;4R", 0, 0},
{ XK_F4, XK_NO_MOD, "\033OS" , 0, 0},
{ XK_F4, /* F16 */ ShiftMask, "\033[1;2S", 0, 0},
{ XK_F4, /* F28 */ ControlMask, "\033[1;5S", 0, 0},
{ XK_F4, /* F40 */ Mod4Mask, "\033[1;6S", 0, 0},
{ XK_F4, /* F52 */ Mod1Mask, "\033[1;3S", 0, 0},
{ XK_F5, XK_NO_MOD, "\033[15~", 0, 0},
{ XK_F5, /* F17 */ ShiftMask, "\033[15;2~", 0, 0},
{ XK_F5, /* F29 */ ControlMask, "\033[15;5~", 0, 0},
{ XK_F5, /* F41 */ Mod4Mask, "\033[15;6~", 0, 0},
{ XK_F5, /* F53 */ Mod1Mask, "\033[15;3~", 0, 0},
{ XK_F6, XK_NO_MOD, "\033[17~", 0, 0},
{ XK_F6, /* F18 */ ShiftMask, "\033[17;2~", 0, 0},
{ XK_F6, /* F30 */ ControlMask, "\033[17;5~", 0, 0},
{ XK_F6, /* F42 */ Mod4Mask, "\033[17;6~", 0, 0},
{ XK_F6, /* F54 */ Mod1Mask, "\033[17;3~", 0, 0},
{ XK_F7, XK_NO_MOD, "\033[18~", 0, 0},
{ XK_F7, /* F19 */ ShiftMask, "\033[18;2~", 0, 0},
{ XK_F7, /* F31 */ ControlMask, "\033[18;5~", 0, 0},
{ XK_F7, /* F43 */ Mod4Mask, "\033[18;6~", 0, 0},
{ XK_F7, /* F55 */ Mod1Mask, "\033[18;3~", 0, 0},
{ XK_F8, XK_NO_MOD, "\033[19~", 0, 0},
{ XK_F8, /* F20 */ ShiftMask, "\033[19;2~", 0, 0},
{ XK_F8, /* F32 */ ControlMask, "\033[19;5~", 0, 0},
{ XK_F8, /* F44 */ Mod4Mask, "\033[19;6~", 0, 0},
{ XK_F8, /* F56 */ Mod1Mask, "\033[19;3~", 0, 0},
{ XK_F9, XK_NO_MOD, "\033[20~", 0, 0},
{ XK_F9, /* F21 */ ShiftMask, "\033[20;2~", 0, 0},
{ XK_F9, /* F33 */ ControlMask, "\033[20;5~", 0, 0},
{ XK_F9, /* F45 */ Mod4Mask, "\033[20;6~", 0, 0},
{ XK_F9, /* F57 */ Mod1Mask, "\033[20;3~", 0, 0},
{ XK_F10, XK_NO_MOD, "\033[21~", 0, 0},
{ XK_F10, /* F22 */ ShiftMask, "\033[21;2~", 0, 0},
{ XK_F10, /* F34 */ ControlMask, "\033[21;5~", 0, 0},
{ XK_F10, /* F46 */ Mod4Mask, "\033[21;6~", 0, 0},
{ XK_F10, /* F58 */ Mod1Mask, "\033[21;3~", 0, 0},
{ XK_F11, XK_NO_MOD, "\033[23~", 0, 0},
{ XK_F11, /* F23 */ ShiftMask, "\033[23;2~", 0, 0},
{ XK_F11, /* F35 */ ControlMask, "\033[23;5~", 0, 0},
{ XK_F11, /* F47 */ Mod4Mask, "\033[23;6~", 0, 0},
{ XK_F11, /* F59 */ Mod1Mask, "\033[23;3~", 0, 0},
{ XK_F12, XK_NO_MOD, "\033[24~", 0, 0},
{ XK_F12, /* F24 */ ShiftMask, "\033[24;2~", 0, 0},
{ XK_F12, /* F36 */ ControlMask, "\033[24;5~", 0, 0},
{ XK_F12, /* F48 */ Mod4Mask, "\033[24;6~", 0, 0},
{ XK_F12, /* F60 */ Mod1Mask, "\033[24;3~", 0, 0},
{ XK_F13, XK_NO_MOD, "\033[1;2P", 0, 0},
{ XK_F14, XK_NO_MOD, "\033[1;2Q", 0, 0},
{ XK_F15, XK_NO_MOD, "\033[1;2R", 0, 0},
{ XK_F16, XK_NO_MOD, "\033[1;2S", 0, 0},
{ XK_F17, XK_NO_MOD, "\033[15;2~", 0, 0},
{ XK_F18, XK_NO_MOD, "\033[17;2~", 0, 0},
{ XK_F19, XK_NO_MOD, "\033[18;2~", 0, 0},
{ XK_F20, XK_NO_MOD, "\033[19;2~", 0, 0},
{ XK_F21, XK_NO_MOD, "\033[20;2~", 0, 0},
{ XK_F22, XK_NO_MOD, "\033[21;2~", 0, 0},
{ XK_F23, XK_NO_MOD, "\033[23;2~", 0, 0},
{ XK_F24, XK_NO_MOD, "\033[24;2~", 0, 0},
{ XK_F25, XK_NO_MOD, "\033[1;5P", 0, 0},
{ XK_F26, XK_NO_MOD, "\033[1;5Q", 0, 0},
{ XK_F27, XK_NO_MOD, "\033[1;5R", 0, 0},
{ XK_F28, XK_NO_MOD, "\033[1;5S", 0, 0},
{ XK_F29, XK_NO_MOD, "\033[15;5~", 0, 0},
{ XK_F30, XK_NO_MOD, "\033[17;5~", 0, 0},
{ XK_F31, XK_NO_MOD, "\033[18;5~", 0, 0},
{ XK_F32, XK_NO_MOD, "\033[19;5~", 0, 0},
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0},
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0},
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0},
};
/*
* Selection types' masks.
* Use the same masks as usual.
* Button1Mask is always unset, to make masks match between ButtonPress.
* ButtonRelease and MotionNotify.
* If no match is found, regular selection is used.
*/
static uint selmasks[] = {
[SEL_RECTANGULAR] = Mod1Mask,
};
/*
* Printable characters in ASCII, used to estimate the advance width
* of single wide characters.
*/
static char ascii_printable[] =
" !\"#$%&'()*+,-./0123456789:;<=>?"
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
"`abcdefghijklmnopqrstuvwxyz{|}~";

View File

@ -0,0 +1,84 @@
diff --git a/config.def.h b/config.def.h
index 877afab..6a1699f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -84,44 +84,49 @@ static unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
- /* 8 normal colors */
- "black",
- "red3",
- "green3",
- "yellow3",
- "blue2",
- "magenta3",
- "cyan3",
- "gray90",
-
- /* 8 bright colors */
- "gray50",
- "red",
- "green",
- "yellow",
- "#5c5cff",
- "magenta",
- "cyan",
- "white",
-
- [255] = 0,
-
- /* more colors can be added after 255 to use with DefaultXX */
- "#cccccc",
- "#555555",
-};
+ /* 8 normal colors */
+ [0] = "#000000", /* black */
+ [1] = "#ff5555", /* red */
+ [2] = "#50fa7b", /* green */
+ [3] = "#f1fa8c", /* yellow */
+ [4] = "#bd93f9", /* blue */
+ [5] = "#ff79c6", /* magenta */
+ [6] = "#8be9fd", /* cyan */
+ [7] = "#bbbbbb", /* white */
+
+ /* 8 bright colors */
+ [8] = "#44475a", /* black */
+ [9] = "#ff5555", /* red */
+ [10] = "#50fa7b", /* green */
+ [11] = "#f1fa8c", /* yellow */
+ [12] = "#bd93f9", /* blue */
+ [13] = "#ff79c6", /* magenta */
+ [14] = "#8be9fd", /* cyan */
+ [15] = "#ffffff", /* white */
+
+ /* special colors */
+ [256] = "#282a36", /* background */
+ [257] = "#f8f8f2", /* foreground */
+};
/*
* Default colors (colorname index)
- * foreground, background, cursor, reverse cursor
+ * foreground, background, cursor
*/
-unsigned int defaultfg = 7;
-unsigned int defaultbg = 0;
-static unsigned int defaultcs = 256;
+unsigned int defaultfg = 257;
+unsigned int defaultbg = 256;
+static unsigned int defaultcs = 257;
static unsigned int defaultrcs = 257;
/*
+ * Colors used, when the specific fg == defaultfg. So in reverse mode this
+ * will reverse too. Another logic would only make the simple feature too
+ * complex.
+ */
+unsigned int defaultitalic = 7;
+unsigned int defaultunderline = 7;
+/*
* Default shape of cursor
* 2: Block ("█")
* 4: Underline ("_")

View File

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

View File

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

52
nixos/wayland.nix Normal file
View File

@ -0,0 +1,52 @@
# Wayland configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./gui.nix
];
environment = {
variables = {
TERMINAL = "foot";
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
];
configPackages = [
pkgs.xdg-desktop-portal-wlr
];
};
};
programs = {
river = {
enable = true;
extraPackages = with pkgs; [
bemenu
foot
mako
swaylock
way-displays
wtype
];
};
xwayland = {
enable = true;
};
};
users.users.${user.name}.packages = with pkgs; [
bemoji
cliphist
grimblast
imv
swww
tessen
wl-clipboard
];
environment.systemPackages = [
];
}

62
nixos/xorg.nix Normal file
View File

@ -0,0 +1,62 @@
# Xorg configuration.nix
{ config, lib, pkgs, inputs, user, ... }:
{
imports = [
./gui.nix
];
environment = {
variables = {
SXHKD_SHELL = "/bin/sh";
TERMINAL = "st";
};
};
xdg = {
autostart.enable = true;
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
configPackages = [
pkgs.gnome.gnome-session
];
};
};
services = {
xserver = {
enable = true;
displayManager.startx.enable = true;
windowManager.bspwm.enable = true;
layout = "us";
xkbVariant = "";
};
picom = {
enable = true;
};
};
programs = {
slock.enable = true;
};
users.users.${user.name}.packages = with pkgs; [
feh
scrot
];
environment.systemPackages = with pkgs; [
(dmenu.overrideAttrs (oldAttrs: rec {
configFile = writeText "config.def.h" (builtins.readFile ./patches/dmenu/config.h);
postPatch = "${oldAttrs.postPatch}\n cp ${configFile} config.def.h";
}))
(st.overrideAttrs (oldAttrs: rec {
configFile = writeText "config.def.h" (builtins.readFile ./patches/st/config.h);
postPatch = "${oldAttrs.postPatch}\n cp ${configFile} config.def.h";
}))
clipmenu
dunst
hsetroot
sxhkd
trayer
xbanish
xsel
];
}

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