Skip to content

kran0/dotfiles

Repository files navigation

HOME directory configuration files. More or less compatible with Home, Work and Phone (Termux) environments.

  • Simple tool for pull updates from repo.

How to use

The start is in .bash_profile. I love to have the .local/bin at the end of ${PATH} to place custom executables in it. Some say it is not secure. It is my life, who cares?

You have to install depencies:

# Macbook depencies
dnf install\
    akmods broadcom-wl kernel-devel mbpfan

# Weak depencies
dnf install\
    ansible firefox libreoffice make mc openssh\
    podman podman-compose pulseaudio-module-bluetooth\
    telegram-desktop tigervnc virt-manager xclip x11vnc

# Main depencies
dnf install\
    dmenu fuse-sshfs git go openssh-clients screen xmodmap xrdb xterm

go get github.com/{alecthomas/gometalinter,/mdempsky/gocode}
go get golang.org/x/tools/cmd/guru

My favorite /custom executables/

  • lsrs - LSRS is s cool script to use GNU Screen to manage remote systems, which cannot run GNU Screen. The LSRS stands for: Local GNU Screen - Remote Shell. The idea is: instead of running OpenSSH client and executing GNU Screen's instance on the remote side:
    • Run new GNU Screen's instance locally and make new separate OpenSSH client connection for every new window;
    • Redefine common tools to LSRS format;
    • If Ctrl+a : screen command instead of running command on GNU Screen's side (local), wrap it and get remote results to the local;
    • Watch ssh-EXAMPLE for how-to-use.
  • darkside - is my portable network music player:
    • Help: darkside --help;
  • menu - the description is below, it is originally created for the tabber;
  • TODO: add more.

Wonderful invention #1 XTerm + GNU Screen

I adore XTerm. XTerm is perfect Terminal emulator. Thank you, Thomas Dickey for your work.

  • .Xresources contains configuration for X apps, in my case mostly for XTerm;
  • XTerm.sh may be the only link on your panel, desktop, etc. It starts XTerm, who needs more?;
  • Before starting XTerm, XTerm.sh is sourcing ssh-agent-call to check if ssh-agent is running;
  • Finally Xterm.sh executes XTerm with GNU Screen workspace with first workspace named local tabber:
    • yes it re-defines the shell to the menu program -s menu;
    • and uses some GNU Screen's magic to reconnect to existing sessions or create new ones.

I adore GNU Screen and The GNU Project. They really changed my life. /Who knows what would our world be without Richard Stallman's ideas?/

  • Usually i run shell in GNU Screen, and GNU Screen in .. Another GNU Screen. Actually I use top 3rd level GNU Screen instance (workspace) to rule them all;
  • XTerm starts GNU Screen workspace with .screenrc-workspace config file:
    • it is used to switch between remre and local tabbers workspaces;
    • it have special (non-default) ecape sequence: escape ^Ee. So, to change the "workspace" you are to use Ctrl+e instead of the default;
    • it is also responsible for the bell, hardstatus, blankerprg and other communications with XTerm;
    • it starts first local workspace named "local" tabber;
    • it uses menu instead of the shell, so instead of running shell in the new window (Ctrl+e Ctrl+c), it will run menu in new window;
  • Tabbers are wokrspaces (local or remote) with configs like .screenrc-tabber:
    • it is responsible for "tabs". Eg: workspace level window manager for XTerm. Every "tab" is usually another with GNU Screen running (if local "tab") or OpenSSH client connection with GNU Screen running on remote;
    • it have special (non-default) ecape sequence: escape ^Bb. So, to change the "tab" you are to use Ctrl+b instead of the default;
    • it is also responsible for the bell, hardstatus and other communications with XTerm.
    • it uses menu instead of the shell, so instead of running shell in the new window (Ctrl+b Ctrl+c), it will run menu in new window;

Menu is a script to manage some elements:

  • Restore current SHELL to user's default shell;
  • Self-configure, receive user's selection and execute the element selected:
    • Actually /menu/ uses some directory to list executables (or symboluc links to executables) from;
    • Dmenu or pmenu as a selector tool;
    • And just executes the first element selected by selector;
  • Of Course, menu set's GNU Screen's window title right and pretty to the name of the executed element;
  • +1 lifehack. There is a symbolic link .local/bin/m > .local/bin/menu. I use short verion just to run menu from the shell or actually from the local GNU Screen tab with Ctrl+a : screen m command.

Menu elements are organised in Debin-style:

  • Items-avalible contains all elements;
  • Another dirs contains subsets;
  • Just change MENU_P (menu path) variable for /menu/ to get the subset:
  • My favorite /menu/ elements:
    • TODO write about them;
    • TODO rethink ssh-* elements before publishing them;
    • Rethink about ssh-EXAMPLE .

Wonderful invention #2 OpenSSH client + menu

I really love OpenSSH. It is really good, that OpenBSD made it free. Some would say it is simple, I'd say it is really not simple. I have changed my mind while reading manpages for: ssh, ssh_config, scp, sftp, ssh-add, ssh-keysign, ssh-keyscan, ssh-keygen, sshd, sshd_config, sftp-server, and ssh-agent. You can unterstand a lot about Computer Science just while reading some manpages, please do. It is very interesting and helpful.

About

Adore: XTerm, GNU Screen, OpenSSH.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published