Scripts to be "quick and efficient" - Servers Administration, Networking, & Virtualization
jkl
I haven't used bare, unmodified Linux installations in years and I don't regret having moved on. However, what is it that you need in a text (or code) editor? Even GNU Emacs works rather well without any configuration changes. (If you can live with its defaults. But I don't like the colors...)
Steph
(06-09-2018, 07:44 PM)jkl Wrote: But I don't like the colors.

I'm in love with my E-ink theme
zge
(06-09-2018, 07:44 PM)jkl Wrote: However, what is it that you need in a text (or code) editor? Even GNU Emacs works rather well without any configuration changes. (If you can live with its defaults. But I don't like the colors...)

Stallman explains it quite well (source:

Quote:EMACS could not have been reached by a process of careful design, because such processes arrive only at goals which are visible at the outset, and whose desirability is established on the bottom line at the outset. Neither I nor anyone else visualized an extensible editor until I had made one, nor appreciated its value until he had experienced it. EMACS exists because I felt free to make individually useful small improvements on a path whose end was not in sight.

what Emacs is couldn't have came into being, it's a core aspect of Emacs (source):

Quote:By Stallman's own recollection, the macro hack touched off an explosion of further innovation. "Everybody and his brother was writing his own collection of redefined screen-editor commands, a command for everything he typically liked to do," Stallman would later recall. "People would pass them around and improve them, making them more powerful and more general. The collections of redefinitions gradually became system programs in their own right."

Of course the standard configuration works well, but depending on my use case, I might want things to be different or to do entirely new things, either because of my own intentions or my personal environment. Examples would be something as simple as rebinding M-SPC from
Code:
just-one-space
to
Code:
cycle-spacing
or using input modes to easily write german words anywhere I use Emacs.

In the end, it's just a very, very big shell.
z3bra
I moved away from vim when I realised that I could easily spend an hour per day tweaking my .vimrc. Be it searching for scripts, color scheme or rebinding stuff.
I'm now using vis for years now, with the default config and it works perfectly.
I'm slowly (but surely!) moving my toolset to the ALL DEFAULTS! way. No config file is the easiest way to deal with configs ;)

To go back to the original topic, I have tens of scripts to make me quicker and more efficient.
Of course I have my own `diffcolor`, but the one I use the most is a script that crawl my /etc/hosts and $HOME/.ssh/known_hosts, and pipe them in `pick(1)`, a fuzzy selector. It then let me ssh in a host directly.
I bound it to ^K in mksh, so I can connect to any host in seconds (it makes all my collegues jealous hehe).
I use a similar system with `dmenu(1)` to open bookmarks in my webbrowser, or browse my history. It let me acces web resources in just one keybind, without needing to focus an app.

On the efficiency level, I also added these lines to my .ssh/config:
Code:
addkeystoagent yes
forwardagent yes
Now my keys are automatically added to my ssh-agent the first time i use them, and the agent is always forwarded (it helps me send files between hosts directly without having to retrieve them locally).

The last thing I did was to create a "plumb" script, bound to button4 on my mouse (on the side, near thumb). It reads whatever is in the primary selection amd tries.to open it. It works on local file path of course (ala xdg-open), but I use it mostly for web links. Instead of openning everything in the browser, it will download the file (or stream.it) in the local apropriate application: media player, image viewer, text editor, ...
This way I can use.the full power of each app instead of relying on the web browser!
For the curious, here is an earlier version of this script (now named "plumb" in hommage to plan9): http://git.z3bra.org/scripts/file/link-open.html
jkl
Wouldn't it have been easier to just use Acme for that?
z3bra
(08-09-2018, 08:21 PM)jkl Wrote: Wouldn't it have been easier to just use Acme for that?
Aqme is a text editor at its core, which is not what I was looking for. Also, using aqme to plumb selection would require aqme to be open all the time, which is not acceptable to me.
Also, I don't like aqme much with the fact it's mouse-driven.
robotchaos
i became too attached to my customizations for them to be worth it as i distrohop more than i would like to admit. so i gave up on customizations because it takes too much to reconfigure or restore configurations if you need to rebuild your os. and this very much so applies to the os. i try to stick with default packages as well as default configurations. it just becomes too much effort to keep track of all i use and how i use them.
xero
for me, optimizing my {workflow,environment} is cathartic. making my setup visually appealing and working the way that's best for me helps me improve. it's an iterative process. if i dont try out new tools and evaluate new methodologies i cant accurately gauge what works best for me.

on top of that thought and experience activities where you force yourself out of your normal comfort zone can give you better perspective. things like our "week in the tty" challenge. i had considered myself a shell user until the 1st time i tried it. i realized how much i relied on things like xsel to jump-gap my clipboard between applications. after a few days w/o using x i gained new powers i didnt realize i "needed". now when i connect to a remote or headless box i'm much more agile and able to work w/o relying on applications i have locally. that being said, it also shows me how far {i,we}'ve come and how much i love tools in my kit.

when i first, seriously, decided to switch from {gui,ide like} editors to vi{m,} my guru z3bra gave me some sage like advice. "learn to use vanilla vi first. once you master the basics everything else will be a natural extension of it's capabilities" <i paraphrased him>. i was naive and didn't fully grok what he meant at first. but after years i've finally started to become enlightened to his wisdom. fast forward to the present my vimrc has changed quite a bit. and i use neovim locally with a bunch of plugins. the features i've added to the editor are lovely and help me a lot for my work. but none of them are "necessary" to me getting things done. now when using vi on an ancient server somewhere i still feel right at home. sure, it's not as "flashy" but as a tool it works just how i expect it to.

speaking of aesthetics; for me, having "good colors" is very important. i read better w/ light on dark colorschemes. for things like your gkt theme and terminal colors this can be achieved w/ relative ease. but for the web it's not so easy. i spend a decent amount of time using the same websites both at home and at work. so taking the time to write css overrides for those sites to make them match my color schemes is worth it to me. there's nothing worse that going to a site and being blinded by some neon white bg. the same is true with distilling visual information. i like to {remove,hide} entire sections of sites to help me focus on only the content i care about (e.g. make reddit more like lobsters).

now, to the actual topic of this post :P

i have a variety of shell scripts in my ~/bin folder that i use all the time. but they mostly just help me automate tasks i cant be bothered to remember to do manually. things like {dis,en}abling my touchpad or discrete graphics cart on my laptop, interacting w/ remote {pastebin,shortlink} services, or just fun stuff like processing and displaying terminal {ascii,ansi} art.

my real productivity enhancements have come from optimizing my toolchain and workflow.




Members  |  Stats  |  Night Mode  |  Help