Your Latest Workflow Improvement - Desktop Customization & Workflow
venam
My latest, not so new, workflow improvement is to use `at` as a notification timer.
When I have to do something after X time or at X time I just fire up `at` with notify-send and/or some sound.

It's pretty neat, light, and simple.
z3bra
I recently switched from tmux to dvtm.
It doesnt sound like much, but the fact it auto arrange stuff is great to force you tidy your things, istead of spending time making mosaics.
grah
My latest workflow improvement is a simple one and is probably something that everyone is already aware of: using Ctrl-Backspace or Ctrl-Del to delete a whole word instead of just using Backspace or Delete. Works in most graphical applications.

(27-02-2019, 11:40 AM)z3bra Wrote: I recently switched from tmux to dvtm.
It doesnt sound like much, but the fact it auto arrange stuff is great to force you tidy your things, istead of spending time making mosaics.

Wow thanks for posting this, dvtm is perfect! I've now dropped tmux and screen and use it along with dtach.
Igrom
Today's workflow improvement is a result of automating a recent piece of work outlined in https://nixers.net/showthread.php?tid=2253.

Code:
# trim video
function vtrim () {
  ffplay -vf "drawtext=text='%{pts\:hms}':box=1:x=(w-tw)/2:y=h-(2*lh)" "$1"
  while :
  do
    read
    ffmpeg -i "$1" -ss 00:00:$REPLY short-"$1"
    ffplay short-"$1"
  done
}

# record video
function vrecord () {
  ffmpeg -video_size $(xrandr | grep -P '(?<=current )[^,]+' -o | tr -d ' ') -framerate 25 -f x11grab -i :0 full.mp4
  vtrim full.mp4
}

The code records my screen. Once the recording is stopped, the video plays back with a rectangular overlay with the frame timestamp. Once I scroll to the beginning of the video's actual content, I memorize the timestamp, ^C and subsequently enter the seconds and microseconds in the terminal to trim the video. I confirm visually that it was done okay, otherwise I ^C to tweak the trim.
wolf
MPD + Youtube-dl : Listen Youtube at mpd

Not exactly a work stuff, but work related since I like to listen some music while working :

Code:
#!/usr/local/bin/bash

mpdu2bCacheDir=/tmp/mpdu2bdir/ ;
/usr/bin/youtube-dl -x \
    --audio-format mp3
    -q "${1}" \
    -o "${mpdu2bdir}/%(title)s.%(ext)s" \
    --exec 'mpc add {}' ;

I used to use the stream URI directly to mpd, but had issues with mp4 and song name ( sometimes I want to see the lyrics ).

Note : You'll need configure your mpd to use Unix Socket as address to bind.
thuban
@wolf : omg that's great !
I guess there is a little mistake in variable.
I modified it a bit to add the "continue" option to youtube-dl if the file is already retrieved:

Code:
#!/bin/sh
MUSDIR=~/Musique
/usr/bin/youtube-dl -x \
    --audio-format best \
    -q "${1}" \
    -c \
    -o "${MUSDIR}/%(title)s.%(ext)s" \
    --exec 'mpc add {}' ;
wolf
(30-03-2019, 09:49 AM)thuban Wrote: @wolf : omg that's great !
I guess there is a little mistake in variable.
I modified it a bit to add the "continue" option to youtube-dl if the file is already retrieved:

Code:
#!/bin/sh
MUSDIR=~/Musique
/usr/bin/youtube-dl -x \
    --audio-format best \
    -q "${1}" \
    -c \
    -o "${MUSDIR}/%(title)s.%(ext)s" \
    --exec 'mpc add {}' ;

Hey, thanks for the fix and improvement. thuban++
z3bra
This week I made a simple script to track my time (ask by my management recently). It lets you create/close tasks (one task is a single line description).
There is only one task elected as "current" at a given time, which is a symlink to the actuall task. When you create a different time, the timestamp is recorded in the file, and a keyword "now" is added to define when you finished it.
When you close a task "now" is replaced by the timestamp, and "[CLOSED]" is prepended to the subject.
You can list you tasks, or export them in csv form if you want to post-process them.

I'm not quite sure if it will help, but it does a good job at tracking time :)

If anyone is interested, I can post the script tomorrow.
zge
(16-03-2019, 06:22 PM)grah Wrote: My latest workflow improvement is a simple one and is probably something that everyone is already aware of: using Ctrl-Backspace or Ctrl-Del to delete a whole word instead of just using Backspace or Delete. Works in most graphical applications.

Learning Emacs keybindings is generally quite useful when you use bash. I regularly use C-x ( to record macros, C-a/C-e to jump around the current line, C-l to clear the screen, C-y/M-y to use the kill ring, and M-u/M-c/M-l to toggle cases. And I guess it's just my preference, but C-f/C-b/C-p/C-n are nicer than the arrow keys, especially on laptops.
fraun
(31-03-2019, 07:05 PM)z3bra Wrote: This week I made a simple script to track my time (ask by my management recently). It lets you create/close tasks (one task is a single line description).
There is only one task elected as "current" at a given time, which is a symlink to the actuall task. When you create a different time, the timestamp is recorded in the file, and a keyword "now" is added to define when you finished it.
When you close a task "now" is replaced by the timestamp, and "[CLOSED]" is prepended to the subject.
You can list you tasks, or export them in csv form if you want to post-process them.

I'm not quite sure if it will help, but it does a good job at tracking time :)

If anyone is interested, I can post the script tomorrow.

That sounds kind of like org-mode in emacs... In fact it is doable in org-mode




Members  |  Stats  |  Night Mode