fish.nix
This commit is contained in:
parent
c487f8d879
commit
a732d4c4ae
4 changed files with 79 additions and 3 deletions
71
fish.nix
Normal file
71
fish.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.fish = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = {
|
||||||
|
r = "R --no-save --no-restore";
|
||||||
|
R = "R --no-save --no-restore";
|
||||||
|
linkbox = "ln -s (pwd) ~/box/";
|
||||||
|
cdg = "cd \$(git rev-parse --show-toplevel)";
|
||||||
|
rloft = "tmux source-file ~/.config/tmux/rloft.conf";
|
||||||
|
map = "telnet mapscii.me";
|
||||||
|
weather = "curl wttr.in/frankfurt";
|
||||||
|
liftbox = "rsync -vaL --delete ~/box/ tstraube@login.server.uni-frankfurt.de:box/";
|
||||||
|
ktiubox = "rsync -vaL --delete ~/box/ root@ktiu.net:/var/www/html/box/";
|
||||||
|
ymd = "date +'%Y-%m-%d'";
|
||||||
|
pulluni = "ssh tstraube@login.server.uni-frankfurt.de \"cd uni-tstraube && git pull\"";
|
||||||
|
pullstat = "ssh tstraube@login.server.uni-frankfurt.de \"cd statistik && git pull\"";
|
||||||
|
pullds = "ssh tstraube@login.server.uni-frankfurt.de \"cd ds23 && git pull\"";
|
||||||
|
pullmla = "ssh tstraube@login.server.uni-frankfurt.de \"cd malta23 && git pull\"";
|
||||||
|
pulldkg = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp && git pull\"";
|
||||||
|
pullsneak = "ssh till@geocom.uni-frankfurt.de \"cd /var/www/dkg_lp_prev && git pull\"";
|
||||||
|
pullkhole = "ssh root@ktiu.net \"cd /var/www/karaoke && git pull\"";
|
||||||
|
buildfk = "curl -X POST -d '{}' https://api.netlify.com/build_hooks/61669ddfeaa3cccc44e752ea";
|
||||||
|
showbox = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/box";
|
||||||
|
showc = "chromium-browser -app=https://user.uni-frankfurt.de/~tstraube/c/";
|
||||||
|
backyin = "duplicity --progress --no-encryption --exclude ~/.local/share/Trash/ --exclude ~/.cache/ ~ file:///run/media/till/yin/nova/";
|
||||||
|
backyang = "duplicity --progress --no-encryption --exclude ~/.local/share/Trash/ --exclude ~/.cache/ ~ file:///run/media/till/yang/nova/";
|
||||||
|
};
|
||||||
|
shellInit = ''
|
||||||
|
function fish_greeting; end
|
||||||
|
function startrloft --description 'Starts R with custom environment'
|
||||||
|
set -lx R_ENVIRON_USER "~/.config/rloft/RLoft_environ"
|
||||||
|
r -q
|
||||||
|
end
|
||||||
|
function vd --wraps vim --description 'vim with date in filename'
|
||||||
|
nvim (ymd)_$argv.md
|
||||||
|
end
|
||||||
|
function note --description 'Create a new note'
|
||||||
|
nvim -c "call CreateNote('$argv')"
|
||||||
|
end
|
||||||
|
|
||||||
|
set -U fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
|
function fish_prompt --description "Write out the prompt"
|
||||||
|
echo -s (set_color brblack) (basename $PWD) (set_color normal) (set_color magenta) ' $ ' (set_color normal)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_right_prompt --description "Display info to the right of the prompt"
|
||||||
|
echo -s (__fish_git_prompt)
|
||||||
|
end
|
||||||
|
|
||||||
|
function fish_mode_prompt; end
|
||||||
|
|
||||||
|
set fish_cursor_default line blink
|
||||||
|
|
||||||
|
set __fish_git_prompt_showdirtystate 'yes'
|
||||||
|
set __fish_git_prompt_showstashstate 'yes'
|
||||||
|
set __fish_git_prompt_showuntrackedfiles 'yes'
|
||||||
|
set __fish_git_prompt_showupstream 'yes'
|
||||||
|
set __fish_git_prompt_color_upstream_ahead green
|
||||||
|
set __fish_git_prompt_color_upstream_behind red
|
||||||
|
set __fish_git_prompt_char_dirtystate '*'
|
||||||
|
set __fish_git_prompt_char_stagedstate '→'
|
||||||
|
set __fish_git_prompt_char_untrackedfiles '☡'
|
||||||
|
set __fish_git_prompt_char_stashstate '↩'
|
||||||
|
set __fish_git_prompt_char_upstream_ahead '+'
|
||||||
|
set __fish_git_prompt_char_upstream_behind '-'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -31,11 +31,13 @@
|
||||||
tree
|
tree
|
||||||
vdirsyncer
|
vdirsyncer
|
||||||
tdesktop
|
tdesktop
|
||||||
|
nnn
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./R.nix
|
./R.nix
|
||||||
./nvim
|
./nvim
|
||||||
|
./fish.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.shellAliases = {
|
home.shellAliases = {
|
||||||
|
|
@ -44,9 +46,6 @@
|
||||||
v = "nvim";
|
v = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.fish = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,8 @@ lua <<EOF
|
||||||
-- require('lspconfig')['typescript'].setup {
|
-- require('lspconfig')['typescript'].setup {
|
||||||
-- capabilities = capabilities
|
-- capabilities = capabilities
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
|
local nvim_lsp = require('lspconfig')
|
||||||
local servers = { "r_language_server", "tsserver" }
|
local servers = { "r_language_server", "tsserver" }
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
nvim_lsp[lsp].setup {
|
nvim_lsp[lsp].setup {
|
||||||
|
|
|
||||||
4
test.R
Normal file
4
test.R
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
library(tidyverse)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue