Compare commits
No commits in common. "07e09b51ea6934858084c189f712f5604e5be612" and "a046927e0675cea0d5554b30bea0b03ee54375b2" have entirely different histories.
07e09b51ea
...
a046927e06
22
flake.lock
22
flake.lock
|
|
@ -84,11 +84,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768927746,
|
"lastModified": 1763416652,
|
||||||
"narHash": "sha256-zyMpWHqcpKVmRc1W2NEK7DAuyVJZV62Jdjqudg70b1k=",
|
"narHash": "sha256-8EBEEvtzQ11LCxpQHMNEBQAGtQiCu/pqP9zSovDSbNM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "63a87808f5f9b6e4195a1d33f6ea25d23f4aa0df",
|
"rev": "ea164b7c9ccdc2321379c2ff78fd4317b4c41312",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -99,11 +99,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768736227,
|
"lastModified": 1762847253,
|
||||||
"narHash": "sha256-qgGq7CfrYKc3IBYQ7qp0Z/ZXndQVC5Bj0N8HW9mS2rM=",
|
"narHash": "sha256-BWWnUUT01lPwCWUvS0p6Px5UOBFeXJ8jR+ZdLX8IbrU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "d447553bcbc6a178618d37e61648b19e744370df",
|
"rev": "899dc449bc6428b9ee6b3b8f771ca2b0ef945ab9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -115,11 +115,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1768564909,
|
"lastModified": 1763421233,
|
||||||
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
|
"narHash": "sha256-Stk9ZYRkGrnnpyJ4eqt9eQtdFWRRIvMxpNRf4sIegnw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f",
|
"rev": "89c2b2330e733d6cdb5eae7b899326930c2c0648",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -192,8 +192,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767812907,
|
"lastModified": 1759260889,
|
||||||
"narHash": "sha256-/UQlJO13c9agryVdPk1bxFa6/SXRdFsw106TFBjp9LU=",
|
"narHash": "sha256-EpjnR/SW4qxgfNTQzRc+WHiLaM5/Afo4j35GmAr2uRc=",
|
||||||
"path": "/home/alice/projects/tepid-client-services/",
|
"path": "/home/alice/projects/tepid-client-services/",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -129,10 +129,10 @@
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable SANE for scanning.
|
# Enable SANE for scanning.
|
||||||
# hardware.sane = {
|
hardware.sane = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# extraBackends = [ pkgs.epkowa ];
|
extraBackends = [ pkgs.epkowa ];
|
||||||
# };
|
};
|
||||||
|
|
||||||
# Enable udisks (handles storage devices, e.g. usb flash drives)
|
# Enable udisks (handles storage devices, e.g. usb flash drives)
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
@ -190,7 +190,6 @@
|
||||||
# neovim
|
# neovim
|
||||||
greetd.tuigreet
|
greetd.tuigreet
|
||||||
ntfs3g
|
ntfs3g
|
||||||
android-tools
|
|
||||||
kakoune
|
kakoune
|
||||||
git
|
git
|
||||||
sl
|
sl
|
||||||
|
|
@ -222,6 +221,9 @@
|
||||||
# Enable tailscale
|
# Enable tailscale
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
|
|
||||||
|
# Enable adb
|
||||||
|
programs.adb.enable = true;
|
||||||
|
|
||||||
# Enable zsh; necessary to switch
|
# Enable zsh; necessary to switch
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,12 @@
|
||||||
|
|
||||||
# Install packages
|
# Install packages
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
|
# [
|
||||||
|
# hunspell
|
||||||
|
# hunspellDicts.fr-any
|
||||||
|
# hunspellDicts.fr-moderne
|
||||||
|
# hunspellDicts.fr-classique
|
||||||
|
# ] ++ # Spell checking
|
||||||
[ ] ++ # Temp
|
[ ] ++ # Temp
|
||||||
[ ];
|
[ ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,6 @@
|
||||||
remmina
|
remmina
|
||||||
pinta
|
pinta
|
||||||
darktable
|
darktable
|
||||||
gthumb
|
|
||||||
] ++ # Selection of graphical apps
|
] ++ # Selection of graphical apps
|
||||||
[
|
[
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
|
@ -93,7 +92,7 @@
|
||||||
[ marksman nil ] ++ # Language servers for built in languages
|
[ marksman nil ] ++ # Language servers for built in languages
|
||||||
[ texliveFull texlab ] ++ # LaTeX - remove this eventually and put it in dev
|
[ texliveFull texlab ] ++ # LaTeX - remove this eventually and put it in dev
|
||||||
# envs
|
# envs
|
||||||
[ xdg-terminal-exec glib upower hledger ] ++
|
[ xdg-terminal-exec glib upower xfce.tumbler xfce.ristretto hledger ] ++
|
||||||
(let
|
(let
|
||||||
archivo = callPackage ../pkgs/archivo/archivo.nix { };
|
archivo = callPackage ../pkgs/archivo/archivo.nix { };
|
||||||
highway-gothic = callPackage ../pkgs/highway-gothic/highway-gothic.nix { };
|
highway-gothic = callPackage ../pkgs/highway-gothic/highway-gothic.nix { };
|
||||||
|
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
||||||
# Count characters, words, lines, and paragraphs in selection.
|
|
||||||
# Author: Francois Tonneau
|
|
||||||
|
|
||||||
# VARIABLES
|
|
||||||
|
|
||||||
declare-option -hidden int wordcount_non_space_chars 0
|
|
||||||
declare-option -hidden int wordcount_all_chars 0
|
|
||||||
|
|
||||||
declare-option -hidden int wordcount_words 0
|
|
||||||
|
|
||||||
declare-option -hidden int wordcount_non_empty_lines 0
|
|
||||||
declare-option -hidden int wordcount_all_lines 0
|
|
||||||
|
|
||||||
declare-option -hidden int wordcount_paragraphs 0
|
|
||||||
|
|
||||||
# PUBLIC COMMANDS
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-docstring 'Count characters - words - lines - paragraphs' \
|
|
||||||
wordcount-count %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
if expr "$kak_selections_length" : '.* .*' >/dev/null; then
|
|
||||||
printf %s\\n 'fail multiple selections not allowed'
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
printf %s\\n wordcount-proceed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
alias global woc wordcount-count
|
|
||||||
|
|
||||||
# IMPLEMENTATION
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-proceed %{
|
|
||||||
wordcount-grow-lines
|
|
||||||
wordcount-count-chars
|
|
||||||
wordcount-count-words
|
|
||||||
wordcount-count-lines
|
|
||||||
wordcount-count-pars
|
|
||||||
wordcount-summarize
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-grow-lines %{
|
|
||||||
execute-keys <a-x>
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-count-chars %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
bulk=$(printf %s "$kak_selection" \
|
|
||||||
| tr -d '\n' \
|
|
||||||
| wc -m \
|
|
||||||
)
|
|
||||||
nonspace=$(printf %s "$kak_selection" \
|
|
||||||
| tr -d '\n' \
|
|
||||||
| sed 's/[[:space:]]/ /g' \
|
|
||||||
| tr -d ' ' \
|
|
||||||
| wc -m \
|
|
||||||
)
|
|
||||||
printf %s\\n "set-option window wordcount_all_chars $bulk"
|
|
||||||
printf %s\\n "set-option window wordcount_non_space_chars $nonspace"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-count-words %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
words=$( printf %s "$kak_selection" \
|
|
||||||
| wc -w \
|
|
||||||
)
|
|
||||||
printf %s\\n "set-option window wordcount_words $words"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-count-lines %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
all=$( printf %s "$kak_selection" \
|
|
||||||
| wc -l \
|
|
||||||
)
|
|
||||||
nonempty=$( printf %s "$kak_selection" \
|
|
||||||
| sed -n /^$/!p \
|
|
||||||
| wc -l \
|
|
||||||
)
|
|
||||||
printf %s\\n "set-option window wordcount_all_lines $all"
|
|
||||||
printf %s\\n "set-option window wordcount_non_empty_lines $nonempty"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-count-pars %{
|
|
||||||
#
|
|
||||||
# Unless it is empty, consider the selection to be 1 paragraph by default.
|
|
||||||
# Then count paragraph separations (\n\n [^\n]).
|
|
||||||
try %{
|
|
||||||
execute-keys -draft <a-k> [^\n] <ret>
|
|
||||||
set-option window wordcount_paragraphs 1
|
|
||||||
} \
|
|
||||||
catch %{
|
|
||||||
set-option window wordcount_paragraphs 0
|
|
||||||
}
|
|
||||||
evaluate-commands -draft %{
|
|
||||||
try %{
|
|
||||||
execute-keys s \n\n [^\n] <ret>
|
|
||||||
evaluate-commands -itersel %{
|
|
||||||
set -add window wordcount_paragraphs 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command \
|
|
||||||
-hidden \
|
|
||||||
wordcount-summarize %{
|
|
||||||
info -title 'Word Count' \
|
|
||||||
" Words: %opt(wordcount_words)
|
|
||||||
Characters, including space: %opt(wordcount_all_chars)
|
|
||||||
Characters, excluding space: %opt(wordcount_non_space_chars)
|
|
||||||
Total lines: %opt(wordcount_all_lines)
|
|
||||||
Non-empty lines: %opt(wordcount_non_empty_lines)
|
|
||||||
Paragraphs: %opt(wordcount_paragraphs)"
|
|
||||||
}
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue