state Sun Oct 24 09:26:30 PM CEST 2021
This commit is contained in:
parent
5f8f755e6e
commit
65146e772d
2 changed files with 25 additions and 3 deletions
12
home/cli.nix
12
home/cli.nix
|
|
@ -29,10 +29,16 @@
|
||||||
gotop
|
gotop
|
||||||
gnumake
|
gnumake
|
||||||
ripgrep # better grep
|
ripgrep # better grep
|
||||||
|
sqlite
|
||||||
|
pass
|
||||||
|
pandoc
|
||||||
|
|
||||||
# editors
|
# editors
|
||||||
emacs-nox
|
emacs-nox
|
||||||
|
|
||||||
|
# c/c++
|
||||||
|
clang_12
|
||||||
|
|
||||||
# haskell
|
# haskell
|
||||||
cabal2nix
|
cabal2nix
|
||||||
nix-prefetch-git
|
nix-prefetch-git
|
||||||
|
|
@ -43,9 +49,9 @@
|
||||||
home.extraOutputsToInstall = [ "doc" "info" "devdoc" ];
|
home.extraOutputsToInstall = [ "doc" "info" "devdoc" ];
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
xdg.configFile = {
|
# xdg.configFile = {
|
||||||
"emacs".source = config.lib.file.mkOutOfStoreSymlink ./emacs.d;
|
# "emacs".source = ./emacs.d;
|
||||||
};
|
# };
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
|
|
|
||||||
16
kill-old-mosh
Executable file
16
kill-old-mosh
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
mysession=$(cat /proc/self/sessionid)
|
||||||
|
count=0
|
||||||
|
while read pid _; do
|
||||||
|
session=$(cat /proc/$pid/sessionid)
|
||||||
|
if [ "$mysession" != "$session" ]; then
|
||||||
|
kill $pid
|
||||||
|
count=$((count + 1))
|
||||||
|
fi
|
||||||
|
done <<<$(ps -C mosh-server -o pid=,etimes= | sort -k 2 -r)
|
||||||
|
|
||||||
|
if [[ $count -eq 0 ]]; then
|
||||||
|
echo 2>&1 "No stale mosh session found"
|
||||||
|
else
|
||||||
|
echo 2>&1 "$count stale mosh session(s) killed"
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue