all recent config changes
This commit is contained in:
@@ -1,131 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
|
||||
# overwrite alacritty package.... to the one with smooth scrolling....
|
||||
# for it you also need to add cursor.smooth_factor to the alacritty settings
|
||||
/*
|
||||
package = pkgs.alacritty.overrideAttrs ( final: prev: rec {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "gregthemadmonk";
|
||||
repo = "alacritty";
|
||||
rev = "master";
|
||||
sha256 = "2XFHVqXR5RyXpdNd+oimrwGHl4k0qaMzLO+WVGWnQ/M=";
|
||||
};
|
||||
#cargoSha256 = "0000000000000000000000000000000000000000000000000000";
|
||||
#cargoSha256 = "";
|
||||
|
||||
cargoDeps = prev.cargoDeps.overrideAttrs (_: {
|
||||
inherit src;
|
||||
outputHash = "sha256-6Gt9ikXrcBXtxHRSvKPEoLoVituxc3rTVDoWlGR4V7A=";
|
||||
# ...
|
||||
});
|
||||
});
|
||||
#*/
|
||||
settings = {
|
||||
#cursor.smooth_factor = 0.5;
|
||||
font = {
|
||||
normal = {
|
||||
family = "Hack";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Hack";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Hack";
|
||||
style = "Italic";
|
||||
};
|
||||
|
||||
bold_italic = {
|
||||
family = "Hack";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
|
||||
size = 8;
|
||||
};
|
||||
|
||||
# Dracula theme for alacritty
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
bright_foreground = "#ffffff";
|
||||
};
|
||||
cursor = {
|
||||
text = "CellBackground";
|
||||
cursor = "CellForeground";
|
||||
};
|
||||
vi_mode_cursor = {
|
||||
text = "CellBackground";
|
||||
cursor = "CellForeground";
|
||||
};
|
||||
search = {
|
||||
matches = {
|
||||
foreground = "#44475a";
|
||||
background = "#50fa7b";
|
||||
};
|
||||
focused_match = {
|
||||
foreground = "#44475a";
|
||||
background = "#ffb86c";
|
||||
};
|
||||
};
|
||||
footer_bar = {
|
||||
background = "#282a36";
|
||||
foreground = "#f8f8f2";
|
||||
};
|
||||
hints = {
|
||||
start = {
|
||||
foreground = "#282a36";
|
||||
background = "#f1fa8c";
|
||||
};
|
||||
end = {
|
||||
foreground = "#f1fa8c";
|
||||
background = "#282a36";
|
||||
};
|
||||
};
|
||||
line_indicator = {
|
||||
foreground = "None";
|
||||
background = "None";
|
||||
};
|
||||
selection = {
|
||||
text = "CellForeground";
|
||||
background = "#44475a";
|
||||
};
|
||||
normal = {
|
||||
black = "#21222c";
|
||||
red = "#ff5555";
|
||||
green = "#50fa7b";
|
||||
yellow = "#f1fa8c";
|
||||
blue = "#bd93f9";
|
||||
magenta = "#ff79c6";
|
||||
cyan = "#8be9fd";
|
||||
white = "#f8f8f2";
|
||||
};
|
||||
bright = {
|
||||
black = "#6272a4";
|
||||
red = "#ff6e6e";
|
||||
green = "#69ff94";
|
||||
yellow = "#ffffa5";
|
||||
blue = "#d6acff";
|
||||
magenta = "#ff92df";
|
||||
cyan = "#a4ffff";
|
||||
white = "#ffffff";
|
||||
};
|
||||
};
|
||||
|
||||
keyboard.bindings = [
|
||||
{ key = "V"; mods = "Control|Shift"; action = "Paste"; }
|
||||
{ key = "C"; mods = "Control|Shift"; action = "Copy"; }
|
||||
{ key = "J"; mods = "Control"; chars = ''\u001b\u005b\u0042''; }
|
||||
{ key = "K"; mods = "Control"; chars = ''\u001b\u005b\u0041''; }
|
||||
{ key = "H"; mods = "Control"; chars = ''\u001b\u005b\u0044''; }
|
||||
{ key = "L"; mods = "Control"; chars = ''\u001b\u005b\u0043''; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,366 +0,0 @@
|
||||
{ lib, secretsDir, confDir, hostname, self, pkgs, config, system, workDir, ... }:
|
||||
{
|
||||
programs.bash = {
|
||||
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
|
||||
historyFile = if hostname == "main" then "/home/$USER/work/app-data/${hostname}/bash-history" else "/home/$USER/host/bash-history";
|
||||
historyFileSize = 10000000;
|
||||
historyControl = [ "ignoredups" ];
|
||||
historyIgnore = [
|
||||
"ls"
|
||||
"cd"
|
||||
"exit"
|
||||
];
|
||||
|
||||
shellOptions = [
|
||||
# append to the history file, don't overwrite it
|
||||
"histappend"
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
"checkwinsize"
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
"globstar"
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
inherit system;
|
||||
# this does not work aparently....
|
||||
|
||||
# is needed to that ssh works
|
||||
# TERM = "xterm";
|
||||
|
||||
|
||||
TEST = "hiiiiiiiiiiiiiiiiiiiiiiiiiii";
|
||||
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
archive-video = "${lib.getExe pkgs.yt-dlp} -f \"bv*+ba/b\" --merge-output-format mp4 --embed-thumbnail --write-thumbnail --convert-thumbnails png --add-metadata -o \"%(title)s.%(ext)s\"";
|
||||
|
||||
#zed="WAYLAND_DISPLAY= zeditor";
|
||||
npm="pnpm";
|
||||
|
||||
ports = "${pkgs.lsof}/bin/lsof -i -P -n";
|
||||
losetup = "${pkgs.util-linux}/bin/losetup";
|
||||
u = "sudo umount ~/mnt";
|
||||
#log = let
|
||||
#log = pkgs.writeShellApplication {
|
||||
#name = "log";
|
||||
#runtimeInputs = [ inputs.my-log.packages.${system}.pythonForLog ];
|
||||
#text = "cd /home/me/work/log/new; nix develop -c 'python ${workDir}/log/new/client.py'";
|
||||
#text = if system == "x86_64-linux" then ''${inputs.my-log.packages.${system}.pythonForLog}/bin/python ${workDir}/log/new/client.py "$@"'' else "echo system not x86_84-linux";
|
||||
#};
|
||||
#in "${log}/bin/log";
|
||||
cdd = "/sdcard";
|
||||
n = "${pkgs.python3} ${self}/scripts/nav/main.py";
|
||||
shutdown = "echo try harder.... xD";
|
||||
npw = "nmcli c up pw";
|
||||
flex = "neofetch | lolcat";
|
||||
kwoche = "curl -k https://kalenderwoche.celll.net/?api=1; echo";
|
||||
psg = "ps -e | grep";
|
||||
vilias = "nvim -c 'set syntax=bash' ${confDir}/common/programs/bash.nix";
|
||||
stl = "sudo systemctl";
|
||||
vim = "nvim";
|
||||
sl = "ls";
|
||||
virsh = "virsh -c qemu:///system";
|
||||
nmgui = ''
|
||||
nm-applet 2>&1 > /dev/null &
|
||||
stalonetray 2>&1 > /dev/null
|
||||
killall nm-applet
|
||||
'';
|
||||
c = "cd ..";
|
||||
ne= "alacritty &";
|
||||
cbs = "history | tail -n 2 | head -n 1 | awk '{\$1=\"\"; print \$0}' | cut -c 2- | cb";
|
||||
gs = "git status";
|
||||
gitlog = "git log --all --graph";
|
||||
ipa= ''
|
||||
echo -e "IPv4:\n-----------------"
|
||||
ip -o a show | cut -d " " -f 2,7 | grep -v : | column -t
|
||||
echo -e "\nIPv6:\n-----------------"
|
||||
ip -o a show | cut -d " " -f 2,7 | grep : | column -t
|
||||
'';
|
||||
};
|
||||
|
||||
profileExtra = ''
|
||||
'';
|
||||
|
||||
bashrcExtra = ''
|
||||
export PATH=${self}/mybin:$PATH
|
||||
export TERM="xterm-color"
|
||||
export system=${system}
|
||||
export NIX_PATH=nixpkgs=${self.inputs.nixpkgs.outPath}
|
||||
export NIXPKGS_ALLOW_UNFREE=1
|
||||
|
||||
# the commit hash of the nixpkgs revs i use
|
||||
export nip="nixpkgs/${self.inputs.nixpkgs.rev}"
|
||||
export nup="nixpkgs/${self.inputs.nixpkgs-unstable.rev}"
|
||||
|
||||
# needed to make ssh -X work
|
||||
# see: https://unix.stackexchange.com/questions/412065/ssh-connection-x11-connection-rejected-because-of-wrong-authentication
|
||||
export XAUTHORITY=$HOME/.Xauthority
|
||||
|
||||
export nl="--log-format bar-with-logs"
|
||||
export acern="ssh://acern x86_64-linux,aarch64-linux - 20 10 big-parallel - -"
|
||||
export fe="ssh://fe x86_64-linux,aarch64-linux - 20 10 big-parallel - -"
|
||||
export mac="ssh://mac x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||
export mosatop="ssh://mosatop x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||
export hpm="ssh://hpm x86_64-linux,aarch64-linux - 8 5 big-parallel - -"
|
||||
|
||||
# my prompt
|
||||
if [[ "${hostname}" == "main" ]]
|
||||
then
|
||||
#export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ "
|
||||
#export PS1="\[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] > "
|
||||
# \n\[\033[1;34m\][\[\e]0;\u@\h: \w\a\]\u@\h:\w]\$\[\033[0m\]
|
||||
#export PS1="\W > ";
|
||||
|
||||
export PS1="\[\033[01;34m\]\W\033[00m ❯❯❯ "
|
||||
else
|
||||
#export PS1="\033[1;32m${hostname}❯ \[\033[01;34m\]\W\[\033[00m\]\[\033[01;32m\]\[\033[00m\] ❯❯❯ "
|
||||
|
||||
export PS1="\033[1;32m${hostname}\[\033[01;34m\] \W\033[00m ❯❯❯ "
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
function lf () {
|
||||
${config.programs.lf.package}/bin/lf -last-dir-path /tmp/lf-last-path && cd $(cat /tmp/lf-last-path)
|
||||
}
|
||||
|
||||
|
||||
function vic() {
|
||||
source ~/work/victorinix/vic
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# function to create a tmpdir, to use for some temporary work....
|
||||
# made this, to not just keep cluttering my $HOME... with all kinds of projects
|
||||
function mt () {
|
||||
export TOPDIR=$HOME/tmp
|
||||
mkdir -p $TOPDIR
|
||||
cd $(${pkgs.python3}/bin/python ${self}/scripts/quick-tmp-dir.py "$@")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
# so that programms i spawn from my shell don't have so high cpu priority
|
||||
[ which renice 2>/dev/null ] && renice -n 9 $$ > /dev/null
|
||||
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
*i*) ;;
|
||||
*) return;;
|
||||
esac
|
||||
|
||||
|
||||
# make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# making reverse search "going back" work with strg+s
|
||||
stty -ixon
|
||||
|
||||
|
||||
#################### functions ####################
|
||||
|
||||
nrel(){
|
||||
nix repl --expr "rec { nixpkgs = builtins.getFlake \"nixpkgs\"; pkgs = import nixpkgs {}; flake = builtins.getFlake \"git+file://$(pwd)\"; out = flake.packages.x86_64-linux;} $@"
|
||||
}
|
||||
|
||||
# shortcut for copying over to tab
|
||||
tta(){
|
||||
if [[ "$1" == "" ]]
|
||||
then
|
||||
rsync -rv --delete ~/work/fast/ tab:/sdcard/fast
|
||||
elif [[ "$1" == "p" ]]
|
||||
then
|
||||
rsync -rv tab:/sdcard/fast/* ~/work/fast
|
||||
elif [[ "$1" == "k" ]]
|
||||
then
|
||||
scp -O "$1" tab:/sdcard/keep
|
||||
else
|
||||
scp -O "$1" tab:/sdcard/fast/
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
tph(){
|
||||
if [[ "$1" == "" ]]
|
||||
then
|
||||
rsync -rv --delete ~/work/fast/ phone:/sdcard/fast
|
||||
elif [[ "$1" == "p" ]]
|
||||
then
|
||||
rsync -rv phone:/sdcard/fast/* ~/work/fast
|
||||
elif [[ "$1" == "k" ]]
|
||||
then
|
||||
scp -O "$1" tab:/sdcard/keep
|
||||
else
|
||||
scp "$1" phone:/sdcard/fast/
|
||||
fi
|
||||
}
|
||||
|
||||
# A shortcut function that simplifies usage of xclip.
|
||||
# - Accepts input from either stdin (pipe), or params.
|
||||
# ------------------------------------------------
|
||||
cb() {
|
||||
local _scs_col="\e[0;32m"; local _wrn_col='\e[1;31m'; local _trn_col='\e[0;33m'
|
||||
|
||||
# Check user is not root (root doesn't have access to user xorg server)
|
||||
if [[ "$USER" == "root" ]]; then
|
||||
echo -e "$_wrn_col""Must be regular user (not root) to copy a file to the clipboard.\e[0m"
|
||||
else
|
||||
# If no tty, data should be available on stdin
|
||||
if ! [[ "$( tty )" == /dev/* ]]; then
|
||||
input="$(< /dev/stdin)"
|
||||
# Else, fetch input from params
|
||||
else
|
||||
input="$*"
|
||||
fi
|
||||
if [ -z "$input" ]; then # If no input, print usage message.
|
||||
echo "Copies a string to the clipboard."
|
||||
echo "Usage: cb <string>"
|
||||
echo " echo <string> | cb"
|
||||
else
|
||||
# Copy input to clipboard
|
||||
echo -n "$input" | wl-copy
|
||||
# Truncate text for status
|
||||
if [ ''${#input} -gt 80 ]; then input="$(echo $input | cut -c1-80)$_trn_col...\e[0m"; fi
|
||||
# Print status.
|
||||
echo -e "$_scs_col""Copied to clipboard:\e[0m $input"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# git commit func
|
||||
function gc(){
|
||||
tmp=$(echo -en $@)
|
||||
git commit -m "$tmp"
|
||||
}
|
||||
|
||||
|
||||
# while true -> do cat.....
|
||||
function follow (){
|
||||
while true;
|
||||
do
|
||||
cat $@;
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# little looping func
|
||||
function loop (){
|
||||
if [ "$1" == "-s" ]
|
||||
then
|
||||
for (( i=1; i<=$3; i++ )); do sleep $2; ''${@:4}; done
|
||||
return
|
||||
fi
|
||||
case $1 in
|
||||
${"''"}|*[!0-9]*)
|
||||
# infinit iterations
|
||||
while true; do $@; done
|
||||
return
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
for (( i=1; i<=$1; i++ ));do ''${@:2}; done
|
||||
}
|
||||
|
||||
|
||||
function psk(){
|
||||
ps -e | grep $1 | awk '{print $1}' | xargs kill
|
||||
}
|
||||
|
||||
|
||||
sd() {
|
||||
if [ "$1" == "" ]
|
||||
then
|
||||
sudo -E $(history | tail -n 2 | head -n 1 | awk '{$1=""; print $0}')
|
||||
else
|
||||
sudo -E $@
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# rech
|
||||
function rech(){
|
||||
python3 -c "print($@)"
|
||||
}
|
||||
|
||||
# cam
|
||||
function cam(){
|
||||
xset r rate 130 85
|
||||
xinput set-prop "ZMK Project Charybdis Mouse" 304 60
|
||||
xinput set-prop "Charybdis Mouse" 304 60
|
||||
id=$(xinput | grep Charybdis | tail -n 1 | awk '{print $4}' | cut -c4- )
|
||||
echo id: $id
|
||||
setxkbmap -device $id -layout us
|
||||
|
||||
id=$(xinput | grep Charybdis | tail -n 1 | awk '{print $6}' | cut -c4- )
|
||||
echo id: $id
|
||||
setxkbmap -device $id -layout us
|
||||
}
|
||||
|
||||
# map
|
||||
function map(){
|
||||
source $
|
||||
if [ "$1" == "" ]
|
||||
then
|
||||
bash ~/work/virtchord/reset
|
||||
xmodmap \
|
||||
-e "clear control" \
|
||||
-e "clear mod1" \
|
||||
-e "keycode 64 = Control_L" \
|
||||
-e "keycode 37 = Alt_L" \
|
||||
-e "add control = Control_L" \
|
||||
-e "add mod1 = Alt_L"
|
||||
|
||||
xset r rate 130 85
|
||||
|
||||
elif [ "$1" != "" ]
|
||||
then
|
||||
echo -en "set-map $1" > ~/work/config/virtchord/pipe1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# cf - copy file
|
||||
function cf() { cat "$1" | cb; }
|
||||
|
||||
|
||||
# shorter zathura
|
||||
function zath(){
|
||||
zathura "$@" 2>/dev/null &
|
||||
}
|
||||
|
||||
|
||||
# shorter mupdf
|
||||
function mu(){
|
||||
mupdf "$@" 1>/dev/null 2>/dev/null &
|
||||
}
|
||||
|
||||
|
||||
# ipaa
|
||||
function ipaa(){
|
||||
ip -json addr show $1 | jq -r '.[] | .addr_info[] | select(.family == "inet") | .local'
|
||||
}
|
||||
|
||||
#################### completions ####################
|
||||
complete -cf sudo
|
||||
complete -cf sd
|
||||
complete -W "start stop restart status daemon-reload" stl
|
||||
|
||||
# run
|
||||
complete -W "mnt-wechner sync-school wstunnel hibernate p speed-test-nixos-iso speed-test-upload speed-test-download bat bstat mnt-files-local mnt-lan-local mnt-files-remote mnt-lan-remote suspend rm-tab-cur rm-last-char mnt-school mnt-host davinci-resolve-convert-videos" ru
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{ inputs, self, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.nix-doom-emacs.hmModule
|
||||
];
|
||||
programs.doom-emacs = {
|
||||
enable = true;
|
||||
doomPrivateDir = "${self}/programs/emacs";
|
||||
};
|
||||
}
|
||||
@@ -1,191 +0,0 @@
|
||||
;;; init.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; This file controls what Doom modules are enabled and what order they load
|
||||
;; in. Remember to run 'doom sync' after modifying it!
|
||||
|
||||
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
|
||||
;; documentation. There you'll find a "Module Index" link where you'll find
|
||||
;; a comprehensive list of Doom's modules and what flags they support.
|
||||
|
||||
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
|
||||
;; 'C-c c k' for non-vim users) to view its documentation. This works on
|
||||
;; flags as well (those symbols that start with a plus).
|
||||
;;
|
||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||
;; directory (for easy access to its source code).
|
||||
|
||||
(doom! :input
|
||||
;;chinese
|
||||
;;japanese
|
||||
;;layout ; auie,ctsrnm is the superior home row
|
||||
|
||||
:completion
|
||||
company ; the ultimate code completion backend
|
||||
;;helm ; the *other* search engine for love and life
|
||||
;;ido ; the other *other* search engine...
|
||||
;;ivy ; a search engine for love and life
|
||||
vertico ; the search engine of the future
|
||||
|
||||
:ui
|
||||
;;deft ; notational velocity for Emacs
|
||||
doom ; what makes DOOM look the way it does
|
||||
doom-dashboard ; a nifty splash screen for Emacs
|
||||
doom-quit ; DOOM quit-message prompts when you quit Emacs
|
||||
;;(emoji +unicode) ; 🙂
|
||||
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
|
||||
;;hydra
|
||||
;;indent-guides ; highlighted indent columns
|
||||
;;ligatures ; ligatures and symbols to make your code pretty again
|
||||
;;minimap ; show a map of the code on the side
|
||||
modeline ; snazzy, Atom-inspired modeline, plus API
|
||||
;;nav-flash ; blink cursor line after big motions
|
||||
;;neotree ; a project drawer, like NERDTree for vim
|
||||
ophints ; highlight the region an operation acts on
|
||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||
;;tabs ; a tab bar for Emacs
|
||||
;;treemacs ; a project drawer, like neotree but cooler
|
||||
;;unicode ; extended unicode support for various languages
|
||||
vc-gutter ; vcs diff in the fringe
|
||||
vi-tilde-fringe ; fringe tildes to mark beyond EOB
|
||||
;;window-select ; visually switch windows
|
||||
workspaces ; tab emulation, persistence & separate workspaces
|
||||
;;zen ; distraction-free coding or writing
|
||||
|
||||
:editor
|
||||
(evil +everywhere); come to the dark side, we have cookies
|
||||
file-templates ; auto-snippets for empty files
|
||||
fold ; (nigh) universal code folding
|
||||
;;(format +onsave) ; automated prettiness
|
||||
;;god ; run Emacs commands without modifier keys
|
||||
;;lispy ; vim for lisp, for people who don't like vim
|
||||
;;multiple-cursors ; editing in many places at once
|
||||
;;objed ; text object editing for the innocent
|
||||
;;parinfer ; turn lisp into python, sort of
|
||||
;;rotate-text ; cycle region at point between text candidates
|
||||
snippets ; my elves. They type so I don't have to
|
||||
;;word-wrap ; soft wrapping with language-aware indent
|
||||
|
||||
:emacs
|
||||
dired ; making dired pretty [functional]
|
||||
electric ; smarter, keyword-based electric-indent
|
||||
;;ibuffer ; interactive buffer management
|
||||
undo ; persistent, smarter undo for your inevitable mistakes
|
||||
vc ; version-control and Emacs, sitting in a tree
|
||||
|
||||
:term
|
||||
;;eshell ; the elisp shell that works everywhere
|
||||
;;shell ; simple shell REPL for Emacs
|
||||
;;term ; basic terminal emulator for Emacs
|
||||
;;vterm ; the best terminal emulation in Emacs
|
||||
|
||||
:checkers
|
||||
syntax ; tasing you for every semicolon you forget
|
||||
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
;;docker
|
||||
;;editorconfig ; let someone else argue about tabs vs spaces
|
||||
;;ein ; tame Jupyter notebooks with emacs
|
||||
(eval +overlay) ; run code, run (also, repls)
|
||||
;;gist ; interacting with github gists
|
||||
lookup ; navigate your code and its documentation
|
||||
;;lsp ; M-x vscode
|
||||
magit ; a git porcelain for Emacs
|
||||
;;make ; run make tasks from Emacs
|
||||
;;pass ; password manager for nerds
|
||||
;;pdf ; pdf enhancements
|
||||
;;prodigy ; FIXME managing external services & code builders
|
||||
;;rgb ; creating color strings
|
||||
;;taskrunner ; taskrunner for all your projects
|
||||
;;terraform ; infrastructure as code
|
||||
;;tmux ; an API for interacting with tmux
|
||||
;;upload ; map local to remote projects via ssh/ftp
|
||||
|
||||
:os
|
||||
(:if IS-MAC macos) ; improve compatibility with macOS
|
||||
;;tty ; improve the terminal Emacs experience
|
||||
|
||||
:lang
|
||||
;;agda ; types of types of types of types...
|
||||
;;beancount ; mind the GAAP
|
||||
;;cc ; C > C++ == 1
|
||||
;;clojure ; java with a lisp
|
||||
;;common-lisp ; if you've seen one lisp, you've seen them all
|
||||
;;coq ; proofs-as-programs
|
||||
;;crystal ; ruby at the speed of c
|
||||
;;csharp ; unity, .NET, and mono shenanigans
|
||||
;;data ; config/data formats
|
||||
;;(dart +flutter) ; paint ui and not much else
|
||||
;;dhall
|
||||
;;elixir ; erlang done right
|
||||
;;elm ; care for a cup of TEA?
|
||||
emacs-lisp ; drown in parentheses
|
||||
;;erlang ; an elegant language for a more civilized age
|
||||
;;ess ; emacs speaks statistics
|
||||
;;factor
|
||||
;;faust ; dsp, but you get to keep your soul
|
||||
;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
|
||||
;;fsharp ; ML stands for Microsoft's Language
|
||||
;;fstar ; (dependent) types and (monadic) effects and Z3
|
||||
;;gdscript ; the language you waited for
|
||||
;;(go +lsp) ; the hipster dialect
|
||||
;;(haskell +lsp) ; a language that's lazier than I am
|
||||
;;hy ; readability of scheme w/ speed of python
|
||||
;;idris ; a language you can depend on
|
||||
;;json ; At least it ain't XML
|
||||
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
|
||||
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
|
||||
;;julia ; a better, faster MATLAB
|
||||
;;kotlin ; a better, slicker Java(Script)
|
||||
;;latex ; writing papers in Emacs has never been so fun
|
||||
;;lean ; for folks with too much to prove
|
||||
;;ledger ; be audit you can be
|
||||
;;lua ; one-based indices? one-based indices
|
||||
markdown ; writing docs for people to ignore
|
||||
;;nim ; python + lisp at the speed of c
|
||||
;;nix ; I hereby declare "nix geht mehr!"
|
||||
;;ocaml ; an objective camel
|
||||
org ; organize your plain life in plain text
|
||||
;;php ; perl's insecure younger brother
|
||||
;;plantuml ; diagrams for confusing people more
|
||||
;;purescript ; javascript, but functional
|
||||
;;python ; beautiful is better than ugly
|
||||
;;qt ; the 'cutest' gui framework ever
|
||||
;;racket ; a DSL for DSLs
|
||||
;;raku ; the artist formerly known as perl6
|
||||
;;rest ; Emacs as a REST client
|
||||
;;rst ; ReST in peace
|
||||
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
|
||||
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
|
||||
;;scala ; java, but good
|
||||
;;(scheme +guile) ; a fully conniving family of lisps
|
||||
sh ; she sells {ba,z,fi}sh shells on the C xor
|
||||
;;sml
|
||||
;;solidity ; do you need a blockchain? No.
|
||||
;;swift ; who asked for emoji variables?
|
||||
;;terra ; Earth and Moon in alignment for performance.
|
||||
;;web ; the tubes
|
||||
;;yaml ; JSON, but readable
|
||||
;;zig ; C, but simpler
|
||||
|
||||
:email
|
||||
;;(mu4e +org +gmail)
|
||||
;;notmuch
|
||||
;;(wanderlust +gmail)
|
||||
|
||||
:app
|
||||
;;calendar
|
||||
;;emms
|
||||
;;everywhere ; *leave* Emacs!? You must be joking
|
||||
;;irc ; how neckbeards socialize
|
||||
;;(rss +org) ; emacs as an RSS reader
|
||||
;;twitter ; twitter client https://twitter.com/vnought
|
||||
|
||||
:config
|
||||
;;literate
|
||||
(default +bindings +smartparens))
|
||||
@@ -1,79 +0,0 @@
|
||||
{ pkgs, inputs, system, lib, persistentDir, config, secretsDir, ... }:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin.overrideAttrs (old: {
|
||||
NIX_CFLAGS_COMPILE = [ (old.NIX_CFLAGS_COMPILE or "") ] ++ [ "-O3" "-march=native" "-fPIC" ];
|
||||
});
|
||||
profiles.me = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
extensions =
|
||||
with inputs.firefox-addons.packages.${system};
|
||||
with (import ./my-extensions.nix {
|
||||
inherit fetchurl lib stdenv;
|
||||
buildFirefoxXpiAddon = inputs.firefox-addons.lib.${system}.buildFirefoxXpiAddon;
|
||||
});
|
||||
[
|
||||
# from extra-firefox-extensions.nix
|
||||
adguard-adblocker
|
||||
grepper
|
||||
visionary-bold-fixed
|
||||
|
||||
|
||||
# to search: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/generated-firefox-addons.nix?ref_type=heads
|
||||
# ref: https://github.com/Misterio77/nix-config/blob/main/home/misterio/features/desktop/common/firefox.nix#L5
|
||||
# ref: https://github.com/Misterio77/nix-config/blob/main/flake.nix#L66
|
||||
onetab
|
||||
bitwarden
|
||||
|
||||
];
|
||||
settings = import ./user-settings.nix {};
|
||||
extraConfig = ''
|
||||
lockPref("browser.theme.content-theme", 0)
|
||||
'';
|
||||
};
|
||||
/*
|
||||
profiles.old = {
|
||||
isDefault = false;
|
||||
id = 1;
|
||||
path = "../../old/app-data/firefox/me";
|
||||
};
|
||||
# */
|
||||
profiles.testing = {
|
||||
id = 2;
|
||||
isDefault = false;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
############ persistent folders of my profile ##################
|
||||
home.file = {
|
||||
".mozilla/firefox/me/places.sqlite" = {
|
||||
force = true;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/firefox-data/places.sqlite";
|
||||
# ref: https://github.com/nix-community/home-manager/issues/676
|
||||
# - link goes into the store, and then out again.... xD
|
||||
};
|
||||
".mozilla/firefox/me/places.sqlite-wal" = {
|
||||
force = true;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/firefox-data/places.sqlite-wal";
|
||||
};
|
||||
|
||||
# one tab storage path
|
||||
".mozilla/firefox/me/storage/default/moz-extension+++e2297551-90b4-4da0-92c8-1d00cda2d080^userContextId=4294967295" = {
|
||||
force = true;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/firefox-data/onetab-folder";
|
||||
};
|
||||
|
||||
# bitwarden storage path
|
||||
# makes bitwarden keep loading forever
|
||||
/*
|
||||
".mozilla/firefox/me/storage/default/moz-extension+++e563a533-4e66-4b75-bbec-176bb803d96c^userContextId=4294967295" = {
|
||||
force = true;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${secretsDir}/firefox-bitwarden-folder";
|
||||
};
|
||||
# */
|
||||
};
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
{ buildFirefoxXpiAddon, fetchurl, lib, stdenv }@args:
|
||||
let
|
||||
buildFirefoxXpiAddonFromFile = lib.makeOverridable ({ stdenv ? args.stdenv
|
||||
, fetchurl ? args.fetchurl, pname, version, addonId, path, meta, ...
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
|
||||
inherit meta;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = true;
|
||||
|
||||
buildCommand = ''
|
||||
dst="$out/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
|
||||
mkdir -p "$dst"
|
||||
install -v -m644 "$path" "$dst/${addonId}.xpi"
|
||||
'';
|
||||
});
|
||||
|
||||
packages = import ./generated-firefox-addons.nix {
|
||||
inherit buildFirefoxXpiAddon fetchurl lib stdenv;
|
||||
};
|
||||
in
|
||||
{
|
||||
/*
|
||||
"onetab" = buildFirefoxXpiAddonFromFile {
|
||||
pname = "onetab";
|
||||
version = "4.2.240";
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
|
||||
"visionary-bold-fixed" = buildFirefoxXpiAddon {
|
||||
pname = "visionary-bold-fixed";
|
||||
version = "1.0";
|
||||
addonId = "{8d38d24a-dd1b-4142-8873-bbaa32e4e44f}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4122855/visionary_bold_fixed-1.0.xpi";
|
||||
sha256 = "c4aed779329b980c7e59cf2353e54108713d60b515b918bf7a535f9944c01ae8";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "As you could notice almost all new mozilla's dark themes (colorways bold) are little broken (dark tabs on dark background). I decided to fix this moment in Visionary Bold theme.";
|
||||
license = licenses.cc-by-30;
|
||||
mozPermissions = [];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"visionary-bold" = buildFirefoxXpiAddon {
|
||||
pname = "visionary-bold";
|
||||
version = "2.1";
|
||||
addonId = "visionary-bold-colorway@mozilla.org";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4066246/visionary_bold-2.1.xpi";
|
||||
sha256 = "73b6a25f41877f2c199c0b07ef28d25f69b067ab56bc08cf238e9fb89dfa92d9";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "You question the status quo and move others to imagine a better future.";
|
||||
license = licenses.cc-by-30;
|
||||
mozPermissions = [];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"atom-one-dark-theme2" = buildFirefoxXpiAddon {
|
||||
pname = "atom-one-dark-theme2";
|
||||
version = "2.0";
|
||||
addonId = "{53de5a1e-f54c-45f7-b86e-09f0161b85f3}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3369239/atom_one_dark_theme2-2.0.xpi";
|
||||
sha256 = "3168163ab8bf2da4a64d10f266c50fd0a03226c6260b60cbcbb4e8779db53b02";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "the atom dark theme extrack for the oponime software";
|
||||
mozPermissions = [];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"simple-style-fox" = buildFirefoxXpiAddon {
|
||||
pname = "simple-style-fox";
|
||||
version = "4.0";
|
||||
addonId = "{05914925-648e-42bc-9024-3b4ea9ec379e}";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3890846/simple_style_fox-4.0.xpi";
|
||||
sha256 = "2d8369ca5215030db03dcce61c3bf4c358fe0c97b6a3e89a64a146063195c038";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "Simple style fox";
|
||||
license = licenses.cc-by-30;
|
||||
mozPermissions = [];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"adguard-adblocker" = buildFirefoxXpiAddon {
|
||||
pname = "adguard-adblocker";
|
||||
version = "4.2.240";
|
||||
addonId = "adguardadblocker@adguard.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4209021/adguard_adblocker-4.2.240.xpi";
|
||||
sha256 = "30790a6d58a2ccc31dc703544f25ef193a8a60074bf2f5775097739db4bcc2e0";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://adguard.com/";
|
||||
description = "Unmatched adblock extension against advertising and pop-ups. Blocks ads on Facebook, Youtube and all other websites.";
|
||||
license = licenses.lgpl3;
|
||||
mozPermissions = [
|
||||
"tabs"
|
||||
"<all_urls>"
|
||||
"webRequest"
|
||||
"webRequestBlocking"
|
||||
"webNavigation"
|
||||
"storage"
|
||||
"contextMenus"
|
||||
"cookies"
|
||||
"privacy"
|
||||
"http://*/*"
|
||||
"https://*/*"
|
||||
"*://*.adguard.com/*/thankyou.html*"
|
||||
"*://*.adguard.info/*/thankyou.html*"
|
||||
"*://*.adguard.app/*/thankyou.html*"
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"grepper" = buildFirefoxXpiAddon {
|
||||
pname = "grepper";
|
||||
version = "0.0.8.9";
|
||||
addonId = "grepper@codegrepper.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4069054/grepper-0.0.8.9.xpi";
|
||||
sha256 = "17db8b2f138f442882f7db5ba40e6d2af591c45e322cf3262628705c76af1b04";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "The Query & Answer System for the Coder Community";
|
||||
mozPermissions = [
|
||||
"storage"
|
||||
"webRequest"
|
||||
"activeTab"
|
||||
"<all_urls>"
|
||||
"alarms"
|
||||
"https://www.google.com/*"
|
||||
"https://www.google.co.uk/*"
|
||||
"https://www.google.co.za/*"
|
||||
"https://www.google.co.th/*"
|
||||
"https://www.google.co.jp/*"
|
||||
"https://www.google.co.il/*"
|
||||
"https://www.google.es/*"
|
||||
"https://www.google.ca/*"
|
||||
"https://www.google.de/*"
|
||||
"https://www.google.it/*"
|
||||
"https://www.google.fr/*"
|
||||
"https://www.google.com.au/*"
|
||||
"https://www.google.com.ph/*"
|
||||
"https://www.google.com.tw/*"
|
||||
"https://www.google.com.br/*"
|
||||
"https://www.google.com.ua/*"
|
||||
"https://www.google.com.my/*"
|
||||
"https://www.google.com.hk/*"
|
||||
"https://www.google.ru/*"
|
||||
"https://www.google.com.tr/*"
|
||||
"https://www.google.be/*"
|
||||
"https://www.google.com.gr/*"
|
||||
"https://www.google.co.in/*"
|
||||
"https://www.google.com.mx/*"
|
||||
"https://www.google.dk/*"
|
||||
"https://www.google.com.ar/*"
|
||||
"https://www.google.ch/*"
|
||||
"https://www.google.cl/*"
|
||||
"https://www.google.co.kr/*"
|
||||
"https://www.google.com.co/*"
|
||||
"https://www.google.pl/*"
|
||||
"https://www.google.pt/*"
|
||||
"https://www.google.com.pk/*"
|
||||
"https://www.google.co.id/*"
|
||||
"https://www.google.com.vn/*"
|
||||
"https://www.google.nl/*"
|
||||
"https://www.google.se/*"
|
||||
"https://www.google.com.sg/*"
|
||||
"http://*/*"
|
||||
"https://*/*"
|
||||
"http://localhost:8888/grepper_app/*"
|
||||
"https://www.codegrepper.com/*"
|
||||
"https://www.grepper.com/*"
|
||||
"https://staging.codegrepper.com/*"
|
||||
"https://www.grepper.com/app/notifications.php"
|
||||
];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
{ ... }: {
|
||||
|
||||
# added over time
|
||||
"browser.tabs.insertAfterCurrent" = true;
|
||||
"browser.tabs.unloadOnLowMemory" = true;
|
||||
"browser.low_commit_space_threshold_mb" = 3000;
|
||||
|
||||
# general
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"extensions.enabledScopes" = 15;
|
||||
"browser.search.region" = "AT";
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
"javascript.options.mem.gc_parallel_marking" = true;
|
||||
"browser.download.dir" = "/home/me/work/downloads";
|
||||
"browser.startup.couldRestoreSession.count" = 5;
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
"devtools.everOpened" = true;
|
||||
"middlemouse.paste" = false;
|
||||
"browser.download.folderList" = 1;
|
||||
"extensions.langpacks.signatures.required" = false;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
|
||||
# better widnow settings for tiling vm
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
|
||||
# so that firefox reacts fast to changes in /etc/hosts
|
||||
"network.dnsCacheExpiration" = 0;
|
||||
|
||||
# dont sync theme
|
||||
# so that "browser.theme.content-theme" is not always set to 2
|
||||
"services.sync.prefs.sync.extensions.activeThemeID" = false;
|
||||
|
||||
# allow to install my own addons
|
||||
"xpinstall.signatures.required" = false;
|
||||
"xpinstall.whitelist.required" = true;
|
||||
|
||||
# set theme
|
||||
#"extensions.activeThemeID" = "visionary-bold-colorway@mozilla.org";
|
||||
# - this one does not work
|
||||
"extensions.activeThemeID" = "{8d38d24a-dd1b-4142-8873-bbaa32e4e44f}";
|
||||
"browser.theme.content-theme" = 0; # content dark theme
|
||||
"browser.theme.toolbar-theme" = 0; # toolbar dark theme
|
||||
|
||||
|
||||
# have acces to browser console
|
||||
"devtools.chrome.enabled" = true;
|
||||
|
||||
#always show downloads button
|
||||
"browser.download.autohideButton" = false;
|
||||
|
||||
# better cache
|
||||
"browser.cache.disk.capacity" = 4560000;
|
||||
"browser.cache.disk.smart_size.enabled" = false;
|
||||
"browser.cache.check_doc_frequency" = 2;
|
||||
# http://kb.mozillazine.org/Browser.cache.check_doc_frequency
|
||||
|
||||
|
||||
# the header customisation
|
||||
"browser.uiCustomization.state" = ''{"placements":{"widget-overflow-fixed-list":["sync-button"],"unified-extensions-area":["jid1-93cwpmrbvpjrqa_jetpack-browser-action","_react-devtools-browser-action","grepper_codegrepper_com-browser-action","simple-translate_sienori-browser-action","_d04b0b40-3dab-4f0b-97a6-04ec3eddbfb0_-browser-action","_b0721213-dc0b-4ae0-8436-8c14f0022a37_-browser-action"],"nav-bar":["back-button","forward-button","stop-reload-button","home-button","customizableui-special-spring1","urlbar-container","zoom-controls","customizableui-special-spring7","screenshot-button","fullscreen-button","developer-button","bookmarks-menu-button","downloads-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","adguardadblocker_adguard_com-browser-action","extension_one-tab_com-browser-action","side-view_mozilla_org-browser-action","unified-extensions-button","reset-pbm-toolbar-button"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["preferences-button","personal-bookmarks"]},"seen":["developer-button","_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action","extension_one-tab_com-browser-action","_d04b0b40-3dab-4f0b-97a6-04ec3eddbfb0_-browser-action","grepper_codegrepper_com-browser-action","save-to-pocket-button","_react-devtools-browser-action","jid1-93cwpmrbvpjrqa_jetpack-browser-action","adguardadblocker_adguard_com-browser-action","side-view_mozilla_org-browser-action","simple-translate_sienori-browser-action","profiler-button","reset-pbm-toolbar-button","_b0721213-dc0b-4ae0-8436-8c14f0022a37_-browser-action"],"dirtyAreaCache":["nav-bar","PersonalToolbar","toolbar-menubar","TabsToolbar","widget-overflow-fixed-list","unified-extensions-area"],"currentVersion":20,"newElementCount":26}'';
|
||||
|
||||
|
||||
# keep extension uuids the same ... so that the bitwaredne pass-store and onetab stores stay the same
|
||||
|
||||
"extensions.webextensions.uuids" = builtins.toJSON {
|
||||
"extension@one-tab.com" = "e2297551-90b4-4da0-92c8-1d00cda2d080";
|
||||
"adguardadblocker@adguard.com" = "b73239bf-cb93-4985-8f3b-71b32a3b3527";
|
||||
"grepper@codegrepper.com" = "7cfa9e68-fba7-4eb9-8f3b-d4562a31b476";
|
||||
|
||||
# bitwarden
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = "e563a533-4e66-4b75-bbec-176bb803d96c";
|
||||
};
|
||||
|
||||
"extensions.webextensions.ExtensionStorageIDB.migrated.adguardadblocker@adguard.com" = true;
|
||||
"extensions.webextensions.ExtensionStorageIDB.migrated.extension@one-tab.com" = true;
|
||||
"extensions.webextensions.ExtensionStorageIDB.migrated.grepper@codegrepper.com" = true;
|
||||
"extensions.webextensions.ExtensionStorageIDB.migrated.screenshots@mozilla.org" = true;
|
||||
"extensions.webextensions.ExtensionStorageIDB.migrated.{446900e4-71c2-419f-a6a7-df9c091e268b}" = true;
|
||||
|
||||
|
||||
# to not show startup dialogs
|
||||
"browser.eme.ui.firstContentShown" = true;
|
||||
"browser.engagement.ctrlTab.has-used" = true;
|
||||
"browser.engagement.downloads-button.has-used" = true;
|
||||
"browser.engagement.fxa-toolbar-menu-button.has-used" = true;
|
||||
"browser.engagement.home-button.has-used" = true;
|
||||
"browser.engagement.library-button.has-used" = true;
|
||||
"browser.engagement.sidebar-button.has-used" = true;
|
||||
"distribution.archlinux.bookmarksProcessed" = true;
|
||||
"distribution.canonical.bookmarksProcessed" = true;
|
||||
"distribution.iniFile.exists.appversion" = "122.0a1";
|
||||
"distribution.iniFile.exists.value" = false;
|
||||
"distribution.nixos.bookmarksProcessed" = true;
|
||||
"browser.firefox-view.feature-tour" = ''{"message":"FIREFOX_VIEW_FEATURE_TOUR","screen":"","complete":true}'';
|
||||
"trailhead.firstrun.didSeeAboutWelcome" = true;
|
||||
|
||||
|
||||
# disable autofill
|
||||
"signon.autofillForms" = false;
|
||||
"signon.firefoxRelay.feature" = "offered";
|
||||
"signon.generation.enabled" = false;
|
||||
"signon.management.page.breach-alerts.enabled" = false;
|
||||
"signon.rememberSignons" = false;
|
||||
|
||||
|
||||
# interesting
|
||||
# browser.bookmarks.defaultLocation toolbar_____
|
||||
# browser.migration.version 142
|
||||
# browser.fixup.dns_first_for_single_words true
|
||||
# browser.fixup.domainwhitelist.router true
|
||||
# browser.startup.homepage about:blank
|
||||
# extensions.activeThemeID visionary-bold-colorway@mozilla.org
|
||||
# network.dns.offline-localhost false
|
||||
# network.dnsCacheExpiration 0
|
||||
# pref.privacy.disable_button.cookie_exceptions false
|
||||
# pref.privacy.disable_button.tracking_protection_exceptions false
|
||||
# pref.privacy.disable_button.view_passwords false
|
||||
|
||||
|
||||
################### devtools not used ##########################
|
||||
#devtools.aboutdebugging.collapsibilities.processes false
|
||||
|
||||
#devtools.debugger.end-panel-size 57
|
||||
#devtools.debugger.event-listeners-visible true
|
||||
#devtools.debugger.pause-on-caught-exceptions false
|
||||
|
||||
#devtools.debugger.prefs-schema-version 11
|
||||
#devtools.debugger.remote-enabled true
|
||||
#devtools.debugger.start-panel-size 155
|
||||
|
||||
|
||||
#devtools.netmonitor.msg.visibleColumns ["data","time"]
|
||||
#devtools.netmonitor.panes-network-details-height 403
|
||||
#devtools.netmonitor.panes-network-details-width 549
|
||||
#devtools.netmonitor.panes-search-height 237
|
||||
#devtools.netmonitor.panes-search-width 250
|
||||
#devtools.performance.new-panel-onboarding false
|
||||
#devtools.performance.recording.entries 134217728
|
||||
#devtools.performance.recording.features ["screenshots","js","stackwalk","cpu","processcpu"]
|
||||
#devtools.performance.recording.threads ["GeckoMain","Compositor","Renderer","SwComposite","DOM Worker"]
|
||||
#devtools.responsive.reloadNotification.enabled false
|
||||
#devtools.responsive.viewport.height 732
|
||||
#devtools.responsive.viewport.width 680
|
||||
#devtools.theme auto
|
||||
#devtools.theme.show-auto-theme-info false
|
||||
#devtools.toolbox.footer.height 633
|
||||
#devtools.toolbox.host right
|
||||
#devtools.toolbox.previousHost bottom
|
||||
#devtools.toolbox.sidebar.width 431
|
||||
#devtools.toolbox.splitconsoleHeight 98
|
||||
#devtools.toolbox.tabsOrder inspector,webconsole,netmonitor,jsdebugger,styleeditor,performance,memory,storage,accessibility,application
|
||||
#devtools.toolbox.zoomValue 1.2
|
||||
#devtools.toolsidebar-height.inspector 345
|
||||
#devtools.toolsidebar-width.inspector 383
|
||||
#devtools.toolsidebar-width.inspector.splitsidebar 225
|
||||
#devtools.webconsole.filter.debug false
|
||||
#devtools.webconsole.filter.info false
|
||||
#devtools.webconsole.input.editorOnboarding false
|
||||
#devtools.webconsole.input.editorWidth 393
|
||||
#devtools.webextensions.@react-devtools.enabled true
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Sebastian Moser";
|
||||
userEmail = "sebastian@c2vi.dev";
|
||||
|
||||
extraConfig.credential.helper = "manager";
|
||||
extraConfig.credential."https://git.htlec.org".username = "c2vi";
|
||||
extraConfig.credential.credentialStore = "cache";
|
||||
|
||||
extraConfig = {
|
||||
core.editor = "nvim";
|
||||
core.color.ui = true;
|
||||
core.pager = "delta";
|
||||
core.excludesfile = "~/.config/git/gitignore";
|
||||
};
|
||||
};
|
||||
home.packages = [ pkgs.git-credential-manager ];
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
# Colors for filenames in lf
|
||||
|
||||
# file types (with matching order)
|
||||
ln 01;36 # LINK
|
||||
or 31;01 # ORPHAN
|
||||
tw 38;5;47 # STICKY_OTHER_WRITABLE
|
||||
ow 38;5;47 # OTHER_WRITABLE
|
||||
st 01;34 # STICKY
|
||||
di 01;34 # DIR
|
||||
pi 33 # FIFO
|
||||
so 01;35 # SOCK
|
||||
bd 33;01 # BLK
|
||||
cd 33;01 # CHR
|
||||
su 01;32 # SETUID
|
||||
sg 01;32 # SETGID
|
||||
ex 01;32 # EXEC
|
||||
fi 00 # FILE
|
||||
|
||||
# archives or compressed
|
||||
*.tar 01;31
|
||||
*.tgz 01;31
|
||||
*.arc 01;31
|
||||
*.arj 01;31
|
||||
*.taz 01;31
|
||||
*.lha 01;31
|
||||
*.lz4 01;31
|
||||
*.lzh 01;31
|
||||
*.lzma 01;31
|
||||
*.tlz 01;31
|
||||
*.txz 01;31
|
||||
*.tzo 01;31
|
||||
*.t7z 01;31
|
||||
*.zip 01;31
|
||||
*.xpi 01;31
|
||||
*.z 01;31
|
||||
*.dz 01;31
|
||||
*.gz 01;31
|
||||
*.lrz 01;31
|
||||
*.lz 01;31
|
||||
*.lzo 01;31
|
||||
*.xz 01;31
|
||||
*.zst 01;31
|
||||
*.tzst 01;31
|
||||
*.bz2 01;31
|
||||
*.bz 01;31
|
||||
*.tbz 01;31
|
||||
*.tbz2 01;31
|
||||
*.tz 01;31
|
||||
*.deb 01;31
|
||||
*.rpm 01;31
|
||||
*.jar 01;31
|
||||
*.war 01;31
|
||||
*.ear 01;31
|
||||
*.sar 01;31
|
||||
*.rar 01;31
|
||||
*.alz 01;31
|
||||
*.ace 01;31
|
||||
*.zoo 01;31
|
||||
*.cpio 01;31
|
||||
*.7z 01;31
|
||||
*.rz 01;31
|
||||
*.cab 01;31
|
||||
*.wim 01;31
|
||||
*.swm 01;31
|
||||
*.dwm 01;31
|
||||
*.esd 01;31
|
||||
|
||||
# image formats
|
||||
*.jpg 38;5;202
|
||||
*.JPG 38;5;202
|
||||
*.jpeg 38;5;202
|
||||
*.mjpg 38;5;202
|
||||
*.mjpeg 38;5;202
|
||||
*.jxl 38;5;202
|
||||
*.JXL 38;5;202
|
||||
*.webp 38;5;202
|
||||
*.gif 38;5;202
|
||||
*.bmp 38;5;202
|
||||
*.pbm 38;5;202
|
||||
*.pgm 38;5;202
|
||||
*.ppm 38;5;202
|
||||
*.tga 38;5;202
|
||||
*.xbm 38;5;202
|
||||
*.xpm 38;5;202
|
||||
*.tif 38;5;202
|
||||
*.tiff 38;5;202
|
||||
*.png 38;5;202
|
||||
*.svg 38;5;202
|
||||
*.svgz 38;5;202
|
||||
*.mng 38;5;202
|
||||
*.odg 38;5;202
|
||||
*.pcx 38;2;218;8;255
|
||||
*.mov 38;2;218;8;255
|
||||
*.mpg 38;2;218;8;255
|
||||
*.mpeg 38;2;218;8;255
|
||||
*.m2v 38;2;218;8;255
|
||||
*.mkv 38;2;218;8;255
|
||||
*.webm 38;2;218;8;255
|
||||
*.ogm 38;2;218;8;255
|
||||
*.mp4 38;2;218;8;255
|
||||
*.m4v 38;2;218;8;255
|
||||
*.mp4v 38;2;218;8;255
|
||||
*.vob 38;2;218;8;255
|
||||
*.qt 38;2;218;8;255
|
||||
*.nuv 38;2;218;8;255
|
||||
*.wmv 38;2;218;8;255
|
||||
*.asf 38;2;218;8;255
|
||||
*.rm 38;2;218;8;255
|
||||
*.rmvb 38;2;218;8;255
|
||||
*.flc 38;2;218;8;255
|
||||
*.avi 38;2;218;8;255
|
||||
*.fli 38;2;218;8;255
|
||||
*.flv 38;2;218;8;255
|
||||
*.gl 38;2;218;8;255
|
||||
*.dl 38;2;218;8;255
|
||||
*.xcf 38;2;218;8;255
|
||||
*.xwd 38;2;218;8;255
|
||||
*.yuv 38;2;218;8;255
|
||||
*.cgm 38;2;218;8;255
|
||||
*.emf 38;2;218;8;255
|
||||
*.ogv 38;2;218;8;255
|
||||
*.ogx 38;2;218;8;255
|
||||
|
||||
# audio formats
|
||||
*.aac 00;36
|
||||
*.au 00;36
|
||||
*.flac 00;36
|
||||
*.m4a 00;36
|
||||
*.mid 00;36
|
||||
*.midi 00;36
|
||||
*.mka 00;36
|
||||
*.mp3 00;36
|
||||
*.mpc 00;36
|
||||
*.ogg 00;36
|
||||
*.ra 00;36
|
||||
*.wav 00;36
|
||||
*.oga 00;36
|
||||
*.opus 00;36
|
||||
*.spx 00;36
|
||||
*.xspf 00;36
|
||||
|
||||
# other formats
|
||||
*.pdf 38;2;249;46;73
|
||||
*.PDF 38;2;249;46;73
|
||||
*.ps 38;2;249;46;73
|
||||
*.epub 38;2;249;46;73
|
||||
*.mobi 38;2;249;46;73
|
||||
*.ods 92
|
||||
*.xls 92
|
||||
*.XLS 92
|
||||
*.xlsx 92
|
||||
*.XLSX 92
|
||||
*.odt 94
|
||||
*.doc 94
|
||||
*.DOC 94
|
||||
*.docx 94
|
||||
*.DOCX 94
|
||||
*.odp 38;2;249;62;0
|
||||
*.ppt 38;2;249;62;0
|
||||
*.PPT 38;2;249;62;0
|
||||
*.pptx 38;2;249;62;0
|
||||
*.PPTX 38;2;249;62;0
|
||||
*.iso 38;5;221
|
||||
*.img 38;5;221
|
||||
*.py 38;5;220
|
||||
*.lua 38;5;39
|
||||
*.js 38;5;226
|
||||
*.htm 38;5;202
|
||||
*.html 38;5;202
|
||||
*.shtml 38;5;202
|
||||
*.xhtml 38;5;202
|
||||
*.css 38;5;39
|
||||
*.go 38;5;39
|
||||
*.php 38;5;75
|
||||
*.tex 38;5;36
|
||||
*.c 38;2;121;168;244
|
||||
*.cpp 38;2;141;116;244
|
||||
*.cs 38;2;203;121;244
|
||||
*.nim 38;5;220
|
||||
*.nims 38;5;220
|
||||
*.r 38;5;39
|
||||
*.R 38;5;39
|
||||
*.rs 38;2;225;105;0
|
||||
*.pl 38;2;0;115;255
|
||||
*.raku 38;2;225;0;221
|
||||
*.m 38;2;225;43;7
|
||||
*.java 38;2;225;136;0
|
||||
*.scala 38;5;196
|
||||
*.rb 38;5;196
|
||||
*.vim 32
|
||||
*.sql 38;5;249
|
||||
*.sqlite 38;5;249
|
||||
*.db 38;5;249
|
||||
*.odb 38;5;249
|
||||
*.apk 38;5;82
|
||||
*.apk 38;5;82
|
||||
*.jl 38;5;147
|
||||
*.hs 38;5;133
|
||||
*.lhs 38;5;133
|
||||
*.blend 38;5;208
|
||||
@@ -1,199 +0,0 @@
|
||||
{ pkgs, self, confDir, system, inputs, ... }@params:
|
||||
{
|
||||
home.file.".config/lf/icons".source = "${self}/programs/lf/icons";
|
||||
programs.lf = let
|
||||
|
||||
myUeberzug = pkgs.ueberzugpp.overrideAttrs (prev: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jstkdng";
|
||||
repo = "ueberzugpp";
|
||||
rev = "528fb0fd6719477308e779aa6dab6040faa698cc";
|
||||
hash = "sha256-VdfpWJOMlC4Ly2lDFvJ+BnOmaM71gLEaIkfwLqzAi/8=";
|
||||
};
|
||||
cmakeFlags = prev.cmakeFlags or [] ++ [ "-DENABLE_SWAY=ON" ];
|
||||
});
|
||||
|
||||
oldpkgs = (builtins.getFlake "nixpkgs/release-25.05").legacyPackages.${system};
|
||||
mylf = oldpkgs.lf.overrideAttrs (final: prev: {
|
||||
patches = (prev.patches or [ ]) ++ [
|
||||
./lf-filter.patch
|
||||
];
|
||||
/*
|
||||
src = pkgs.fetchFromGitHub { # use the old v35 version of lf... so that my patch applies
|
||||
owner = "gokcehan";
|
||||
repo = "lf";
|
||||
rev = "r35";
|
||||
hash = "sha256-0ZyIbEKiQ9l30gqHlpW7l/6/TzqVRvnKk9c2FiQ6E6Y=";
|
||||
};
|
||||
*/
|
||||
checkPhase = "";
|
||||
});
|
||||
|
||||
myCleaner = pkgs.writeShellApplication {
|
||||
name = "myCleaner";
|
||||
|
||||
runtimeInputs = with pkgs; [ myUeberzug ];
|
||||
|
||||
text = ''
|
||||
ueberzugpp cmd -s "$UB_SOCKET" -a remove -i PREVIEW
|
||||
UB_PID=$(cat "$UB_PID_FILE")
|
||||
kill "$UB_PID"
|
||||
'';
|
||||
};
|
||||
|
||||
myPreviewer = pkgs.writeShellApplication {
|
||||
name = "myPreviewer";
|
||||
runtimeInputs = with pkgs; [
|
||||
file
|
||||
gnumeric
|
||||
catdoc
|
||||
odt2txt
|
||||
transmission_4
|
||||
libcdio
|
||||
p7zip
|
||||
unrar
|
||||
xz
|
||||
bat # (text)
|
||||
exiftool
|
||||
ffmpegthumbnailer
|
||||
myUeberzug # (images, videos, pdf, fonts)
|
||||
ffmpegthumbnailer # (videos)
|
||||
exiftool # (metadata/audio, and file detection for .webm files)
|
||||
jq # (json and metadata)
|
||||
lynx # (html/web pages)
|
||||
poppler-utils # pdftoppm # (pdf)
|
||||
odt2txt # (odt)
|
||||
imagemagick # convert from imagemagick (fonts)
|
||||
atool # (archives)
|
||||
gnupg # (PGP encrypted files)
|
||||
man # (troff manuals)
|
||||
coreutils #busybox # other
|
||||
];
|
||||
text = builtins.readFile "${self}/programs/lf/previewer";
|
||||
};
|
||||
|
||||
mylfWrapper = pkgs.writeShellApplication {
|
||||
name = "lf";
|
||||
|
||||
runtimeInputs = with pkgs; [ mylf myUeberzug util-linux ];
|
||||
|
||||
text = ''
|
||||
|
||||
# This is a wrapper script for lf that allows it to create image previews with
|
||||
# ueberzug. This works in concert with the lf configuration file and the
|
||||
# lf-cleaner script.
|
||||
|
||||
set -e
|
||||
set +o nounset
|
||||
|
||||
UB_PID=0
|
||||
UB_SOCKET=""
|
||||
|
||||
case "$(uname -a)" in
|
||||
*Darwin*) UEBERZUG_TMP_DIR="$TMPDIR" ;;
|
||||
*) UEBERZUG_TMP_DIR="/tmp" ;;
|
||||
esac
|
||||
|
||||
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
|
||||
${mylf}/bin/lf "$@"
|
||||
else
|
||||
[ ! -d "$HOME/.cache/lf" ] && mkdir -p "$HOME/.cache/lf"
|
||||
UB_PID_FILE="$UEBERZUG_TMP_DIR/.$(uuidgen)"
|
||||
ueberzugpp layer --silent --no-stdin --use-escape-codes --pid-file "$UB_PID_FILE"
|
||||
UB_PID=$(cat "$UB_PID_FILE")
|
||||
UB_SOCKET="$UEBERZUG_TMP_DIR/ueberzugpp-''${UB_PID}.socket"
|
||||
export UB_PID UB_SOCKET
|
||||
|
||||
${mylf}/bin/lf "$@"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
package = mylfWrapper // { inherit myUeberzug; };
|
||||
|
||||
enable = true;
|
||||
commands = {
|
||||
dragon-out = ''%${pkgs.dragon-drop}/bin/xdragon -a -x "$fx"'';
|
||||
editor-open = ''$$EDITOR $f'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory Name: "
|
||||
read DIR
|
||||
mkdir $DIR
|
||||
}}
|
||||
'';
|
||||
nav = ''
|
||||
%{{${pkgs.python3}/bin/python3 ${confDir}/scripts/nav/main.py --mode lf}}
|
||||
'';
|
||||
nav-home = ''
|
||||
%{{
|
||||
${pkgs.python3}/bin/python3 ${confDir}/scripts/nav/main.py --mode lf --char H
|
||||
}}
|
||||
'';
|
||||
nav-work = ''
|
||||
%{{
|
||||
${pkgs.python3}/bin/python3 ${confDir}/scripts/nav/main.py --mode lf --char W
|
||||
}}
|
||||
'';
|
||||
};
|
||||
settings = {
|
||||
icons = true;
|
||||
drawbox = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
keybindings = {
|
||||
# sort by time
|
||||
mt = ":set sortby time; set info time; set reverse";
|
||||
# sort normally
|
||||
ms = ":set sortby natural; set info; set reverse!";
|
||||
F = "setfilter";
|
||||
P = "%pwd";
|
||||
W = "nav-work";
|
||||
H = "nav-home";
|
||||
n = "nav";
|
||||
"." = "set hidden!";
|
||||
"<enter>" = "open";
|
||||
do = "dragon-out";
|
||||
"gh" = "cd";
|
||||
"g/" = "/";
|
||||
ee = "editor-open";
|
||||
V = ''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"'';
|
||||
};
|
||||
extraConfig = ''
|
||||
%test $LF_LEVEL -eq 1 || >&2 printf "Warning: You're in a nested lf instance!"
|
||||
# export pid and ppid
|
||||
''${{
|
||||
myPID=$(ps -j | grep lf | tail -n 1 | awk '{print $1}')
|
||||
myPGID=$(ps -j | grep lf | tail -n 1 | awk '{print $2}')
|
||||
lf -remote "send $id set user_pid $myPID"
|
||||
lf -remote "send $id set user_pgid $myPGID"
|
||||
}}
|
||||
|
||||
source ${self}/programs/lf/opener
|
||||
set cleaner "${myCleaner}/bin/myCleaner"
|
||||
set cursorpreviewfmt "\033[7m"
|
||||
set previewer "${myPreviewer}/bin/myPreviewer"
|
||||
set period "1"
|
||||
|
||||
#set promptfmt "
|
||||
#\033[48;2;35;38;39;38;2;28;220;156m
|
||||
#\033[38;2;35;38;39;48;2;202;31;31m
|
||||
#\033[38;2;202;31;31;48;2;40;47;62m
|
||||
#\033[38;2;255;255;255m %w
|
||||
#\033[38;2;40;47;62;48;2;58;67;89m
|
||||
#\033[38;2;255;255;255m %f
|
||||
#\033[;38;2;58;67;89;49m\033[m"
|
||||
|
||||
set timefmt "2023-11-28 15:04:05 "
|
||||
set waitmsg "\033[1;31m⏎\033[m"
|
||||
set tabstop 4
|
||||
set shellopts "-eu"
|
||||
set ifs "\n"
|
||||
set shell "bash"
|
||||
#set ruler "df:acc:progress:selection:filter:ind"
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,455 +0,0 @@
|
||||
# Icons for lf
|
||||
|
||||
# These icons require Nerd Fonts and emojis in a compatible font for terminals
|
||||
# See https://www.nerdfonts.com for more information.
|
||||
# Note: some double space emojis/icons render as 1-character width in some
|
||||
# terminals and as 2-character width in others. I'm adjusting them to make
|
||||
# them look aligned in the 'Alacritty' terminal
|
||||
|
||||
# file types (with matching order)
|
||||
ln 🔗 # LINK
|
||||
or ❌ # ORPHAN
|
||||
tw 🍃 # STICKY_OTHER_WRITABLE
|
||||
ow 📂 # OTHER_WRITABLE
|
||||
st 🔖 # STICKY
|
||||
di 📁 # DIR
|
||||
pi " " # FIFO
|
||||
so 🔌 # SOCK
|
||||
bd 🧱 # BLK
|
||||
cd " " # CHR
|
||||
su 🦸 # SETUID
|
||||
sg 👥 # SETGID
|
||||
ex 🎯 # EXEC
|
||||
fi 📄 # FILE
|
||||
|
||||
# file extensions (vim-devicons)
|
||||
*.styl " "
|
||||
*.sass " "
|
||||
*.scss " "
|
||||
*.htm " "
|
||||
*.html " "
|
||||
*.xhtml " "
|
||||
*.shtml " "
|
||||
*.slim " "
|
||||
*.haml " "
|
||||
*.ejs " "
|
||||
*.css " "
|
||||
*.qss " "
|
||||
*.rasi " "
|
||||
*.less " "
|
||||
*.wiki " "
|
||||
*.md " "
|
||||
*.mdx " "
|
||||
*.markdown " "
|
||||
*.rmd " "
|
||||
*.Rmd " "
|
||||
*.xml " "
|
||||
*.json " "
|
||||
*.bson " "
|
||||
*.webmanifest " "
|
||||
*.js " "
|
||||
*.mjs " "
|
||||
*.jsx " "
|
||||
*.rb " "
|
||||
*.gemspec " "
|
||||
*.rake " "
|
||||
*.php " "
|
||||
*.py " "
|
||||
*.pyc " "
|
||||
*.pyo " "
|
||||
*.pyd " "
|
||||
*.ipynb " "
|
||||
*.nim "👑"
|
||||
*.nims "👑"
|
||||
*.coffee " "
|
||||
*.mustache " "
|
||||
*.hbs " "
|
||||
*.conf "⚙ "
|
||||
*.ini "⚙ "
|
||||
*.yml "⚙ "
|
||||
*.yaml "⚙ "
|
||||
*.toml "⚙ "
|
||||
*.mk "⚙ "
|
||||
*.twig " "
|
||||
*.cpp " "
|
||||
*.c++ " "
|
||||
*.cxx " "
|
||||
*.cc " "
|
||||
*.cp " "
|
||||
*.c " "
|
||||
*.cs " "
|
||||
*.h " "
|
||||
*.hh " "
|
||||
*.hpp " "
|
||||
*.hxx " "
|
||||
*.hs " "
|
||||
*.lhs " "
|
||||
*.nix " "
|
||||
*.lua " "
|
||||
*.java " "
|
||||
*.sh " "
|
||||
*.fish " "
|
||||
*.bash " "
|
||||
*.zsh " "
|
||||
*.ksh " "
|
||||
*.csh " "
|
||||
*.awk " "
|
||||
*.sed " "
|
||||
*.m4 " "
|
||||
*.cmd " "
|
||||
*.bat " "
|
||||
*.ps1 " "
|
||||
*.ml " λ"
|
||||
*.mli " λ"
|
||||
*.diff " "
|
||||
*.db " "
|
||||
*.odb " "
|
||||
*.sql " "
|
||||
*.sqlite " "
|
||||
*.dump " "
|
||||
*.mongo " "
|
||||
*.rdb " "
|
||||
*.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 " ﳒ"
|
||||
*.R " ﳒ"
|
||||
*.rproj "鉶"
|
||||
*.sol " ﲹ"
|
||||
*.apk " "
|
||||
*.xapk " "
|
||||
*.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 "⚙ "
|
||||
*.git " "
|
||||
*.gitconfig " "
|
||||
*.gitignore " "
|
||||
*.gitattributes " "
|
||||
*.gitlab-ci.yml " "
|
||||
*bashrc "⚙ "
|
||||
*.zshrc "⚙ "
|
||||
*.zshenv "⚙ "
|
||||
*.zprofile "⚙ "
|
||||
*.vimrc " "
|
||||
*.gvimrc " "
|
||||
*_vimrc " "
|
||||
*_gvimrc " "
|
||||
*.bashprofile "⚙ "
|
||||
*favicon.ico " "
|
||||
*license "📜"
|
||||
*licence "📜"
|
||||
*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 "📜"
|
||||
*LICENCE "📜"
|
||||
*COPYING "📜"
|
||||
*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
|
||||
*.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 📦
|
||||
*.xpi 📦
|
||||
|
||||
# image and video extensions
|
||||
*.jpg 📸
|
||||
*.JPG 📸
|
||||
*.jpeg 📸
|
||||
*.JPEG 📸
|
||||
*.jpe 📸
|
||||
*.mjpg 📸
|
||||
*.mjpeg 📸
|
||||
*.jxl "🖼 "
|
||||
*.JXL "🖼 "
|
||||
*.svg "🗺 "
|
||||
*.svgz "🗺 "
|
||||
*.bmp "🖼 "
|
||||
*.pbm "🖼 "
|
||||
*.pgm "🖼 "
|
||||
*.ppm "🖼 "
|
||||
*.tga "🖼 "
|
||||
*.xbm "🖼 "
|
||||
*.xpm "🖼 "
|
||||
*.tif "🖼 "
|
||||
*.tiff "🖼 "
|
||||
*.png "🖼 "
|
||||
*.PNG "🖼 "
|
||||
*.webp "🖼 "
|
||||
*.mng "🖼 "
|
||||
*.pcx "🖼 "
|
||||
*.ico "🖼 "
|
||||
*.gif "🎞 "
|
||||
*.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 🎥
|
||||
*.kdenlive 🎬
|
||||
*.prproj 🎬
|
||||
|
||||
# audio extensions
|
||||
*.wav 🎼
|
||||
*.aac 🎵
|
||||
*.au 🎵
|
||||
*.flac 🎵
|
||||
*.m4a 🎵
|
||||
*.mid 🎵
|
||||
*.midi 🎵
|
||||
*.mka 🎵
|
||||
*.mp3 🎵
|
||||
*.mpc 🎵
|
||||
*.ogg 🎵
|
||||
*.ra 🎵
|
||||
*.oga 🎵
|
||||
*.opus 🎵
|
||||
*.spx 🎵
|
||||
*.xspf 🎵
|
||||
|
||||
# other extensions
|
||||
*.elf " "
|
||||
*.exe " "
|
||||
*.appx " "
|
||||
*.msi " "
|
||||
*.app " "
|
||||
*.pdf " "
|
||||
*.PDF " "
|
||||
*.ps " "
|
||||
*.txt 📝
|
||||
*.TXT 📝
|
||||
*.csv 📓
|
||||
*.CSV 📓
|
||||
*.tsv 📓
|
||||
*.djvu 📚
|
||||
*.epub 📚
|
||||
*.torrent 📥
|
||||
*.magnet 🧲
|
||||
*.lrc 🎤
|
||||
*.kar 🎤
|
||||
*.src 💬
|
||||
*.gpg 🔐
|
||||
*.ssh 🔑
|
||||
*.key 🔑
|
||||
*.rsa 🔑
|
||||
*.pem 🔑
|
||||
*.sig 🪪
|
||||
*.asc "🕵 "
|
||||
*.manifest 📜
|
||||
*.log 📙
|
||||
*.xopp 📔
|
||||
*.iso 📀
|
||||
*.img 📀
|
||||
*.bib 🎓
|
||||
*.nfo " "
|
||||
*.info " "
|
||||
*.m 📊
|
||||
*.ods 📗
|
||||
*.xls 📗
|
||||
*.XLS 📗
|
||||
*.xlsx 📗
|
||||
*.XLSX 📗
|
||||
*.odt 📘
|
||||
*.doc 📘
|
||||
*.DOC 📘
|
||||
*.docx 📘
|
||||
*.DOCX 📘
|
||||
*.odp 📕
|
||||
*.ppt 📕
|
||||
*.PPT 📕
|
||||
*.pptx 📕
|
||||
*.PPTX 📕
|
||||
*.odg "🖼 "
|
||||
*.krita "🖌 "
|
||||
*.kra "🖌 "
|
||||
*.xcf "🖌 "
|
||||
*.eml 📧
|
||||
*.mom "✍ "
|
||||
*.me "✍ "
|
||||
*.ms "✍ "
|
||||
*.groff "✍ "
|
||||
*.tbl "✍ "
|
||||
*.pic "✍ "
|
||||
*.blend " "
|
||||
*.ffpreset " "
|
||||
*.bak "🗃 "
|
||||
*.desktop "🖥 "
|
||||
*.z64 🎮
|
||||
*.v64 🎮
|
||||
*.n64 🎮
|
||||
*.gba 🎮
|
||||
*.nes 🎮
|
||||
*.gdi 🎮
|
||||
*.gam 🎮
|
||||
*.sav 🎮
|
||||
*.scm 🎮
|
||||
*.bin 🎮
|
||||
*.psv 🎮
|
||||
*.rom 🎮
|
||||
*.xex 🎮
|
||||
*.jrz 🎮
|
||||
*.efi " "
|
||||
|
||||
# vim:ft=conf
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/nav.go b/nav.go
|
||||
index c32fc97..95cc2ce 100644
|
||||
--- a/nav.go
|
||||
+++ b/nav.go
|
||||
@@ -1774,7 +1774,7 @@ func searchMatch(name, pattern string) (matched bool, err error) {
|
||||
if gOpts.globsearch {
|
||||
return filepath.Match(pattern, name)
|
||||
}
|
||||
- return strings.Contains(name, pattern), nil
|
||||
+ return strings.HasPrefix(name, pattern), nil
|
||||
}
|
||||
|
||||
func (nav *nav) searchNext() (bool, error) {
|
||||
@@ -1,242 +0,0 @@
|
||||
# Opener for lf
|
||||
|
||||
# En general, deberías delegar la apertura de ficheros a tu abridor de
|
||||
# recursos (e.g. xdg-open, mimeo), recomiendo ponerlo en la variable de
|
||||
# entorno $OPENER y luego configurar sus reglas de asociaciones entre tipos
|
||||
# MIME y lanzadores .desktop (e.g. ~/.config/applications/mimeapps.list)
|
||||
# Sin embargo, acá se puede programar comportamiento más avanzado basado
|
||||
# en más características de los ficheros y/o específicamente para lf
|
||||
# Tipos MIME IANA oficiales: https://www.iana.org/assignments/media-types/media-types.xhtml
|
||||
|
||||
cmd open ${{
|
||||
|
||||
# Demonizador de comandos, en orden de preferencia
|
||||
dem() {
|
||||
{ setsid -f "$@" >/dev/null 2>&1& } \
|
||||
|| ({ nohup "$@" >/dev/null 2>&1& } &) \
|
||||
|| (exec "$@" >/dev/null 2>&1&)
|
||||
}
|
||||
|
||||
real_f="$(readlink -f $f || realpath $f)" \
|
||||
|
||||
mime_type="$(\
|
||||
exiftool -s3 -MIMEType "$real_f" 2>/dev/null \
|
||||
|| file --dereference -b --mime-type -- "$real_f" 2>/dev/null
|
||||
)"
|
||||
|
||||
case "$mime_type" in
|
||||
(application/pdf | application/postscript | image/vnd.djvu | application/epub*)
|
||||
dem "${READER:-zathura}" $fx
|
||||
;;
|
||||
(text/html)
|
||||
case "${f##*.}" in
|
||||
(xls) dem localc $f ;;
|
||||
(*) "${EDITOR:-nvim}" $fx
|
||||
esac
|
||||
;;
|
||||
(text/troff)
|
||||
case "${f##*.}" in
|
||||
([0-9] | [01]p | [23]*) man $fx ;;
|
||||
(*) "${EDITOR:-nvim}" $fx
|
||||
esac
|
||||
;;
|
||||
( text/* | application/json | application/javascript | \
|
||||
application/pgp-encrypted | inode/x-empty | application/octet-stream | \
|
||||
application/x-gettext-translation )
|
||||
"${EDITOR:-nvim}" $fx
|
||||
;;
|
||||
(image/x-*)
|
||||
dem "${IMAGE_EDITOR:-gimp}" $fx
|
||||
;;
|
||||
(image/* )
|
||||
case "$(tty)" in
|
||||
("/dev/tty"*) # En tty imágenes pueden ser mostradas con mpv
|
||||
"${MPV:-mpv}" --keep-open $fx
|
||||
;;
|
||||
(*) dem "${IMAGE_VIEWER:-vimiv}" $fx
|
||||
esac
|
||||
;;
|
||||
(audio/*)
|
||||
case "$(tty)" in
|
||||
("/dev/tty"*) # No demonizar en tty
|
||||
"${AUDIO_PLAYER:-"${MPV:-mpv}"}" --audio-display=no $fx
|
||||
;;
|
||||
(*) dem "${TERMINAL:-alacritty}" -e "${AUDIO_PLAYER:-"${MPV:-mpv}"}" --audio-display=no $fx
|
||||
esac
|
||||
;;
|
||||
(video/*)
|
||||
case "$(tty)" in
|
||||
("/dev/tty"*) # No demonizar en tty
|
||||
"${VIDEO_PLAYER:-"${MPV:-mpv}"}" $fx
|
||||
;;
|
||||
# TODO: handle video/webm like previewer
|
||||
(*) dem "${VIDEO_PLAYER:-"${MPV:-mpv}"}" $fx
|
||||
esac
|
||||
;;
|
||||
(application/vnd.sqlite3)
|
||||
sqlite3 $fx
|
||||
;;
|
||||
# text/xml)
|
||||
# ;;
|
||||
(application/zip)
|
||||
case "${f##*.}" in
|
||||
(kra) dem krita $f ;;
|
||||
(*)
|
||||
for f in $fx; do
|
||||
"${OPENER:-xdg-open}" $f
|
||||
done
|
||||
esac
|
||||
;;
|
||||
(*)
|
||||
case "$f" in
|
||||
# TODO: redo this with mime types, not extensions
|
||||
( *.tar.bz | *.tar.bz2 | *.tbz | \
|
||||
*.tbz2 | *.tar.gz | *.tgz | *.tar.lzma | \
|
||||
*.tar.xz | *.txz | *.zip | *.rar | *.iso)
|
||||
mntdir="$f-archivemount"
|
||||
if ! [ -d "$mntdir" ]; then
|
||||
mkdir -- "$mntdir"
|
||||
archivemount "$f" "$mntdir"
|
||||
printf -- "%s\n" "$mntdir" >> "/tmp/__lf_archivemount_$id"
|
||||
fi
|
||||
lf -remote "send $id cd '$mntdir'"
|
||||
lf -remote "send $id reload"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Delegate opening to resource opener
|
||||
|
||||
#pwhich() {
|
||||
# hash "$1" >/dev/null 2>&1 && command -v -- "$1"
|
||||
#}
|
||||
#[ "$OPENER" ] || OPENER=$(pwhich xdg-open)
|
||||
for f in $fx; do
|
||||
dem "${OPENER:-xdg-open}" $f
|
||||
#"${OPENER:-"${EDITOR:-nvim}"}" $f
|
||||
# ${OPENER:-"xdg-open"} $f || "${EDITOR:-"nvim"}" $f
|
||||
done
|
||||
;;
|
||||
esac
|
||||
}}
|
||||
|
||||
# Bug: In my AwesomeWM some JPGs or webm don't show the window until is tiled
|
||||
|
||||
cmd openwith ${{
|
||||
|
||||
dem() {
|
||||
{ setsid -f "$@" >/dev/null 2>&1& } \
|
||||
|| ({ nohup "$@" >/dev/null 2>&1& } &) \
|
||||
|| (exec "$@" >/dev/null 2>&1&)
|
||||
}
|
||||
|
||||
real_f="$(readlink -f $f || realpath $f)" \
|
||||
mime_type="$(\
|
||||
exiftool -s3 -MIMEType "$real_f" \
|
||||
|| file --dereference -b --mime-type -- "$real_f"
|
||||
)"
|
||||
|
||||
menu_select() {
|
||||
nl -nln | fzf --with-nth 2.. | cut -d' ' -f1
|
||||
}
|
||||
|
||||
# TODO: hacer que se puedan abrir con múltiples a la vez (fzf +m)
|
||||
case "$mime_type" in
|
||||
( text/* | application/json | application/javascript | \
|
||||
application/pgp-encrypted | inode/x-empty | application/octet-stream )
|
||||
app=$(menu_select <<-\EOF
|
||||
$EDITOR
|
||||
$EDITOR (new terminal)
|
||||
nano
|
||||
nano (new terminal)
|
||||
EOF
|
||||
)
|
||||
case "$app" in
|
||||
(1) "${EDITOR:-nvim}" $fx ;;
|
||||
(2) dem "${TERMINAL:-alacritty}" -e "$EDITOR" $fx ;;
|
||||
(3) nano $fx ;;
|
||||
(4) dem "${TERMINAL:-alacritty}" -e nano $fx ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
(image/svg+xml | image/png | image/jpeg | image/gif )
|
||||
app=$(menu_select <<-\EOF
|
||||
vimiv
|
||||
gimp
|
||||
mpv
|
||||
krita
|
||||
inkscape
|
||||
EOF
|
||||
)
|
||||
case "$app" in
|
||||
(1) dem vimiv $fx ;;
|
||||
(2) dem gimp $fx ;;
|
||||
(3)
|
||||
case "$(tty)" in
|
||||
# Demonizing on tty makes it impossible to quit
|
||||
("/dev/tty"*) "${MPV:-mpv}" --keep-open=yes $fx ;;
|
||||
(*) dem "${MPV:-mpv}" --keep-open=yes $fx ;;
|
||||
esac
|
||||
;;
|
||||
(4) dem krita $fx ;;
|
||||
(5) dem inkscape $fx ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
(image/x-*)
|
||||
app=$(menu_select <<-\EOF
|
||||
gimp
|
||||
vimiv
|
||||
mpv
|
||||
EOF
|
||||
)
|
||||
case "$app" in
|
||||
(1) dem gimp $fx ;;
|
||||
(2) dem vimiv $fx ;;
|
||||
(3)
|
||||
case "$(tty)" in
|
||||
# Demonizing on tty makes it impossible to quit
|
||||
("/dev/tty"*) "${MPV:-mpv}" --keep-open=yes $fx ;;
|
||||
(*) dem "${MPV:-mpv}" --keep-open=yes $fx ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
(audio/*)
|
||||
app=$(menu_select <<-\EOF
|
||||
mpv (force terminal)
|
||||
mpv (background)
|
||||
mpv (background, only audio)
|
||||
mpv (foreground)
|
||||
mpv (foreground, only audio)
|
||||
mpv (force window)
|
||||
EOF
|
||||
)
|
||||
case "$app" in
|
||||
(1) dem "${TERMINAL:-alacritty}" -e "$MPV" --audio-display=no $fx ;;
|
||||
(2) dem "${MPV:-mpv}" $fx ;;
|
||||
(3) dem "${MPV:-mpv}" --audio-display=no $fx ;;
|
||||
(4) "${MPV:-mpv}" $fx ;;
|
||||
(5) echo; "${MPV:-mpv}" --audio-display=no $fx ;;
|
||||
(6) dem "${MPV:-mpv}" --force-window $fx ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
(video/*)
|
||||
app=$(menu_select <<-\EOF
|
||||
mpv
|
||||
mpv (background, only audio)
|
||||
mpv (foreground, only audio)
|
||||
kdenlive
|
||||
EOF
|
||||
)
|
||||
case "$app" in
|
||||
(1) dem "${MPV:-mpv}" $fx ;;
|
||||
(2) dem "${MPV:-mpv}" --video=no --audio-display=no $fx ;;
|
||||
(3) echo; "${MPV:-mpv}" --video=no --audio-display=no $fx ;;
|
||||
(4) dem "${VIDEO_EDITOR:-kdenlive}" $fx ;;
|
||||
esac
|
||||
esac
|
||||
}}
|
||||
|
||||
# vim: ft=lf
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
image() {
|
||||
FILE_PATH="$1"
|
||||
X=$4
|
||||
Y=$5
|
||||
MW=$(($2 - 1))
|
||||
MH=$3
|
||||
ueberzug cmd -s "$UB_SOCKET" -a add -i PREVIEW -x "$X" -y "$Y" --max-width "$MW" --max-height "$MH" -f "$FILE_PATH"
|
||||
exit 1
|
||||
}
|
||||
|
||||
batorcat() {
|
||||
file="$1"
|
||||
shift
|
||||
if command -v bat >/dev/null 2>&1; then
|
||||
bat --color=always --style=plain --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")" | tr '[:upper:]' '[:lower:]')" 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"
|
||||
;;
|
||||
*.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"
|
||||
;;
|
||||
*.svg)
|
||||
[ ! -f "${CACHE}.jpg" ] && convert "$1" "${CACHE}.jpg"
|
||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
||||
;;
|
||||
*)
|
||||
batorcat "$1"
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
@@ -1,609 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
ccls
|
||||
];
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
withPython3 = true;
|
||||
withNodeJs = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
haskell-vim
|
||||
plenary-nvim
|
||||
rust-vim
|
||||
dracula-vim
|
||||
lf-vim
|
||||
typst-vim
|
||||
];
|
||||
|
||||
coc.enable = true;
|
||||
coc.settings = {
|
||||
"rust-analyzer.cargo.sysroot" = "discover";
|
||||
"rust-analyzer.cargo.features" = "all";
|
||||
"rust-analyzer.server.path" = "/etc/profiles/per-user/me/bin/rust-analyzer";
|
||||
"coc.preferences.extensionUpdateCheck" = "never";
|
||||
"cSpellExt.enableDictionaries" = [ "german" ];
|
||||
"cSpell.language" = "en,de";
|
||||
"rust-analyzer.enable" = true;
|
||||
"rust-analyzer.diagnostics.enable" = true;
|
||||
"rust-analyzer.checkOnSave.enable" = false;
|
||||
"languageserver" = {
|
||||
"ccls" = {
|
||||
"command" = "ccls";
|
||||
"filetypes" = ["c" "cpp" "objc" "objcpp"];
|
||||
"rootPatterns" = [".ccls" "compile_commands.json" ".vim/" ".git/" ".hg/"];
|
||||
"initializationOptions" = {
|
||||
"cache" = {
|
||||
"directory" = "/tmp/ccls";
|
||||
};
|
||||
};
|
||||
};
|
||||
"slint" = {
|
||||
"filetypes" = [ "slint" ];
|
||||
"command" = "slint-lsp";
|
||||
"rootPatterns" = [ ".slint" ];
|
||||
};
|
||||
"vhdl" = {
|
||||
"command" = "/home/sebastian/work/config/nvim/language-servers/vhdl/vhdl-tool";
|
||||
"args" = [ "lsp" ];
|
||||
"filetypes" = [ "vhdl" ];
|
||||
};
|
||||
"csharp-ls" = {
|
||||
"command" = "csharp-ls";
|
||||
"filetypes" = [ "cs" ];
|
||||
"rootPatterns" = [ "*.csproj" ".vim/" ".git/" ".hg/" ];
|
||||
};
|
||||
"nix" = {
|
||||
"command" = "nil";
|
||||
"filetypes" = [ "nix" ];
|
||||
"rootPatterns" = [ "flake.nix" ];
|
||||
};
|
||||
#"typst" = {
|
||||
# error: 'typst-lsp' has been removed due to lack of upstream maintenance, consider using 'tinymist' instead
|
||||
#"command" = "${pkgs.typst-lsp}/bin/typst-lsp";
|
||||
#"filetypes" = [ "typ" "typst" ];
|
||||
#};
|
||||
};
|
||||
"svelte.enable-ts-plugin" = true;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
|
||||
autocmd BufEnter *.slint :setlocal filetype=slint
|
||||
|
||||
syntax enable
|
||||
filetype plugin indent on
|
||||
|
||||
" the nord colorscheme
|
||||
"source ~/.config/nvim/plugins/nord-vim/colors/nord.vim
|
||||
colorscheme dracula
|
||||
|
||||
autocmd BufReadPost * call Setup()
|
||||
|
||||
function Setup()
|
||||
if index(["typst", "haskell", "tex", "c", "rust", "js", "vhdl", "nix"], &syntax) >= 0
|
||||
execute "call Setup_" . &syntax . "()"
|
||||
endif
|
||||
endfunction
|
||||
|
||||
""""""""""""""""""""""""""""" mappings """""""""""""""""""""""""""""
|
||||
nmap <LEFT> gT
|
||||
map <RIGHT> gt
|
||||
imap <LEFT> <ESC>gT
|
||||
imap <RIGHT> <ESC>gt
|
||||
|
||||
map <C-l> gt
|
||||
map <C-h> gT
|
||||
imap <C-l> <ESC>gt
|
||||
imap <C-h> <ESC>gT
|
||||
|
||||
:tnoremap <Esc> <C-\><C-n>
|
||||
:tmap <C-h> <Esc><C-h>
|
||||
:tmap <C-l> <Esc><C-l>
|
||||
|
||||
|
||||
nmap <C-n> :LfNewTab<ENTER>
|
||||
cnoreabbrev e LfCurrentFile
|
||||
let g:floaterm_width = 0.88
|
||||
let g:floaterm_height = 0.88
|
||||
|
||||
nmap <C-w> :wq<ENTER>
|
||||
imap <C-w> :wq<ENTER>
|
||||
cnoreabbrev ta LfNewTab
|
||||
cnoreabbrev hh TSHighlightCapturesUnderCursor
|
||||
|
||||
nnoremap ga :call CocActionAsync('doHover')<ENTER>
|
||||
nnoremap gd :call CocActionAsync('jumpDefinition')<ENTER>
|
||||
|
||||
nmap <C-,> A;<Esc>
|
||||
|
||||
nmap <C-d> <C-d>zz
|
||||
nmap <C-u> <C-u>zz
|
||||
|
||||
nmap # *
|
||||
|
||||
nmap ' /aöeiääääaöfj<ENTER>:<ESC>
|
||||
|
||||
nmap j gj
|
||||
nmap k gk
|
||||
nmap 0 g0
|
||||
nmap $ g$
|
||||
inoremap <C-BS> <ESC>bcw
|
||||
|
||||
cnoreabbrev s set filetype=javascriptreact
|
||||
|
||||
"nnoremap <C-n> <cmd>lua require('renamer').rename()<cr>
|
||||
|
||||
"cmap t <TAB>
|
||||
"cmap <C-j> <C-i>
|
||||
"cnoremap <C-k> <S-TAB>
|
||||
"cnoremap <C-i> <C-n>
|
||||
"cnoremap <TAB> <C-n>
|
||||
"cnoremap <C-j> <C-i>
|
||||
"cnoremap <C-j> <TAB>
|
||||
"cnoremap <C-n> <TAB>
|
||||
noremap <ENTER> i<ENTER>
|
||||
set nohlsearch
|
||||
set backupdir=~/.local/state/nvim/backup
|
||||
|
||||
cnoreabbrev cdf :lcd %:p:h
|
||||
cnoreabbrev tspell call CocAction('toggleExtension', 'coc-spell-checker')
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" neovide """""""""""""""""""""""""""""
|
||||
|
||||
" Being able to paste system clipboard in neovide
|
||||
imap <C-v> <ESC>"+pi
|
||||
nmap <C-v> "+p
|
||||
|
||||
vmap <C-c> "+y
|
||||
|
||||
|
||||
let g:neovide_cursor_vfx_mode = "wireframe"
|
||||
set guifont=Hack:h10
|
||||
"set guifont=Monospace:h6
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" coc """""""""""""""""""""""""""""
|
||||
|
||||
imap <C-k> <UP>
|
||||
imap <C-j> <DOWN>
|
||||
imap <C-ENTER> <C-j><ENTER>
|
||||
imap <C-s> <C-j><C-j><ENTER>
|
||||
|
||||
"let g:coc_snippet_next = ${"''"}
|
||||
"let g:coc_snippet_prev = ${"''"}
|
||||
|
||||
"inoremap <expr> <c-j>
|
||||
"\ pumvisible() ? "\<DOWN>" :
|
||||
"\ coc#jumpable() ? "\<c-r>=coc#rpc#request('snippetNext', [])<cr>" :
|
||||
"\ "\<c-j>"
|
||||
"inoremap <expr> <c-k>
|
||||
"\ pumvisible() ? "\<UP>" :
|
||||
"\ coc#jumpable() ? "\<c-r>=coc#rpc#request('snippetPrev', [])<cr>" :
|
||||
"\ "\<c-k>"
|
||||
|
||||
" use enter for completing with coc
|
||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm() : "\<CR>"
|
||||
|
||||
|
||||
function! s:TernimalRun(cmd)
|
||||
execute '5new'
|
||||
call termopen(a:cmd, {
|
||||
\ 'on_exit': 's:OnExit',
|
||||
\ 'buffer_nr': bufnr('%'),
|
||||
\})
|
||||
execute 'wincmd p'
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
""""""""""""""""""""""""""""" languages """""""""""""""""""""""""""""
|
||||
|
||||
" ###### nix ###### "
|
||||
function! Setup_nix()
|
||||
" use spaces for indentation with nix .. so that multiline strings get stripped of tabs
|
||||
set smartindent
|
||||
set tabstop=2
|
||||
set expandtab
|
||||
set shiftwidth=2
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
" ###### typst ###### "
|
||||
"Typst highlight customisation
|
||||
function! Setup_typst()
|
||||
" set highlight of Headings to not be underlined
|
||||
"autocmd TermClose * echo v:shell_error
|
||||
"au TermClose * call feedkeys("ii")
|
||||
:hi! link typstMarkupHeading markdownH1
|
||||
:hi markdownH1 cterm=bold, gui=bold
|
||||
|
||||
" to keep indent the same when making a "-" list
|
||||
set cindent
|
||||
|
||||
cnoreabbrev c call SaveAndCompile_typst()
|
||||
|
||||
function! OnExit(job_id, exit_code, event) dict
|
||||
let lines = line("$")
|
||||
if a:exit_code == "0"
|
||||
"echo "good"
|
||||
call feedkeys("ii")
|
||||
else
|
||||
"echo "bad"
|
||||
endif
|
||||
|
||||
|
||||
endfunction
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
function! SaveAndCompile_typst()
|
||||
:silent w
|
||||
"execute '5new'
|
||||
let path = expand('%:p')
|
||||
:belowright new 20split
|
||||
":belowright 20split call termopen("echo hello")
|
||||
call termopen("typst --root ~/work/config/typst --font-path ~/config/typst/fonts compile " . path . " out.pdf", {
|
||||
\ 'on_exit': 'OnExit',
|
||||
\ 'buffer_nr': bufnr('%'),
|
||||
\})
|
||||
"execute 'wincmd p'
|
||||
":execute '!typst compile ' . expand('%:p')
|
||||
":belowright 20split term://typst compile doku.typ
|
||||
":belowright 20split
|
||||
"s:TernimalRun("!echo hello")
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
|
||||
" ###### js ###### "
|
||||
set tabstop=3 shiftwidth=3
|
||||
function! Setup_js()
|
||||
|
||||
"autocmd Filetype js set tabstop=2 shiftwidth=2 expandtab
|
||||
set tabstop=4 shiftwidth=4
|
||||
cnoreabbrev c echo JSSSSSSSSSSSSSSSSSS is interpreted.....
|
||||
" autocmd Filetype setlocal ts=2 sw=2 expandtab
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
" ###### c ###### "
|
||||
function! Setup_c()
|
||||
cnoreabbrev c call SaveAndCompile_c()
|
||||
endfunction
|
||||
|
||||
|
||||
function! SaveAndCompile_c()
|
||||
:w
|
||||
execute '!gcc main.c -o main.out; if [ $? -ne 0 ]; then echo ======= ERROR =======; exit; fi ; echo "======= NO ERROR = PROGRAMM ======="; ./main.out'
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
" ###### latex ###### "
|
||||
|
||||
let g:UltiSnipsExpandTrigger = '<tab>'
|
||||
let g:UltiSnipsJumpForwardTrigger = '<c-j>'
|
||||
let g:UltiSnipsJumpBackwardTrigger = '<c-k>'
|
||||
|
||||
function! Setup_tex()
|
||||
set tabstop=2 shiftwidth=2
|
||||
"command SaveAndCompilelatex
|
||||
cnoreabbrev c call SaveAndCompile_latex()
|
||||
cnoreabbrev o call Open_latex()<ENTER>
|
||||
|
||||
function Latex_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "%"
|
||||
execute 's@^%@@g'
|
||||
else
|
||||
execute 's/^/%/g'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
vnoremap s :call Latex_toggle_comment()<Enter>
|
||||
endfunction
|
||||
|
||||
function SaveAndCompile_latex()
|
||||
:w
|
||||
execute '!pdflatex --output-directory=' . expand('%:p:h') . " " . expand('%:p')
|
||||
endfunction
|
||||
|
||||
function Open_latex()
|
||||
execute '!zathura ./main.pdf 1>/dev/null 2>/dev/null &'
|
||||
endfunction
|
||||
" end latex
|
||||
|
||||
|
||||
" ###### vhdl ###### "
|
||||
|
||||
function! Setup_vhdl()
|
||||
function Vhdl_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "-"
|
||||
execute 's@^--@@g'
|
||||
else
|
||||
execute 's/^/--/g'
|
||||
endif
|
||||
endfunction
|
||||
|
||||
vnoremap s :call Vhdl_toggle_comment()<Enter>
|
||||
|
||||
endfunction
|
||||
|
||||
" ###### haskell ###### "
|
||||
|
||||
function! Setup_haskell()
|
||||
set tabstop=4 shiftwidth=4 expandtab
|
||||
|
||||
"command SaveAndCompile_haskell
|
||||
cnoreabbrev c call SaveAndCompile_haskell()
|
||||
"command Debugger_haskell
|
||||
cnoreabbrev d call Debugger_haskell()
|
||||
endfunction
|
||||
|
||||
|
||||
function SaveAndCompile_haskell()
|
||||
:w
|
||||
execute '!ghc ' . @%
|
||||
endfunction
|
||||
|
||||
|
||||
function Debugger_haskell()
|
||||
:w
|
||||
execute '!ghci ' . @%
|
||||
endfunction
|
||||
|
||||
let g:haskell_classic_highlighting = 0
|
||||
let g:haskell_indent_if = 3
|
||||
let g:haskell_intdent_disable = 0
|
||||
let g:haskell_indent_case = 2
|
||||
let g:haskell_indent_let = 4
|
||||
let g:haskell_indent_where = 6
|
||||
let g:haskell_indent_before_where = 2
|
||||
let g:haskell_indent_after_bare_where = 2
|
||||
let g:haskell_indent_do = 3
|
||||
let g:haskell_indent_in = 1
|
||||
let g:haskell_indent_guard = 2
|
||||
let g:haskell_indent_case_alternative = 1
|
||||
let g:cabal_indent_section = 2
|
||||
|
||||
|
||||
|
||||
" ###### rust ###### "
|
||||
|
||||
" specially for mize...
|
||||
cnoreabbrev md call Set_Mize_RunBuild()
|
||||
|
||||
function! Set_Mize_RunBuild()
|
||||
cnoreabbrev c call Mize_RunBuild()
|
||||
endfunction
|
||||
|
||||
function! Mize_RunBuild()
|
||||
:w
|
||||
silent ! echo Run > ~/.mize/mize_dev_module/pipe
|
||||
endfunction
|
||||
|
||||
|
||||
|
||||
function! Setup_rust()
|
||||
|
||||
vnoremap s :call Rust_toggle_comment()<Enter>
|
||||
|
||||
cnoreabbrev c call Cargo_check()
|
||||
cnoreabbrev r call Cargo_run()
|
||||
cnoreabbrev b call Cargo_build()
|
||||
|
||||
endfunction
|
||||
|
||||
function Cargo_build()
|
||||
:w
|
||||
":term cargo build
|
||||
:belowright 20split term://cargo build
|
||||
endfunction
|
||||
|
||||
function Cargo_run()
|
||||
:w
|
||||
":term cargo run
|
||||
:belowright 20split term://cargo run
|
||||
endfunction
|
||||
|
||||
"tnoremap J :call Cargo_jump()
|
||||
augroup MyTermMappings
|
||||
autocmd!
|
||||
autocmd TermOpen * nnoremap <buffer> J :lua Cargo_jump()<Enter>
|
||||
augroup END
|
||||
|
||||
function Cargo_check()
|
||||
:w
|
||||
:belowright 20split term://cargo check
|
||||
endfunction
|
||||
|
||||
function Cargo_check_mize()
|
||||
:w
|
||||
:belowright 20split term://cargo check --bin mize --features os-binary
|
||||
endfunction
|
||||
|
||||
function Rust_toggle_comment()
|
||||
let line=getline('.')
|
||||
let chars = split(line, '\zs')
|
||||
let index = 0
|
||||
while 1
|
||||
if len(chars) == 0
|
||||
return
|
||||
break
|
||||
endif
|
||||
if chars[index] == " "
|
||||
let index += 1
|
||||
else
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
if chars[index] == "/"
|
||||
execute 's@^//@@g'
|
||||
else
|
||||
execute 's/^/\/\//g'
|
||||
endif
|
||||
endfunction
|
||||
'';
|
||||
|
||||
extraLuaConfig = ''
|
||||
function Cargo_jump()
|
||||
local line,c = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local lines = vim.api.nvim_buf_get_lines(0, 0, -1, false)
|
||||
print("hiiiiiiiiiii")
|
||||
print("hiiiiiiiiiii")
|
||||
print("hiiiiiiiiiii")
|
||||
print("hiiiiiiiiiii")
|
||||
print("hiiiiiiiiiii")
|
||||
print("lines", lines)
|
||||
print("line", line)
|
||||
|
||||
local line_iter = line
|
||||
local line_to_jump = nil
|
||||
local file_to_jump = nil
|
||||
if line == 1 then
|
||||
line_iter = 2
|
||||
end
|
||||
while true do
|
||||
if (lines[line_iter]:sub(1,5) == "error") then
|
||||
local split_line = mysplit(lines[line_iter +1], ":")
|
||||
line_to_jump = split_line[2]
|
||||
file_to_jump = split_line[1]:sub(7, -1)
|
||||
file_to_jump = file_to_jump:gsub("%s+", "")
|
||||
break
|
||||
end
|
||||
line_iter = line_iter - 1
|
||||
end
|
||||
|
||||
local buffers = get_buffers()
|
||||
local abs_file_to_jump = vim.fn.getcwd() .. "/" .. file_to_jump
|
||||
|
||||
for i,buf in pairs(buffers) do
|
||||
-- local status, name = pcall(function () vim.api.nvim_buf_get_name(buf) end)
|
||||
-- if status then print("error getting buf name"); goto continue else print("got name: " .. name) end
|
||||
|
||||
local name = vim.fn["bufname"](buf)
|
||||
if name == "" then
|
||||
-- print("buf name empty")
|
||||
goto continue
|
||||
end
|
||||
|
||||
-- print("name: " .. name .. " file_to_jump: " .. file_to_jump)
|
||||
if name == file_to_jump then
|
||||
local tab_num = get_tab(name)
|
||||
print("jumping to" .. tostring(tab_num))
|
||||
-- vim.cmd(tab_num .. "gt")
|
||||
-- local keys = vim.api.nvim_replace_termcodes("<ENTER>"..tab_num.."gt", false, false, false)
|
||||
-- vim.api.nvim_feedkeys("<ENTER>", "m", true)
|
||||
vim.cmd("q")
|
||||
vim.api.nvim_feedkeys(tab_num .. "gt", "m", false)
|
||||
vim.api.nvim_feedkeys(line_to_jump .. "G", "m", false)
|
||||
return
|
||||
else
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
-- vim.cmd(":tabnew" .. abs_file_to_jump)
|
||||
end
|
||||
|
||||
function get_tab(name)
|
||||
print("the messssssssssssssssss")
|
||||
local listing = vim.api.nvim_command_output("tabs")
|
||||
local tab
|
||||
local file
|
||||
for i,line in pairs(mysplit(listing, "\n")) do
|
||||
print("line: " .. line)
|
||||
if line:sub(1,8) == "Tab page" then
|
||||
tab = line:sub(-1)
|
||||
print("tab:", tab)
|
||||
else
|
||||
file = line:sub(5,-1)
|
||||
print("file: " .. file .. " on tab: " .. tostring(tab))
|
||||
if file == name then
|
||||
return tab
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mysplit (inputstr, sep)
|
||||
if sep == nil then
|
||||
sep = "%s"
|
||||
end
|
||||
local t={}
|
||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
||||
table.insert(t, str)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
|
||||
function dump(o)
|
||||
if type(o) == 'table' then
|
||||
local s = '{ '
|
||||
for k,v in pairs(o) do
|
||||
print(k)
|
||||
if type(k) ~= 'number' then k = '"'..k..'"' end
|
||||
s = s .. '['..k..'] = ' .. dump(v) .. ','
|
||||
end
|
||||
return s .. '} '
|
||||
else
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
function get_buffers()
|
||||
local buffers = {}
|
||||
|
||||
for buffer = 1, vim.fn.bufnr('$') do
|
||||
local is_listed = vim.fn.buflisted(buffer) == 1
|
||||
table.insert(buffers, buffer)
|
||||
end
|
||||
|
||||
return buffers
|
||||
end
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
/*
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "Arc-Dark";
|
||||
extraConfig = {
|
||||
modi = "run,filebrowser";
|
||||
color-normal = "#1c2023, #919ba0, #1c2023, #a4a4a4, #1c2023";
|
||||
color-urgent = "argb:00000000, #f43753, argb:00000000, argb:00000000, #e29a49";
|
||||
color-active = "argb:00000000, #49bbfb, argb:00000000, argb:00000000, #e29a49";
|
||||
color-window = "#1c2023, #919ba0, #1c2023";
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
# credit https://github.com/lostMia/nixos-config/blob/f1654caf8572f25f9de9216cfe402995187f3c27/programs/rofi.nix
|
||||
home.file.".config/rofi/config.rasi".text = ''
|
||||
* {
|
||||
selected-normal-foreground: #282a36;
|
||||
foreground: #f8f8f2;
|
||||
item-normal: #1e1e1e;
|
||||
item-alternative: #222222;
|
||||
normal-foreground: @foreground;
|
||||
alternate-normal-background: rgba ( 45, 48, 59, 1 % );
|
||||
red: rgba ( 220, 50, 47, 100 % );
|
||||
selected-urgent-foreground: rgba ( 249, 249, 249, 100 % );
|
||||
blue: rgba ( 38, 139, 210, 100 % );
|
||||
urgent-foreground: rgba ( 204, 102, 102, 100 % );
|
||||
alternate-urgent-background: rgba ( 75, 81, 96, 90 % );
|
||||
active-foreground: rgba ( 101, 172, 255, 100 % );
|
||||
lightbg: rgba ( 238, 232, 213, 100 % );
|
||||
selected-active-foreground: @foreground;
|
||||
alternate-active-background: rgba ( 45, 48, 59, 88 % );
|
||||
background: #1b1b1b;
|
||||
alternate-normal-foreground: @foreground;
|
||||
normal-background: rgba ( 45, 48, 59, 1 % );
|
||||
lightfg: rgba ( 88, 104, 117, 100 % );
|
||||
selected-normal-background: #f8f8f2;
|
||||
border-color: #ff3060;
|
||||
spacing: 10;
|
||||
separatorcolor: rgba ( 45, 48, 59, 1 % );
|
||||
urgent-background: rgba ( 45, 48, 59, 15 % );
|
||||
selected-urgent-background: rgba ( 165, 66, 66, 100 % );
|
||||
alternate-urgent-foreground: @urgent-foreground;
|
||||
background-color: rgba ( 0, 0, 0, 0 % );
|
||||
alternate-active-foreground: @active-foreground;
|
||||
active-background: rgba ( 29, 31, 33, 17 % );
|
||||
selected-active-background: rgba ( 26, 28, 35, 100 % );
|
||||
}
|
||||
|
||||
configuration {
|
||||
font: "HackNerdFont Regular 14";
|
||||
show-icons: true;
|
||||
icon-theme: "Tela circle purple dark";
|
||||
drun-display-format: "{name}";
|
||||
scroll-method: 0;
|
||||
disable-history: false;
|
||||
sidebar-mode: false;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: @background;
|
||||
border: 2;
|
||||
border-color: @border-color;
|
||||
padding: 15;
|
||||
width: 500px;
|
||||
}
|
||||
listview {
|
||||
lines: 12;
|
||||
columns: 1;
|
||||
}
|
||||
mainbox {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
message {
|
||||
border: 2px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
listview {
|
||||
fixed-height: 0;
|
||||
border: 8px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 8px ;
|
||||
scrollbar: false;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
element {
|
||||
border: 1px;
|
||||
border-radius: 12px;
|
||||
border-color: #333333;
|
||||
padding: 4px ;
|
||||
}
|
||||
element-text {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element.normal.normal {
|
||||
background-color: @item-normal;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
element.normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
element.normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
element.selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
element.selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
element.selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
element.alternate.normal {
|
||||
background-color: @item-alternative;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
element.alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
element.alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
border: 0;
|
||||
handle-color: @normal-foreground;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
mode-switcher {
|
||||
border: 2px 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
button {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
button.selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
inputbar {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
entry {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: " ";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
'';
|
||||
}
|
||||
179
programs/ssh.nix
179
programs/ssh.nix
@@ -1,179 +0,0 @@
|
||||
{ secretsDir, ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
identityFile = "${secretsDir}/private-key";
|
||||
};
|
||||
ouranos = {
|
||||
hostname = "195.201.148.94";
|
||||
user = "root";
|
||||
};
|
||||
ligai = {
|
||||
hostname = "ssh.lightning.ai";
|
||||
identityFile = "~/work/here/secrets/lightning-ai-key";
|
||||
#IdentitiesOnly = "yes";
|
||||
#ServerAliveInterval = 15;
|
||||
#ServerAliveCountMax = 4;
|
||||
#StrictHostKeyChecking = "no";
|
||||
#UserKnownHostsFile = "/dev/null";
|
||||
user = "s_01j7xkk335kbnr7r19zhssxn29";
|
||||
};
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
};
|
||||
hetzner2 = {
|
||||
user = "c2vi";
|
||||
port = 2222;
|
||||
hostname = "hetzner2.ecbb.cc";
|
||||
};
|
||||
here = {
|
||||
port = 8888;
|
||||
hostname = "127.0.0.1";
|
||||
user = "me";
|
||||
};
|
||||
files = {
|
||||
port = 49388;
|
||||
user = "files";
|
||||
};
|
||||
nico = {
|
||||
user = "root";
|
||||
};
|
||||
rpis = {
|
||||
hostname = "rpi";
|
||||
port = 49388;
|
||||
user = "server";
|
||||
};
|
||||
fwin = {
|
||||
user = "me";
|
||||
hostname = "fwin";
|
||||
};
|
||||
|
||||
|
||||
feh = {
|
||||
user = "root";
|
||||
hostname = "100.88.93.24";
|
||||
port = 9000;
|
||||
};
|
||||
ti = {
|
||||
user = "root";
|
||||
hostname = "localhost";
|
||||
port = 2222;
|
||||
};
|
||||
ppc-hosting = {
|
||||
user = "root";
|
||||
hostname = "100.88.46.87";
|
||||
port = 9000;
|
||||
};
|
||||
pcmc = {
|
||||
user = "root";
|
||||
hostname = "100.88.33.187";
|
||||
port = 9000;
|
||||
};
|
||||
|
||||
|
||||
phone = {
|
||||
user = "u0_a345";
|
||||
port = 8022;
|
||||
};
|
||||
tab = {
|
||||
user = "nix-on-droid";
|
||||
port = 8022;
|
||||
};
|
||||
acern = {
|
||||
user = "me";
|
||||
port = 2222;
|
||||
};
|
||||
mac = {
|
||||
user = "me";
|
||||
port = 22;
|
||||
};
|
||||
mosatop = {
|
||||
user = "me";
|
||||
port = 2222;
|
||||
};
|
||||
hpm = {
|
||||
user = "me";
|
||||
};
|
||||
fasu = {
|
||||
hostname = "fasu";
|
||||
user = "me";
|
||||
};
|
||||
fasus = {
|
||||
hostname = "fasu";
|
||||
user = "server";
|
||||
};
|
||||
|
||||
fusu = {
|
||||
port = 49388;
|
||||
hostname = "fusu";
|
||||
user = "me";
|
||||
};
|
||||
|
||||
fe = {
|
||||
port = 22;
|
||||
hostname = "fe";
|
||||
user = "me";
|
||||
};
|
||||
|
||||
fes = {
|
||||
port = 22;
|
||||
hostname = "fe";
|
||||
user = "server";
|
||||
};
|
||||
|
||||
fusus = {
|
||||
port = 49388;
|
||||
hostname = "fusu";
|
||||
user = "server";
|
||||
};
|
||||
|
||||
ocih = {
|
||||
hostname = "152.67.70.13";
|
||||
user = "ubuntu";
|
||||
};
|
||||
mandroid = {
|
||||
hostname = "mac";
|
||||
user = "u0_a77";
|
||||
port = 4401;
|
||||
};
|
||||
ocib = {
|
||||
hostname = "140.238.213.48";
|
||||
user = "ubuntu";
|
||||
};
|
||||
hec-builder = {
|
||||
hostname = "10.5.5.72";
|
||||
user = "root";
|
||||
};
|
||||
old-hec-builder = {
|
||||
hostname = "10.5.5.56";
|
||||
user = "root";
|
||||
};
|
||||
storage = {
|
||||
hostname = "10.5.5.50";
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
home.file.".ssh/known_hosts".force = true;
|
||||
home.file.".ssh/known_hosts".text = ''
|
||||
hpm ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ+FpaNOf+ao6RCa6e43vAHFcQZTGu45rIqAG3Vx0/M8
|
||||
lush ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNQClF4DQhO1jSkVWhusp1wfxadSsDclg0TbFGbR+Gy
|
||||
github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl
|
||||
rpi ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOX+6B6Axx7AqgCm1H1rrou/3yOLeOLcTd8s0In0mOIY
|
||||
files ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOX+6B6Axx7AqgCm1H1rrou/3yOLeOLcTd8s0In0mOIY
|
||||
phone ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHxg0HKtGAkwymll8r17d9cXdt40dJgRkSAzB699pWke+edne4Ildcnbde2yle01nEL7GOg92vh5t1sh6vkCzJQ=
|
||||
uwu ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6H4kcLXH5hvXN8Ablcfo4q2MwdvVBiAdYWlc4qUiCj
|
||||
[phone]:8022 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN30DqIE7AMYBoKnmbDw+U01LAEC25JZjIXB+T76LBp9
|
||||
[phone]:8022 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSWFzU8GrAJD/CKJby8IbUzLtbXxwYBF+QQzSRIlbx5kCS2MQjjNtLjAMdt2c8z0O2+qX9abEZXmtYfYlHCo2nCFOhhkjuzT7t6lb14wjAK2HBBWOsh2Y1WSK35FzKtWJvmYcu1uWdDZrvu44PoFITJhCAoZG6QaGlhXVGk1lpasP1qA1/guX/LJYVUGww7oSjQeeAxjKFxrLK01iD1aS60IxIHZIT4yKe//YhppC8LkJc0OnRIzmCMdNIHNXIsg0dL/8to5vA85hqJlTJAZ9qhw542Ul5C34F2z69h4hf3eslIqvVL/tci86jgX4eYiVsUZ81jFtGN3As2RpcOLz8mrC1qZgHTLqix6PaNRrQeRcfvMIH0VOiyzAFEzBI/v0wj1zthRHOg+xKfAq1hKhXarJRYw0c0wmgPUoAOUQGwoF2JGIss7D7ulKTUd7ALn8fdS8+CboFSQ709OA44pSEsAl6IfXT/gh4zHwubfT3mRbla8iQAXYD/nKF5xPQ+Jc=
|
||||
[phone]:8022 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEN+gaX1uwr5oY98hJYGWwBQEEDpmbJsKLY7vIfWRQo02IH36ZC0p14GOnfPLtXuHz8AoNUp7UYyNu8oXxuU/fE=
|
||||
[tab]:8022 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCWnKy5TnPukGMkxYGLjs4Tpu/v3x8JfxaU7dcaAcp3KhxtUDPjdSQLGEIS08L781nGpIJZRdy+jNqKiolQRRTuy7eQaZnCO+ddYQldW2OpqVGbOjS/7T7cHy+aHFJdPiltdgagfPIPColYCGCCoMi3wN7VkR49MAYOr1a0YIlfh1y0PgCbGqkYCPKO90woXPYxI+v5trYHaqNDz9O5ug7k93AHQuTQroqfyzM9vhcg8z42EpDzTs+ypdgXJYOuc4ZbH1mWkou+1SPEZxMSoNUipmwkjQ5GCEwPIpSgRoRHh2WnXU8TmLLDVteJ7zUJlLR8p93rgmp2Uo1gePCsQNiqd4XrmdgdNypUifUE5M7V5LOcuCtZJfX0XZHoo+cvVKgQqpz8MIJAFOJzCXt39/gxcytDwSbN+B4oh9CR4kGGCST/griKpR3rl+PKDap1rpGZYBlPv0ss6RNZTVnIKuv6MaFXLmmrkpaKiFX3Bmze6820BO/LXz5qoLbL8dIf0s=
|
||||
[tab]:8022 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKY8+fJoEuAh0KlB9/g40ImJVcFEuksckgCA5BNK1gdhGsRBkN9LE16Wu07bzVbtBhdYoGDdflI9Hr6l1Y6gu0I=
|
||||
[tab]:8022 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBPVAyWNCCzQSOzeYibuXNPExD7YKcNczvJfc44a3zeo
|
||||
[tab]:8022 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDdwFZf3IRa4YZyrNseofTRIDbkmdMiIXa3Gxs7wFzZN+ICwXeipfqV1Lh9C1sI4YnRIqfZlCSU+SE2dqVoQB6Uj64cdLrdslHYvgsR9PY3vVtrYypGfE1XTkLvD516x4mFofo22A9j8fK95fcMwpWLtNnv9SVBIT3V+4fUlbRCngdJ1V2cOd41JIwBrIxmRJ6X5v/SEqajmnVneqEmsqGgGA7JBJBCMSz5wwmZzWrTpzwj4SAD5b1z/R12DZfFHmgJCZYcMbjDgUiD5khsOwCCflH8DtO41PkOZRqDlpPPT9al7qhhESwxE6w5gIvaVh6HJljSCNw9OCQWONotv3gF9tVs6sZXsWxRZ2R0oIeA3rnM+mZxEtxElc2MKLVlsQ9SM2Xcr3J4Y43cWm7m03cDOz+iZecxs2qKAgn5Au72fudapDAtiCuYjKlMGEgbWX3CmxL0n/Uo32yfTRXnEHWMzXezmdGsuHUzk/sHTL8z5RVyzIBNl2HGlhldFbATuwRxXyBW9JIuEll+rW9Jm0MvpT3KoD/Q5aXDVH+21l6SSNBcjvZu00WNiYDD+gFR4BlewobtacGNOR4ErjxVZ10d8p6S5smadmo/RmbjhrVJK8EzigJPsVxEEjtuVq+jAQCvLTZCpEyDF/cBv60vIu4CyZkoAq1UaL64m7nIhR/8Yw==
|
||||
'';
|
||||
*/
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
{ pkgs, config, persistentDir, ... }: {
|
||||
|
||||
## thunderbird settings
|
||||
programs.thunderbird = {
|
||||
enable = false;
|
||||
|
||||
profiles.me = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
## mail archiveing...
|
||||
|
||||
|
||||
## email accounts
|
||||
/*
|
||||
accounts.email.accounts.sewi-gmail = {
|
||||
flavor = "gmail.com";
|
||||
};
|
||||
|
||||
accounts.email.accounts.c2vi-gmail = {
|
||||
flavor = "gmail.com";
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
# not working....
|
||||
home.file.".thunderbird" = {
|
||||
force = true;
|
||||
source = config.lib.file.mkOutOfStoreSymlink "${persistentDir}/thunderbird";
|
||||
};
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
roll-step = 40;
|
||||
};
|
||||
mappings = {
|
||||
"<C-y>" = ''scroll down'';
|
||||
"<C-x>" = ''scroll up'';
|
||||
"<C-o>" = ''scroll left'';
|
||||
"<C-p>" = ''scroll right'';
|
||||
|
||||
"j" = ''feedkeys "4<C-y>"'';
|
||||
"k" = ''feedkeys "4<C-x>"'';
|
||||
"h" = ''feedkeys "4<C-o>"'';
|
||||
"l" = ''feedkeys "4<C-p>"'';
|
||||
|
||||
"J" = ''feedkeys "<C-y>"'';
|
||||
"K" = ''feedkeys "<C-x>"'';
|
||||
"H" = ''feedkeys "<C-o>"'';
|
||||
"L" = ''feedkeys "<C-p>"'';
|
||||
|
||||
"y" = ''zoom in'';
|
||||
"+" = ''feedkeys "yyy"'';
|
||||
"*" = ''feedkeys "y"'';
|
||||
|
||||
"x" = ''zoom out'';
|
||||
"-" = ''feedkeys "xxx"'';
|
||||
"_" = ''feedkeys "x"'';
|
||||
|
||||
"n" = ''navigate next'';
|
||||
"p" = ''navigate previous'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user