summary refs log tree commit diff stats
path: root/lib/std/dirs.nim
Commit message (Collapse)AuthorAgeFilesLines
* complete std prefixes for stdlib (#22887)ringabout2023-10-301-1/+1
| | | | follow up https://github.com/nim-lang/Nim/pull/22851 follow up https://github.com/nim-lang/Nim/pull/22873
* fixes #21977; add sideEffects to dirExists, fileExists and symlinkExists ↵ringabout2023-06-011-1/+1
| | | | (#21978)
* stdlib organization & documentation improvements (#20971)metagn2022-12-061-0/+2
| | | | | | | | | | | | | | | | | * stdlib organization & documentation improvements * fix CI * Update doc/lib.md Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> * fix ci, remove jshttpcore, export in jsfetch instead * fix alphabetical order violations * add cmdline, db_odbc Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
* Fix #20628 for Windows (#20667)Andrey Makarov2022-10-281-6/+6
| | | | | | | * Fix #20628 for Windows * Move isRegular - !isSpecial and onlyRegular - skipSpecial * Forgot to change it in 1 more place
* cleanup os related documentation links (#20663)ringabout2022-10-271-14/+3
| | | cleanup documentation links
* clean up `std/os` related modules (#20651)ringabout2022-10-251-46/+9
| | | | | | | | | * clean up `std/os` related modules * use `cmpPaths` * reset * cleanup
* Implement Unix file regularity check (#20448) (#20628)Andrey Makarov2022-10-251-14/+18
| | | | | * Implement Unix file regularity check * update std/dirs also
* add typesafe `std/paths`, `std/files`, `std/dirs`, `std/symlinks` (#20582)ringabout2022-10-211-0/+177
* split std/os; add typesafe std/paths * add more files, dirs, paths * add documentation * add testcase * remove tryRemoveFile * clean up * Delete test.nim * apply changes * add `add` and fixes
cp">#include "wm.h" #include <X11/keysym.h> static const char *term[] = { "xterm", "-bg", "black", "-fg", "white", "-fn", "-*-terminus-medium-*-*-*-13-*-*-*-*-*-iso10646-*", 0 }; static const char *proglist[] = { "sh", "-c", "exec `ls -lL /bin /sbin /usr/bin /usr/local/bin 2>/dev/null | awk 'NF>2 && $1 ~ /^[^d].*x/ {print $NF}' | sort | uniq | gridmenu`", 0 }; static Key key[] = { { Mod1Mask, XK_Return, run, term }, { Mod1Mask, XK_p, run, proglist }, { Mod1Mask | ShiftMask, XK_c, kill, NULL}, { Mod1Mask | ShiftMask, XK_q, quit, NULL}, }; void update_keys() { unsigned int i, len; KeyCode code; len = sizeof(key) / sizeof(key[0]); for(i = 0; i < len; i++) { code = XKeysymToKeycode(dpy, key[i].keysym); XUngrabKey(dpy, code, key[i].mod, root); XGrabKey(dpy, code, key[i].mod, root, True, GrabModeAsync, GrabModeAsync); } } void keypress(XEvent *e) { XKeyEvent *ev = &e->xkey; unsigned int i, len; KeySym keysym; keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0); len = sizeof(key) / sizeof(key[0]); for(i = 0; i < len; i++) if((keysym == key[i].keysym) && (key[i].mod == ev->state)) { if(key[i].func) key[i].func(key[i].aux); return; } }