A bunch of changes

This commit is contained in:
i.ortega 2020-05-23 16:37:32 +02:00
parent 846ca7311b
commit 5141a63d1e
16 changed files with 129 additions and 38 deletions

View File

@ -2,6 +2,10 @@ function fish_title
true
end
if [ "$TERM" = "dumb" ];
set PS1 '$ '
end
bind -M insert \ce edit_command_buffer
set fish_color_command 9ce8f8

View File

@ -58,6 +58,9 @@ alt + shift + w
ctrl + shift + t
dash $SCRIPTS/telegram-reply.sh
# ctrl + shift + s
# dash $SCRIPTS/signal-reply.sh
ctrl + shift + j
dash $SCRIPTS/jami-reply.sh

View File

@ -1,8 +1,8 @@
" ____ _____
" ____ _____
" | _ \_ _| Derek Taylor (DistroTube)
" | | | || | http://www.youtube.com/c/DistroTube
" | |_| || | http://www.gitlab.com/dwt1/
" |____/ |_|
" | |_| || | http://www.gitlab.com/dwt1/
" |____/ |_|
" vim: filetype=vifm :
" Sample configuration file for vifm (last updated: 20 July, 2018)
@ -230,8 +230,8 @@ filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
fileviewer *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\*.as[fx]
\ vifmimg videopreview %px %py %pw %ph %c
\ %pc
\ vifmimg videopreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
" \ ffprobe -pretty %c 2>&1
@ -283,7 +283,7 @@ fileviewer *.gif
\ vifmimg gifpreview %px %py %pw %ph %c
\ %pc
\ vifmimg clear
" OpenRaster
filextype *.ora
\ {Edit in MyPaint}

View File

@ -468,6 +468,7 @@ instead."
(lambda ()
(calendar-set-date-style 'european)))
(setq calendar-week-start-day 1)
(setq flycheck-flake8-maximum-line-length 80)
(after! haskell-mode
(progn
(setq
@ -526,3 +527,5 @@ instead."
(yafolding-mode)
(setq-default python-indent 4)))
(highlight-words-on-mode 'sh-mode sh-symbols)
;; (add-to-list 'TeX-mode-hook #'TeX-fold-buffer)
;; (add-hook! 'tex-mode-hook #'TeX-fold-buffer)

View File

@ -634,6 +634,10 @@ Interesting buffers filter:
(calendar-set-date-style 'european)))
(setq calendar-week-start-day 1)
#+END_SRC
#+BEGIN_SRC emacs-lisp
(setq flycheck-flake8-maximum-line-length 80)
#+END_SRC
** Haskell
Haskell-mode configs:
# ;; Ancient code for hindent
@ -736,6 +740,11 @@ Highlight predule:
(highlight-words-on-mode 'sh-mode sh-symbols)
#+END_SRC
** AucTex
#+BEGIN_SRC emacs-lisp
;; (add-to-list 'TeX-mode-hook #'TeX-fold-buffer)
;; (add-hook! 'tex-mode-hook #'TeX-fold-buffer)
#+END_SRC
* Doom info
Here are some additional functions/macros that could help you configure Doom:

View File

@ -63,10 +63,11 @@
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
(dired ; making dired pretty [functional]
+ranger +icons)
electric ; smarter, keyword-based electric-indent
ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
(ibuffer +icons) ; interactive buffer management
(undo +tree) ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
@ -117,7 +118,7 @@
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
ess ; emacs speaks statistics
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
@ -129,7 +130,8 @@
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
latex ; writing papers in Emacs has never been so fun
;; latex ; writing papers in Emacs has never been so fun
(latex +fold +lsp) ; writing papers in Emacs has never been so fun
;;lean
;;factor
;;ledger ; an accounting system in Emacs
@ -138,7 +140,13 @@
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
org ; organize your plain life in plain text
(org ; organize your plain life in plain text
+dragndrop ; drag & drop files/images into org buffers
;;+hugo ; use Emacs for hugo blogging
+jupyter ; ipython/jupyter support for babel
+pandoc ; export-with-pandoc support
;;+pomodoro ; be fruitful with the tomato technique
+present) ; using org-mode for presentations
;;perl ; write code no one else can comprehend
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more

View File

@ -54,6 +54,6 @@
(package! highlight-operators)
(package! highlight)
(package! yafolding)
(package! ranger)
(package! dired-quick-sort)
;; (package! image-dired+)
(package! ido-vertical-mode) ; not being used

4
.zshrc
View File

@ -106,7 +106,7 @@ source $HOME/.profile
# export PATH="$HOME/bin:$HOME/.local/bin:$PATH"
# source $HOME/.alias
# source $HOME/ros/serial/setup.zsh
source /usr/share/rosbash/roszsh
# source /usr/share/rosbash/roszsh
DISABLE_UPDATE_PROMPT=true
@ -201,4 +201,4 @@ export KEYTIMEOUT=1
# fi
# neofetch
# exec fish
exec fish

View File

@ -1,6 +1,6 @@
ISC-License
(c) 2014-2016 Markus Teich <markus.teich@stusta.mhn.de>
(c) 2014-2017 Markus Teich <markus.teich@stusta.mhn.de>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@ -14,15 +14,16 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(c) 2015 Jonas Jelten <jj@sft.mx>
(c) 2015 Szabolcs Nagy <nsz@port70.net>
(c) 2015 Tony Lainson <t.lainson@gmail.com>
(c) 2015 Jan Christoph Ebersbach <jceb@e-jc.de>
(c) 2015 Ivan Tham <pickfire@riseup.net>
(c) 2015 Quentin Rameau <quinq@fifth.space>
(c) 2015 Alexis <surryhill@gmail.com>
(c) 2015 Dimitris Papastamos <sin@2f30.org>
(c) 2015 Grant Mathews <grant.m.mathews@gmail.com>
(c) 2015 David Phillips <dbphillipsnz@gmail.com>
(c) 2016 Laslo Hunhold <dev@frign.de>
(c) 2016,2017 Laslo Hunhold <dev@frign.de>
(c) 2016 ssd <ssd@mailless.org>
(c) 2016 Hiltjo Posthuma <hiltjo@codemadness.org>
(c) 2015 David Phillips <dbphillipsnz@gmail.com>
(c) 2015 Grant Mathews <grant.m.mathews@gmail.com>
(c) 2015 Dimitris Papastamos <sin@2f30.org>
(c) 2015 Alexis <surryhill@gmail.com>
(c) 2015 Quentin Rameau <quinq@fifth.space>
(c) 2015 Ivan Tham <pickfire@riseup.net>
(c) 2015 Jan Christoph Ebersbach <jceb@e-jc.de>
(c) 2015 Tony Lainson <t.lainson@gmail.com>
(c) 2015 Szabolcs Nagy <nsz@port70.net>
(c) 2015 Jonas Jelten <jj@sft.mx>

View File

@ -50,6 +50,9 @@ static Shortcut shortcuts[] = {
{ XK_n, advance, {.i = +1} },
{ XK_p, advance, {.i = -1} },
{ XK_r, reload, {0} },
{ XK_bracketleft, beginning, {0} },
{ XK_bracketright,end, {0} },
{ XK_e, pdf, {0} },
};
static Filter filters[] = {

View File

@ -50,6 +50,9 @@ static Shortcut shortcuts[] = {
{ XK_n, advance, {.i = +1} },
{ XK_p, advance, {.i = -1} },
{ XK_r, reload, {0} },
{ XK_bracketleft, beginning, {0} },
{ XK_bracketright,end, {0} },
{ XK_e, pdf, {0} },
};
static Filter filters[] = {

View File

@ -12,7 +12,7 @@ X11LIB = /usr/X11R6/lib
# includes and libs
INCS = -I. -I/usr/include -I/usr/include/freetype2 -I${X11INC}
LIBS = -L/usr/lib -lc -lm -L${X11LIB} -lXft -lfontconfig -lX11
LIBS = -L/usr/lib -lc -lm -L${X11LIB} -lXft -lfontconfig -lX11 -lcairo
# OpenBSD (uncomment)
#INCS = -I. -I${X11INC} -I${X11INC}/freetype2
# FreeBSD (uncomment)

Binary file not shown.

View File

@ -52,6 +52,8 @@ Reload the slides. Only works on file input.
Go to next slide, if existent.
.It Sy Left | Backspace | h | k | Up | Prior | p
Go to previous slide, if existent.
.It Sy e
Export slides into PDF and save it as FILENAME.pdf.
.El
.El
.Sh FORMAT

View File

@ -19,6 +19,10 @@
#include <X11/Xutil.h>
#include <X11/Xft/Xft.h>
#include <cairo/cairo.h>
#include <cairo/cairo-xlib.h>
#include <cairo/cairo-pdf.h>
#include "arg.h"
#include "util.h"
#include "drw.h"
@ -97,6 +101,9 @@ static void cleanup(int slidesonly);
static void reload(const Arg *arg);
static void load(FILE *fp);
static void advance(const Arg *arg);
static void beginning(const Arg *arg);
static void end(const Arg *arg);
static void pdf();
static void quit(const Arg *arg);
static void resize(int width, int height);
static void run();
@ -457,6 +464,9 @@ load(FILE *fp)
if (!p)
break;
}
if (!slidecount)
die("sent: No slides in file");
}
void
@ -472,6 +482,56 @@ advance(const Arg *arg)
}
}
void
pdf()
{
const Arg next = { .i = 1 };
const Arg first = { .i = -(slidecount-1) };
cairo_surface_t *cs;
char filename[20];
sprintf(filename, "%s.pdf", fname);
cairo_surface_t *pdf = cairo_pdf_surface_create(filename, xw.w, xw.h);
cairo_t *cr = cairo_create(pdf);
idx = -1;
for (int i = 0; i < slidecount; ++i) {
cs = cairo_xlib_surface_create(xw.dpy, xw.win, xw.vis, xw.w, xw.h);
advance(&next);
cairo_set_source_surface(cr, cs, 0.0, 0.0);
cairo_paint(cr);
cairo_show_page(cr);
cairo_surface_destroy(cs);
}
cairo_destroy(cr);
cairo_surface_destroy(pdf);
advance(&first);
}
void
beginning(const Arg *arg)
{
if (idx != 0) {
if (slides[idx].img)
slides[idx].img->state &= ~SCALED;
idx = 0;
xdraw();
}
}
void
end(const Arg *arg)
{
if (idx != slidecount-1) {
if (slides[idx].img)
slides[idx].img->state &= ~SCALED;
idx = slidecount-1;
xdraw();
}
}
void
quit(const Arg *arg)
{
@ -710,9 +770,6 @@ main(int argc, char *argv[])
load(fp);
fclose(fp);
if (!slidecount)
usage();
xinit();
run();

View File

@ -3,18 +3,16 @@
iter="1"
while [ $iter -eq "1" ];
do
freq="$(cat /tmp/cpu-freq)"
iter="$(echo "$freq > 5" | bc -l)"
freq=$(top -bn 2 -d 5 | grep '^%Cpu' | tail -n 1 | gawk '{print $2+$4+$6}')
iter=$(echo "$freq > 5" | bc -l)
if [ $iter -eq 0 ]; then
sleep 5m
freq="$(cat /tmp/cpu-freq)"
iter="$(echo "$freq > 5" | bc -l)"
freq=$(top -bn 2 -d 5 | grep '^%Cpu' | tail -n 1 | gawk '{print $2+$4+$6}')
iter=$(echo "$freq > 5" | bc -l)
else
sleep 2m
fi
done
done
printf "%b\n" "done"
sleep 10m
$1