1
0
Fork 0

Nonatomic

This commit is contained in:
Malte Brandy 2018-04-27 23:48:56 +02:00
parent 86f8404961
commit 074a7f21ab
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9
17 changed files with 2517 additions and 49 deletions

View file

@ -16,13 +16,14 @@ set backupdir=~/.vimhist/bak
set showcmd
nnoremap <silent><cr> :nohlsearch<CR>
vnoremap < <gv
vnoremap > >gv u
nnoremap <C-Down> <C-W><C-J>
nnoremap <C-Up> <C-W><C-K>
nnoremap <C-Right> <C-W><C-L>
nnoremap <C-Left> <C-W><C-H>
nnoremap <A-Left> gT
nnoremap <A-Right> gt
vnoremap > >gv
nnoremap <c-down> <c-w><c-j>
nnoremap <c-up> <c-w><c-k>
nnoremap <c-right> <c-w><c-l>
nnoremap <c-left> <c-w><c-h>
nnoremap <a-left> gT
nnoremap <a-right> gt
let mapleader=","
set colorcolumn=81,121
hi ColorColumn ctermbg=black
@ -42,6 +43,7 @@ noremap <buffer> <silent> <End> g<End>
if !exists('g:deoplete#omni#input_patterns')
let g:deoplete#omni#input_patterns = {}
endif
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
set statusline+=%#warningmsg#
set statusline+=%{syntasticstatuslineflag()}
set statusline+=%*
@ -50,19 +52,19 @@ let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_aggregate_errors = 1
let g:syntastic_enable_highlighting = 0
let g:syntastic_loc_list_height = 3
let g:syntastic_enable_highlighting = 1
let g:syntastic_loc_list_height = 5
let g:rustfmt_autosave = 1
"let g:ycm_rust_src_path = '/usr/src/rust/src'
"let g:ftplugin_rust_source_path = '/usr/src/rust/src'
let g:syntastic_rust_checkers = [ 'cargo']
let g:rust_recommend_style = 1
let g:rust_fold =1
let g:syntastic_rust_rustc_exe = 'cargo check'
let g:syntastic_rust_rustc_fname = ""
let g:syntastic_rust_rustc_args = '--'
"let g:syntastic_rust_rustc_exe = 'cargo check'
let g:deoplete#enable_at_startup = 1
let g:deoplete#auto_complete_start_length = 1
let g:deoplete#sources#rust#racer_binary='racer'
"let g:deoplete#sources#rust#racer_binary='racer'
"let g:rustfmt_command = "rustfmt"
"let g:racer_cmd = "racer"

View file

@ -7,9 +7,9 @@ if [[ -z "$TMUX" ]] {
}
}
precmd() {
local s=$? c=( $(fc -l -d -1 ) )
if [[ $launched && "''${c[2]}" != "0:00" ]] {
eventc command $([[ ''${s} == 0 ]] && echo success || echo failure) -d command="\"''${c[3,-1]}\"" -d time="\"''${c[2]}\"" -d host="\"$host\""
local s=$? c=( $(fc -L -D -l -1) )
if [[ $launched && "${c[2]}" != "0:00" ]] {
eventc command $([[ ${s} == 0 ]] && echo success || echo failure) -d command="\"${c[3,-1]}\"" -d time="\"${c[2]}\"" -d host="\"$HOST\""
} else {
export launched=true;
}
@ -27,3 +27,5 @@ alias ls=exa
export BROWSER=qutebrowser
export EDITOR=nvim
export MANPAGER="most -s"
bindkey '^R' history-incremental-pattern-search-backward

View file

@ -1,5 +1,7 @@
{ pkgs, ... }:
{
let
rust-scripts = with pkgs; callPackage ../packages/rust-scripts {};
in {
programs = {
home-manager = {
enable = true;
@ -103,33 +105,45 @@
pythonPackages.qrcode
ranger
# rust-scripts
(pkgs.neovim.override {
vimAlias = true;
withPython3 = true;
configure = {
customRC = builtins.readFile ./configs/vimrc;
customRC = ''
let $RUST_SRC_PATH="${pkgs.rustPlatform.rustcSrc}"
let g:rustfmt_command = "${pkgs.rustfmt}/bin/rustfmt"
let g:racer_cmd = "${pkgs.rustracer}/bin/racer"
let g:deoplete#sources#rust#racer_binary='${pkgs.rustracer}/bin/racer'
let g:syntastic_rust_rustc_exe = '${pkgs.cargo}/bin/cargo check'
${builtins.readFile ./configs/vimrc}
'';
packages.myVimPackage = with pkgs.vimPlugins; {
start = [
deoplete-nvim
# deoplete-nvim
vim-nix
ctrlp
vimtex
Syntastic
UltiSnips
airline
rust-vim
deoplete-rust
# deoplete-rust
fugitive
airline
vim-snippets
# ale
# vim-snippets
vim-trailing-whitespace
vim-racer
vim-polyglot
nvim-cm-racer
nvim-completion-manager
vim-pandoc
nerdcommenter
vim-signify
];
};
};
withPython3 = true;
})
];
xdg.enable = true;

View file

@ -1,7 +1,7 @@
{ pkgs, lib, config, ... }:
let
eventd-pkgs = import (fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/fe61c3b84e8e81a8ec2bf6b3ed2a0e8652cea190.tar.gz) {};
eventd = with eventd-pkgs; callPackage ../../packages/eventd {};
eventd = eventd-pkgs.callPackage ../../packages/eventd {};
colors = config.common.colors;
in {
home = {

View file

@ -47,30 +47,68 @@ in {
rofi.sidebar-mode: true
rofi.combi-modi: window,drun,run
'';
separator = "solid";
borderWidth = 0;
separator = "none";
fullscreen = false;
width = 1920;
terminal = terminal;
location = "left";
location = "center";
scrollbar = false;
width = 1500;
yoffset = -10;
lines = 35;
padding = 200;
lines = 30;
colors = {
window = {
background = colors.background;
border = colors.blue;
separator = colors.blue;
};
rows = {
normal = {
background = colors.background;
foreground = colors.foreground;
backgroundAlt = colors.black;
highlight = {
background = colors.blue;
foreground = colors.white;
};
};
};
window = {
background = "argb:a0${builtins.substring 1 6 colors.background}";
border = colors.blue;
separator = colors.blue;
};
rows = {
normal = {
background = colors.background;
foreground = colors.foreground;
backgroundAlt = colors.black;
highlight = {
background = colors.blue;
foreground = colors.white;
};
};
active = {
background = colors.background;
foreground = colors.foreground;
backgroundAlt = colors.black;
highlight = {
background = colors.blue;
foreground = colors.white;
};
};
urgent = {
background = colors.background;
foreground = colors.foreground;
backgroundAlt = colors.black;
highlight = {
background = colors.blue;
foreground = colors.white;
};
};
};
#colors = {
#window = {
#background = "argb:${builtins.substring 1 6 colors.background}22";
#border = colors.blue;
#separator = colors.blue;
#};
#rows = {
#normal = {
#background = colors.background;
#foreground = colors.foreground;
#backgroundAlt = colors.black;
#highlight = {
#background = colors.blue;
#foreground = colors.white;
#};
#};
#};
};
};
};

View file

@ -20,7 +20,7 @@ while True:
with open(filename) as filterfile:
filter = filterfile.read().strip()
tasklist = call_task(["default"] + filter.split())
rofi_list_cmd = ['rofi', '-dmenu', '-p', 'task: ', '-mesg', '\n'.join([lastresult, "filter: {}".format(filter)]).strip()]
rofi_list_cmd = ['rofi', '-dmenu', '-p', 'task', '-mesg', '\n'.join([lastresult, "filter: {}".format(filter)]).strip()]
rofi = subprocess.Popen(rofi_list_cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
entered_command = rofi.communicate(input=tasklist)[0].decode('utf8').strip()
if entered_command == "":

View file

@ -9,6 +9,9 @@
youtubeDL
cargo
gcc
binutils-unwrapped
rustfmt
carnix
];
}

View file

@ -1,7 +1,7 @@
{ pkgs, lib, ... }:
{
home = {
packages = with pkgs; [ taskwarrior ];
packages = [ pkgs.taskwarrior ];
file = {
taskwarrior-on-add-hook = {
target = ".task/hooks/on-add.eventd-notification";

View file

@ -37,6 +37,8 @@
arandr
qutebrowser
mumble
# tools & office
gimp
imagemagick

View file

@ -16,8 +16,8 @@
imports = [
./hardware-configuration.nix
../../snippets/common.nix
../../snippets/init_ssh.nix
../../host-common/common.nix
../../host-common/init_ssh.nix
/etc/nixos/local/config.nix
./dav.nix
./mail.nix

422
packages/rust-scripts/Cargo.lock generated Normal file
View file

@ -0,0 +1,422 @@
[[package]]
name = "backtrace"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "backtrace-sys"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "bitflags"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cc"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "cfg-if"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "chrono"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "derive_builder"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"derive_builder_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "derive_builder_core"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dialog"
version = "0.1.0"
source = "git+https://git.darmstadt.ccc.de/maralorn/dialog-rs.git#f33f0c9ac4f4407899da55507147a8a808e2f521"
dependencies = [
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustyline 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"termios 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dtoa"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "encode_unicode"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "error-chain"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "fuchsia-zircon-sys"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "itoa"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
version = "0.2.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "log"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "nix"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-integer"
version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "num-traits"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "proc-macro2"
version = "0.3.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quote"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "quote"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "redox_syscall"
version = "0.1.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rust-scripts"
version = "0.1.0"
dependencies = [
"dialog 0.1.0 (git+https://git.darmstadt.ccc.de/maralorn/dialog-rs.git)",
"task-hookrs 0.5.0 (git+https://github.com/maralorn/task-hookrs.git?branch=preview)",
]
[[package]]
name = "rustc-demangle"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rustyline"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"encode_unicode 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde"
version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.42"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive_internals 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_derive_internals"
version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syn"
version = "0.11.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syn"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "synom"
version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "task-hookrs"
version = "0.5.0"
source = "git+https://github.com/maralorn/task-hookrs.git?branch=preview#24a3ad5519a9bb26fcf0eeee368f8899211e47e1"
dependencies = [
"chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"derive_builder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
"error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"uuid 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "termios"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "time"
version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "unicode-width"
version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicode-xid"
version = "0.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "uuid"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi-build"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
"checksum backtrace 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ebbe525f66f42d207968308ee86bc2dd60aa5fab535b22e616323a173d097d8e"
"checksum backtrace-sys 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "44585761d6161b0f57afc49482ab6bd067e4edef48c12a152c237eb0203f7661"
"checksum bitflags 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dead7461c1127cf637931a1e50934eb6eee8bff2f74433ac7909e9afcee04a3"
"checksum bitflags 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b3c30d3802dfb7281680d6285f2ccdaa8c2d8fee41f93805dba5c4cf50dc23cf"
"checksum cc 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "8b9d2900f78631a5876dc5d6c9033ede027253efcd33dd36b1309fc6cab97ee0"
"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de"
"checksum chrono 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1cce36c92cb605414e9b824f866f5babe0a0368e39ea07393b9b63cf3844c0e6"
"checksum derive_builder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c998e6ab02a828dd9735c18f154e14100e674ed08cb4e1938f0e4177543f439"
"checksum derive_builder_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "735e24ee9e5fa8e16b86da5007856e97d592e11867e45d76e0c0d0a164a0b757"
"checksum dialog 0.1.0 (git+https://git.darmstadt.ccc.de/maralorn/dialog-rs.git)" = "<none>"
"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab"
"checksum encode_unicode 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "28d65f1f5841ef7c6792861294b72beda34c664deb8be27970f36c306b7da1ce"
"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3"
"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
"checksum itoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c069bbec61e1ca5a596166e55dfe4773ff745c3d16b700013bcaff9a6df2c682"
"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
"checksum libc 0.2.40 (registry+https://github.com/rust-lang/crates.io-index)" = "6fd41f331ac7c5b8ac259b8bf82c75c0fb2e469bbf37d2becbba9a6a2221965b"
"checksum log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "89f010e843f2b1a31dbd316b3b8d443758bc634bed37aabade59c686d644e0a2"
"checksum nix 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfb3ddedaa14746434a02041940495bf11325c22f6d36125d3bdd56090d50a79"
"checksum num-integer 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f8d26da319fb45674985c78f1d1caf99aa4941f785d384a2ae36d0740bc3e2fe"
"checksum num-traits 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dee092fcdf725aee04dd7da1d21debff559237d49ef1cb3e69bcb8ece44c7364"
"checksum proc-macro2 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "49b6a521dc81b643e9a51e0d1cf05df46d5a2f3c0280ea72bcb68276ba64a118"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum quote 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
"checksum rustc-demangle 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11fb43a206a04116ffd7cfcf9bcb941f8eb6cc7ff667272246b0a1c74259a3cb"
"checksum rustyline 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "00b06ac9c8e8e3e83b33d175d39a9f7b6c2c930c82990593719c8e48788ae2d9"
"checksum serde 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "a73973861352c932ed1365ce22b32467ce260ac4c8db11cf750ce56334ff2dcf"
"checksum serde_derive 1.0.42 (registry+https://github.com/rust-lang/crates.io-index)" = "b392c5a0cebb98121454531c50e60e2ffe0fbeb1a44da277da2d681d08d7dc0b"
"checksum serde_derive_internals 0.23.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9d30c4596450fd7bbda79ef15559683f9a79ac0193ea819db90000d7e1cae794"
"checksum serde_json 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "8c6c4e049dc657a99e394bd85c22acbf97356feeec6dbf44150f2dcf79fb3118"
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
"checksum syn 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "91b52877572087400e83d24b9178488541e3d535259e04ff17a63df1e5ceff59"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum task-hookrs 0.5.0 (git+https://github.com/maralorn/task-hookrs.git?branch=preview)" = "<none>"
"checksum termios 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "70226acdf12d182df757d9fb07c0257a1558ec48c8059f607d6b38145ce4e2fa"
"checksum time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "a15375f1df02096fb3317256ce2cee6a1f42fc84ea5ad5fc8c421cfe40c73098"
"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f"
"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc"
"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
"checksum uuid 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8630752f979f1b6b87c49830a5e3784082545de63920d59fbaac252474319447"
"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
"checksum winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb3"
"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

View file

@ -0,0 +1,8 @@
[package]
name = "rust-scripts"
version = "0.1.0"
authors = ["Malte Brandy <malte.brandy@maralorn.de>"]
[dependencies]
task-hookrs = { git = "https://github.com/maralorn/task-hookrs.git", branch = "preview"}
dialog = { git = "https://git.darmstadt.ccc.de/maralorn/dialog-rs.git" }

View file

@ -0,0 +1,8 @@
{ rustPlatform }:
with rustPlatform; buildRustPackage rec {
name = "rust-scripts";
src = ./.;
# depsSha256 = "";
cargoSha256 = "0h1fimvkm05y5vi2c2baxys5scv2icf0g6bjp62p7x935y5j85ks";
doCheck = false;
}

View file

@ -0,0 +1,74 @@
extern crate rust_scripts;
use rust_scripts::hotkeys::*;
fn main() {
let state;
let location;
let volume_up = (
c("Volume up"),
Fork(cmd(
vec!["pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%"],
)),
);
let volume_down = (
c("Volume down"),
Fork(cmd(
vec!["pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%"],
)),
);
let ncmpcpp = (c("Music"), Exec(cmd(vec!["urxvt", "-e", "ncmpcpp"])));
let wizard = (c("Magic"), Script);
let startmenu = Menu((c("Hauptmenü"), vec![wizard]))
// arandr?
// keymap
// shutdown options
// lautstärken micro, lautsprecher, regler zeigen
// zeige Buchhaltung
// mumble
// hub.w17.io
// select wifi
// debug network
// grammofy
// browser + pm
// IM dienste
// evolution
// door options, music options, hub options
// lock inhibit
// suspend inhibit
// ssh kiva, ag, whisky, vorstand, shells, charon
let w17menu
main_loop(startmenu);
// Brightness -> i3
// Basic Sound -> i3
}
fn wizard() -> Next {
// states: work, research, normal, idle
// enter new tasks
// always: add task/subtask
// what about running tasks?
// check unread E-Mail + ak?
// update
// system
// home
// inbox
//
// treesort
// mails
// sort inbox
// sort inboxkiva
// sort inboxak
// sort to sort
// go trough todo
// go trough toread
// go trough readlater
// pick tasks
// optional, later
// await
// do accounting own, cda
// dirty gits
// task generator
// task completion helper
}

View file

@ -0,0 +1,108 @@
extern crate dialog;
extern crate task_hookrs;
pub mod hotkeys {
use std::rc::Rc;
use dialog::DialogProvider;
use dialog::errors::Error;
use dialog::errors::ErrorKind::*;
use dialog::rofi::RofiDialogProvider;
use std::process::Command as StdCommand;
use std::os::unix::process::CommandExt;
pub use hotkeys::Next::*;
#[derive(Clone)]
pub enum Next {
Menu(Dialog),
TmpMenu(Dialog),
Run(Command),
Fork(Command),
Exec(Command),
Back,
Exit,
Stay,
Script(Rc<Fn(State) -> Next>),
}
type Dialog = (String, Vec<Item>);
type Item = (String, Next);
type Command = Vec<String>;
type State = String;
pub fn c<T>(string: T) -> String
where
T: Into<String>,
{
string.into()
}
pub fn cmd<S, K>(argv: S) -> Command
where
S: IntoIterator<Item = K>,
K: Into<String>,
{
argv.into_iter().map(|x| x.into()).collect()
}
fn show_menu<T: DialogProvider>(dialog_provider: &mut T, menu: Dialog) -> Next {
let (msg, options) = menu;
match dialog_provider.select_option(msg, options) {
Ok(next) => next,
Err(Error(InputCanceled, _)) => Exit,
Err(Error(InvalidUserInput, _)) => Stay,
Err(err) => {
println!("DialogError: {}", err);
Stay
}
}
}
fn build_command(cmd: Command) -> StdCommand {
let mut cmd_iter = cmd.iter();
let mut prg = StdCommand::new(cmd_iter.next().expect("Called program without name"));
for arg in cmd_iter {
prg.arg(arg);
}
prg
}
pub fn main_loop(startmenu: Next) {
let mut dialog_provider = RofiDialogProvider;
let mut history = vec![];
let mut next = startmenu;
loop {
next = match next {
Exit => break,
Back => {
history.pop().expect("Empty history");
Stay
}
Script(script) => script(c("work")),
TmpMenu(menu) => show_menu(&mut dialog_provider, menu),
Menu(menu) => {
history.push(menu.clone());
show_menu(&mut dialog_provider, menu)
}
Fork(cmd) => {
build_command(cmd).spawn().is_ok();
Stay
}
Run(cmd) => {
build_command(cmd).output().is_ok();
Stay
}
Exec(cmd) => {
build_command(cmd).exec();
break;
}
Stay => Menu(history.pop().expect("Empty history").clone()),
};
}
}
}

View file

@ -35,4 +35,5 @@ with rustPlatform; buildRustPackage rec {
mkdir -p $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications/
'';
doCheck = false;
}

1786
packages/tasktree/deps.nix Normal file

File diff suppressed because it is too large Load diff