From 6e528248414e330c9e25e81596ab47b8b8a5b701 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 14 May 2021 22:44:50 +0430 Subject: first commit --- .Xresources | 49 + .config/bat/config | 27 + .config/i3/config | 194 + .config/joplin/keymap.json | 4 + .config/pgcli/config | 197 + .config/qutebrowser/bookmarks/urls | 0 .config/qutebrowser/config.py | 101 + .config/qutebrowser/keys.conf | 693 +++ .config/qutebrowser/nord-qutebrowser.py | 1 + .config/qutebrowser/quickmarks | 0 .config/qutebrowser/qutebrowser.conf | 1572 ++++++ .config/ranger/rc.conf | 725 +++ .config/tmuxinator/sample.yml | 59 + .ctags | 59 + .gitconfig | 6 + .gitignore | 1 + .gotty | 302 ++ .i3blocks.conf | 331 ++ .iredisrc | 67 + .kshrc | 87 + .mongorc.js | 17 + .muttrc | 253 + .newsboat/config | 42 + .newsboat/urls | 56 + .psqlrc | 29 + .rainbow_config.json | 43 + .tmux.conf | 146 + .trash | 15 + .tvrc | 5 + .vimrc | 1308 +++++ .vimshrc | 10 + .w3m/build.sh | 5 + .w3m/cgi-bin/fzf_surfraw.cgi | 6 + .w3m/cgi-bin/fzf_surfraw_tmux.cgi | 41 + .w3m/cgi-bin/goto_clipboard.cgi | 25 + .w3m/cgi-bin/goto_clipboard_primary.cgi | 28 + .w3m/cgi-bin/goto_tmux_clipboard.cgi | 28 + .w3m/cgi-bin/restore_session.cgi | 49 + .w3m/cgi-bin/restore_tab.cgi | 10 + .w3m/config | 155 + .w3m/keymap | 132 + .ycm_extra_config.py | 99 + .zshrc | 392 ++ CV.tex | 173 + CV_Abridged.tex | 135 + LICENSE | 674 +++ README.md | 5 + _emacs.el | 121 + baseline/.minttyrc | 29 + baseline/.tmux.conf | 62 + baseline/.vimrc | 309 ++ baseline/.zshrc | 62 + baseline/startup.sh | 46 + baseline/ufw-allow-mosh | 31 + bin/astdump | 44 + bin/bruiser | 1 + bin/cgrep | 1 + bin/colo | 136 + bin/color | 6 + bin/colormake | 40 + bin/delf | 1 + bin/disasm | 50 + bin/dwasm | 1 + bin/extractor | 67 + bin/fzf_surfraw | 6 + bin/fzf_surfraw_tmux | 6 + bin/goto_clipboard.cgi | 4 + bin/hived | 1 + bin/index.html | 256 + bin/kaminokumo | 1 + bin/leb128 | 117 + bin/llvm-wasm | 10 + bin/lorem-ipsum | 9 + bin/manga_dmenu.sh | 5 + bin/mushi | 1 + bin/postit.sh | 4 + bin/ramdump | 1 + bin/run_with_dmenu.sh | 7 + bin/sniff | 105 + c/debug.dbg | 15 + c/devi_extra.h | 33 + c/header.hpp | 4 + c/main.c | 12 + c/main.cpp | 6 + cfam.vimrc | 10 + checknodeversion.sh | 18 + compiler-explorer/ceconfig.json | 14 + compiler-explorer/index.js | 21 + compiler-explorer/main.js | 45 + compiler-explorer/package.json | 14 + crontab | 1 + cygwin/.tmux.conf | 59 + cygwin/.zshrc | 89 + cygwin/ChangeCapsToControl.reg | Bin 0 -> 386 bytes cygwin/_emacs.el | 124 + cygwin/alac.bat | 2 + cygwin/alacritty.yml | 747 +++ cygwin/conemu.xml | 775 +++ cygwin/devi.zsh-theme | 264 + cygwin/sumatrapdf/SumatraPDF-settings.txt | 67 + cygwin/xserver.bat | 2 + default.sh | 63 + devi.zsh-theme | 299 ++ df/colors.txt | 50 + df/df-init | 6 + df/init.txt | 150 + df/world_gen.txt | 88 + docker/devdocs.bat | 2 + docker/mongo.sh | 3 + docker/postgres.sh | 4 + docker/searx.bat | 2 + docker/yacy.bat | 2 + etc/fonts/local.conf | 39 + fedpackages.txt | 573 +++ fzfinit.sh | 3 + gen_wg_config.sh | 45 + header.hpp | 4 + hived | 704 +++ hived.desktop | 5 + hivedup.sh | 4 + hiveinit.py | 60 + init.vim | 189 + irssi/config | 449 ++ irssi/irssi.sh | 21 + irssi/solarized-powerline.theme | 419 ++ irssi/startup | 11 + keymap.sh | 7 + keyremap.ahk | 130 + lemonbar.sh | 50 + lesscolor.sh | 20 + llvm-build.sh | 2 + llvm-update.sh | 11 + lynx.cfg | 3837 ++++++++++++++ lynx.lss | 112 + makefile | 102 + makefilec | 233 + makefilecpp | 234 + misc.sh | 7 + mushi.py | 54 + postit | 16 + pygitty.py | 21 + python/deviutil.py | 229 + python/main.py | 52 + qtbrowser/config.py | 100 + rpi/configmap.yaml | 7 + rpi/ntp/ntp.conf | 65 + rpi/pihole-deployment.yaml | 65 + rpi/squid-proxy-deployment.yaml | 56 + rpi/squid/squid.conf | 7963 +++++++++++++++++++++++++++++ rpi/unbound-deployment.yaml | 35 + snippets/cmain.c | 3 + snippets/cppmain.cpp | 3 + snippets/main.py | 45 + snippets/shebang.sh | 1 + tagger.sh | 60 + telebot.py | 126 + tg.lua | 109 + tmux/common.sh | 7 + tmux/date.sh | 16 + tmux/jdat.sh | 5 + tmux/vcs_info.sh | 66 + torrc | 255 + vim/install.sh | 41 + vimium-options.json | 42 + voice.sh | 3 + zathurarc | 51 + zshrc_stripped.sh | 114 + 167 files changed, 29768 insertions(+) create mode 100644 .Xresources create mode 100644 .config/bat/config create mode 100644 .config/i3/config create mode 100644 .config/joplin/keymap.json create mode 100644 .config/pgcli/config create mode 100644 .config/qutebrowser/bookmarks/urls create mode 100644 .config/qutebrowser/config.py create mode 100644 .config/qutebrowser/keys.conf create mode 120000 .config/qutebrowser/nord-qutebrowser.py create mode 100644 .config/qutebrowser/quickmarks create mode 100644 .config/qutebrowser/qutebrowser.conf create mode 100644 .config/ranger/rc.conf create mode 100644 .config/tmuxinator/sample.yml create mode 100644 .ctags create mode 100644 .gitconfig create mode 100644 .gitignore create mode 100644 .gotty create mode 100644 .i3blocks.conf create mode 100644 .iredisrc create mode 100644 .kshrc create mode 100644 .mongorc.js create mode 100644 .muttrc create mode 100644 .newsboat/config create mode 100644 .newsboat/urls create mode 100644 .psqlrc create mode 100755 .rainbow_config.json create mode 100644 .tmux.conf create mode 100644 .trash create mode 100644 .tvrc create mode 100644 .vimrc create mode 100644 .vimshrc create mode 100644 .w3m/build.sh create mode 100755 .w3m/cgi-bin/fzf_surfraw.cgi create mode 100755 .w3m/cgi-bin/fzf_surfraw_tmux.cgi create mode 100755 .w3m/cgi-bin/goto_clipboard.cgi create mode 100755 .w3m/cgi-bin/goto_clipboard_primary.cgi create mode 100755 .w3m/cgi-bin/goto_tmux_clipboard.cgi create mode 100755 .w3m/cgi-bin/restore_session.cgi create mode 100755 .w3m/cgi-bin/restore_tab.cgi create mode 100644 .w3m/config create mode 100644 .w3m/keymap create mode 100644 .ycm_extra_config.py create mode 100644 .zshrc create mode 100644 CV.tex create mode 100644 CV_Abridged.tex create mode 100644 LICENSE create mode 100644 README.md create mode 100755 _emacs.el create mode 100644 baseline/.minttyrc create mode 100644 baseline/.tmux.conf create mode 100644 baseline/.vimrc create mode 100644 baseline/.zshrc create mode 100755 baseline/startup.sh create mode 100755 baseline/ufw-allow-mosh create mode 100755 bin/astdump create mode 120000 bin/bruiser create mode 120000 bin/cgrep create mode 100755 bin/colo create mode 100755 bin/color create mode 100755 bin/colormake create mode 120000 bin/delf create mode 100755 bin/disasm create mode 120000 bin/dwasm create mode 100755 bin/extractor create mode 100755 bin/fzf_surfraw create mode 100755 bin/fzf_surfraw_tmux create mode 100755 bin/goto_clipboard.cgi create mode 120000 bin/hived create mode 100644 bin/index.html create mode 120000 bin/kaminokumo create mode 100755 bin/leb128 create mode 100755 bin/llvm-wasm create mode 100755 bin/lorem-ipsum create mode 100755 bin/manga_dmenu.sh create mode 120000 bin/mushi create mode 100755 bin/postit.sh create mode 120000 bin/ramdump create mode 100755 bin/run_with_dmenu.sh create mode 100755 bin/sniff create mode 100644 c/debug.dbg create mode 100644 c/devi_extra.h create mode 100644 c/header.hpp create mode 100644 c/main.c create mode 100644 c/main.cpp create mode 100644 cfam.vimrc create mode 100755 checknodeversion.sh create mode 100644 compiler-explorer/ceconfig.json create mode 100644 compiler-explorer/index.js create mode 100644 compiler-explorer/main.js create mode 100644 compiler-explorer/package.json create mode 100644 crontab create mode 100644 cygwin/.tmux.conf create mode 100644 cygwin/.zshrc create mode 100755 cygwin/ChangeCapsToControl.reg create mode 100755 cygwin/_emacs.el create mode 100755 cygwin/alac.bat create mode 100644 cygwin/alacritty.yml create mode 100644 cygwin/conemu.xml create mode 100644 cygwin/devi.zsh-theme create mode 100644 cygwin/sumatrapdf/SumatraPDF-settings.txt create mode 100755 cygwin/xserver.bat create mode 100644 default.sh create mode 100644 devi.zsh-theme create mode 100644 df/colors.txt create mode 100644 df/df-init create mode 100644 df/init.txt create mode 100644 df/world_gen.txt create mode 100755 docker/devdocs.bat create mode 100755 docker/mongo.sh create mode 100755 docker/postgres.sh create mode 100755 docker/searx.bat create mode 100755 docker/yacy.bat create mode 100644 etc/fonts/local.conf create mode 100644 fedpackages.txt create mode 100755 fzfinit.sh create mode 100755 gen_wg_config.sh create mode 100644 header.hpp create mode 100755 hived create mode 100644 hived.desktop create mode 100755 hivedup.sh create mode 100755 hiveinit.py create mode 100644 init.vim create mode 100644 irssi/config create mode 100755 irssi/irssi.sh create mode 100644 irssi/solarized-powerline.theme create mode 100644 irssi/startup create mode 100755 keymap.sh create mode 100644 keyremap.ahk create mode 100755 lemonbar.sh create mode 100755 lesscolor.sh create mode 100755 llvm-build.sh create mode 100755 llvm-update.sh create mode 100644 lynx.cfg create mode 100644 lynx.lss create mode 100644 makefile create mode 100644 makefilec create mode 100644 makefilecpp create mode 100755 misc.sh create mode 100755 mushi.py create mode 100644 postit create mode 100755 pygitty.py create mode 100755 python/deviutil.py create mode 100755 python/main.py create mode 100644 qtbrowser/config.py create mode 100644 rpi/configmap.yaml create mode 100644 rpi/ntp/ntp.conf create mode 100644 rpi/pihole-deployment.yaml create mode 100644 rpi/squid-proxy-deployment.yaml create mode 100644 rpi/squid/squid.conf create mode 100644 rpi/unbound-deployment.yaml create mode 100644 snippets/cmain.c create mode 100644 snippets/cppmain.cpp create mode 100644 snippets/main.py create mode 100644 snippets/shebang.sh create mode 100755 tagger.sh create mode 100755 telebot.py create mode 100644 tg.lua create mode 100644 tmux/common.sh create mode 100755 tmux/date.sh create mode 100755 tmux/jdat.sh create mode 100755 tmux/vcs_info.sh create mode 100644 torrc create mode 100755 vim/install.sh create mode 100755 vimium-options.json create mode 100755 voice.sh create mode 100644 zathurarc create mode 100644 zshrc_stripped.sh diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..3d52f5a --- /dev/null +++ b/.Xresources @@ -0,0 +1,49 @@ + +Xft.autohint: 0 +Xft.antialias: 1 +Xft.hinting: 1 +Xft.hintstyle: hintslight +Xft.embolden: 1 +Xft.dpi: 96 +Xft.rgba: rgb +Xft.lcdfilter: lcddefault +Xft.embeddedbitmap: 1 +xterm*dpi: 96 +gnome-terminal*dpi: 96 +*.alpha: 1.0 +*.font: DejaVu Sans Mono for Powerline:pixelsize=11.3:antialias=true:autohint=true; +xterm*scaleHeight: 1.01 + +#define base00 #2E3431 +#define base01 #cc0000 +#define base02 #4E9A06 +#define base03 #C4A000 +#define base04 #3465A4 +#define base05 #75507B +#define base06 #06989A +#define base07 #D3D7CF +#define base08 #555753 +#define base09 #EF2929 +#define base0A #8AE234 +#define base0B #FCE94F +#define base0C #729FCF +#define base0D #AD7FA8 +#define base0E #34E2E2 +#define base0F #EEEEEC + +*.color0: base00 +*.color1: base01 +*.color2: base02 +*.color3: base03 +*.color4: base04 +*.color5: base05 +*.color6: base06 +*.color7: base07 +*.color8: base08 +*.color9: base09 +*.color10: base0A +*.color11: base0B +*.color12: base0C +*.color13: base0D +*.color14: base0E +*.color15: base0F diff --git a/.config/bat/config b/.config/bat/config new file mode 100644 index 0000000..e96057d --- /dev/null +++ b/.config/bat/config @@ -0,0 +1,27 @@ +# This is `bat`s configuration file. Each line either contains a comment or +# a command-line option that you want to pass to `bat` by default. You can +# run `bat --help` to get a list of all possible configuration options. + +# Specify desired highlighting theme (e.g. "TwoDark"). Run `bat --list-themes` +# for a list of all available themes +--theme="Solarized (light)" + +# Enable this to use italic text on the terminal. This is not supported on all +# terminal emulators (like tmux, by default): +--italic-text=always + +# Uncomment the following line to disable automatic paging: +#--paging=never + +# Uncomment the following line if you are using less version >= 551 and want to +# enable mouse scrolling support in `bat` when running inside tmux. This might +# disable text selection, unless you press shift. +#--pager="less --RAW-CONTROL-CHARS --quit-if-one-screen --mouse" + +# Syntax mappings: map a certain filename pattern to a language. +# Example 1: use the C++ syntax for .ino files +# Example 2: Use ".gitignore"-style highlighting for ".ignore" files +--map-syntax "*.ino:C++" +--map-syntax ".ignore:Git Ignore" + +--style=auto diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..7cb28b9 --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,194 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono For Powerline Book 12 +font pango:DejaVu Sans Mono for Powerline 10 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +#bindsym $mod+Return exec gnome-terminal +bindsym $mod+Return exec st -f "DejaVu Sans Mono for Powerline-11.3" + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +bindsym $mod+d exec dmenu_run -nhb "dark slate gray" -nhf white -shb "forest green" -shf white -l 14 +#bindsym $mod+d exec dmenu_run -nb black -sb tomato -l 12 +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# run quick term command +bindsym $mod+t exec --no-startup-id ~/scripts/bin/run_with_dmenu.sh +bindsym $mod+m exec --no-startup-id ~/scripts/bin/manga_dmenu.sh +bindsym $mod+p exec --no-startup-id ~/scripts/bin/postit.sh +bindsym $mod+c exec clipmenu + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+h focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+h move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+- split h + +# split in vertical orientation +bindsym $mod+| split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# switch to workspace +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" + +# run on startup +exec /home/bloodstalker/scripts/hived --demon & +#exec telegram-cli -D -s /home/bloodstalker/scripts/tg.lua & +exec setxkbmap -option ctrl:nocaps +exec service start tor +exec /home/bloodstalker/scripts/keymap.sh + +# removes the title bar +new_window 1pixel + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+r mode "resize" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +bar { +#separator_symbol "" + status_command i3blocks -c ~/scripts/.i3blocks.conf + font pango:DejaVu Sans Mono Bold Nerd Font Complete Mono-7 7 + colors { + separator #268bd2 + background #002b36 + statusline #839496 + focused_workspace #0066cc #0099cc #ffffff + active_workspace #00cc99 #336633 #ffffff + inactive_workspace #002b36 #586e75 #002b36 + urgent_workspace #d33682 #d33682 #fdf6e3 + } +} + +#client.focused #3399ff #6699cc #333366 #ffffff +client.focused #66ccff #333366 #66ccff #66ccff +client.focused_inactive #111111 #073642 #eee8d5 #6c71c4 +client.unfocused #006633 #073642 #93a1a1 #586e75 +client.urgent #00af00 #00af00 #fdf6e3 #dc322f + +#font xft:DejaVu Sans Mono for Powerline Book 12 +font pango:DejaVu Sans Mono for Powerline Book 10 diff --git a/.config/joplin/keymap.json b/.config/joplin/keymap.json new file mode 100644 index 0000000..354a87b --- /dev/null +++ b/.config/joplin/keymap.json @@ -0,0 +1,4 @@ +[ + {"keys":["k"],"type":"function","command":"move_up"}, + {"keys":["j"],"type":"function","command":"move_down"} +] diff --git a/.config/pgcli/config b/.config/pgcli/config new file mode 100644 index 0000000..bc55d6f --- /dev/null +++ b/.config/pgcli/config @@ -0,0 +1,197 @@ +# vi: ft=dosini +[main] + +# Enables context sensitive auto-completion. If this is disabled, all +# possible completions will be listed. +smart_completion = True + +# Display the completions in several columns. (More completions will be +# visible.) +wider_completion_menu = True + +# Multi-line mode allows breaking up the sql statements into multiple lines. If +# this is set to True, then the end of the statements must have a semi-colon. +# If this is set to False then sql statements can't be split into multiple +# lines. End of line (return) is considered as the end of the statement. +multi_line = False + +# If multi_line_mode is set to "psql", in multi-line mode, [Enter] will execute +# the current input if the input ends in a semicolon. +# If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always +# insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute +# a command. +multi_line_mode = psql + +# Destructive warning mode will alert you before executing a sql statement +# that may cause harm to the database such as "drop table", "drop database" +# or "shutdown". +destructive_warning = True + +# Enables expand mode, which is similar to `\x` in psql. +expand = False + +# Enables auto expand mode, which is similar to `\x auto` in psql. +auto_expand = True + +# If set to True, table suggestions will include a table alias +generate_aliases = False + +# log_file location. +# In Unix/Linux: ~/.config/pgcli/log +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\log +# %USERPROFILE% is typically C:\Users\{username} +log_file = default + +# keyword casing preference. Possible values: "lower", "upper", "auto" +keyword_casing = auto + +# casing_file location. +# In Unix/Linux: ~/.config/pgcli/casing +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\casing +# %USERPROFILE% is typically C:\Users\{username} +casing_file = default + +# If generate_casing_file is set to True and there is no file in the above +# location, one will be generated based on usage in SQL/PLPGSQL functions. +generate_casing_file = False + +# Casing of column headers based on the casing_file described above +case_column_headers = True + +# history_file location. +# In Unix/Linux: ~/.config/pgcli/history +# In Windows: %USERPROFILE%\AppData\Local\dbcli\pgcli\history +# %USERPROFILE% is typically C:\Users\{username} +history_file = default + +# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO" +# and "DEBUG". "NONE" disables logging. +log_level = INFO + +# Order of columns when expanding * to column list +# Possible values: "table_order" and "alphabetic" +asterisk_column_order = table_order + +# Whether to qualify with table alias/name when suggesting columns +# Possible values: "always", "never" and "if_more_than_one_table" +qualify_columns = if_more_than_one_table + +# When no schema is entered, only suggest objects in search_path +search_path_filter = False + +# Default pager. +# By default 'PAGER' environment variable is used +# pager = bat + +# Timing of sql statements and table rendering. +timing = True + +# Show/hide the informational toolbar with function keymap at the footer. +show_bottom_toolbar = True + +# Table format. Possible values: psql, plain, simple, grid, fancy_grid, pipe, +# ascii, double, github, orgtbl, rst, mediawiki, html, latex, latex_booktabs, +# textile, moinmoin, jira, vertical, tsv, csv. +# Recommended: psql, fancy_grid and grid. +table_format = psql + +# Syntax Style. Possible values: manni, igor, xcode, vim, autumn, vs, rrt, +# native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark, +# colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity +syntax_style = default + +# Keybindings: +# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL. +# When Vi mode is disabled emacs keybindings such as Ctrl-A for home and Ctrl-E +# for end are available in the REPL. +vi = True + +# Error handling +# When one of multiple SQL statements causes an error, choose to either +# continue executing the remaining statements, or stopping +# Possible values "STOP" or "RESUME" +on_error = STOP + +# Set threshold for row limit. Use 0 to disable limiting. +row_limit = 1000 + +# Skip intro on startup and goodbye on exit +less_chatty = False + +# Postgres prompt +# \t - Current date and time +# \u - Username +# \h - Short hostname of the server (up to first '.') +# \H - Hostname of the server +# \d - Database name +# \p - Database port +# \i - Postgres PID +# \# - "@" sign if logged in as superuser, '>' in other case +# \n - Newline +# \dsn_alias - name of dsn alias if -D option is used (empty otherwise) +# \x1b[...m - insert ANSI escape sequence +# eg: prompt = '\x1b[35m\u@\x1b[32m\h:\x1b[36m\d>' +#prompt = '\u@\h:\d> ' +prompt = '\x1b[38;5;31m\# \x1b[38;5;34m\u\x1b[0m@\x1b[38;5;39m\H\x1b[0m:\x1b[38;5;104m\p \x1b[38;5;37m\d \x1b[38;5;69m\t \x1b[38;5;31m\i \x1b[38;5;34m\dsn\n\x1b[38;5;28m>>>\x1b[0m' + +# Number of lines to reserve for the suggestion menu +min_num_menu_lines = 4 + +# Character used to left pad multi-line queries to match the prompt size. +multiline_continuation_char = '' + +# The string used in place of a null value. +null_string = '' + +# manage pager on startup +enable_pager = True + +# Use keyring to automatically save and load password in a secure manner +keyring = False + +# Custom colors for the completion menu, toolbar, etc. +[colors] +completion-menu.completion.current = 'bg:#ffffff #000000' +completion-menu.completion = 'bg:#008888 #ffffff' +completion-menu.meta.completion.current = 'bg:#44aaaa #000000' +completion-menu.meta.completion = 'bg:#448888 #ffffff' +completion-menu.multi-column-meta = 'bg:#aaffff #000000' +scrollbar.arrow = 'bg:#003333' +scrollbar = 'bg:#00aaaa' +selected = '#ffffff bg:#6666aa' +search = '#ffffff bg:#4444aa' +search.current = '#ffffff bg:#44aa44' +bottom-toolbar = 'bg:#222222 #aaaaaa' +bottom-toolbar.off = 'bg:#222222 #888888' +bottom-toolbar.on = 'bg:#222222 #ffffff' +search-toolbar = 'noinherit bold' +search-toolbar.text = 'nobold' +system-toolbar = 'noinherit bold' +arg-toolbar = 'noinherit bold' +arg-toolbar.text = 'nobold' +bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold' +bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold' +literal.string = '#ba2121' +literal.number = '#666666' +keyword = 'bold #008000' + +# style classes for colored table output +output.header = "#00ff5f bold" +output.odd-row = "" +output.even-row = "" +output.null = "#808080" + +# Named queries are queries you can execute by name. +[named queries] +dd = "select * from $1" + +# DSN to call by -D option +[alias_dsn] +# example_dsn = postgresql://[user[:password]@][netloc][:port][/dbname] + +# Format for number representation +# for decimal "d" - 12345678, ",d" - 12,345,678 +# for float "g" - 123456.78, ",g" - 123,456.78 +[data_formats] +decimal = "" +float = "" diff --git a/.config/qutebrowser/bookmarks/urls b/.config/qutebrowser/bookmarks/urls new file mode 100644 index 0000000..e69de29 diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py new file mode 100644 index 0000000..b1be151 --- /dev/null +++ b/.config/qutebrowser/config.py @@ -0,0 +1,101 @@ +import os +solarized = { + 'base03': '#002b36', + 'base02': '#073642', + 'base01': '#586e75', + 'base00': '#657b83', + 'base0': '#839496', + 'base1': '#93a1a1', + 'base2': '#eee8d5', + 'base3': '#fdf6e3', + 'yellow': '#b58900', + 'orange': '#cb4b16', + 'red': '#dc322f', + 'magenta': '#d33682', + 'violet': '#6c71c4', + 'blue': '#268bd2', + 'cyan': '#2aa198', + 'green': '#859900' +} + +c.colors.completion.category.bg = solarized['base03'] +c.colors.completion.category.border.bottom = solarized['base03'] +c.colors.completion.category.border.top = solarized['base03'] +c.colors.completion.category.fg = solarized['base3'] +c.colors.completion.even.bg = solarized['base02'] +c.colors.completion.fg = solarized['base3'] +c.colors.completion.item.selected.bg = solarized['violet'] +c.colors.completion.item.selected.border.bottom = solarized['violet'] +c.colors.completion.item.selected.border.top = solarized['violet'] +c.colors.completion.item.selected.fg = solarized['base3'] +c.colors.completion.match.fg = solarized['base2'] +c.colors.completion.odd.bg = solarized['base02'] +c.colors.completion.scrollbar.bg = solarized['base0'] +c.colors.completion.scrollbar.fg = solarized['base2'] +c.colors.downloads.bar.bg = solarized['base03'] +c.colors.downloads.error.bg = solarized['red'] +c.colors.downloads.error.fg = solarized['base3'] +c.colors.downloads.start.bg = '#0000aa' +c.colors.downloads.start.fg = solarized['base3'] +c.colors.downloads.stop.bg = '#00aa00' +c.colors.downloads.stop.fg = solarized['base3'] +c.colors.downloads.system.bg = 'rgb' +c.colors.downloads.system.fg = 'rgb' +c.colors.hints.bg = solarized['violet'] +c.colors.hints.fg = solarized['base3'] +c.colors.hints.match.fg = solarized['base2'] +c.colors.keyhint.bg = 'rgba(0, 0, 0, 80%)' +c.colors.keyhint.fg = solarized['base3'] +c.colors.keyhint.suffix.fg = solarized['yellow'] +c.colors.messages.error.bg = solarized['red'] +c.colors.messages.error.border = solarized['red'] +c.colors.messages.error.fg = solarized['base3'] +c.colors.messages.info.bg = solarized['base03'] +c.colors.messages.info.border = solarized['base03'] +c.colors.messages.info.fg = solarized['base3'] +c.colors.messages.warning.bg = solarized['orange'] +c.colors.messages.warning.border = solarized['orange'] +c.colors.messages.warning.fg = solarized['base3'] +c.colors.prompts.bg = solarized['base02'] +c.colors.prompts.border = '1px solid ' + solarized['base3'] +c.colors.prompts.fg = solarized['base3'] +c.colors.prompts.selected.bg = solarized['base01'] +c.colors.statusbar.caret.bg = solarized['blue'] +c.colors.statusbar.caret.fg = solarized['base3'] +c.colors.statusbar.caret.selection.bg = solarized['violet'] +c.colors.statusbar.caret.selection.fg = solarized['base3'] +c.colors.statusbar.command.bg = solarized['base03'] +c.colors.statusbar.command.fg = solarized['base3'] +c.colors.statusbar.command.private.bg = solarized['base01'] +c.colors.statusbar.command.private.fg = solarized['base3'] +c.colors.statusbar.insert.bg = solarized['green'] +c.colors.statusbar.insert.fg = solarized['base3'] +c.colors.statusbar.normal.bg = solarized['base03'] +c.colors.statusbar.normal.fg = solarized['base3'] +c.colors.statusbar.passthrough.bg = solarized['magenta'] +c.colors.statusbar.passthrough.fg = solarized['base3'] +c.colors.statusbar.private.bg = solarized['base01'] +c.colors.statusbar.private.fg = solarized['base3'] +c.colors.statusbar.progress.bg = solarized['base3'] +c.colors.statusbar.url.error.fg = solarized['red'] +c.colors.statusbar.url.fg = solarized['base3'] +c.colors.statusbar.url.hover.fg = solarized['base2'] +c.colors.statusbar.url.success.http.fg = solarized['base3'] +c.colors.statusbar.url.success.https.fg = solarized['base3'] +c.colors.statusbar.url.warn.fg = solarized['yellow'] +c.colors.tabs.bar.bg = '#555555' +c.colors.tabs.even.bg = solarized['base01'] +c.colors.tabs.even.fg = solarized['base2'] +c.colors.tabs.indicator.error = solarized['red'] +c.colors.tabs.indicator.start = solarized['violet'] +c.colors.tabs.indicator.stop = solarized['orange'] +c.colors.tabs.odd.bg = solarized['base01'] +c.colors.tabs.odd.fg = solarized['base2'] +c.colors.tabs.selected.even.bg = solarized['base03'] +c.colors.tabs.selected.even.fg = solarized['base3'] +c.colors.tabs.selected.odd.bg = solarized['base03'] +c.colors.tabs.selected.odd.fg = solarized['base3'] + +c.auto_save.session = True +c.content.user_stylesheets = "/home/bloodstalker/solarized-everything-css/css/gruvbox/gruvbox-all-sites.css" +config.source('nord-qutebrowser.py') diff --git a/.config/qutebrowser/keys.conf b/.config/qutebrowser/keys.conf new file mode 100644 index 0000000..21acc1c --- /dev/null +++ b/.config/qutebrowser/keys.conf @@ -0,0 +1,693 @@ +# vim: ft=conf +# +# In this config file, qutebrowser's key bindings are configured. +# The format looks like this: +# +# [keymode] +# +# command +# keychain +# keychain2 +# ... +# +# All blank lines and lines starting with '#' are ignored. +# Inline-comments are not permitted. +# +# keymode is a comma separated list of modes in which the key binding should be +# active. If keymode starts with !, the key binding is active in all modes +# except the listed modes. +# +# For special keys (can't be part of a keychain), enclose them in `<`...`>`. +# For modifiers, you can use either `-` or `+` as delimiters, and these names: +# +# * Control: `Control`, `Ctrl` +# * Meta: `Meta`, `Windows`, `Mod4` +# * Alt: `Alt`, `Mod1` +# * Shift: `Shift` +# +# For simple keys (no `<>`-signs), a capital letter means the key is pressed +# with Shift. For special keys (with `<>`-signs), you need to explicitly add +# `Shift-` to match a key pressed with shift. +# +# Note that default keybindings are always bound, and need to be explicitly +# unbound if you wish to remove them: +# +# +# keychain +# keychain2 +# ... + +[!normal] + +leave-mode + + + +[normal] +# Keybindings for normal mode. + +clear-keychain ;; search ;; fullscreen --leave + + + +set-cmd-text -s :open + o + +set-cmd-text :open {url:pretty} + go + +set-cmd-text -s :open -t + O + +set-cmd-text :open -t -i {url:pretty} + gO + +set-cmd-text -s :open -b + xo + +set-cmd-text :open -b -i {url:pretty} + xO + +set-cmd-text -s :open -w + wo + +set-cmd-text :open -w {url:pretty} + wO + +set-cmd-text / + / + +set-cmd-text ? + ? + +set-cmd-text : + : + +open -t + ga + + +open -w + + +tab-close + d + + +tab-close -o + D + +tab-only + co + +tab-focus + T + +tab-move + gm + +tab-move - + gl + +tab-move + + gr + +tab-next + J + + +tab-prev + K + + +tab-clone + gC + +reload + r + + +reload -f + R + + +back + H + + +back -t + th + +back -w + wh + +forward + L + + +forward -t + tl + +forward -w + wl + +fullscreen + + +hint + f + +hint all tab + F + +hint all window + wf + +hint all tab-bg + ;b + +hint all tab-fg + ;f + +hint all hover + ;h + +hint images + ;i + +hint images tab + ;I + +hint links fill :open {hint-url} + ;o + +hint links fill :open -t -i {hint-url} + ;O + +hint links yank + ;y + +hint links yank-primary + ;Y + +hint --rapid links tab-bg + ;r + +hint --rapid links window + ;R + +hint links download + ;d + +hint inputs + ;t + +scroll left + h + +scroll down + j + +scroll up + k + +scroll right + l + +undo + u + + +scroll-perc 0 + gg + +scroll-perc + G + +search-next + n + +search-prev + N + +enter-mode insert + i + +enter-mode caret + v + +enter-mode set_mark + ` + +enter-mode jump_mark + ' + +yank + yy + +yank -s + yY + +yank title + yt + +yank title -s + yT + +yank domain + yd + +yank domain -s + yD + +yank pretty-url + yp + +yank pretty-url -s + yP + +open -- {clipboard} + pp + +open -- {primary} + pP + +open -t -- {clipboard} + Pp + +open -t -- {primary} + PP + +open -w -- {clipboard} + wp + +open -w -- {primary} + wP + +quickmark-save + m + +set-cmd-text -s :quickmark-load + b + +set-cmd-text -s :quickmark-load -t + B + +set-cmd-text -s :quickmark-load -w + wb + +bookmark-add + M + +set-cmd-text -s :bookmark-load + gb + +set-cmd-text -s :bookmark-load -t + gB + +set-cmd-text -s :bookmark-load -w + wB + +save + sf + +set-cmd-text -s :set + ss + +set-cmd-text -s :set -t + sl + +set-cmd-text -s :bind + sk + +zoom-out + - + +zoom-in + + + +zoom + = + +navigate prev + [[ + +navigate next + ]] + +navigate prev -t + {{ + +navigate next -t + }} + +navigate up + gu + +navigate up -t + gU + +navigate increment + + +navigate decrement + + +inspector + wi + +download + gd + +download-cancel + ad + +download-clear + cd + +view-source + gf + +set-cmd-text -s :buffer + gt + +tab-focus last + + +enter-mode passthrough + + +quit + + +scroll-page 0 1 + + +scroll-page 0 -1 + + +scroll-page 0 0.5 + + +scroll-page 0 -0.5 + + +tab-focus 1 + + +tab-focus 2 + + +tab-focus 3 + + +tab-focus 4 + + +tab-focus 5 + + +tab-focus 6 + + +tab-focus 7 + + +tab-focus 8 + + +tab-focus 9 + + +home + + +stop + + +print + + +open qute:settings + Ss + +follow-selected + + + + + + + +follow-selected -t + + + +repeat-command + . + +record-macro + q + +run-macro + @ + +[insert] +# Keybindings for insert mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `open-editor`: Open a texteditor with the focused field. +# * `paste-primary`: Paste primary selection at cursor position. + +open-editor + + +insert-text {primary} + + +[hint] +# Keybindings for hint mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `follow-hint`: Follow the currently selected hint. + +follow-hint + + + + + + + +hint --rapid links tab-bg + + +hint links + + +hint all tab-bg + + +[command] +# Keybindings for command mode. +# Since normal keypresses are passed through, only special keys are +# supported in this mode. +# Useful hidden commands to map in this section: +# * `command-history-prev`: Switch to previous command in history. +# * `command-history-next`: Switch to next command in history. +# * `completion-item-focus`: Select another item in completion. +# * `command-accept`: Execute the command currently in the commandline. + +command-history-prev + + +command-history-next + + +completion-item-focus prev + + + +completion-item-focus next + + + +completion-item-focus next-category + + +completion-item-focus prev-category + + +completion-item-del + + +command-accept + + + + + + + +[prompt] +# Keybindings for prompts in the status line. +# You can bind normal keys in this mode, but they will be only active +# when a yes/no-prompt is asked. For other prompt modes, you can only +# bind special keys. +# Useful hidden commands to map in this section: +# * `prompt-accept`: Confirm the entered value. +# * `prompt-accept yes`: Answer yes to a yes/no question. +# * `prompt-accept no`: Answer no to a yes/no question. + +prompt-accept + + + + + + + +prompt-accept yes + y + +prompt-accept no + n + +prompt-open-download + + +prompt-item-focus prev + + + +prompt-item-focus next + + + +[command,prompt] + +rl-backward-char + + +rl-forward-char + + +rl-backward-word + + +rl-forward-word + + +rl-beginning-of-line + + +rl-end-of-line + + +rl-unix-line-discard + + +rl-kill-line + + +rl-kill-word + + +rl-unix-word-rubout + + +rl-backward-kill-word + + +rl-yank + + +rl-delete-char + + +rl-backward-delete-char + + +[caret] + +toggle-selection + v + + +drop-selection + + +enter-mode normal + c + +move-to-next-line + j + +move-to-prev-line + k + +move-to-next-char + l + +move-to-prev-char + h + +move-to-end-of-word + e + +move-to-next-word + w + +move-to-prev-word + b + +move-to-start-of-next-block + ] + +move-to-start-of-prev-block + [ + +move-to-end-of-next-block + } + +move-to-end-of-prev-block + { + +move-to-start-of-line + 0 + +move-to-end-of-line + $ + +move-to-start-of-document + gg + +move-to-end-of-document + G + +yank selection -s + Y + +yank selection + y + + + + + + + +scroll left + H + +scroll down + J + +scroll up + K + +scroll right + L + diff --git a/.config/qutebrowser/nord-qutebrowser.py b/.config/qutebrowser/nord-qutebrowser.py new file mode 120000 index 0000000..f76a0c3 --- /dev/null +++ b/.config/qutebrowser/nord-qutebrowser.py @@ -0,0 +1 @@ +/home/bloodstalker/nord-qutebrowser/nord-qutebrowser.py \ No newline at end of file diff --git a/.config/qutebrowser/quickmarks b/.config/qutebrowser/quickmarks new file mode 100644 index 0000000..e69de29 diff --git a/.config/qutebrowser/qutebrowser.conf b/.config/qutebrowser/qutebrowser.conf new file mode 100644 index 0000000..b05cc4f --- /dev/null +++ b/.config/qutebrowser/qutebrowser.conf @@ -0,0 +1,1572 @@ +# vim: ft=dosini + +# Configfile for qutebrowser. +# +# This configfile is parsed by python's configparser in extended +# interpolation mode. The format is very INI-like, so there are +# categories like [general] with "key = value"-pairs. +# +# Note that you shouldn't add your own comments, as this file is +# regenerated every time the config is saved. +# +# Interpolation looks like ${value} or ${section:value} and will be +# replaced by the respective value. +# +# Some settings will expand environment variables. Note that, since +# interpolation is run first, you will need to escape the $ char as +# described below. +# +# This is the default config, so if you want to remove anything from +# here (as opposed to change/add), for example a key binding, set it to +# an empty value. +# +# You will need to escape the following values: +# - # at the start of the line (at the first position of the key) (\#) +# - $ in a value ($$) + +[general] +# General/miscellaneous options. +# +# ignore-case (IgnoreCase): +# Whether to find text on a page case-insensitively. +# true: Search case-insensitively +# false: Search case-sensitively +# smart: Search case-sensitively if there are capital chars +# Default: smart +# +# startpage (List of String): +# The default page(s) to open at the start, separated by commas. +# Default: https://start.duckduckgo.com +# +# yank-ignored-url-parameters (List of String): +# The URL parameters to strip with :yank url, separated by commas. +# Default: +# ref,utm_source,utm_medium,utm_campaign,utm_term,utm_content +# +# default-open-dispatcher (String): +# The default program used to open downloads. Set to an empty string +# to use the default internal handler. +# Any {} in the string will be expanded to the filename, else the +# filename will be appended. +# Default: +# +# default-page (FuzzyUrl): +# The page to open if :open -t/-b/-w is used without URL. Use +# `about:blank` for a blank page. +# Default: ${startpage} +# +# auto-search (AutoSearch): +# Whether to start a search when something else than a URL is +# entered. +# naive: Use simple/naive check. +# dns: Use DNS requests (might be slow!). +# false: Never search automatically. +# Default: naive +# +# auto-save-config (Bool): +# Whether to save the config automatically on quit. +# Valid values: true, false +# Default: true +# +# auto-save-interval (Int): +# How often (in milliseconds) to auto-save config/cookies/etc. +# Default: 15000 +# +# editor (ShellCommand): +# The editor (and arguments) to use for the `open-editor` command. +# The arguments get split like in a shell, so you can use `"` or `'` +# to quote them. +# `{}` gets replaced by the filename of the file to be edited. +# Default: gvim -f "{}" +# +# editor-encoding (Encoding): +# Encoding to use for editor. +# Default: utf-8 +# +# private-browsing (Bool): +# Do not record visited pages in the history or store web page +# icons. +# Valid values: true, false +# Default: false +# +# developer-extras (Bool): +# Enable extra tools for Web developers. +# This needs to be enabled for `:inspector` to work and also adds an +# _Inspect_ entry to the context menu. For QtWebEngine, see +# 'qutebrowser --help' instead. +# Valid values: true, false +# Default: false +# +# print-element-backgrounds (Bool): +# Whether the background color and images are also drawn when the +# page is printed. +# This setting only works with Qt 5.8 or newer when using the +# QtWebEngine backend. +# Valid values: true, false +# Default: true +# +# xss-auditing (Bool): +# Whether load requests should be monitored for cross-site scripting +# attempts. +# Suspicious scripts will be blocked and reported in the inspector's +# JavaScript console. Enabling this feature might have an impact on +# performance. +# Valid values: true, false +# Default: false +# +# site-specific-quirks (Bool): +# Enable QtWebKit workarounds for broken sites. +# Valid values: true, false +# Default: true +# +# default-encoding (String): +# Default encoding to use for websites. +# The encoding must be a string describing an encoding such as +# _utf-8_, _iso-8859-1_, etc. If left empty a default value will be +# used. +# Default: +# +# new-instance-open-target (String): +# How to open links in an existing instance if a new one is +# launched. +# tab: Open a new tab in the existing window and activate the +# window. +# tab-bg: Open a new background tab in the existing window and +# activate the window. +# tab-silent: Open a new tab in the existing window without +# activating the window. +# tab-bg-silent: Open a new background tab in the existing +# window without activating the window. +# window: Open in a new window. +# Default: tab +# +# new-instance-open-target.window (String): +# Which window to choose when opening links as new tabs. +# first-opened: Open new tabs in the first (oldest) opened +# window. +# last-opened: Open new tabs in the last (newest) opened window. +# last-focused: Open new tabs in the most recently focused +# window. +# last-visible: Open new tabs in the most recently visible +# window. +# Default: last-focused +# +# log-javascript-console (String): +# How to log javascript console messages. +# none: Don't log messages. +# debug: Log messages with debug level. +# info: Log messages with info level. +# Default: debug +# +# save-session (Bool): +# Whether to always save the open pages. +# Valid values: true, false +# Default: false +# +# session-default-name (SessionName): +# The name of the session to save by default, or empty for the last +# loaded session. +# Default: +# +# url-incdec-segments (FlagList): +# The URL segments where `:navigate increment/decrement` will search +# for a number. +# Valid values: host, path, query, anchor +# Default: path,query +ignore-case = smart +startpage = https://start.duckduckgo.com +yank-ignored-url-parameters = ref,utm_source,utm_medium,utm_campaign,utm_term,utm_content +default-open-dispatcher = +default-page = ${startpage} +auto-search = naive +auto-save-config = true +auto-save-interval = 15000 +editor = gvim -f "{}" +editor-encoding = utf-8 +private-browsing = true +developer-extras = true +print-element-backgrounds = true +xss-auditing = true +site-specific-quirks = true +default-encoding = +new-instance-open-target = tab +new-instance-open-target.window = last-focused +log-javascript-console = debug +save-session = false +session-default-name = +url-incdec-segments = path,query + +[ui] +# General options related to the user interface. +# +# zoom-levels (List of Perc): +# The available zoom levels, separated by commas. +# Default: +# 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% +# +# default-zoom (Perc): +# The default zoom level. +# Default: 100% +# +# downloads-position (VerticalPosition): +# Where to show the downloaded files. +# Valid values: top, bottom +# Default: top +# +# status-position (VerticalPosition): +# The position of the status bar. +# Valid values: top, bottom +# Default: bottom +# +# message-timeout (Int): +# Time (in ms) to show messages in the statusbar for. +# Default: 2000 +# +# message-unfocused (Bool): +# Whether to show messages in unfocused windows. +# Valid values: true, false +# Default: false +# +# confirm-quit (ConfirmQuit): +# Whether to confirm quitting the application. +# always: Always show a confirmation. +# multiple-tabs: Show a confirmation if multiple tabs are +# opened. +# downloads: Show a confirmation if downloads are running +# never: Never show a confirmation. +# Default: never +# +# zoom-text-only (Bool): +# Whether the zoom factor on a frame applies only to the text or to +# all content. +# Valid values: true, false +# Default: false +# +# frame-flattening (Bool): +# Whether to expand each subframe to its contents. +# This will flatten all the frames to become one scrollable page. +# Valid values: true, false +# Default: false +# +# user-stylesheet (File): +# User stylesheet to use (absolute filename or filename relative to +# the config directory). Will expand environment variables. +# Default: +# +# hide-scrollbar (Bool): +# Hide the main scrollbar. +# Valid values: true, false +# Default: true +# +# css-media-type (String): +# Set the CSS media type. +# Default: +# +# smooth-scrolling (Bool): +# Whether to enable smooth scrolling for webpages. +# Valid values: true, false +# Default: false +# +# remove-finished-downloads (Int): +# Number of milliseconds to wait before removing finished downloads. +# Will not be removed if value is -1. +# Default: -1 +# +# hide-statusbar (Bool): +# Whether to hide the statusbar unless a message is shown. +# Valid values: true, false +# Default: false +# +# statusbar-padding (Padding): +# Padding for statusbar (top, bottom, left, right). +# Default: 1,1,0,0 +# +# window-title-format (FormatString): +# The format to use for the window title. The following placeholders +# are defined: +# * `{perc}`: The percentage as a string like `[10%]`. +# * `{perc_raw}`: The raw percentage, e.g. `10` +# * `{title}`: The title of the current web page +# * `{title_sep}`: The string ` - ` if a title is set, empty +# otherwise. +# * `{id}`: The internal window ID of this window. +# * `{scroll_pos}`: The page scroll position. +# * `{host}`: The host of the current web page. +# * `{backend}`: Either 'webkit' or 'webengine' +# Default: {perc}{title}{title_sep}qutebrowser +# +# modal-js-dialog (Bool): +# Use standard JavaScript modal dialog for alert() and confirm() +# Valid values: true, false +# Default: false +# +# hide-wayland-decoration (Bool): +# Hide the window decoration when using wayland (requires restart) +# Valid values: true, false +# Default: false +# +# keyhint-blacklist (List of String): +# Keychains that shouldn't be shown in the keyhint dialog +# Globs are supported, so ';*' will blacklist all keychainsstarting +# with ';'. Use '*' to disable keyhints +# Default: +# +# prompt-radius (Int): +# The rounding radius for the edges of prompts. +# Default: 8 +# +# prompt-filebrowser (Bool): +# Show a filebrowser in upload/download prompts. +# Valid values: true, false +# Default: true +zoom-levels = 25%,33%,50%,67%,75%,90%,100%,110%,125%,150%,175%,200%,250%,300%,400%,500% +default-zoom = 100% +downloads-position = top +status-position = bottom +message-timeout = 2000 +message-unfocused = false +confirm-quit = never +zoom-text-only = false +frame-flattening = false +user-stylesheet = +hide-scrollbar = true +css-media-type = +smooth-scrolling = false +remove-finished-downloads = -1 +hide-statusbar = false +statusbar-padding = 1,1,0,0 +window-title-format = {perc}{title}{title_sep}qutebrowser +modal-js-dialog = false +hide-wayland-decoration = false +keyhint-blacklist = +prompt-radius = 8 +prompt-filebrowser = true + +[network] +# Settings related to the network. +# +# do-not-track (Bool): +# Value to send in the `DNT` header. +# Valid values: true, false +# Default: true +# +# accept-language (String): +# Value to send in the `accept-language` header. +# Default: en-US,en +# +# referer-header (String): +# Send the Referer header +# always: Always send. +# never: Never send; this is not recommended, as some sites may +# break. +# same-domain: Only send for the same domain. This will still +# protect your privacy, but shouldn't break any sites. +# Default: same-domain +# +# user-agent (UserAgent): +# User agent to send. Empty to send the default. +# Default: +# +# proxy (Proxy): +# The proxy to use. +# In addition to the listed values, you can use a `socks://...` or +# `http://...` URL. +# This setting only works with Qt 5.8 or newer when using the +# QtWebEngine backend. +# system: Use the system wide proxy. +# none: Don't use any proxy +# Default: system +# +# proxy-dns-requests (Bool): +# Whether to send DNS requests over the configured proxy. +# Valid values: true, false +# Default: true +# +# ssl-strict (BoolAsk): +# Whether to validate SSL handshakes. +# Valid values: true, false, ask +# Default: ask +# +# dns-prefetch (Bool): +# Whether to try to pre-fetch DNS entries to speed up browsing. +# Valid values: true, false +# Default: true +# +# custom-headers (HeaderDict): +# Set custom headers for qutebrowser HTTP requests. +# Default: +# +# netrc-file (File): +# Set location of a netrc-file for HTTP authentication. If empty, +# ~/.netrc is used. +# Default: +do-not-track = true +accept-language = en-US,en +referer-header = same-domain +user-agent = +proxy = system +proxy-dns-requests = true +ssl-strict = ask +dns-prefetch = true +custom-headers = +netrc-file = + +[completion] +# Options related to completion and command history. +# +# show (String): +# When to show the autocompletion window. +# always: Whenever a completion is available. +# auto: Whenever a completion is requested. +# never: Never. +# Default: always +# +# download-path-suggestion (String): +# What to display in the download filename input. +# path: Show only the download path. +# filename: Show only download filename. +# both: Show download path and filename. +# Default: path +# +# timestamp-format (TimestampTemplate): +# How to format timestamps (e.g. for history) +# Default: %Y-%m-%d +# +# height (PercOrInt): +# The height of the completion, in px or as percentage of the +# window. +# Default: 50% +# +# cmd-history-max-items (Int): +# How many commands to save in the command history. +# 0: no history / -1: unlimited +# Default: 100 +# +# web-history-max-items (Int): +# How many URLs to show in the web history. +# 0: no history / -1: unlimited +# Default: 1000 +# +# quick-complete (Bool): +# Whether to move on to the next part when there's only one possible +# completion left. +# Valid values: true, false +# Default: true +# +# shrink (Bool): +# Whether to shrink the completion to be smaller than the configured +# size if there are no scrollbars. +# Valid values: true, false +# Default: false +# +# scrollbar-width (Int): +# Width of the scrollbar in the completion window (in px). +# Default: 12 +# +# scrollbar-padding (Int): +# Padding of scrollbar handle in completion window (in px). +# Default: 2 +show = always +download-path-suggestion = path +timestamp-format = %Y-%m-%d +height = 50% +cmd-history-max-items = 100 +web-history-max-items = 1000 +quick-complete = true +shrink = false +scrollbar-width = 12 +scrollbar-padding = 2 + +[input] +# Options related to input modes. +# +# timeout (Int): +# Timeout (in milliseconds) for ambiguous key bindings. +# If the current input forms both a complete match and a partial +# match, the complete match will be executed after this time. +# Default: 500 +# +# partial-timeout (Int): +# Timeout (in milliseconds) for partially typed key bindings. +# If the current input forms only partial matches, the keystring +# will be cleared after this time. +# Default: 5000 +# +# insert-mode-on-plugins (Bool): +# Whether to switch to insert mode when clicking flash and other +# plugins. +# Valid values: true, false +# Default: false +# +# auto-leave-insert-mode (Bool): +# Whether to leave insert mode if a non-editable element is clicked. +# Valid values: true, false +# Default: true +# +# auto-insert-mode (Bool): +# Whether to automatically enter insert mode if an editable element +# is focused after page load. +# Valid values: true, false +# Default: false +# +# forward-unbound-keys (String): +# Whether to forward unbound keys to the webview in normal mode. +# all: Forward all unbound keys. +# auto: Forward unbound non-alphanumeric keys. +# none: Don't forward any keys. +# Default: auto +# +# spatial-navigation (Bool): +# Enables or disables the Spatial Navigation feature. +# Spatial navigation consists in the ability to navigate between +# focusable elements in a Web page, such as hyperlinks and form +# controls, by using Left, Right, Up and Down arrow keys. For +# example, if a user presses the Right key, heuristics determine +# whether there is an element he might be trying to reach towards +# the right and which element he probably wants. +# Valid values: true, false +# Default: false +# +# links-included-in-focus-chain (Bool): +# Whether hyperlinks should be included in the keyboard focus chain. +# Valid values: true, false +# Default: true +# +# rocker-gestures (Bool): +# Whether to enable Opera-like mouse rocker gestures. This disables +# the context menu. +# Valid values: true, false +# Default: false +# +# mouse-zoom-divider (Int): +# How much to divide the mouse wheel movements to translate them +# into zoom increments. +# Default: 512 +timeout = 500 +partial-timeout = 5000 +insert-mode-on-plugins = false +auto-leave-insert-mode = true +auto-insert-mode = false +forward-unbound-keys = auto +spatial-navigation = false +links-included-in-focus-chain = true +rocker-gestures = false +mouse-zoom-divider = 512 + +[tabs] +# Configuration of the tab bar. +# +# background-tabs (Bool): +# Whether to open new tabs (middleclick/ctrl+click) in background. +# Valid values: true, false +# Default: false +# +# select-on-remove (SelectOnRemove): +# Which tab to select when the focused tab is removed. +# prev: Select the tab which came before the closed one (left in +# horizontal, above in vertical). +# next: Select the tab which came after the closed one (right in +# horizontal, below in vertical). +# last-used: Select the previously selected tab. +# Default: next +# +# new-tab-position (NewTabPosition): +# How new tabs are positioned. +# prev: Before the current tab. +# next: After the current tab. +# first: At the beginning. +# last: At the end. +# Default: next +# +# new-tab-position-explicit (NewTabPosition): +# How new tabs opened explicitly are positioned. +# prev: Before the current tab. +# next: After the current tab. +# first: At the beginning. +# last: At the end. +# Default: last +# +# last-close (String): +# Behavior when the last tab is closed. +# ignore: Don't do anything. +# blank: Load a blank page. +# startpage: Load the start page. +# default-page: Load the default page. +# close: Close the window. +# Default: ignore +# +# show (String): +# When to show the tab bar +# always: Always show the tab bar. +# never: Always hide the tab bar. +# multiple: Hide the tab bar if only one tab is open. +# switching: Show the tab bar when switching tabs. +# Default: always +# +# show-switching-delay (Int): +# Time to show the tab bar before hiding it when tabs->show is set +# to 'switching'. +# Default: 800 +# +# wrap (Bool): +# Whether to wrap when changing tabs. +# Valid values: true, false +# Default: true +# +# movable (Bool): +# Whether tabs should be movable. +# Valid values: true, false +# Default: true +# +# close-mouse-button (String): +# On which mouse button to close tabs. +# right: Close tabs on right-click. +# middle: Close tabs on middle-click. +# none: Don't close tabs using the mouse. +# Default: middle +# +# position (Position): +# The position of the tab bar. +# Valid values: top, bottom, left, right +# Default: top +# +# show-favicons (Bool): +# Whether to show favicons in the tab bar. +# Valid values: true, false +# Default: true +# +# width (PercOrInt): +# The width of the tab bar if it's vertical, in px or as percentage +# of the window. +# Default: 20% +# +# indicator-width (Int): +# Width of the progress indicator (0 to disable). +# Default: 3 +# +# tabs-are-windows (Bool): +# Whether to open windows instead of tabs. +# Valid values: true, false +# Default: false +# +# title-format (FormatString): +# The format to use for the tab title. The following placeholders +# are defined: +# * `{perc}`: The percentage as a string like `[10%]`. +# * `{perc_raw}`: The raw percentage, e.g. `10` +# * `{title}`: The title of the current web page +# * `{title_sep}`: The string ` - ` if a title is set, empty +# otherwise. +# * `{index}`: The index of this tab. +# * `{id}`: The internal tab ID of this tab. +# * `{scroll_pos}`: The page scroll position. +# * `{host}`: The host of the current web page. +# * `{backend}`: Either 'webkit' or 'webengine' +# Default: {index}: {title} +# +# title-alignment (TextAlignment): +# Alignment of the text inside of tabs +# Valid values: left, right, center +# Default: left +# +# mousewheel-tab-switching (Bool): +# Switch between tabs using the mouse wheel. +# Valid values: true, false +# Default: true +# +# padding (Padding): +# Padding for tabs (top, bottom, left, right). +# Default: 0,0,5,5 +# +# indicator-padding (Padding): +# Padding for indicators (top, bottom, left, right). +# Default: 2,2,0,4 +background-tabs = false +select-on-remove = next +new-tab-position = next +new-tab-position-explicit = last +last-close = ignore +show = always +show-switching-delay = 800 +wrap = true +movable = true +close-mouse-button = middle +position = top +show-favicons = true +width = 20% +indicator-width = 3 +tabs-are-windows = false +title-format = {index}: {title} +title-alignment = left +mousewheel-tab-switching = true +padding = 0,0,5,5 +indicator-padding = 2,2,0,4 + +[storage] +# Settings related to cache and storage. +# +# download-directory (Directory): +# The directory to save downloads to. An empty value selects a +# sensible os-specific default. Will expand environment variables. +# Default: +# +# prompt-download-directory (Bool): +# Whether to prompt the user for the download location. +# If set to false, 'download-directory' will be used. +# Valid values: true, false +# Default: true +# +# remember-download-directory (Bool): +# Whether to remember the last used download directory. +# Valid values: true, false +# Default: true +# +# maximum-pages-in-cache (Int): +# The maximum number of pages to hold in the global memory page +# cache. +# The Page Cache allows for a nicer user experience when navigating +# forth or back to pages in the forward/back history, by pausing and +# resuming up to _n_ pages. +# For more information about the feature, please refer to: +# http://webkit.org/blog/427/webkit-page-cache-i-the-basics/ +# Default: +# +# object-cache-capacities (List of WebKitBytes): +# The capacities for the global memory cache for dead objects such +# as stylesheets or scripts. Syntax: cacheMinDeadCapacity, +# cacheMaxDead, totalCapacity. +# The _cacheMinDeadCapacity_ specifies the minimum number of bytes +# that dead objects should consume when the cache is under pressure. +# _cacheMaxDead_ is the maximum number of bytes that dead objects +# should consume when the cache is *not* under pressure. +# _totalCapacity_ specifies the maximum number of bytes that the +# cache should consume *overall*. +# Default: +# +# offline-storage-default-quota (WebKitBytes): +# Default quota for new offline storage databases. +# Default: +# +# offline-web-application-cache-quota (WebKitBytes): +# Quota for the offline web application cache. +# Default: +# +# offline-storage-database (Bool): +# Whether support for the HTML 5 offline storage feature is enabled. +# Valid values: true, false +# Default: true +# +# offline-web-application-storage (Bool): +# Whether support for the HTML 5 web application cache feature is +# enabled. +# An application cache acts like an HTTP cache in some sense. For +# documents that use the application cache via JavaScript, the +# loader engine will first ask the application cache for the +# contents, before hitting the network. +# The feature is described in details at: +# http://dev.w3.org/html5/spec/Overview.html#appcache +# Valid values: true, false +# Default: true +# +# local-storage (Bool): +# Whether support for the HTML 5 local storage feature is enabled. +# Valid values: true, false +# Default: true +# +# cache-size (Int): +# Size of the HTTP network cache. Empty to use the default value. +# Default: +download-directory = +prompt-download-directory = true +remember-download-directory = true +maximum-pages-in-cache = +object-cache-capacities = +offline-storage-default-quota = +offline-web-application-cache-quota = +offline-storage-database = true +offline-web-application-storage = true +local-storage = true +cache-size = + +[content] +# Loaded plugins/scripts and allowed actions. +# +# allow-images (Bool): +# Whether images are automatically loaded in web pages. +# Valid values: true, false +# Default: true +# +# allow-javascript (Bool): +# Enables or disables the running of JavaScript programs. +# Valid values: true, false +# Default: true +# +# allow-plugins (Bool): +# Enables or disables plugins in Web pages. +# Qt plugins with a mimetype such as "application/x-qt-plugin" are +# not affected by this setting. +# Valid values: true, false +# Default: false +# +# webgl (Bool): +# Enables or disables WebGL. +# Valid values: true, false +# Default: true +# +# css-regions (Bool): +# Enable or disable support for CSS regions. +# Valid values: true, false +# Default: true +# +# hyperlink-auditing (Bool): +# Enable or disable hyperlink auditing (). +# Valid values: true, false +# Default: false +# +# geolocation (BoolAsk): +# Allow websites to request geolocations. +# Valid values: true, false, ask +# Default: ask +# +# notifications (BoolAsk): +# Allow websites to show notifications. +# Valid values: true, false, ask +# Default: ask +# +# media-capture (BoolAsk): +# Allow websites to record audio/video. +# Valid values: true, false, ask +# Default: ask +# +# javascript-can-open-windows-automatically (Bool): +# Whether JavaScript programs can open new windows without user +# interaction. +# Valid values: true, false +# Default: false +# +# javascript-can-close-windows (Bool): +# Whether JavaScript programs can close windows. +# Valid values: true, false +# Default: false +# +# javascript-can-access-clipboard (Bool): +# Whether JavaScript programs can read or write to the clipboard. +# With QtWebEngine, writing the clipboard as response to a user +# interaction is always allowed. +# Valid values: true, false +# Default: false +# +# ignore-javascript-prompt (Bool): +# Whether all javascript prompts should be ignored. +# Valid values: true, false +# Default: false +# +# ignore-javascript-alert (Bool): +# Whether all javascript alerts should be ignored. +# Valid values: true, false +# Default: false +# +# local-content-can-access-remote-urls (Bool): +# Whether locally loaded documents are allowed to access remote +# urls. +# Valid values: true, false +# Default: false +# +# local-content-can-access-file-urls (Bool): +# Whether locally loaded documents are allowed to access other local +# urls. +# Valid values: true, false +# Default: true +# +# cookies-accept (String): +# Control which cookies to accept. +# all: Accept all cookies. +# no-3rdparty: Accept cookies from the same origin only. +# no-unknown-3rdparty: Accept cookies from the same origin only, +# unless a cookie is already set for the domain. +# never: Don't accept cookies at all. +# Default: no-3rdparty +# +# cookies-store (Bool): +# Whether to store cookies. Note this option needs a restart with +# QtWebEngine. +# Valid values: true, false +# Default: true +# +# host-block-lists (List of Url): +# List of URLs of lists which contain hosts to block. +# The file can be in one of the following formats: +# - An '/etc/hosts'-like file +# - One host per line +# - A zip-file of any of the above, with either only one file, or a +# file named 'hosts' (with any extension). +# Default: +# https://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext +# +# host-blocking-enabled (Bool): +# Whether host blocking is enabled. +# Valid values: true, false +# Default: true +# +# host-blocking-whitelist (List of String): +# List of domains that should always be loaded, despite being +# ad-blocked. +# Domains may contain * and ? wildcards and are otherwise required +# to exactly match the requested domain. +# Local domains are always exempt from hostblocking. +# Default: piwik.org +# +# enable-pdfjs (Bool): +# Enable pdf.js to view PDF files in the browser. +# Note that the files can still be downloaded by clicking the +# download button in the pdf.js viewer. +# Valid values: true, false +# Default: false +allow-images = true +allow-javascript = true +allow-plugins = false +webgl = true +css-regions = true +hyperlink-auditing = false +geolocation = ask +notifications = ask +media-capture = ask +javascript-can-open-windows-automatically = false +javascript-can-close-windows = false +javascript-can-access-clipboard = false +ignore-javascript-prompt = false +ignore-javascript-alert = false +local-content-can-access-remote-urls = false +local-content-can-access-file-urls = true +cookies-accept = no-3rdparty +cookies-store = true +host-block-lists = https://www.malwaredomainlist.com/hostslist/hosts.txt,http://someonewhocares.org/hosts/hosts,http://winhelp2002.mvps.org/hosts.zip,http://malwaredomains.lehigh.edu/files/justdomains.zip,https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext +host-blocking-enabled = true +host-blocking-whitelist = piwik.org +enable-pdfjs = true + +[hints] +# Hinting settings. +# +# border (String): +# CSS border value for hints. +# Default: 1px solid #E3BE23 +# +# mode (String): +# Mode to use for hints. +# number: Use numeric hints. (In this mode you can also type +# letters form the hinted element to filter and reduce the number of +# elements that are hinted.) +# letter: Use the chars in the hints -> chars setting. +# word: Use hints words based on the html elements and the extra +# words. +# Default: letter +# +# chars (UniqueCharString): +# Chars used for hint strings. +# Default: asdfghjkl +# +# min-chars (Int): +# Minimum number of chars used for hint strings. +# Default: 1 +# +# scatter (Bool): +# Whether to scatter hint key chains (like Vimium) or not (like +# dwb). Ignored for number hints. +# Valid values: true, false +# Default: true +# +# uppercase (Bool): +# Make chars in hint strings uppercase. +# Valid values: true, false +# Default: false +# +# dictionary (File): +# The dictionary file to be used by the word hints. +# Default: /usr/share/dict/words +# +# auto-follow (String): +# Controls when a hint can be automatically followed without the +# user pressing Enter. +# always: Auto-follow whenever there is only a single hint on a +# page. +# unique-match: Auto-follow whenever there is a unique non-empty +# match in either the hint string (word mode) or filter (number +# mode). +# full-match: Follow the hint when the user typed the whole hint +# (letter, word or number mode) or the element's text (only in +# number mode). +# never: The user will always need to press Enter to follow a +# hint. +# Default: unique-match +# +# auto-follow-timeout (Int): +# A timeout (in milliseconds) to inhibit normal-mode key bindings +# after a successful auto-follow. +# Default: 0 +# +# next-regexes (List of Regex): +# A comma-separated list of regexes to use for 'next' links. +# Default: +# \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b +# +# prev-regexes (List of Regex): +# A comma-separated list of regexes to use for 'prev' links. +# Default: \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b +# +# find-implementation (String): +# Which implementation to use to find elements to hint. +# javascript: Better but slower +# python: Slightly worse but faster +# Default: python +# +# hide-unmatched-rapid-hints (Bool): +# Controls hiding unmatched hints in rapid mode. +# Valid values: true, false +# Default: true +border = 1px solid #E3BE23 +mode = letter +chars = asdfghjkl +min-chars = 1 +scatter = true +uppercase = false +dictionary = /usr/share/dict/words +auto-follow = unique-match +auto-follow-timeout = 0 +next-regexes = \bnext\b,\bmore\b,\bnewer\b,\b[>→≫]\b,\b(>>|»)\b,\bcontinue\b +prev-regexes = \bprev(ious)?\b,\bback\b,\bolder\b,\b[<←≪]\b,\b(<<|«)\b +find-implementation = python +hide-unmatched-rapid-hints = true + +[searchengines] +# Definitions of search engines which can be used via the address bar. +# The searchengine named `DEFAULT` is used when `general -> auto-search` +# is true and something else than a URL was entered to be opened. Other +# search engines can be used by prepending the search engine name to the +# search term, e.g. `:open google qutebrowser`. The string `{}` will be +# replaced by the search term, use `{{` and `}}` for literal `{`/`}` +# signs. +DEFAULT = https://duckduckgo.com/?q={} + +[aliases] +# Aliases for commands. +# By default, no aliases are defined. Example which adds a new command +# `:qtb` to open qutebrowsers website: +# `qtb = open https://www.qutebrowser.org/` + +[colors] +# Colors used in the UI. +# A value can be in one of the following format: +# * `#RGB`/`#RRGGBB`/`#RRRGGGBBB`/`#RRRRGGGGBBBB` +# * An SVG color name as specified in http://www.w3.org/TR/SVG/types.html#ColorKeywords[the W3C specification]. +# * transparent (no color) +# * `rgb(r, g, b)` / `rgba(r, g, b, a)` (values 0-255 or percentages) +# * `hsv(h, s, v)` / `hsva(h, s, v, a)` (values 0-255, hue 0-359) +# * A gradient as explained in http://doc.qt.io/qt-5/stylesheet-reference.html#list-of-property-types[the Qt documentation] under ``Gradient''. +# A *.system value determines the color system to use for color +# interpolation between similarly-named *.start and *.stop entries, +# regardless of how they are defined in the options. Valid values are +# 'rgb', 'hsv', and 'hsl'. +# The `hints.*` values are a special case as they're real CSS colors, not Qt-CSS colors. There, for a gradient, you need to use `-webkit-gradient`, see https://www.webkit.org/blog/175/introducing-css-gradients/[the WebKit documentation]. +# +# completion.fg (QtColor): +# Text color of the completion widget. +# Default: white +# +# completion.bg (QssColor): +# Background color of the completion widget. +# Default: #333333 +# +# completion.alternate-bg (QssColor): +# Alternating background color of the completion widget. +# Default: #444444 +# +# completion.category.fg (QtColor): +# Foreground color of completion widget category headers. +# Default: white +# +# completion.category.bg (QssColor): +# Background color of the completion widget category headers. +# Default: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, +# stop:1 #505050) +# +# completion.category.border.top (QssColor): +# Top border color of the completion widget category headers. +# Default: black +# +# completion.category.border.bottom (QssColor): +# Bottom border color of the completion widget category headers. +# Default: ${completion.category.border.top} +# +# completion.item.selected.fg (QtColor): +# Foreground color of the selected completion item. +# Default: black +# +# completion.item.selected.bg (QssColor): +# Background color of the selected completion item. +# Default: #e8c000 +# +# completion.item.selected.border.top (QssColor): +# Top border color of the completion widget category headers. +# Default: #bbbb00 +# +# completion.item.selected.border.bottom (QssColor): +# Bottom border color of the selected completion item. +# Default: ${completion.item.selected.border.top} +# +# completion.match.fg (QssColor): +# Foreground color of the matched text in the completion. +# Default: #ff4444 +# +# completion.scrollbar.fg (QssColor): +# Color of the scrollbar handle in completion view. +# Default: ${completion.fg} +# +# completion.scrollbar.bg (QssColor): +# Color of the scrollbar in completion view +# Default: ${completion.bg} +# +# statusbar.fg (QssColor): +# Foreground color of the statusbar. +# Default: white +# +# statusbar.bg (QssColor): +# Background color of the statusbar. +# Default: black +# +# statusbar.fg.insert (QssColor): +# Foreground color of the statusbar in insert mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.insert (QssColor): +# Background color of the statusbar in insert mode. +# Default: darkgreen +# +# statusbar.fg.command (QssColor): +# Foreground color of the statusbar in command mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.command (QssColor): +# Background color of the statusbar in command mode. +# Default: ${statusbar.bg} +# +# statusbar.fg.caret (QssColor): +# Foreground color of the statusbar in caret mode. +# Default: ${statusbar.fg} +# +# statusbar.bg.caret (QssColor): +# Background color of the statusbar in caret mode. +# Default: purple +# +# statusbar.fg.caret-selection (QssColor): +# Foreground color of the statusbar in caret mode with a selection +# Default: ${statusbar.fg} +# +# statusbar.bg.caret-selection (QssColor): +# Background color of the statusbar in caret mode with a selection +# Default: #a12dff +# +# statusbar.progress.bg (QssColor): +# Background color of the progress bar. +# Default: white +# +# statusbar.url.fg (QssColor): +# Default foreground color of the URL in the statusbar. +# Default: ${statusbar.fg} +# +# statusbar.url.fg.success (QssColor): +# Foreground color of the URL in the statusbar on successful load +# (http). +# Default: white +# +# statusbar.url.fg.success.https (QssColor): +# Foreground color of the URL in the statusbar on successful load +# (https). +# Default: lime +# +# statusbar.url.fg.error (QssColor): +# Foreground color of the URL in the statusbar on error. +# Default: orange +# +# statusbar.url.fg.warn (QssColor): +# Foreground color of the URL in the statusbar when there's a +# warning. +# Default: yellow +# +# statusbar.url.fg.hover (QssColor): +# Foreground color of the URL in the statusbar for hovered links. +# Default: aqua +# +# tabs.fg.odd (QtColor): +# Foreground color of unselected odd tabs. +# Default: white +# +# tabs.bg.odd (QtColor): +# Background color of unselected odd tabs. +# Default: grey +# +# tabs.fg.even (QtColor): +# Foreground color of unselected even tabs. +# Default: white +# +# tabs.bg.even (QtColor): +# Background color of unselected even tabs. +# Default: darkgrey +# +# tabs.fg.selected.odd (QtColor): +# Foreground color of selected odd tabs. +# Default: white +# +# tabs.bg.selected.odd (QtColor): +# Background color of selected odd tabs. +# Default: black +# +# tabs.fg.selected.even (QtColor): +# Foreground color of selected even tabs. +# Default: ${tabs.fg.selected.odd} +# +# tabs.bg.selected.even (QtColor): +# Background color of selected even tabs. +# Default: ${tabs.bg.selected.odd} +# +# tabs.bg.bar (QtColor): +# Background color of the tab bar. +# Default: #555555 +# +# tabs.indicator.start (QtColor): +# Color gradient start for the tab indicator. +# Default: #0000aa +# +# tabs.indicator.stop (QtColor): +# Color gradient end for the tab indicator. +# Default: #00aa00 +# +# tabs.indicator.error (QtColor): +# Color for the tab indicator on errors.. +# Default: #ff0000 +# +# tabs.indicator.system (ColorSystem): +# Color gradient interpolation system for the tab indicator. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# hints.fg (QssColor): +# Font color for hints. +# Default: black +# +# hints.bg (QssColor): +# Background color for hints. Note that you can use a `rgba(...)` +# value for transparency. +# Default: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, +# 247, 133, 0.8), stop:1 rgba(255, 197, 66, 0.8)) +# +# hints.fg.match (QssColor): +# Font color for the matched part of hints. +# Default: green +# +# downloads.bg.bar (QssColor): +# Background color for the download bar. +# Default: black +# +# downloads.fg.start (QtColor): +# Color gradient start for download text. +# Default: white +# +# downloads.bg.start (QtColor): +# Color gradient start for download backgrounds. +# Default: #0000aa +# +# downloads.fg.stop (QtColor): +# Color gradient end for download text. +# Default: ${downloads.fg.start} +# +# downloads.bg.stop (QtColor): +# Color gradient stop for download backgrounds. +# Default: #00aa00 +# +# downloads.fg.system (ColorSystem): +# Color gradient interpolation system for download text. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# downloads.bg.system (ColorSystem): +# Color gradient interpolation system for download backgrounds. +# rgb: Interpolate in the RGB color system. +# hsv: Interpolate in the HSV color system. +# hsl: Interpolate in the HSL color system. +# none: Don't show a gradient. +# Default: rgb +# +# downloads.fg.error (QtColor): +# Foreground color for downloads with errors. +# Default: white +# +# downloads.bg.error (QtColor): +# Background color for downloads with errors. +# Default: red +# +# webpage.bg (QtColor): +# Background color for webpages if unset (or empty to use the +# theme's color) +# Default: white +# +# keyhint.fg (QssColor): +# Text color for the keyhint widget. +# Default: #FFFFFF +# +# keyhint.fg.suffix (CssColor): +# Highlight color for keys to complete the current keychain +# Default: #FFFF00 +# +# keyhint.bg (QssColor): +# Background color of the keyhint widget. +# Default: rgba(0, 0, 0, 80%) +# +# messages.fg.error (QssColor): +# Foreground color of an error message. +# Default: white +# +# messages.bg.error (QssColor): +# Background color of an error message. +# Default: red +# +# messages.border.error (QssColor): +# Border color of an error message. +# Default: #bb0000 +# +# messages.fg.warning (QssColor): +# Foreground color a warning message. +# Default: white +# +# messages.bg.warning (QssColor): +# Background color of a warning message. +# Default: darkorange +# +# messages.border.warning (QssColor): +# Border color of an error message. +# Default: #d47300 +# +# messages.fg.info (QssColor): +# Foreground color an info message. +# Default: white +# +# messages.bg.info (QssColor): +# Background color of an info message. +# Default: black +# +# messages.border.info (QssColor): +# Border color of an info message. +# Default: #333333 +# +# prompts.fg (QssColor): +# Foreground color for prompts. +# Default: white +# +# prompts.bg (QssColor): +# Background color for prompts. +# Default: darkblue +# +# prompts.selected.bg (QssColor): +# Background color for the selected item in filename prompts. +# Default: #308cc6 +completion.fg = white +completion.bg = #333333 +completion.alternate-bg = #444444 +completion.category.fg = white +completion.category.bg = qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, stop:1 #505050) +completion.category.border.top = black +completion.category.border.bottom = ${completion.category.border.top} +completion.item.selected.fg = black +completion.item.selected.bg = #e8c000 +completion.item.selected.border.top = #bbbb00 +completion.item.selected.border.bottom = ${completion.item.selected.border.top} +completion.match.fg = #ff4444 +completion.scrollbar.fg = ${completion.fg} +completion.scrollbar.bg = ${completion.bg} +statusbar.fg = white +statusbar.bg = black +statusbar.fg.insert = ${statusbar.fg} +statusbar.bg.insert = darkgreen +statusbar.fg.command = ${statusbar.fg} +statusbar.bg.command = ${statusbar.bg} +statusbar.fg.caret = ${statusbar.fg} +statusbar.bg.caret = purple +statusbar.fg.caret-selection = ${statusbar.fg} +statusbar.bg.caret-selection = #a12dff +statusbar.progress.bg = white +statusbar.url.fg = ${statusbar.fg} +statusbar.url.fg.success = white +statusbar.url.fg.success.https = lime +statusbar.url.fg.error = orange +statusbar.url.fg.warn = yellow +statusbar.url.fg.hover = aqua +tabs.fg.odd = white +tabs.bg.odd = grey +tabs.fg.even = white +tabs.bg.even = darkgrey +tabs.fg.selected.odd = white +tabs.bg.selected.odd = black +tabs.fg.selected.even = ${tabs.fg.selected.odd} +tabs.bg.selected.even = ${tabs.bg.selected.odd} +tabs.bg.bar = #555555 +tabs.indicator.start = #0000aa +tabs.indicator.stop = #00aa00 +tabs.indicator.error = #ff0000 +tabs.indicator.system = rgb +hints.fg = black +hints.bg = qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 247, 133, 0.8), stop:1 rgba(255, 197, 66, 0.8)) +hints.fg.match = green +downloads.bg.bar = black +downloads.fg.start = white +downloads.bg.start = #0000aa +downloads.fg.stop = ${downloads.fg.start} +downloads.bg.stop = #00aa00 +downloads.fg.system = rgb +downloads.bg.system = rgb +downloads.fg.error = white +downloads.bg.error = red +webpage.bg = white +keyhint.fg = #FFFFFF +keyhint.fg.suffix = #FFFF00 +keyhint.bg = rgba(0, 0, 0, 80%) +messages.fg.error = white +messages.bg.error = red +messages.border.error = #bb0000 +messages.fg.warning = white +messages.bg.warning = darkorange +messages.border.warning = #d47300 +messages.fg.info = white +messages.bg.info = black +messages.border.info = #333333 +prompts.fg = white +prompts.bg = darkblue +prompts.selected.bg = #308cc6 + +[fonts] +# Fonts used for the UI, with optional style/weight/size. +# * Style: `normal`/`italic`/`oblique` +# * Weight: `normal`, `bold`, `100`..`900` +# * Size: _number_ `px`/`pt` +# +# _monospace (Font): +# Default monospace fonts. +# Default: Terminus, Monospace, "DejaVu Sans Mono", Monaco, +# "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, +# "Liberation Mono", monospace, Fixed, Consolas, Terminal +# +# completion (Font): +# Font used in the completion widget. +# Default: 8pt ${_monospace} +# +# completion.category (Font): +# Font used in the completion categories. +# Default: bold ${completion} +# +# tabbar (QtFont): +# Font used in the tab bar. +# Default: 8pt ${_monospace} +# +# statusbar (Font): +# Font used in the statusbar. +# Default: 8pt ${_monospace} +# +# downloads (Font): +# Font used for the downloadbar. +# Default: 8pt ${_monospace} +# +# hints (Font): +# Font used for the hints. +# Default: bold 13px ${_monospace} +# +# debug-console (QtFont): +# Font used for the debugging console. +# Default: 8pt ${_monospace} +# +# web-family-standard (FontFamily): +# Font family for standard fonts. +# Default: +# +# web-family-fixed (FontFamily): +# Font family for fixed fonts. +# Default: +# +# web-family-serif (FontFamily): +# Font family for serif fonts. +# Default: +# +# web-family-sans-serif (FontFamily): +# Font family for sans-serif fonts. +# Default: +# +# web-family-cursive (FontFamily): +# Font family for cursive fonts. +# Default: +# +# web-family-fantasy (FontFamily): +# Font family for fantasy fonts. +# Default: +# +# web-size-minimum (Int): +# The hard minimum font size. +# Default: +# +# web-size-minimum-logical (Int): +# The minimum logical font size that is applied when zooming out. +# Default: +# +# web-size-default (Int): +# The default font size for regular text. +# Default: +# +# web-size-default-fixed (Int): +# The default font size for fixed-pitch text. +# Default: +# +# keyhint (Font): +# Font used in the keyhint widget. +# Default: 8pt ${_monospace} +# +# messages.error (Font): +# Font used for error messages. +# Default: 8pt ${_monospace} +# +# messages.warning (Font): +# Font used for warning messages. +# Default: 8pt ${_monospace} +# +# messages.info (Font): +# Font used for info messages. +# Default: 8pt ${_monospace} +# +# prompts (Font): +# Font used for prompts. +# Default: 8pt sans-serif +_monospace = Terminus, Monospace, "DejaVu Sans Mono", Monaco, "Bitstream Vera Sans Mono", "Andale Mono", "Courier New", Courier, "Liberation Mono", monospace, Fixed, Consolas, Terminal +completion = 8pt ${_monospace} +completion.category = bold ${completion} +tabbar = 8pt ${_monospace} +statusbar = 8pt ${_monospace} +downloads = 8pt ${_monospace} +hints = bold 13px ${_monospace} +debug-console = 8pt ${_monospace} +web-family-standard = +web-family-fixed = +web-family-serif = +web-family-sans-serif = +web-family-cursive = +web-family-fantasy = +web-size-minimum = +web-size-minimum-logical = +web-size-default = +web-size-default-fixed = +keyhint = 8pt ${_monospace} +messages.error = 8pt ${_monospace} +messages.warning = 8pt ${_monospace} +messages.info = 8pt ${_monospace} +prompts = 8pt sans-serif diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf new file mode 100644 index 0000000..cacf0d6 --- /dev/null +++ b/.config/ranger/rc.conf @@ -0,0 +1,725 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create either /etc/ranger/rc.conf +# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom +# commands there. +# +# If you copy this whole file there, you may want to set the environment +# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. +# +# The purpose of this file is mainly to define keybindings and settings. +# For running more complex python code, please create a plugin in "plugins/" or +# a command in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Options +# =================================================================== + +# Which viewmode should be used? Possible values are: +# miller: Use miller columns which show multiple levels of the hierarchy +# multipane: Midnight-commander like multipane view showing all tabs next +# to each other +set viewmode miller +#set viewmode multipane + +# How many columns are there, and what are their relative widths? +set column_ratios 1,3,4 + +# Which files should be hidden? (regular expression) +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ + +# Show hidden files? You can toggle this by typing 'zh' +set show_hidden true + +# Ask for a confirmation when running the "delete" command? +# Valid values are "always", "never", "multiple" (default) +# With "multiple", ranger will ask only if you delete multiple files at once. +set confirm_on_delete multiple + +# Use non-default path for file preview script? +# ranger ships with scope.sh, a script that calls external programs (see +# README.md for dependencies) to preview images, archives, etc. +#set preview_script ~/.config/ranger/scope.sh + +# Use the external preview script or display simple plain text or image previews? +#set use_preview_script true + +# Automatically count files in the directory, even before entering them? +set automatically_count_files true + +# Open all images in this directory when running certain image viewers +# like feh or sxiv? You can still open selected files by marking them. +set open_all_images true + +# Be aware of version control systems and display information. +set vcs_aware true + +# State of the four backends git, hg, bzr, svn. The possible states are +# disabled, local (only show local info), enabled (show local and remote +# information). +set vcs_backend_git enabled +set vcs_backend_hg enabled +set vcs_backend_bzr disabled +set vcs_backend_svn enabled + +# Use one of the supported image preview protocols +set preview_images true + +# Set the preview image method. Supported methods: +# +# * w3m (default): +# Preview images in full color with the external command "w3mimgpreview"? +# This requires the console web browser "w3m" and a supported terminal. +# It has been successfully tested with "xterm" and "urxvt" without tmux. +# +# * iterm2: +# Preview images in full color using iTerm2 image previews +# (http://iterm2.com/images.html). This requires using iTerm2 compiled +# with image preview support. +# +# This feature relies on the dimensions of the terminal's font. By default, a +# width of 8 and height of 11 are used. To use other values, set the options +# iterm2_font_width and iterm2_font_height to the desired values. +# +# * terminology: +# Previews images in full color in the terminology terminal emulator. +# Supports a wide variety of formats, even vector graphics like svg. +# +# * urxvt: +# Preview images in full color using urxvt image backgrounds. This +# requires using urxvt compiled with pixbuf support. +# +# * urxvt-full: +# The same as urxvt but utilizing not only the preview pane but the +# whole terminal window. +# +# * kitty: +# Preview images in full color using kitty image protocol. +# Requires python PIL or pillow library. +# If ranger does not share the local filesystem with kitty +# the transfer method is changed to encode the whole image; +# while slower, this allows remote previews, +# for example during an ssh session. +# Tmux is unsupported. +set preview_images_method w3m + +# Delay in seconds before displaying an image with the w3m method. +# Increase it in case of experiencing display corruption. +set w3m_delay 0.09 + +# Default iTerm2 font size (see: preview_images_method: iterm2) +set iterm2_font_width 8 +set iterm2_font_height 11 + +# Use a unicode "..." character to mark cut-off filenames? +set unicode_ellipsis false + +# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic). +# Requires the python-bidi pip package +set bidi_support false + +# Show dotfiles in the bookmark preview box? +set show_hidden_bookmarks true + +# Which colorscheme to use? These colorschemes are available by default: +# default, jungle, snow, solarized +set colorscheme default + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +set preview_files true +set preview_directories true +set collapse_preview true + +# Save the console history on exit? +set save_console_history true + +# Draw the status bar on top of the browser window (default: bottom) +set status_bar_on_top false + +# Draw a progress bar in the status bar which displays the average state of all +# currently running tasks which support progress bars? +set draw_progress_bar_in_status_bar true + +# Draw borders around columns? (separators, outline, both, or none) +# Separators are vertical lines between columns. +# Outline draws a box around all the columns. +# Both combines the two. +set draw_borders none + +# Display the directory name in tabs? +set dirname_in_tabs true + +# Enable the mouse support? +set mouse_enabled true + +# Display the file size in the main column or status bar? +set display_size_in_main_column true +set display_size_in_status_bar true + +# Display the free disk space in the status bar? +set display_free_space_in_status_bar true + +# Display files tags in all columns or only in main column? +set display_tags_in_all_columns true + +# Set a title for the window? +set update_title false + +# Set the title to "ranger" in the tmux program? +set update_tmux_title true + +# Shorten the title if it gets long? The number defines how many +# directories are displayed at once, 0 turns off this feature. +set shorten_title 3 + +# Show hostname in titlebar? +set hostname_in_titlebar true + +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? +set tilde_in_titlebar true + +# How many directory-changes or console-commands should be kept in history? +set max_history_size 20 +set max_console_history_size 50 + +# Try to keep so much space between the top/bottom border when scrolling: +set scroll_offset 8 + +# Flush the input after each key hit? (Noticeable when ranger lags) +set flushinput true + +# Padding on the right when there's no preview? +# This allows you to click into the space to run the file. +set padding_right true + +# Save bookmarks (used with mX and `X) instantly? +# This helps to synchronize bookmarks between multiple ranger +# instances but leads to *slight* performance loss. +# When false, bookmarks are saved when ranger is exited. +set autosave_bookmarks true + +# Save the "`" bookmark to disk. This can be used to switch to the last +# directory by typing "``". +set save_backtick_bookmark true + +# You can display the "real" cumulative size of directories by using the +# command :get_cumulative_size or typing "dc". The size is expensive to +# calculate and will not be updated automatically. You can choose +# to update it automatically though by turning on this option: +set autoupdate_cumulative_size false + +# Turning this on makes sense for screen readers: +set show_cursor false + +# One of: size, natural, basename, atime, ctime, mtime, type, random +set sort natural + +# Additional sorting options +set sort_reverse false +set sort_case_insensitive true +set sort_directories_first true +set sort_unicode false + +# Enable this if key combinations with the Alt Key don't work for you. +# (Especially on xterm) +set xterm_alt_key false + +# Whether to include bookmarks in cd command +set cd_bookmarks true + +# Changes case sensitivity for the cd command tab completion +set cd_tab_case sensitive + +# Use fuzzy tab completion with the "cd" command. For example, +# ":cd /u/lo/b" expands to ":cd /usr/local/bin". +set cd_tab_fuzzy false + +# Avoid previewing files larger than this size, in bytes. Use a value of 0 to +# disable this feature. +set preview_max_size 0 + +# The key hint lists up to this size have their sublists expanded. +# Otherwise the submaps are replaced with "...". +set hint_collapse_threshold 10 + +# Add the highlighted file to the path in the titlebar +set show_selection_in_titlebar true + +# The delay that ranger idly waits for user input, in milliseconds, with a +# resolution of 100ms. Lower delay reduces lag between directory updates but +# increases CPU load. +set idle_delay 2000 + +# When the metadata manager module looks for metadata, should it only look for +# a ".metadata.json" file in the current directory, or do a deep search and +# check all directories above the current one as well? +set metadata_deep_search false + +# Clear all existing filters when leaving a directory +set clear_filters_on_dir_change false + +# Disable displaying line numbers in main column. +# Possible values: false, absolute, relative. +set line_numbers relative + +# When line_numbers=relative show the absolute line number in the +# current line. +set relative_current_zero false + +# Start line numbers from 1 instead of 0 +set one_indexed false + +# Save tabs on exit +set save_tabs_on_exit false + +# Enable scroll wrapping - moving down while on the last item will wrap around to +# the top and vice versa. +set wrap_scroll false + +# Set the global_inode_type_filter to nothing. Possible options: d, f and l for +# directories, files and symlinks respectively. +set global_inode_type_filter + +# This setting allows to freeze the list of files to save I/O bandwidth. It +# should be 'false' during start-up, but you can toggle it by pressing F. +set freeze_files false + +# =================================================================== +# == Local Options +# =================================================================== +# You can set local options that only affect a single directory. + +# Examples: +# setlocal path=~/downloads sort mtime + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +alias e edit +alias q quit +alias q! quit! +alias qa quitall +alias qa! quitall! +alias qall quitall +alias qall! quitall! +alias setl setlocal + +alias filter scout -prts +alias find scout -aets +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map Q quitall +map q quit +copymap q ZZ ZQ + +map R reload_cwd +map F set freeze_files! +map reset +map redraw_window +map abort +map change_mode normal +map ~ set viewmode! + +map i display_file +map ? help +map W display_log +map w taskview_open +map S shell $SHELL + +map : console +map ; console +map ! console shell%space +map @ console -p6 shell %%s +map # console shell -p%space +map s console shell%space +map r chain draw_possible_programs; console open_with%%space +map f console find%space +map cd console cd%space + +map chain console; eval fm.ui.console.history_move(-1) + +# Change the line mode +map Mf linemode filename +map Mi linemode fileinfo +map Mm linemode mtime +map Mp linemode permissions +map Ms linemode sizemtime +map Mt linemode metatitle + +# Tagging / Marking +map t tag_toggle +map ut tag_remove +map " tag_toggle tag=%any +map mark_files toggle=True +map v mark_files all=True toggle=True +map uv mark_files all=True val=False +map V toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map help +map rename_append +map display_file +map edit +map copy +map cut +map console mkdir%space +map console delete +map exit + +# In case you work on a keyboard with dvorak layout +map move up=1 +map move down=1 +map move left=1 +map move right=1 +map move to=0 +map move to=-1 +map move down=1 pages=True +map move up=1 pages=True +map move right=1 +#map console delete +map console touch%space + +# VIM-like +copymap k +copymap j +copymap h +copymap l +copymap gg +copymap G +copymap +copymap + +map J move down=0.5 pages=True +map K move up=0.5 pages=True +copymap J +copymap K + +# Jumping around +map H history_go -1 +map L history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse +map { traverse_backwards +map ) jump_non + +map gh cd ~ +map ge cd /etc +map gu cd /usr +map gd cd /dev +map gl cd -r . +map gL cd -r %f +map go cd /opt +map gv cd /var +map gm cd /media +map gi eval fm.cd('/run/media/' + os.getenv('USER')) +map gM cd /mnt +map gs cd /srv +map gp cd /tmp +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g/ cd / +map g? cd /usr/share/doc/ranger + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp yank path +map yd yank dir +map yn yank name +map y. yank name_without_extension + +# Filesystem Operations +map = chmod + +map cw console rename%space +map a rename_append +map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%")) +map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7) + +map pp paste +map po paste overwrite=True +map pP paste append=True +map pO paste overwrite=True append=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree + +map dD console delete + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove +map dt cut mode=toggle + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove +map yt copy mode=toggle + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +map / console search%space +map n search_next +map N search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + +# Tabs +map tab_new +map tab_close +map tab_move 1 +map tab_move -1 +map tab_move 1 +map tab_move -1 +map gt tab_move 1 +map gT tab_move -1 +map gn tab_new +map gc tab_close +map uq tab_restore +map tab_open 1 +map tab_open 2 +map tab_open 3 +map tab_open 4 +map tab_open 5 +map tab_open 6 +map tab_open 7 +map tab_open 8 +map tab_open 9 +map tab_shift 1 +map tab_shift -1 + +# Sorting +map or set sort_reverse! +map oz set sort=random +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True + +map dc get_cumulative_size + +# Settings +map zc set collapse_preview! +map zd set sort_directories_first! +map zh set show_hidden! +map set show_hidden! +copymap +copymap +map zI set flushinput! +map zi set preview_images! +map zm set mouse_enabled! +map zp set preview_files! +map zP set preview_directories! +map zs set sort_case_insensitive! +map zu set autoupdate_cumulative_size! +map zv set use_preview_script! +map zf console filter%space +copymap zf zz + +# Filter stack +map .n console filter_stack add name%space +map .m console filter_stack add mime%space +map .d filter_stack add type d +map .f filter_stack add type f +map .l filter_stack add type l +map .| filter_stack add or +map .& filter_stack add and +map .! filter_stack add not +map .r console filter_stack rotate +map .c filter_stack clear +map .* filter_stack decompose +map .p filter_stack pop +map .. filter_stack show + +# Bookmarks +map ` enter_bookmark %any +map ' enter_bookmark %any +map m set_bookmark %any +map um unset_bookmark %any + +map m draw_bookmarks +copymap m um ` ' + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +cmap eval fm.ui.console.tab() +cmap eval fm.ui.console.tab(-1) +cmap eval fm.ui.console.close() +cmap eval fm.ui.console.execute() +cmap redraw_window + +copycmap +copycmap + +# Move around +cmap eval fm.ui.console.history_move(-1) +cmap eval fm.ui.console.history_move(1) +cmap eval fm.ui.console.move(left=1) +cmap eval fm.ui.console.move(right=1) +cmap eval fm.ui.console.move(right=0, absolute=True) +cmap eval fm.ui.console.move(right=-1, absolute=True) +cmap eval fm.ui.console.move_word(left=1) +cmap eval fm.ui.console.move_word(right=1) + +copycmap +copycmap + +# Line Editing +cmap eval fm.ui.console.delete(-1) +cmap eval fm.ui.console.delete(0) +cmap eval fm.ui.console.delete_word() +cmap eval fm.ui.console.delete_word(backward=False) +cmap eval fm.ui.console.delete_rest(1) +cmap eval fm.ui.console.delete_rest(-1) +cmap eval fm.ui.console.paste() + +# And of course the emacs way +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap + +# Note: There are multiple ways to express backspaces. (code 263) +# and (code 127). To be sure, use both. +copycmap + +# This special expression allows typing in numerals: +cmap false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +pmap pager_move down=1 +pmap pager_move up=1 +pmap pager_move left=4 +pmap pager_move right=4 +pmap pager_move to=0 +pmap pager_move to=-1 +pmap pager_move down=1.0 pages=True +pmap pager_move up=1.0 pages=True +pmap pager_move down=0.5 pages=True +pmap pager_move up=0.5 pages=True + +copypmap k +copypmap j +copypmap h +copypmap l +copypmap g +copypmap G +copypmap d +copypmap u +copypmap n f +copypmap p b + +# Basic +pmap redraw_window +pmap pager_close +copypmap q Q i +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap taskview_move up=1 +tmap taskview_move down=1 +tmap taskview_move to=0 +tmap taskview_move to=-1 +tmap taskview_move down=1.0 pages=True +tmap taskview_move up=1.0 pages=True +tmap taskview_move down=0.5 pages=True +tmap taskview_move up=0.5 pages=True + +copytmap k +copytmap j +copytmap g +copytmap G +copytmap u +copytmap n f +copytmap p b + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap eval -q fm.ui.taskview.task_move(-1) +tmap eval -q fm.ui.taskview.task_move(0) +tmap eval -q fm.ui.taskview.task_remove() + +# Basic +tmap redraw_window +tmap taskview_close +copytmap q Q w diff --git a/.config/tmuxinator/sample.yml b/.config/tmuxinator/sample.yml new file mode 100644 index 0000000..33f628c --- /dev/null +++ b/.config/tmuxinator/sample.yml @@ -0,0 +1,59 @@ +# /home/sadeghi_f/.config/tmuxinator/maha.yml + +name: maha +root: ~/ + +# Optional tmux socket +# socket_name: foo + +# Note that the pre and post options have been deprecated and will be replaced by +# project hooks. + +# Project hooks + +# Runs on project start, always +# on_project_start: command + +# Run on project start, the first time +# on_project_first_start: command + +# Run on project start, after the first time +# on_project_restart: command + +# Run on project exit ( detaching from tmux session ) +# on_project_exit: command + +# Run on project stop +# on_project_stop: command + +# Runs in each window and pane before window/pane specific commands. Useful for setting up interpreter versions. +# pre_window: rbenv shell 2.0.0-p247 + +# Pass command line options to tmux. Useful for specifying a different tmux.conf. +# tmux_options: -f ~/.tmux.mac.conf + +# Change the command to call tmux. This can be used by derivatives/wrappers like byobu. +# tmux_command: byobu + +# Specifies (by name or index) which window will be selected on project startup. If not set, the first window is used. +# startup_window: editor + +# Specifies (by index) which pane of the specified window will be selected on project startup. If not set, the first pane is used. +# startup_pane: 1 + +# Controls whether the tmux session should be attached to automatically. Defaults to true. +# attach: false + +windows: + - shell1: + - cd "D:\Workspace\mi-server\Projects\ETCS\ONBOARD.KERNEL\RM\DIM" + - vim + - shell2: + - cd "D:\Workspace\mi-server\Projects\ETCS\ONBOARD.KERNEL\RM\DIM" + - date + - jcal + - std: cd "C:\Users\sadeghi_f\Desktop\STD\STD" + - src1: cd "D:\Workspace\mi-server\Projects\ETCS\ONBOARD.KERNEL\IMP\SRC" + - src2: cd "D:\Workspace\mi-server\Projects\ETCS\ONBOARD.KERNEL\IMP\SRC" + - hole: + - digg diff --git a/.ctags b/.ctags new file mode 100644 index 0000000..ebc3ebf --- /dev/null +++ b/.ctags @@ -0,0 +1,59 @@ +--langdef=Solidity +--langmap=Solidity:.sol +--regex-Solidity=/^contract[ \t]+([a-zA-Z0-9_]+)/\1/c,contract/ +--regex-Solidity=/[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\1/f,function/ +--regex-Solidity=/[ \t]*event[ \t]+([a-zA-Z0-9_]+)/\1/e,event/ +--regex-Solidity=/[ \t]*(struct[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/ +--regex-Solidity=/[ \t]*(enum[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/ +--regex-Solidity=/[ \t]*mapping[ \t]+\(([a-zA-Z0-9_]+)[ \t]*=>[ \t]*([a-zA-Z0-9_]+)\)[ \t]+([a-zA-Z0-9_]+)/\3 (\1=>\2)/m,mapping/ + +--langdef=Rust +--langmap=Rust:.rs +--regex-Rust=/^[ \t]*(#\[[^\]]\][ \t]*)*(pub[ \t]+)?(extern[ \t]+)?("[^"]+"[ \t]+)?(unsafe[ \t]+)?fn[ \t]+([a-zA-Z0-9_]+)/\6/f,functions,function definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?type[ \t]+([a-zA-Z0-9_]+)/\2/T,types,type definitions/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?enum[ \t]+([a-zA-Z0-9_]+)/\2/g,enum,enumeration names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?struct[ \t]+([a-zA-Z0-9_]+)/\2/s,structure names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?mod[ \t]+([a-zA-Z0-9_]+)/\2/m,modules,module names/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?(static|const)[ \t]+(mut[ \t]+)?([a-zA-Z0-9_]+)/\4/c,consts,static constants/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?(unsafe[ \t]+)?trait[ \t]+([a-zA-Z0-9_]+)/\3/t,traits,traits/ +--regex-Rust=/^[ \t]*(pub[ \t]+)?(unsafe[ \t]+)?impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\5 \7 \8/i,impls,trait implementations/ +--regex-Rust=/^[ \t]*macro_rules![ \t]+([a-zA-Z0-9_]+)/\1/d,macros,macro definitions/ +--regex-make=/^([^# \t]*):/\1/t,target/ + +--langdef=Go +--langmap=Go:.go +--regex-Go=/func([ \t]+\([^)]+\))?[ \t]+([a-zA-Z0-9_]+)/\2/d,func/ +--regex-Go=/var[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/d,var/ +--regex-Go=/type[ \t]+([a-zA-Z_][a-zA-Z0-9_]+)/\1/d,type/ + +--exclude=node_modules +--exclude=gulp +--langdef=js +--langmap=js:.js +--langmap=js:+.jsx +--regex-js=/[ \t.]([A-Z][A-Z0-9._$]+)[ \t]*[=:][ \t]*([0-9"'\[\{]|null)/\1/n,constant/ +--regex-js=/\.([A-Za-z0-9._$]+)[ \t]*=[ \t]*\{/\1/o,object/ +--regex-js=/['"]*([A-Za-z0-9_$]+)['"]*[ \t]*:[ \t]*\{/\1/o,object/ +--regex-js=/([A-Za-z0-9._$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*\{/\1\.\2/o,object/ +--regex-js=/([A-Za-z0-9._$]+)[ \t]*=[ \t]*\(function\(\)/\1/c,class/ +--regex-js=/['"]*([A-Za-z0-9_$]+)['"]*:[ \t]*\(function\(\)/\1/c,class/ +--regex-js=/class[ \t]+([A-Za-z0-9._$]+)[ \t]*/\1/c,class/ +--regex-js=/([A-Za-z$][A-Za-z0-9_$()]+)[ \t]*=[ \t]*[Rr]eact.createClass[ \t]*\(/\1/c,class/ +--regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*=[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/ +--regex-js=/([A-Z][A-Za-z0-9_$]+)[ \t]*:[ \t]*[A-Za-z0-9_$]*[ \t]*[{(]/\1/c,class/ +--regex-js=/([A-Za-z$][A-Za-z0-9_$]+)[ \t]*=[ \t]*function[ \t]*\(/\1/f,function/ +--regex-js=/(function)*[ \t]*([A-Za-z$_][A-Za-z0-9_$]+)[ \t]*\([^)]*\)[ \t]*\{/\2/f,function/ +--regex-js=/['"]*([A-Za-z$][A-Za-z0-9_$]+)['"]*:[ \t]*function[ \t]*\(/\1/m,method/ +--regex-js=/([A-Za-z0-9_$]+)\[["']([A-Za-z0-9_$]+)["']\][ \t]*=[ \t]*function[ \t]*\(/\2/m,method/ + +--langdef=typescript +--langmap=typescript:.ts +--regex-typescript=/^[ \t]*(export)?[ \t]*class[ \t]+([a-zA-Z0-9_]+)/\2/c,classes/ +--regex-typescript=/^[ \t]*(export)?[ \t]*module[ \t]+([a-zA-Z0-9_]+)/\2/n,modules/ +--regex-typescript=/^[ \t]*(export)?[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\2/f,functions/ +--regex-typescript=/^[ \t]*export[ \t]+var[ \t]+([a-zA-Z0-9_]+)/\1/v,variables/ +--regex-typescript=/^[ \t]*var[ \t]+([a-zA-Z0-9_]+)[ \t]*=[ \t]*function[ \t]*\(\)/\1/v,varlambdas/ +--regex-typescript=/^[ \t]*(export)?[ \t]*(public|private)[ \t]+(static)?[ \t]*([a-zA-Z0-9_]+)/\4/m,members/ +--regex-typescript=/^[ \t]*(export)?[ \t]*interface[ \t]+([a-zA-Z0-9_]+)/\2/i,interfaces/ +--regex-typescript=/^[ \t]*(export)?[ \t]*enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enums/ +--regex-typescript=/^[ \t]*import[ \t]+([a-zA-Z0-9_]+)/\1/I,imports/ diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..3096768 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,6 @@ +[user] + email = thabogre@gmail.com +[alias] + conflicts = !git ls-files -u | cut -f 2 | sort -u + pr = "!f() { git fetch -fu ${2:-upstream} refs/pull/$1/head:pr/$1 && git checkout pr/$1; }; f" + pr-clean = "!git checkout master ; git for-each-ref refs/heads/pr/* --format=\"%(refname)\" | while read ref ; do branch=${ref#refs/heads/} ; git branch -D $branch ; done" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bee8a64 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +__pycache__ diff --git a/.gotty b/.gotty new file mode 100644 index 0000000..e69fe13 --- /dev/null +++ b/.gotty @@ -0,0 +1,302 @@ +// [string] Address to listen, all addresses will be used when empty +address = "localhost" + +// [string] Port to listen +port = "9000" + +// [bool] Permit clients to write to the TTY +permit_write = true + +// [bool] Enable basic authentication +// enable_basic_auth = false + +// [string] Default username and password of basic authentication (user:pass) +// To enable basic authentication, set `true` to `enable_basic_auth` +// credential = "user:pass" + +// [bool] Enable random URL generation +// enable_random_url = false + +// [int] Default length of random strings appended to URL +// To enable random URL generation, set `true` to `enable_random_url` +// random_url_length = 8 + +// [bool] Enable TLS/SSL +// enable_tls = false + +// [string] Default TLS certificate file path +// tls_crt_file = "~/.gotty.crt" + +// [string] Default TLS key file path +// tls_key_file = "~/.gotty.key" + +// [bool] Enable client certificate authentication +// enable_tls_client_auth = false + +// [string] Certificate file of CA for client certificates +// tls_ca_crt_file = "~/.gotty.ca.crt" + +// [string] Custom index.html file +// index_file = "" + +// [string] Title format of browser window +// Available variables are: +// Command Command string +// Pid PID of the process for the client +// Hostname Server hostname +// RemoteAddr Client IP address +// title_format = "GoTTY - {{ .Command }} ({{ .Hostname }})" + +// [bool] Enable client side reconnection when connection closed +// enable_reconnect = false + +// [int] Interval time to try reconnection (seconds) +// To enable reconnection, set `true` to `enable_reconnect` +// reconnect_time = 10 + +// [int] Timeout seconds for waiting a client (0 to disable) +// timeout = 60 + +// [int] Maximum connection to gotty, 0(default) means no limit. +// max_connection = 0 + +// [bool] Accept only one client and exit gotty once the client exits +// once = false + +// [bool] Permit clients to send command line arguments in URL (e.g. http://example.com:8080/?arg=AAA&arg=BBB) +// permit_arguments = false + +// [object] Client terminal (hterm) preferences +preferences { + + // [enum(null, "none", "ctrl-alt", "left-alt", "right-alt")] + // Select an AltGr detection hack^Wheuristic. + // null: Autodetect based on navigator.language: "en-us" => "none", else => "right-alt" + // "none": Disable any AltGr related munging. + // "ctrl-alt": Assume Ctrl+Alt means AltGr. + // "left-alt": Assume left Alt means AltGr. + // "right-alt": Assume right Alt means AltGr. + // alt_gr_mode = null + + // [bool] If set, alt-backspace indeed is alt-backspace. + // alt_backspace_is_meta_backspace = false + + // [bool] Set whether the alt key acts as a meta key or as a distinct alt key. + // alt_is_meta = false + + // [enum("escape", "8-bit", "browser-key")] + // Controls how the alt key is handled. + // "escape"....... Send an ESC prefix. + // "8-bit"........ Add 128 to the unshifted character as in xterm. + // "browser-key".. Wait for the keypress event and see what the browser says. + // (This won't work well on platforms where the browser performs a default action for some alt sequences.) + // alt_sends_what = "escape" + + // [string] URL of the terminal bell sound. Empty string for no audible bell. + // audible_bell_sound = "lib-resource:hterm/audio/bell" + + // [bool] If true, terminal bells in the background will create a Web Notification. http://www.w3.org/TR/notifications/ + // Displaying notifications requires permission from the user. + // When this option is set to true, hterm will attempt to ask the user for permission if necessary. + // Note browsers may not show this permission request + // if it did not originate from a user action. + // desktop_notification_bell = false + + // [string] The background color for text with no other color attributes. + background_color = "rgb(0, 0, 0)" + + // [string] CSS value of the background image. Empty string for no image. + // For example: + // "url(https://goo.gl/anedTK) linear-gradient(top bottom, blue, red)" + // background_image = "" + + // [string] CSS value of the background image size. Defaults to none. + // background_size = "" + + // [string] CSS value of the background image position. + // For example: + // "10% 10% center" + // background_position = "" + + // [bool] If true, the backspace should send BS ('\x08', aka ^H). Otherwise the backspace key should send '\x7f'. + // backspace_sends_backspace = false + + // [map[string]map[string]string] + // A nested map where each property is the character set code and the value is a map that is a sparse array itself. + // In that sparse array, each property is the received character and the value is the displayed character. + // For example: + // {"0" = {"+" = "\u2192" + // "," = "\u2190" + // "-" = "\u2191" + // "." = "\u2193" + // "0" = "\u2588"}} + // character_map_overrides = null + + // [bool] Whether or not to close the window when the command exits. + // close_on_exit = true + + // [bool] Whether or not to blink the cursor by default. + // cursor_blink = false + + // [2[int]] The cursor blink rate in milliseconds. + // A two element array, the first of which is how long the cursor should be on, second is how long it should be off. + // cursor_blink_cycle = [1000, 500] + + // [string] The color of the visible cursor. + // cursor_color = "rgba(255, 0, 0, 0.5)" + + // [[]string] + // Override colors in the default palette. + // This can be specified as an array or an object. + // Values can be specified as almost any css color value. + // This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the stock X11 rgb.txt file. + // You can use 'null' to specify that the default value should be not be changed. + // This is useful for skipping a small number of indicies when the value is specified as an array. + // color_palette_overrides = null + + // [bool] Automatically copy mouse selection to the clipboard. + // copy_on_select = true + + // [bool] Whether to use the default window copy behaviour + // use_default_window_copy = false + + // [bool] Whether to clear the selection after copying. + // clear_selection_after_copy = true + + // [bool] If true, Ctrl-Plus/Minus/Zero controls zoom. + // If false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing. + // ctrl_plus_minus_zero_zoom = true + + // [bool] Ctrl+C copies if true, send ^C to host if false. + // Ctrl+Shift+C sends ^C to host if true, copies if false. + // ctrl_c_copy = false + + // [bool] Ctrl+V pastes if true, send ^V to host if false. + // Ctrl+Shift+V sends ^V to host if true, pastes if false. + // ctrl_v_paste = false + + // [bool] Set whether East Asian Ambiguous characters have two column width. + // east_asian_ambiguous_as_two_column = false + + // [bool] True to enable 8-bit control characters, false to ignore them. + // We'll respect the two-byte versions of these control characters regardless of this setting. + // enable_8_bit_control = false + + // [enum(null, true, false)] + // True if we should use bold weight font for text with the bold/bright attribute. + // False to use the normal weight font. + // Null to autodetect. + enable_bold = false + + // [bool] True if we should use bright colors (8-15 on a 16 color palette) for any text with the bold attribute. + // False otherwise. + enable_bold_as_bright = false + + // [bool] Show a message in the terminal when the host writes to the clipboard. + // enable_clipboard_notice = true + + // [bool] Allow the host to write directly to the system clipboard. + enable_clipboard_write = true + + // [bool] Respect the host's attempt to change the cursor blink status using DEC Private Mode 12. + // enable_dec12 = false + + // [map[string]string] The default environment variables, as an object. + environment = {"TERM" = "xterm-256color"} + + // [string] Default font family for the terminal text. + font_family = "'DejaVuSansMono NF', 'Everson Mono', FreeMono, 'Menlo', 'Terminal', monospace" + + // [int] The default font size in pixels. + // font_size = 15 + + // [string] CSS font-smoothing property. + // font_smoothing = "antialiased" + + // [string] The foreground color for text with no other color attributes. + // foreground_color = "rgb(240, 240, 240)" + + // [bool] If true, home/end will control the terminal scrollbar and shift home/end will send the VT keycodes. + // If false then home/end sends VT codes and shift home/end scrolls. + // home_keys_scroll = false + + // [map[string]string] + // A map of key sequence to key actions. + // Key sequences include zero or more modifier keys followed by a key code. + // Key codes can be decimal or hexadecimal numbers, or a key identifier. + // Key actions can be specified a string to send to the host, or an action identifier. + // For a full list of key code and action identifiers, see https://goo.gl/8AoD09. + // Sample keybindings: + // {"Ctrl-Alt-K" = "clearScrollback" + // "Ctrl-Shift-L"= "PASS" + // "Ctrl-H" = "'HELLO\n'"} + // keybindings = null + + // [int] Max length of a DCS, OSC, PM, or APS sequence before we give up and ignore the code. + // max_string_sequence = 100000 + + // [bool] If true, convert media keys to their Fkey equivalent. + // If false, let the browser handle the keys. + // media_keys_are_fkeys = false + + // [bool] Set whether the meta key sends a leading escape or not. + // meta_sends_escape = true + + // [enum(null, 0, 1, 2, 3, 4, 5, 6] + // Mouse paste button, or null to autodetect. + // For autodetect, we'll try to enable middle button paste for non-X11 platforms. + // On X11 we move it to button 3. + // mouse_paste_button = null + + // [bool] If true, page up/down will control the terminal scrollbar and shift page up/down will send the VT keycodes. + // If false then page up/down sends VT codes and shift page up/down scrolls. + // page_keys_scroll = false + + // [enum(null, true, false)] + // Set whether we should pass Alt-1..9 to the browser. + // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators. + // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs. + // If true, Alt-1..9 will be handled by the browser. + // If false, Alt-1..9 will be sent to the host. + // If null, autodetect based on browser platform and window type. + // pass_alt_number = null + + // [enum(null, true, false)] + // Set whether we should pass Ctrl-1..9 to the browser. + // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators. + // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs. + // If true, Ctrl-1..9 will be handled by the browser. + // If false, Ctrl-1..9 will be sent to the host. + // If null, autodetect based on browser platform and window type. + // pass_ctrl_number = null + + // [enum(null, true, false)] + // Set whether we should pass Meta-1..9 to the browser. + // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators. + // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs. + // If true, Meta-1..9 will be handled by the browser. + // If false, Meta-1..9 will be sent to the host. If null, autodetect based on browser platform and window type. + // pass_meta_number = null + + // [bool] Set whether meta-V gets passed to host. + // pass_meta_v = true + + // [bool] If true, scroll to the bottom on any keystroke. + // scroll_on_keystroke = true + + // [bool] If true, scroll to the bottom on terminal output. + // scroll_on_output = false + + // [bool] The vertical scrollbar mode. + scrollbar_visible = true + + // [int] The multiplier for the pixel delta in mousewheel event caused by the scroll wheel. Alters how fast the page scrolls. + // scroll_wheel_move_multiplier = 1 + + // [bool] Shift + Insert pastes if true, sent to host if false. + shift_insert_paste = true + + // [string] URL of user stylesheet to include in the terminal document. + // user_css = "" + +} diff --git a/.i3blocks.conf b/.i3blocks.conf new file mode 100644 index 0000000..6695527 --- /dev/null +++ b/.i3blocks.conf @@ -0,0 +1,331 @@ +# i3blocks config file +# +# Please see man i3blocks for a complete reference! +# The man page is also hosted at http://vivien.github.io/i3blocks +# +# List of valid properties: +# +# align +# color +# background +# border +# command +# full_text +# instance +# interval +# label +# min_width +# name +# separator +# separator_block_width +# short_text +# signal +# urgent + +# Global properties +# +# The top properties below are applied to every block, but can be overridden. +# Each block command defaults to the script name to avoid boilerplate. +command=/usr/local/libexec/i3blocks/$BLOCK_NAME +separator=false +separator_block_width=3 +markup=none +######################### +#[buy] +#command=~/scripts/coinmarketcap.py --ava ant +#interval=60 +#color=#ffffff +#background=#330099 + +[cgrep-stargazers] +label=cgrep +command=/home/bloodstalker/scripts/pygitty.py --repo bloodstalker/cgrep +interval=600 +color=#ffffff +background=#0087af + +[mutator-stargazers] +label=mutator +command=/home/bloodstalker/scripts/pygitty.py --repo bloodstalker/mutator +interval=600 +color=#ffffff +background=#00af00 + +#[mahsa] +#command=/home/bloodstalker/scripts/mushi.py --tg +#command=echo mahsa +#interval=60 +#color=#ffffff +#background=#660033 + +[alive] +command=/home/bloodstalker/scripts/hivedup.sh +interval=60 +color=#ffffff +background=#000033 + +[alert2] +command=~/extra/kaminokumo/kaminokumo --cb +interval=600 +color=#ffffff +background=#cc6699 + +[alert1] +command=/home/bloodstalker/scripts/mushi.py --al1 +interval=600 +color=#ffffff +background=#6633cc + +[alert3] +command=/home/bloodstalker/scripts/mushi.py --al2 +interval=600 +color=#ffffff +background=#6633ff + +[alert4] +command=/home/bloodstalker/scripts/mushi.py --al3 +interval=600 +color=#ffffff +background=#6633cc + +[alert5] +command=/home/bloodstalker/scripts/mushi.py --al4 +interval=600 +color=#ffffff +background=#663399 + +[alert6] +command=/home/bloodstalker/scripts/mushi.py --al5 +interval=600 +color=#ffffff +background=#6666FF + +[buylist] +command=/home/bloodstalker/scripts/mushi.py --watchlist fil doge ada gnt eth bat +interval=1200 +color=#ffffff +background=#330099 + +#[buylistss] +#command=/home/bloodstalker/scripts/mushi.py --ss fil doge ada gnt eth bat +#interval=600 +#color=#ffffff +#background=#330066 + +[total] +command=/home/bloodstalker/scripts/mushi.py --total +interval=600 +label=NET +color=#ffffff +background=#003366 + +[bat] +command=/home/bloodstalker/scripts/mushi.py --name bat +interval=600 +label=BAT +color=#000000 +background=#33CCFF + +[ethereum] +command=/home/bloodstalker/scripts/mushi.py --name eth +interval=600 +label=ETH +color=#ffffff +background=#669900 + +[dogecoin] +command=/home/bloodstalker/scripts/mushi.py --name doge +interval=600 +label=DOGE +color=#111111 +background=#99cc66 + +[golem] +command=/home/bloodstalker/scripts/mushi.py --name gnt +interval=600 +label=GNT +color=#ffffff +background=#339999 + +[aragon] +command=/home/bloodstalker/scripts/mushi.py --name ant +interval=600 +label=ANT +color=#ffffff +background=#006666 + +[cardano] +command=/home/bloodstalker/scripts/mushi.py --name ada +interval=600 +label=ADA +color=#ffffff +background=#006633 + +[siacoin] +command=/home/bloodstalker/scripts/mushi.py --name sc +interval=600 +label=SC +color=#ffffff +background=#0066ff + +#[iota] +#command=/home/bloodstalker/scripts/mushi.py --name iota +#interval=600 +#label=IOTA +#color=#000000 +#background=#33ffcc + +#[burst] +#command=/home/bloodstalker/scripts/mushi.py --name burst +#interval=600 +#label=BURST +#color=#ffffff +#background=#339933 + +#[tronix] +#command=/home/bloodstalker/scripts/mushi.py --name tronix +#interval=600 +#label=TRX +#color=#ffffff +#background=#666699 + +#[raiden] +#command=~/scripts/hived --name raiden-network-token +#interval=160 +#label=RDN +#color=#ffffff +#background=#0099ff + +#[filecoin] +#command=~/scripts/hived --name fil +#interval=160 +#label=FIL +#color=#ffffff +#background=#339933 + +[memory] +label=Mem +separator=false +interval=30 +background=#66ccff +color=#111111 + +[memory] +label=Swap +instance=swap +separator=false +interval=30 +background=#669966 +color=#111111 + +[disk] +label=Home +#instance=/mnt/data +interval=30 +background=#336699 +color=#ffffff + +[iface] +#instance=wlan0 +color=#ffffff +interval=10 +separator=false +background=#009999 + +[wifi] +#instance=wlp3s0 +color=#ffffff +background=#006699 +interval=10 +separator=false + +[bandwidth] +label=Speed +#instance=eth0 +color=#111111 +background=#0099ff +interval=5 + +# CPU usage +# +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +[cpu_usage] +label=CPU +interval=10 +min_width=CPU: 100.00% +color=#ffffff +background=#009966 +#separator=false + +[load_average] +label=Load +interval=10 +color=#ffffff +background=#336666 + +[disk-io] +command=~/i3blocks-contrib/disk-io/disk-io +interval=persist +markup=pango +instance=/^sd[ab]/ +color=#ffffff +background=#0066cc +#WARN_COLOR="#FF0000" +#SEPARATOR=/ +#PREFIX= +#SUFFIX="B/s" +#LABEL= +#DT=5 +#MB_ONLY=0 #0 or 1 +#KB_ONLY=0 #0 or 1 +#WIDTH=4 +#MB_PRECISION=1 +#KB_PRECISION=0 +#REGEX=/^(s|h)d[a-zA-Z]+/ +#THRESHOLD=0 + +# Battery indicator +# +# The battery instance defaults to 0. +[battery] +label=BAT +label=⚡ +#instance=1 +interval=30 +color=#ffffff +background=#336666 + +# Date Time +# +[time] +background=#006600 +color=#ffffff +command=date '+%Y-%m-%d %H:%M:%S' +interval=5 + +[temperature] +command=~/i3blocks-contrib/temperature/temperature +label=Temp +interval=10 +color=#ffffff +background=#669999 + +[volume] +#label=Vol +label=♪ +instance=Master +#instance=PCM +interval=once +signal=10 +background=#0066ff +color=#ffffff + +[mail] +label=Mail +command=~/i3blocks-contrib/email/email +interval=60 +instance=gmail +background=#336633 +color=#ffffff + diff --git a/.iredisrc b/.iredisrc new file mode 100644 index 0000000..f46c4ce --- /dev/null +++ b/.iredisrc @@ -0,0 +1,67 @@ +# vi: ft=dosini +[main] +# weather display raw redis response +raw = False + +# iredis use a LRU strategy to store the completions, like keys, set members, +# etc, this will set how many completions can iredis keep at most. +completer_max = 300 + +# Completion casing preference, options are: "lower", "upper", "auto" +completion_casing = auto + +# if in newbie_mode, a description of commands and options will showup along +# with completion, encourage to enable it to who is new to redis +newbie_mode = True + +# show prompt in a ranibow color +rainbow = False + +# retry times for connection error and timeout +retry_times = 2 + +socket_keepalive = True + +# IRedis support running shell command to parse the response, like this: +# > get json-str | jq . +# However that will allow any shell command to execute under iredis REPL, +# you can disable this feature by setting this to False. +# Default is True. +shell = True + +# decode redis response, default None +decode = + +# enable pager? defualt to True, you can disable it by changing it to False +enable_pager = True + +# pager setting when line is too tall +# By default 'PAGER' environment variable is used +# pager = less -SRXF + +# iredis will send a `INFO` command to get the server's version, this option can +# disable it +no_info = True + +# iredis will show command hint on bottom bar, this option can disable it +bottom_bar = True + +# Dangerous command warning mode will alert you before executing a dangerous +# command, that may cause harm to the redis-server or hang server, +# such as "KEYS", "DEL" or "SHUTDOWN". +warning = True + +# IRedis log for debugging, leave this blank will disable log. +# You don't need this unless you are debuging iredis. +# Be careful this will log your commands input (include AUTH with password) to +# log file. +# eg. ~/.iredis.log +log_location = + +# History file location +history_location = ~/.iredis_history + +[alias_dsn] +# example_dsn = redis://[[username]:[password]]@localhost:6379/0 +# example_dsn = rediss://[[username]:[password]]@localhost:6379/0 +# example_dsn = unix://[[username]:[password]]@/path/to/socket.sock?db=0 diff --git a/.kshrc b/.kshrc new file mode 100644 index 0000000..d72e060 --- /dev/null +++ b/.kshrc @@ -0,0 +1,87 @@ +#!/usr/bin/env ksh + +set -o vi +# set -o vi-tabcomplete +# bind ^I=complete-list +HISTFILE="$HOME/.ksh_history" +HISTSIZE=5000 + +alias ..="cd ../" +alias ...="cd ../../" +alias ....="cd ../../../" +alias .....="cd ../../../../" +alias ......="cd ../../../../../" +alias ls="ls --color=tty" +alias ll="ls -l" +alias la="ls -a" +alias lss="ls -sSA" +alias ~="cd ~" + +alias quit="exit" +alias xx="dtrx" +alias mv="mv -i" +alias cp="cp -i" +alias df='df -h' +alias digg="dig && clear" +alias clean="clear" +alias quit="exit" + +alias grep='grep --color=auto' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' + +function loginname { + echo $USER +} + +PS1='$(echo -ne "\033[32m`loginname`@`hostname`:\033[00m";if [[ "${PWD#$HOME}" != "$PWD" ]] then; echo -ne "\033[34m~${PWD#$HOME}\033[00m"; else; echo -ne "\033[34m$PWD\033[00m";fi;echo -ne " >>> ")' + +function docpp { + cp ~/scripts/makefilecpp ./makefile + cp ~/scripts/c/main.cpp ./ + cp ~/scripts/c/header.hpp ./ + cp ~/scripts/.ycm_extra_config.py ./.ycm_extra_conf.py + cp ~/scripts/cfam.vimrc ./.vimrc + cp ~/scripts/compiler-explorer/ceconfig.json ./ + cp ~/scripts/c/debug.dbg ./ +} + +function docc { + cp ~/scripts/makefilec ./makefile + cp ~/scripts/c/main.c ./ + cp ~/scripts/.ycm_extra_config.py ./.ycm_extra_conf.py + cp ~/scripts/cfam.vimrc ./.vimrc + cp ~/scripts/compiler-explorer/ceconfig.json ./ + cp ~/scripts/c/debug.dbg ./ +} + +function dig { + globalholecounter=0 + if test "$(ls -A "/home/devi/devi/abbatoir")"; then + while [ 1 ]; do + if [ -d "/home/devi/devi/abbatoir/hole$globalholecounter" ]; then + # if its not empty + if test "$(ls -A "/home/devi/devi/abbatoir/hole$globalholecounter")"; then + : + # if its empty + else + cd /home/devi/devi/abbatoir/hole$globalholecounter + break + fi + else + mkdir /home/devi/devi/abbatoir/hole$globalholecounter + cd /home/devi/devi/abbatoir/hole$globalholecounter + echo $globalholecounter + break + fi + ((globalholecounter++)) + done + else + mkdir /home/devi/devi/abbatoir + mkdir /home/devi/devi/abbatoir/hole$globalholecounter + cd /home/devi/devi/abbatoir/hole$globalholecounter + fi +} + +export SHELL="ksh" +export PATH=$PATH:/home/devi/scripts/bin diff --git a/.mongorc.js b/.mongorc.js new file mode 100644 index 0000000..43424dd --- /dev/null +++ b/.mongorc.js @@ -0,0 +1,17 @@ +function prompt() { + + var username = ""; + var user = db.runCommand({ + connectionStatus: 1 + }).authInfo.authenticatedUsers[0]; + + if (!!user) { + username = user.user; + } else { + username = "anonymous"; + } + + var database = db.getName(); + + return `${username}:${database} >`; +} diff --git a/.muttrc b/.muttrc new file mode 100644 index 0000000..7d884bd --- /dev/null +++ b/.muttrc @@ -0,0 +1,253 @@ +set from = 'thabogre@gmail.com' +set realname = 'farzad sadeghi' +set imap_user = 'thabogre@gmail.com' +source "gpg -d ~/scripts/imap.pass.gpg |" +#set sidebar_visible = yes + +# macros +macro index A "T~N;WNT~O;WO\CT~T” “mark all messages read" + +# REMOTE GMAIL FOLDERS +set folder = 'imaps://imap.gmail.com:993' +set spoolfile = '+Inbox' +set postponed = '+Drafts' +set record = '+Sent' +set trash = '+Trash' + +# gives us all the mailboxes in the sidebar +set imap_check_subscribed + +#LOCAL FOLDERS FOR CACHED HEADERS AND CERTIFICATES +set header_cache = ~/.mutt/cache/headers +#set header_cache =\home\bloodstalker\.mutt\cache\headers +set message_cachedir = ~/.mutt/cache/bodies +set certificate_file = ~/.mutt/certificates + +#SMTP SETTINGS +set smtp_url = 'smtp://thabogre@smtp.gmail.com:587/' + +set editor = "vim" + +#SECURING +set move = no +set imap_keepalive = 900 + +set timeout=30 +folder-hook gmail/important "color status J_black color136 " +#set imap_list_subscribed=yes + +set sidebar_visible = yes +set mail_check_stats = yes +set sidebar_divider_char = ' |' +set sidebar_visible = yes +set sidebar_width = 40 +set sidebar_short_path = yes +set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_folder_indent = yes +set sidebar_indent_string = "...." + +#subscriptions +subscribe ^cfe-dev@lists.llvm.org$ +subscribe ^llvm-dev@lists.llvm.org$ +subscribe -group lua lua-l@lists.lua.org +subscribe -group cygwin cygwin@cygwin.com + +# for background in 16 color terminal, valid background colors include: +# base03, bg, black, any of the non brights + +# style notes: +# when bg=235, that's a highlighted message +# normal bg=233 + +# basic colors --------------------------------------------------------- +# color normal brightyellow default +color error color196 default # message line error text +color tilde color81 default # vi-like tildes marking blank lines +color message color82 default +color markers brightcolor232 color222 # wrapped-line /^\+/ markers +color attachment brightcolor165 default # attachment headers +color search color232 color154 # search patterns in pager +color status brightcolor232 color39 +color indicator brightcolor232 color33 # selected email in index +color tree brightcolor165 default # arrow in threads (`-->') + +# basic monochrome screen +mono bold bold +mono underline underline +mono indicator reverse +mono error bold +mono header bold "^(From|Subject|Date|To|Cc|Bcc):" +mono quoted bold + +# index ---------------------------------------------------------------- + +color index color160 default "~A" # all messages +color index color166 default "~E" # expired messages +color index color28 default "~N" # new messages +color index color22 default "~O" # old messages +color index color244 default "~R" # read messages +color index color38 default "~Q" # messages that have been replied to +color index color31 default "~U" # unread messages +color index color29 default "~U~$" # unread, unreferenced messages +color index color222 default "~v" # messages part of a collapsed thread +color index color222 default "~P" # messages from me +color index color39 default "~p!~F" # messages to me +color index color39 default "~N~p!~F" # new messages to me +color index color39 default "~U~p!~F" # unread messages to me +color index color244 default "~R~p!~F" # messages to me +color index brightcolor165 default "~F" # flagged messages +color index brightcolor165 default "~F~p" # flagged messages to me +color index brightcolor165 default "~N~F" # new flagged messages +color index brightcolor165 default "~N~F~p" # new flagged messages to me +color index brightcolor165 default "~U~F~p" # new flagged messages to me +color index color232 color196 "!~N ~D" # deleted messages +color index color232 color196 "~N ~D" # deleted new messages +color index color244 default "~v~(!~N)" # collapsed thread with no unread +color index color81 default "~v~(~N)" # collapsed thread with some unread +color index color81 default "~N~v~(~N)" # collapsed thread with unread parent +# statusbg used to indicated flagged when foreground color shows other status +# for collapsed thread +color index color160 default "~v~(~F)!~N" # collapsed thread with flagged, no unread +color index color81 default "~v~(~F~N)" # collapsed thread with some unread & flagged +color index color81 default "~N~v~(~F~N)" # collapsed thread with unread parent & flagged +color index color81 default "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged +color index color39 default "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly +color index color81 color160 "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) +color index color222 default "~T" # tagged messages +color index brightcolor222 default "~T~F" # tagged, flagged messages +color index brightcolor222 default "~T~N" # tagged, new messages +color index brightcolor222 default "~T~U" # tagged, unread messages + +color index red default "~D(!~p|~p)" # deleted +color index color111 default "~F" # flagged +color index brightred default "~=" # duplicate messages +color index color22 default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest +color index brightgreen default "~A~N!~T!~p!~Q!~F!~D" # the rest, new +color index black red "~D" # deleted messages +color index yellow default "~(~N)" # messages in threads with some unread +color index green default "~S" # superseded messages +color index yellow default "~T" # tagged messages +color index brightred red "~=" # duplicated messages + +# message headers ------------------------------------------------------ + +color hdrdefault brightcolor222 default +color header color27 default "^(To|Cc|Bcc)" +color header color28 default "^(From)" +color header color6 default "^(Date)" +color header color22 default "^(Subject)" + +# body ----------------------------------------------------------------- + +color quoted color39 default +color quoted1 color165 default +color quoted2 color35 default +color quoted3 color222 default +color quoted4 color166 default +color quoted5 color108 default +color quoted6 color105 default +color quoted7 color100 default +color quoted8 color39 default +color quoted9 color31 default +color signature color81 default # everything below /^--\s*$/ + +color bold color255 default +color underline color208 default +color normal color244 default + +## pgp + +color body color160 default "(BAD signature)" +color body color39 default "(Good signature)" +color body color235 default "^gpg: Good signature .*" +color body color241 default "^gpg: " +color body color241 color160 "^gpg: BAD signature from.*" +mono body bold "^gpg: Good signature" +mono body bold "^gpg: BAD signature from.*" + +# yes, an insane URL regex +color body brightcolor39 default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" +# and a heavy handed email regex +color body brightcolor39 default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" + +# simplified regex for URL & email +#color body magenta default "(ftp|https?|gopher|news|telnet|finger)://[^ \"\t\r\n]+" +#color body magenta default "[-a-z_0-9.]+@[-a-z_0-9.]+" + +#highlight the mail subject and from in the body as well +color body color28 default "(^Subject:.*$)" +color body color27 default "(^From:.*$)" + +# _underline_ +color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" +# /italic/ (Sometimes gets directory names) +color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" +mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" + +# Color if the attachment is autoviewed +color attach_headers brightgreen default "Autoview" + +# Color only the brackets around the headers +color attach_headers brightyellow default "^\\[--" +color attach_headers brightyellow default "--]$" + +# Color the mime type and the size +color attach_headers green default "Type: [a-z]+/[a-z0-9\-]+" +color attach_headers green default "Size: [0-9\.]+[KM]" + +# Color GPGME signature checks +color attach_headers brightgreen default "Good signature from.*" +color attach_headers brightred default "Bad signature from.*" +color attach_headers brightred default "BAD signature from.*" +color attach_headers brightred default "Note: This key has expired!" +color attach_headers brightmagenta default "Problem signature from.*" +color attach_headers brightmagenta default "WARNING: This key is not certified with a trusted signature!" +color attach_headers brightmagenta default " There is no indication that the signature belongs to the owner." +color attach_headers brightmagenta default "can't handle these multiple signatures" +color attach_headers brightmagenta default "signature verification suppressed" +color attach_headers brightmagenta default "invalid node with packet of type" +### +color index_collapsed blue default +color index_date color31 default +color index_label color196 default +color index_number color63 default +color index_size color37 default +color index_tags color27 default +#color index_subject color166 default +#color index_tag color165 default +### +color prompt blue cyan + +color sidebar_divider brightcolor39 default +color sidebar_flagged red default +color sidebar_highlight color28 default +color sidebar_indicator cyan default +color sidebar_new color24 default +color sidebar_ordinary color25 default +color sidebar_spoolfile color38 default +color sidebar_unread color99 default + +color progress white blue +color index_flags default red '~F' +# vi: ft=muttrc ts=4 sw=4 sts=4 et +set status_format='-%r-NeoMutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? \ +Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---' +set index_format='%4C %D %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' +set sort=threads +set sort_aux=last-date-received +color status color39 default +color status brightred white '(New|Del|Flag):[0-9]+' +color status brightred default '\([^)]+/[^)]+\)' +color status default default '\(threads/last-date-received\)' +color status red default '\[([^]]+)\]' 1 +color status brightwhite default 'NeoMutt: ([^ ]+)' 1 + +set mailcap_path = ~/.mutt/mailcap +auto_view text/html + +#set pager_index_lines=10 + +bind index,pager \CP sidebar-prev +bind index,pager \CN sidebar-next +bind index,pager \CO sidebar-open diff --git a/.newsboat/config b/.newsboat/config new file mode 100644 index 0000000..d9ba148 --- /dev/null +++ b/.newsboat/config @@ -0,0 +1,42 @@ +# colors +#color background color255 color0 +#color listnormal color255 color0 +#color listfocus color255 color88 bold +#color listnormal_unread color255 color0 bold +#color listfocus_unread color255 color88 bold +#color info color255 color31 +#color article color255 color0 +color listfocus green black bold +color listnormal_unread green black +color listfocus_unread green black bold +color info green black bold +color article white black + + +# highlights +#highlight article "^(Feed|Title|Link|Date|Author):.*$" color31 color0 +#highlight article "https?://[^ ]+" color9 color0 protect +highlight article "^Feed:.*" color174 color237 +highlight article "^Title:.*" color223 color237 bold +highlight article "^Author:.*" color114 color237 +highlight article "^Link:.*" color116 color237 +highlight article "^Date:.*" color223 color237 +highlight article "\\[[0-9][0-9]*\\]" color66 color237 bold +highlight article "\\[image [0-9][0-9]*\\]" color109 color237 bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 color237 bold + +bind-key j next +bind-key k prev +bind-key j down article +bind-key k up article + +highlight article "(^Feed:.*|^Title:.*|^Author:.*)" color75 default +highlight article "(^Link:.*|^Date:.*)" color75 default +highlight article "^Podcast Download URL:.*" color71 default +highlight article "^Links:" white color240 underline +highlight article "\\[[0-9][0-9]*\\]" color72 default bold +highlight article "\\[image [0-9][0-9]*\\]" color72 default bold +highlight article "\\[embedded flash: [0-9][0-9]*\\]" color72 default bold +highlight article ":.*\\(link\\)$" color74 default +highlight article ":.*\\(image\\)$" color74 default +highlight article ":.*\\(embedded flash\\)$" color74 default diff --git a/.newsboat/urls b/.newsboat/urls new file mode 100644 index 0000000..8b758b0 --- /dev/null +++ b/.newsboat/urls @@ -0,0 +1,56 @@ +http://horriblesubs.info/rss.php?res=sd +http://dark-world.ru/rss/albums/ +http://dark-world.ru/rss/compilations/ +https://www.reddit.com/r/CryptoCurrency.rss +http://feeds.feedburner.com/abseilio +https://hackaday.com/blog/feed/ +https://www.cyberciti.biz/atom/atom.xml + +# (Youtube) +https://www.youtube.com/feeds/videos.xml?channel_id=UC-91UA-Xy2Cvb98deRXuggA "~Joshua Fluke"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC0Whg8Zz7TT1VSpWeCjghKg "~-sokoninaru-そこに鳴る"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC17mJJnvzAa_e9qQqLIfIeQ "~Semicolon&Sons"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke_Smith"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC3M7l8ved_rYQ45AVzS0RGA "~The_Jimmy_Dore_Show"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC4QEH0BC7ZQMYIEmr1yAHfQ "~RomNex"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC4w1YQAJMWOz4qtxinq55LQ "~Level1Techs"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC4xKdmAXFh4ACyhpiQ_3qBw "~TechLead"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC5e__RG9K3cHrPotPABnrwg "~BoostCon"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC6ZMVdbuHN5S2Zcf3c2fAqQ "~Civillain"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC6gD8kk_Z_5bX2PcRk2fwDg "~Pagefire"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC79H1bXWDNodOD8_VtZd_DA "~Chilling_Tales_for_Dark_Nights"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA "~Mental_Outlaw"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC8ENHE5xdFSwx71u3fDH5Xw "~ThePrimeagen"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC8W_AGkuup8MnCfU7PPOkAg "~WTFSexyHeadphones"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "~Computerphile"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCD0y51PJfvkZNe3y3FR5riw "~Chyrosran22"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCJ6q9Ie29ajGqKApbLqfBOg "~Black_Hat"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCJMemx7yz_1QwXjHG_rXRhg "~MrCreepyPasta"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCMlGfpWw-RUdWX_JbLCukXg "~CppCon"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCOWcZ6Wicl-1N34H0zZe38w "~Level1Linux"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCQ-W1KE9EYfdxhL6S4twUNw "~The_Cherno"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCQN2DsjnYH60SFBIA6IkNwg "~STÖEK"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCQPmOWNza6PMesQaWWBEhJA "~Anabolic_Aliens"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCS5tt2z_DFvG7-39J3aE-bQ "~Life_of_Boris"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCS97tchJDq17Qms3cux8wcA "~Chrisatmachine"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCVHOgH4XEyYx-ZEaya1XqCQ "~Cryo_Chamber"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCVls1GmFKf6WlTraIb_IaJg "~DistroTube"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCWUxLYGeeIKxxioUqL54Q8g "~GP-_Penitentiary_Life_Wes_Watson"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCXuqSBlHAE6Xw-yeJA0Tunw "~Linus_Tech_Tips"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCYyWrpcVU2PZlLohFaYOZUw "~The_Exploring_Series"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC_NSOckDnuypJK_FpCO6ogA "~SGtMarkIV"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UC_e39rWdkQqo5-LbiLiU10g "~The_Dark_Somnium"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCcZ_-5180OBED8NBkZgkRmQ "~Dr._Creepen"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCchBatdUMZoMfJ3rIzgV84g "~Viva_La_Dirt League"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCcmEL8JoDBE25gvCFkrqhcw "~TheVolgun"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCfhSB16X9MXhzSFe_H7XbHg "~Bryan_Jenks"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCgTNupxATBfWmfehv21ym-g "~Null_Byte"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCld68syR8Wi-GY_n4CaoJGA "~Brodie_Robertson"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCnK36WwcJDTEhyS7w3SQntg "~Creepy_Ghost_Stories"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCoJTOwZxbvq8Al8Qat2zgTA "~Kim_Iversen"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCorzANoC3fX9VVefJHM5wtA "~Nick_Janetakis"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCoxcjq-8xIDTYp3uz647V5A "~Numberphile"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCrmnnE3yzpAyAuX_hRqyLdg "~Software_Engineering_Institute_|_Carnegie_Mellon_University"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCyUBW72KU30dfAYWLVNZO8Q "~Stefan_Mischook"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCyp1gCHZJU_fGWFf2rtMkCg "~Numberphile2"_("youtube") +https://www.youtube.com/feeds/videos.xml?channel_id=UCvEdeev3sZoxi5hMksZI4KA "~gotbletu"_("youtube") diff --git a/.psqlrc b/.psqlrc new file mode 100644 index 0000000..8e774e6 --- /dev/null +++ b/.psqlrc @@ -0,0 +1,29 @@ +\set QUIET 1 + +/* prompts */ +\set PROMPT1 '\x1b[38;5;34m%n\x1b[0m@\x1b[38;5;39m%M\x1b[0m:\x1b[38;5;37m%> \x1b[38;5;69m%`date +%H:%M:%S` \x1b[38;5;4m[%/] \x1b[38;5;31m%x\x1b[38;5;104m%#\x1b[38;5;34m%R\n\x1b[38;5;28m>>>\x1b[0m' +\set PROMPT2 '\x1b[38;5;39m%M\x1b[0m:\x1b[38;5;37m%> \x1b[38;5;34m%n\x1b[0m@\x1b[38;5;4m%/\x1b[38;5;34m%R \x1b[38;5;104m%# \n\x1b[38;5;28m>>>\x1b[0m' +\set PROMPT3 '\x1b[38;5;38m>>>\x1b[0m' + +\pset null '[null]' +\set COMP_KEYWORD_CASE upper +\timing +\x auto +\set VERBOSITY verbose +\set version 'SELECT version();' +/* history options */ +\set HISTSIZE 2000 +\set HISTFILE ~/.psql_history- :DBNAME +\set HISTCONTROL ignoredups + + +\set ON_ERROR_STOP on +\set ON_ERROR_ROLLBACK off + +\set COMP_KEYWORD_CASE upper + +\pset unicode_border_linestyle single +\pset unicode_column_linestyle single +\pset unicode_header_linestyle double + +\unset QUIET diff --git a/.rainbow_config.json b/.rainbow_config.json new file mode 100755 index 0000000..e0b53ba --- /dev/null +++ b/.rainbow_config.json @@ -0,0 +1,43 @@ +{ + "DISABLE_EXTENDED_TWEETS": false, + "HEARTBEAT_TIMEOUT": 120, + "IMAGE_ON_TERM": false, + "IMAGE_RESIZE_TO_FIT": false, + "THEME": "tomorrow_night", + "ASCII_ART": true, + "HIDE_PROMPT": false, + "PREFIX": "#owner#place#me#keyword", + "SEARCH_TYPE": "mixed", + "SEARCH_MAX_RECORD": 5, + "HOME_TWEET_NUM": 5, + "RETWEETS_SHOW_NUM": 5, + "CONVERSATION_MAX": 30, + "QUOTE_FORMAT": "#comment https://twitter.com/#owner/status/#tid", + "THREAD_META_LEFT": "(#id) #clock", + "THREAD_META_RIGHT": "#clock (#id)", + "THREAD_MIN_WIDTH": 20, + "NOTIFY_FORMAT": " #source_user #notify #clock", + "MESSAGES_DISPLAY": 5, + "TREND_MAX": 10, + "LIST_MAX": 5, + "ONLY_LIST": [], + "IGNORE_LIST": [], + "HISTORY_FILENAME": "completer.hist", + "IMAGE_SHIFT": 2, + "IMAGE_MAX_HEIGHT": 90, + "STREAM_DELAY": 0, + "USER_DOMAIN": "userstream.twitter.com", + "PUBLIC_DOMAIN": "stream.twitter.com", + "SITE_DOMAIN": "sitestream.twitter.com", + "FORMAT": { + "TWEET": { + "CLOCK_FORMAT": "%Y/%m/%d %H:%M:%S", + "DISPLAY": "\n #name #nick #clock \n \u267a:#rt_count \u2665:#fa_count id:#id via #client #fav\n #tweet" + }, + "MESSAGE": { + "CLOCK_FORMAT": "%Y/%m/%d %H:%M:%S", + "DISPLAY": "\n #sender_name #sender_nick #to #recipient_name #recipient_nick :\n #clock message_id:#id\n #message" + } + }, + "POCKET_SUPPORT": false +} diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..3fd013f --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,146 @@ +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' +set -g @plugin 'soyuka/tmux-current-pane-hostname' +set -g @plugin 'laktak/extrakto' +set -g @plugin 'tmux-plugins/tmux-copycat' +set -g @continuum-restore 'on' +set -g @plugin 'tmux-plugins/tmux-prefix-highlight' +set -g @plugin 'tmux-plugins/tmux-online-status' +# set -g @plugin 'tmux-plugins/tmux-sidebar' + +set -g focus-events on + +set -g default-command /usr/bin/zsh +set -g default-shell /usr/bin/zsh +set -g default-terminal "tmux-256color" + +set-option -g prefix C-a +set -g status-interval 120 +set-option -g history-limit 10000 +set-option -g repeat-time 500 + +#prefix highlight settings +set -g @prefix_highlight_show_copy_mode 'on' +set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' +set -g @prefix_highlight_prefix_prompt 'Wait' +set -g @prefix_highlight_copy_prompt 'Copy' +set -g @prefix_highlight_output_suffix '' + +#online status options +# set -g @online_icon "ok" +# set -g @offline_icon "offline!" +set -g @online_icon "#[bg=colour75 fg=colour22]#[bg=colour22] " +set -g @offline_icon "#[bg=colour75 fg=colour1]#[bg=colour1] " + +#move/panes panes and windows +# bind-key W choose-tree -Zw "swap-window -t '%%'" +# bind-key P choose-tree -Zw "swap-pane -t '%%'" +# bind-key C-M-w choose-tree -Zw "move-window -t '%%'" +# bind-key C-M-p choose-tree -Zw "move-pane -t '%%'" +# bind-key C-M-w command-prompt -p "Swap Current Window To? (e.g 3; 4; session_name:5)" "swap-window -t '%%'" +# bind-key C-M-p command-prompt -p "Swap Current Pane To? (e.g 2.0; session_name:4.0)" "swap-pane -t '%%'" +bind-key M-p command-prompt -p "Move Current Pane To? (e.g 3.1; session_name:6.0)" "move-window -t '%%'" +bind-key M-w command-prompt -p "Move Current Window To? (e.g 3.1; session_name:6.0)" "move-pane -t '%%'" +#swap panes around +# bind-key -r -T prefix C-M-k select-pane -U \; swap-pane -t ! +# bind-key -r -T prefix C-M-j select-pane -D \; swap-pane -t ! +# bind-key -r -T prefix C-M-h select-pane -L \; swap-pane -t ! +# bind-key -r -T prefix C-M-l select-pane -R \; swap-pane -t ! + +#to support nested tmux sessions for ssh workflows +bind -T root F6 \ + set prefix None \;\ + set key-table off \;\ + if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ + refresh-client -S \;\ + +bind -T off F6 \ + set -u prefix \;\ + set -u key-table \;\ + refresh-client -S + +wg_is_keys_off="#[fg=colour15,bg=colour63,bold]#([ $(tmux show-option -qv key-table) = 'off' ] && echo 'OFF')#[fg=colour22] #{?#{pane_ssh_connected},#[fg=colour63 bg=colour24],#[fg=colour63 bg=colour31]}#[default]" + +#key bindings +#do not use alt keybindings. because of the escape passed at the beginning of a alt keycode, +#zsh's vim mode's escape becomes slow since tmux will have to wait on keybindings beginning with escape. +bind | split-window -h +bind - split-window -v +bind -r k select-pane -U +bind -r j select-pane -D +bind -r h select-pane -L +bind -r l select-pane -R +# bind -n S-Right next-window +# bind -n S-Left previous-window +bind -n C-k next-window +bind -n C-j previous-window +# bind -n M-Up select-pane -U +# bind -n M-Down select-pane -D +# bind -n M-Left select-pane -L +# bind -n M-Right select-pane -R +bind -r C-k select-pane -U +bind -r C-j select-pane -D +bind -r C-h select-pane -L +bind -r C-l select-pane -R +setw -g mode-keys vi +bind [ copy-mode +bind -T copy-mode-vi 'v' send -X begin-selection +bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel +#bind -T copy-mode-vi 'V' rectangle-toggle +bind ] paste-buffer +bind Space choose-buffer +# bind C-l send-keys 'C-l' + +#move windows +# bind-key -n C-S-Left swap-window -t -1 +# bind-key -n C-S-Right swap-window -t +1 +# bind-key -n M-S-j swap-window -t -1 +# bind-key -n M-S-k swap-window -t +1 +bind-key -n C-S-Left swap-window -t -1\; select-window -t -1 +bind-key -n C-S-Right swap-window -t +1\; select-window -t +1 + +#unbindings -- these are reserved for vim use +unbind Up +unbind Down +unbind Left +unbind Right + +# Enable activity alerts. +setw -g monitor-activity off +set -g visual-activity off + +set -g pane-active-border-style fg='#669933' +set -g pane-border-style fg='#0099ff' + +# message text +set -g message-style bg='#44475a',fg='#8be9fd' + +#powerline +set-option -g status on +#set-option -g status-interval 2 +set-option -g status-justify "centre" +set-option -g status-left-length 120 +set-option -g status-right-length 170 + +# set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#[fg=colour15 bg=colour22]#U@#H#[fg=colour22 bg=colour148]#(/home/devi/tmux-powerline/powerline.sh left)" +# set-option -g status-right "#(/home/devi/tmux-powerline/powerline.sh right)#{online_status}" +set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#{?#{pane_ssh_connected},#[fg=colour15 bg=colour24],#[fg=colour15 bg=colour31]}#U@#H:#{pane_ssh_port}#{?#{pane_ssh_connected},#[fg=colour24 bg=colour61],#[fg=colour31 bg=colour61]}#(/home/devi/scripts/tmux/vcs_info.sh)" +# set-option -g status-left "#{prefix_highlight}$wg_is_keys_off#{?#{pane_ssh_connected},#[fg=colour15 bg=colour31],#[fg=colour15 bg=colour24]}#[fg=colour15 bg=colour31]#U@#H:#{pane_ssh_port}#[fg=colour31 bg=colour61]#(/home/devi/scripts/tmux/vcs_info.sh)" +set-option -g status-right "#(/home/devi/scripts/tmux/date.sh)#{online_status}" + +current_window_format="#{?window_zoomed_flag,#[fg=colour63#, bg=colour16]#[fg=colour63#, bg=colour16#, bold] Z #W #[fg=colour63#, bg=colour16],#[fg=colour255#, bg=colour16] #I #W #[fg=colour255#, bg=colour16]}" + +set-window-option -g window-status-current-format $current_window_format +# set-window-option -g window-status-current-format "#[fg=colour255, bg=colour16]#[fg=colour255, bg=colour16] #I #W #[fg=colour255, bg=colour16]" +set -g status-bg colour16 +set-window-option -g window-status-format "#[fg=colour32 bg=colour16]#[fg=colour255 bg=colour32]#I#[fg=colour32 bg=colour16]" +set-window-option -g window-status-separator "" + +#run command on idle +#set -g lock-after-time 300 +#set -g lock-command "cmatrix -C blue" +bind-key e copy-mode \; send-keys "?Error" C-m + +#must be the last line +run '~/.tmux/plugins/tpm/tpm' diff --git a/.trash b/.trash new file mode 100644 index 0000000..c9ee14b --- /dev/null +++ b/.trash @@ -0,0 +1,15 @@ +TRASH_CAN=.TRASH +IN_CASE_OF-FAILURE=PROTECT +SHOULD-WARN=YES +PROTECT_TRASH=YES +IGNORE_EXTENSIONS=o;log +IGNORE_HIDDEN=NO +IGNORE_EDITOR_BACKUP=YES +IGNORE-EDITOR-TEMPORARY=YES +LIBTRASH_CONFIG_FILE_UNREMOVEABLE=YES +TRASH_SYSTEM_ROOT=SYSTEM_ROOT +UNREMOVABLE_DIRS=/bin;/boot;/dev;/etc;/lib;/sbin;/usr;/home/devi +UNCOVER_DIRS= +USER_TEMPORARY_DIRS=temp +REMOVEABLE_MEDIA_NMOUNT_POINTS= +EXCEPTIONS=/etc/mtab;/etc/resolv.conf;/etc/adjtime;/etc/upsstatus diff --git a/.tvrc b/.tvrc new file mode 100644 index 0000000..754c643 --- /dev/null +++ b/.tvrc @@ -0,0 +1,5 @@ +[DEFAULT] +editor = vim +extension = .md +extensions = .md, .txt, .text, .markdown, .mdown, .mdwn, .mkdn, .mkd, .rst +notes_dir = ~/Notes diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..060987a --- /dev/null +++ b/.vimrc @@ -0,0 +1,1308 @@ +let mapleader = " " +let maplocalleader = "," +set encoding=UTF-8 +set nocompatible +set completeopt-=preview +set completeopt+=popup +set showmatch +set list +set hidden +set tabstop=2 +set conceallevel=1 +set shiftwidth=2 +set shell=ksh +set directory^=$HOME/.vim/tmp// +set expandtab +set smarttab +set autoindent +set autochdir +set history=1000 +set cindent +set complete=.,w,b,u,t,i +set foldmethod=manual +set nofoldenable +set autoread +set number +set showtabline=0 +set numberwidth=5 +set laststatus=2 +set smartcase +set more +set lazyredraw +set synmaxcol=800 +syntax sync minlines=64 +set ttyfast +set relativenumber +set wildignorecase +" set wildmode=list:longest,full +set wildignore+=*/tmp/*,*.so,*.swp,*.zip +set wildmenu +set confirm +set magic +set scrolloff=0 +set noerrorbells +set novisualbell +set t_vb= +set tm=500 +set ai +set si +set wrap +set linebreak +set breakindent +let &showbreak = '↪ ' +set tagbsearch +set showfulltag +set diffopt=internal,algorithm:patience +set fillchars+=vert:\ " whitespace signifacant +set secure +set cursorline +autocmd InsertLeave * set cursorline +autocmd InsertEnter * set nocursorline +set tags=./tags,tags;$HOME +set spelllang=en_us,de_de +set hlsearch +set incsearch +set ignorecase +set smartcase +set backspace=indent,eol,start +" set cursorcolumn +" set exrc +set viminfo='100,\"500,:50,%,n~/.viminfo + +highlight clear Search +let g:is_posix = 1 + +set rtp+=~/.vim/bundle/Vundle.vim +set rtp+=/usr/bin/fzf +" set rtp+=/home/bloodstalker/extra/llvm-clang-4/build/bin/clangd +" set rtp+=/usr/local/bin/pyls +let g:polyglot_disabled = ['go.plugin'] + +call vundle#begin() +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +Plugin 'mbbill/undotree' +Plugin 'mhinz/vim-startify' +Plugin 'ctrlpvim/ctrlp.vim' +Plugin 'kh3phr3n/python-syntax' +Plugin 'VundleVim/Vundle.vim' +Plugin 'scrooloose/nerdtree' +Plugin 'sickill/vim-pasta' +Plugin 'adelarsq/vim-matchit' +Plugin 'makerj/vim-pdf' +Plugin 'Xuyuanp/nerdtree-git-plugin' +Plugin 'vim-ctrlspace/vim-ctrlspace' +Plugin 'mhinz/vim-signify' +Plugin 'octol/vim-cpp-enhanced-highlight' +Plugin 'vimwiki/vimwiki' +Plugin 'flazz/vim-colorschemes' +Plugin 'plasticboy/vim-markdown' +Plugin 'neomutt/neomutt.vim' +Plugin 'sngn/vim-i3blocks-syntax' +Plugin 'rhysd/vim-wasm' +Plugin 'nathanaelkane/vim-indent-guides' +Plugin 'tomlion/vim-solidity' +Plugin 'dense-analysis/ale' +Plugin 'ekalinin/Dockerfile.vim' +Plugin 'PotatoesMaster/i3-vim-syntax' +Plugin 'chrisbra/NrrwRgn' +Plugin 'kana/vim-arpeggio' +Plugin 'easymotion/vim-easymotion' +Plugin 'neovimhaskell/haskell-vim' +Plugin 'majutsushi/tagbar' +Plugin 'szw/vim-maximizer' +Plugin 'chrisbra/csv.vim' +Plugin 'Valloric/YouCompleteMe' +Plugin 'vim-pandoc/vim-pandoc' +Plugin 'vim-pandoc/vim-pandoc-syntax' +Plugin 'elzr/vim-json' +Plugin 'wellle/context.vim' +Plugin 'ludovicchabant/vim-gutentags' +Plugin 'skywind3000/gutentags_plus' +Plugin 'stephpy/vim-yaml' +Plugin 'unblevable/quick-scope' +Plugin 'SirVer/ultisnips' +Plugin 'honza/vim-snippets' +Plugin 'chrisbra/Recover.vim' +Plugin 'wellle/targets.vim' +Plugin 'rhysd/git-messenger.vim' +Plugin 'mhinz/vim-grepper' +Plugin 'vim-utils/vim-troll-stopper' +Plugin 'junegunn/limelight.vim' +Plugin 'valloric/MatchTagAlways' +Plugin 'junegunn/vim-peekaboo' +Plugin 'tpope/vim-vinegar' +Plugin 'tpope/vim-commentary' +Plugin 'tpope/vim-rhubarb' +Plugin 'rgrinberg/vim-ocaml' +Plugin 'terryma/vim-multiple-cursors' +Plugin 'kshenoy/vim-signature' +Plugin 'Konfekt/vim-scratchpad' +Plugin 'tmux-plugins/vim-tmux' +Plugin 'rust-lang/rust.vim' +Plugin 'tpope/vim-repeat' +Plugin 'cespare/vim-toml' +Plugin 'maralla/vim-toml-enhance' +Plugin 'junegunn/fzf' +Plugin 'junegunn/fzf.vim' +Plugin 'chiel92/vim-autoformat' +Plugin 'vim-scripts/ZoomWin' +Plugin 'wakatime/vim-wakatime' +Plugin 'terryma/vim-expand-region' +Plugin 'tpope/vim-surround' +Plugin 'vim-scripts/DoxyGen-Syntax' +Plugin 'vim-scripts/DoxygenToolkit.vim' +Plugin 'fatih/vim-go' +Plugin 'tpope/vim-fugitive' +Plugin 'junegunn/goyo.vim' +Plugin 'amix/vim-zenroom2' +Plugin 'raimon49/requirements.txt.vim' +Plugin 'Shougo/vimproc.vim' +Plugin 'rhysd/vim-llvm' +Plugin 'rhysd/vim-gfm-syntax' +Plugin 'haya14busa/is.vim' +Plugin 'haya14busa/vim-asterisk' +Plugin 'haya14busa/incsearch.vim' +Plugin 'haya14busa/vim-edgemotion' +Plugin 'lervag/vimtex' +Plugin 'vim-utils/vim-man' +Plugin 'ajh17/VimCompletesMe' +Plugin 'ryanoasis/vim-devicons' +Plugin 'sheerun/vim-polyglot' +Plugin 'dbeniamine/cheat.sh-vim' +Plugin 'lifepillar/pgsql.vim' +Plugin 'tmux-plugins/vim-tmux-focus-events' +Plugin 'congma/vim-compiler-checkbashisms' +Plugin 'hsanson/vim-openapi' +Plugin 'mattn/emmet-vim' +Plugin 'hail2u/vim-css3-syntax' +" Plugin 'skammer/vim-css-color' +" Plugin 'christoomey/vim-tmux-navigator' +" Plugin 'jelera/vim-javascript-syntax' +" Plugin 'szymonmaszke/vimpyter' +" Plugin 'puremourning/vimspector' +" Plugin 'kana/vim-submode' +" Plugin 'jaxbot/semantic-highlight.vim' +" Plugin 'tpope/vim-capslock' +" Plugin 'nanotech/jellybeans.vim' +" Plugin 'tiagofumo/vim-nerdtree-syntax-highlight' +" Plugin 'mattn/webapi-vim' +" Plugin 'Townk/vim-autoclose' +" Plugin 'tpope/vim-speeddating' +" Plugin 'powerman/vim-plugin-AnsiEsc' +" Plugin 'xolox/vim-misc' +" Plugin 'liuchengxu/vista.vim' +" Plugin 'metakirby5/codi.vim' +" Plugin 'vim-scripts/tagexplorer.vim' +" Plugin 'MattesGroeger/vim-bookmarks' +" Plugin 'severin-lemaignan/vim-minimap' +" Plugin 'ervandew/supertab' +" Plugin 'Valloric/ListToggle' +" Plugin 'neomake/neomake' +" Plugin 'scrooloose/syntastic' +" Plugin 'Yggdroot/hiPairs' +" Plugin 'maxbrunsfeld/vim-yankstack' +" Plugin 'gcmt/wildfire.vim' +" Plugin 'luochen1990/rainbow' +call vundle#end() +filetype plugin indent on + +let g:gfm_syntax_enable_always = 0 +let g:gfm_syntax_enable_filetypes = ['markdown.gfm'] +autocmd BufRead,BufNew,BufNewFile README.md setlocal ft=markdown.gfm + +"jellybeans +silent! colo jellybeans +set background=dark +let g:jellybeans_overrides = { +\ 'Todo': { 'guifg': '000000', 'guibg': '00cc00', +\ 'ctermfg': 'Black', 'ctermbg': 'Blue', +\ 'attr': 'bold' }, +\ 'Comment': { 'guifg': '339966' }, +\ 'background': { "guibg": "000000", "ctermbg":"none"}, +\ 'StorageClass': {"guifg": '9966ff' }, +\ 'Exception': {"guifg": "99cc00"}, +\ "Ignore": {"guifg": "336699"}, +\ "SpecialComment": {"guifg": "009900"}, +\ "Macro": {"guifg": "0099cc"} +\} +let g:jellybeans_use_term_italics = 1 + +"Disable Background Color Erase (BCE) so that color schemes +"work properly when Vim is used inside tmux and GNU screen. +if &term =~ '256color' + set t_ut= +endif + +let g:cpp_class_scope_highlight = 1 +let g:cpp_member_variable_highlight = 1 +let g:cpp_class_decl_highlight = 1 +let g:cpp_experimental_template_highlight = 1 +let g:cpp_concepts_highlight = 1 +let g:cpp_posix_standard = 1 + +hi Normal ctermbg=None + +function! s:shortenPath(path) + let l:result = [] + let l:segments = split(a:path, "/") + if len(l:segments) - 1 > 0 + let l:last_segment = l:segments[len(l:segments)-1] + for segment in l:segments + if l:segment == l:last_segment + call add(l:result, "/".l:segment) + else + call add(l:result, "/".l:segment[0]) + endif + endfor + else + let l:result = ["none"] + endif + return join(l:result, "") +endfunction + +"airline options +let g:airline_powerline_fonts = 1 +let s:airline_custom_cwd = s:shortenPath(expand('%:p')) +try + let g:airline#extensions#tabline#enabled = 1 + let g:airline#extensions#tabline#left_sep = ' ' + let g:airline#extensions#tabline#left_alt_sep = '|' + let g:airline#extensions#tabline#formatter = 'default' + let g:airline#extensions#ale#enabled = 1 + let g:airline#extensions#branch#enabled = 1 + let g:airline#extensions#xkblayout#enabled = 1 +catch +endtry +let g:airline_theme = 'jellybeans' +function! Airline_Custom() + let l:spc = g:airline_symbols.space + let g:airline_section_z = airline#section#create([ + \ 'windowswap', + \ s:shortenPath(getcwd())."  ", + \ '%3p%%'.l:spc, + \ 'linenr', + \ ':%3v'.l:spc, + \ '%5o', + \ '[%b][0x%B]' + \]) +endfunction +autocmd user AirlineAfterInit call Airline_Custom() +let g:XkbSwitchLib = '/usr/local/lib/libxkbswitch.so' +let g:airline_exclude_preview = 1 + +syntax on + +"n00b stuff +nmap +nmap +nmap +nmap +nmap +nmap +nmap +nmap + +" imap +" imap +imap +imap +imap +imap +imap +imap +"end of n00b stuff + +au BufRead,BufNewFile .i3blocks.conf set filetype=i3blocks +au BufRead,BufNewFile *.zsh-theme set filetype=zsh +au BufEnter,FileType cpp set syntax=cpp.doxygen +au BufEnter,FileType c set syntax=cpp.doxygen +"sets filetype for muttrc to neomuttrc not muttrc since i'm too lazy +"to be bothered to change the name of my rc that i pass to neomutt +au BufNewFile,BufRead .muttrc set filetype=neomuttrc +au BufNewFile,BufRead,BufEnter *.toml set filetype=toml + +au BufNewFile,BufEnter *.s set ft=nasm +au BufEnter,FileType *.wast set syntax=wast +au BufEnter,FileType *.wat set syntax=wast +au BufEnter,FileType *.uml set syntax=plantuml + +"python configs +"PEP-8 +au BufNewFile,BufEnter *.py set tabstop=4 +au BufNewFile,BufEnter *.py set softtabstop=4 +au BufNewFile,BufEnter *.py set shiftwidth=4 +" au BufNewFile,BufEnter *.py set textwidth=79 +au BufNewFile,BufEnter *.py set expandtab +au BufNewFile,BufEnter *.py set autoindent +au BufNewFile,BufEnter *.py set fileformat=unix + +let python_highlight_all = 1 + +"mapping fast keycodes +"the key codes are for my build of st +set timeoutlen=500 ttimeoutlen=100 +"Shift+F10 +set =[21;2~ +map +map! +"Shift+F9 +set =[20;2~ +map +map! +"Shift+F5 +set =[15;2~ +map +map! +"Shift+F1 +set = +map +map! +"Shift+F2 +set = +map +map! +"Shift+F11 +set =[23;2~ +map +map! +"Shift+F12 +set =[24;5~ +map +map! +"Ctrl+Del +set =[3;5~ +map +map! +"Ctrl+Ins +set =[2;5~ +map +map! +"Ctrl+PageDown +set =[6;5~ +map +map! +"Ctrl+PageUp +set =[5;5~ +map +map! +"Shift+Del +set =[3;2~ +map +map! + +"cnoremap help vert help +map (expand_region_shrink) +map (expand_region_expand) +nnoremap :bp +nnoremap :bn +inoremap :bp +inoremap :bn +map w :w +noremap :q +nnoremap :NERDTreeToggle +nnoremap :UndotreeToggle +nnoremap :vsp +nnoremap :sp +nnoremap :ContextToggle +map :TagbarToggle +augroup LatexAU + autocmd! + autocmd filetype tex map :VimtexTocToggle +augroup END +"reserved for tmux use +map +"messes up some other bindings +"nmap Y y$ +nnoremap :bd +nnoremap c :call clearmatches() +inoremap I +inoremap A +nnoremap t :bel term +"execute current buffer +nnoremap r :!%:p +augroup GoLangRun + autocmd! + autocmd FileType go nmap r (go-run) +augroup end +nnoremap cd :cd %:p:h +"terminal vim wont do weird things when you paste things in +set pastetoggle= +nnoremap a :ALEToggle +nnoremap u :GutentagsUpdate +nnoremap v :VimtexView + +nmap [q :col +nmap ]q :cnew +nmap [l :lol +nmap ]l :lnew +nmap ]c :cn +nmap [c :cp + +function! GetBufferList() + redir =>buflist + silent! ls! + redir END + return buflist +endfunction + +function! ToggleList(bufname, pfx) + let buflist = GetBufferList() + for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))') + if bufwinnr(bufnum) != -1 + exec(a:pfx.'close') + return + endif + endfor + if a:pfx == 'l' && len(getloclist(0)) == 0 + echohl ErrorMsg + echo "Location List is Empty." + return + endif + let winnr = winnr() + exec(a:pfx.'open') + if winnr() != winnr + wincmd p + endif +endfunction + +nmap l :call ToggleList("Location List", 'l') +nmap q :call ToggleList("Quickfix List", 'c') + +" nmap :wincmd k +" nmap :wincmd j +" nmap :wincmd h +" nmap :wincmd l + +"vim-tmux-navigator +" let g:tmux_navigator_no_mappings = 1 +" let g:tmux_navigator_disable_when_zoomed = 1 +" let g:tmux_navigator_save_on_switch = 2 + +" nnoremap :TmuxNavigateLeft +" nnoremap :TmuxNavigateDown +" nnoremap :TmuxNavigateUp +" nnoremap :TmuxNavigateRight +" nnoremap {Previous-Mapping} :TmuxNavigatePrevious + +"vim.session options +let g:session_directory = "~/.vim/session" +let g:session_autosave = "no" + +" NERDTree +let g:NERDTreeGitStatusIndicatorMapCustom = { + \ "Modified" : "✹", + \ "Staged" : "✚", + \ "Untracked" : "✭", + \ "Renamed" : "➜", + \ "Unmerged" : "═", + \ "Deleted" : "✖", + \ "Dirty" : "✗", + \ "Clean" : "✔︎", + \ 'Ignored' : '☒', + \ "Unknown" : "?" + \ } +"NERDTree File highlighting +function! NERDTreeHighlightFile(extension, fg, bg) + exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg + exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*\.'. a:extension .'$#' +endfunction + +augroup NerdTreeFileTypeHighlight + autocmd! + exec 'autocmd filetype nerdtree highlight csource ctermbg=none ctermfg=29' + exec 'autocmd filetype nerdtree syn match csource #^\s\+.*\.c$#' + exec 'autocmd filetype nerdtree highlight makef1 ctermbg=none ctermfg=98' + exec 'autocmd filetype nerdtree syn match makef1 #^\s\+.*makefile$#' + exec 'autocmd filetype nerdtree syn match makef1 #^\s\+.*Makefile$#' +augroup END +call NERDTreeHighlightFile('o', 146, 'none') +call NERDTreeHighlightFile('a', 146, 'none') +call NERDTreeHighlightFile('h', 29, 'none') +call NERDTreeHighlightFile('cpp', 32, 'none') +call NERDTreeHighlightFile('cc', 32, 'none') +call NERDTreeHighlightFile('hpp', 32, 'none') +call NERDTreeHighlightFile('makefile', 98, 'none') +call NERDTreeHighlightFile('Makefile', 98, 'none') +call NERDTreeHighlightFile('md', 27, 'none') +call NERDTreeHighlightFile('yml', 27, 'none') +call NERDTreeHighlightFile('config', 25, 'none') +call NERDTreeHighlightFile('conf', 25, 'none') +call NERDTreeHighlightFile('cfg', 25, 'none') +call NERDTreeHighlightFile('json', 25, 'none') +call NERDTreeHighlightFile('html', 23, 'none') +call NERDTreeHighlightFile('py', 22, 'none') +call NERDTreeHighlightFile('js', 202, 'none') +call NERDTreeHighlightFile('lua', 39, 'none') +call NERDTreeHighlightFile('sh', 63, 'none') +call NERDTreeHighlightFile('make', 29, 'none') +call NERDTreeHighlightFile('xml', 53, 'none') +call NERDTreeHighlightFile('vim', 37, 'none') +call NERDTreeHighlightFile('tex', 106, 'none') +call NERDTreeHighlightFile('pdf', 160, 'none') +call NERDTreeHighlightFile('tags', 75, 'none') +call NERDTreeHighlightFile('ahk', 89, 'none') +call NERDTreeHighlightFile('vimrc', 70, 'none') +call NERDTreeHighlightFile('hs', 63, 'none') +call NERDTreeHighlightFile('go', 33, 'none') +call NERDTreeHighlightFile('txt', 131, 'none') +call NERDTreeHighlightFile('uml', 69, 'none') +call NERDTreeHighlightFile('so', 146, 'none') +call NERDTreeHighlightFile('swp', 58, 'none') + +let NERDTreeDirArrows = 1 +let NERDTreeShowHidden=1 +highlight Directory ctermfg=28 +highlight Title ctermfg=36 +let NERDTreeShowLineNumbers = 1 +autocmd Filetype nerdtree setlocal relativenumber +let g:DevIconsEnableFoldersOpenClose = 1 +let g:WebDevIconsUnicodeDecorateFolderNodes = 1 +let g:WebDevIconsOS = 'unix' + +"tagbar +let g:tagbar_compact = 1 +let g:tagbar_show_linenumbers = 2 +let g:tagbar_width = 50 +highlight TagbarSignature ctermfg=DarkBlue +"solidity ctags - by shuangjj +let g:tagbar_type_solidity = { + \ 'ctagstype': 'solidity', + \ 'kinds' : [ + \ 'c:contracts', + \ 'e:events', + \ 'f:functions', + \ 'm:mappings', + \ 'v:varialbes', + \ ] + \ } + +let g:tagbar_type_haskell = { + \ 'ctagsbin' : '/home/bloodstalker/.cabal/bin/hasktags', + \ 'ctagsargs' : '-x -c -o-', + \ 'kinds' : [ + \ 'm:modules:0:1', + \ 'd:data: 0:1', + \ 'd_gadt: data gadt:0:1', + \ 't:type names:0:1', + \ 'nt:new types:0:1', + \ 'c:classes:0:1', + \ 'cons:constructors:1:1', + \ 'c_gadt:constructor gadt:1:1', + \ 'c_a:constructor accessors:1:1', + \ 'ft:function types:1:1', + \ 'fi:function implementations:0:1', + \ 'i:instance:0:1', + \ 'o:others:0:1' + \ ], + \ 'sro' : '.', + \ 'kind2scope' : { + \ 'm' : 'module', + \ 'c' : 'class', + \ 'd' : 'data', + \ 't' : 'type', + \ 'i' : 'instance' + \ }, + \ 'scope2kind' : { + \ 'module' : 'm', + \ 'class' : 'c', + \ 'data' : 'd', + \ 'type' : 't', + \ 'instance' : 'i' + \ } + \ } + +let g:tagbar_type_javascript = { + \ 'ctagstype': 'javascript', + \ 'kinds': [ + \ 'A:arrays', + \ 'P:properties', + \ 'T:tags', + \ 'O:objects', + \ 'G:generator functions', + \ 'F:functions', + \ 'C:constructors/classes', + \ 'M:methods', + \ 'V:variables', + \ 'I:imports', + \ 'E:exports', + \ 'S:styled components' + \ ]} + +"doxygentoolkit +autocmd BufNewFile,BufRead,BufEnter *.sol let g:DoxygenToolkit_briefTag_pre="@dev " + +"open-pdf conf +let g:pdf_convert_on_edit = 1 +let g:pdf_convert_on_read = 1 + +"startify +let g:session_autoload="no" + +"highlight groups +hi def InterestingWord1 ctermfg=16 ctermbg=214 +hi def InterestingWord2 ctermfg=16 ctermbg=154 +hi def InterestingWord3 ctermfg=16 ctermbg=121 +hi def InterestingWord4 ctermfg=16 ctermbg=137 +hi def InterestingWord5 ctermfg=16 ctermbg=211 +hi def InterestingWord6 ctermfg=16 ctermbg=195 +hi def InterestingWord7 ctermfg=16 ctermbg=99 +hi def InterestingWord8 ctermfg=16 ctermbg=35 +hi def InterestingWord9 ctermfg=16 ctermbg=57 +hi def InterestingWord0 ctermfg=16 ctermbg=39 + +"Steve Losh's highlight function +function HighInterestingWord(n) + normal! mz + normal! "zyiw + let mid = 88888 + a:n + silent! call matchdelete(mid) + let pat = '\V\<' . escape(@z, '\') . '\>' + call matchadd("InterestingWord".a:n, pat, 1, mid) + normal! `z +endfunction + +"multiple highlights +nnoremap 1 :call HighInterestingWord(1) +nnoremap 2 :call HighInterestingWord(2) +nnoremap 3 :call HighInterestingWord(3) +nnoremap 4 :call HighInterestingWord(4) +nnoremap 5 :call HighInterestingWord(5) +nnoremap 6 :call HighInterestingWord(6) +nnoremap 7 :call HighInterestingWord(7) +nnoremap 8 :call HighInterestingWord(8) +nnoremap 9 :call HighInterestingWord(9) +nnoremap 0 :call HighInterestingWord(0) + +"scratchpad +let g:scratchpad_path = '.scratchpads' +nmap (ToggleScratchPad) + +let g:tagbar_type_rust = { + \ 'ctagstype' : 'rust', + \ 'kinds' : [ + \'T:types,type definitions', + \'f:functions,function definitions', + \'g:enum,enumeration names', + \'s:structure names', + \'m:modules,module names', + \'c:consts,static constants', + \'t:traits', + \'i:impls,trait implementations', + \] + \} + +let g:tagbar_type_make = { + \ 'kinds':[ + \ 'm:macros', + \ 't:targets' + \ ] +\} + +let g:tagbar_type_go = { + \ 'ctagstype' : 'go', + \ 'kinds' : [ + \ 'p:package', + \ 'i:imports:1', + \ 'c:constants', + \ 'v:variables', + \ 't:types', + \ 'n:interfaces', + \ 'w:fields', + \ 'e:embedded', + \ 'm:methods', + \ 'r:constructor', + \ 'f:functions' + \ ], + \ 'sro' : '.', + \ 'kind2scope' : { + \ 't' : 'ctype', + \ 'n' : 'ntype' + \ }, + \ 'scope2kind' : { + \ 'ctype' : 't', + \ 'ntype' : 'n' + \ }, + \ 'ctagsbin' : 'gotags', + \ 'ctagsargs' : '-sort -silent' +\ } + +let g:tagbar_type_json = { + \ 'ctagstype' : 'json', + \ 'kinds' : [ + \ 'o:objects', + \ 'a:arrays', + \ 'n:numbers', + \ 's:strings', + \ 'b:booleans', + \ 'z:nulls' + \ ], + \ 'sro' : '.', + \ 'scope2kind': { + \ 'object': 'o', + \ 'array': 'a', + \ 'number': 'n', + \ 'string': 's', + \ 'boolean': 'b', + \ 'null': 'z' + \ }, + \ 'kind2scope': { + \ 'o': 'object', + \ 'a': 'array', + \ 'n': 'number', + \ 's': 'string', + \ 'b': 'boolean', + \ 'z': 'null' + \ }, + \ 'sort' : 0 + \ } + +let g:autofmt_autosave = 1 + +"undotree +"make sure to create the directory. vim wont do it itself +set undolevels=1000 +if has("persistent_undo") + set undodir=~/.undodir/ + set undofile +endif +let g:undotree_WindowLayout = 4 + +"narrow region +let g:nrrw_rgn_vert = 1 +let g:nrrw_rgn_resize_window = "relative" +vnoremap :NR + +"runs shell command, opens new buffer with syntax=nasm, prints command output +command! -complete=shellcmd -nargs=+ Shell call s:RunShellCommand() +function! s:RunShellCommand(cmdline) + echo a:cmdline + let expanded_cmdline = a:cmdline + for part in split(a:cmdline, ' ') + if part[0] =~ '\v[%#<]' + let expanded_part = fnameescape(expand(part)) + let expanded_cmdline = substitute(expanded_cmdline, part, expanded_part, '') + endif + endfor + botright vnew + setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap + call setline(3,substitute(getline(2),'.','=','g')) + execute '$read !'. expanded_cmdline + setlocal nomodifiable + set syntax=nasm + 1 +endfunction +"vmap call RunShellCommand + +"by xolox +function! s:get_visual_selection() + let [line_start, column_start] = getpos("'<")[1:2] + let [line_end, column_end] = getpos("'>")[1:2] + let lines = getline(line_start, line_end) + if len(lines) == 0 + return '' + endif + let lines[-1] = lines[-1][: column_end - (&selection == 'inclusive' ? 1 : 2)] + let lines[0] = lines[0][column_start - 1:] + return join(lines, "\n") +endfunction + +let s:compiler_explorer_std_c_hdrs = ["#include \r", "#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r"] +let s:compiler_explorer_std_cpp_hdrs = ["#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r", + \"#include \r","#include \r","#include \r","#include \r"] +"sends visual selection to compiler exlorer and gets the asm back + +"should probably change this to be the complete path and make the variable +"glboal +let s:compiler_explorer_config="/ceconfig.json" +function! s:compiler_explorer() + let temp_file = tempname() + if &filetype == "c" + call writefile(s:compiler_explorer_std_c_hdrs, temp_file, "a") + elseif &filetype == "cpp" + call writefile(s:compiler_explorer_std_cpp_hdrs, temp_file, "a") + endif + + let source_code = s:get_visual_selection() + call writefile(split(substitute(source_code, "\n", "\r", "g"), "\r"), temp_file, "a") + let current_buf_name = bufname("%") + botright vnew + setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap + call setline(3,substitute(getline(2),'.','=','g')) + execute "$read!"."node"." "."~/scripts/compiler-explorer/main.js ".temp_file. " ". getcwd(0).s:compiler_explorer_config + setlocal nomodifiable + set syntax=nasm + 1 +endfunction +command! -complete=shellcmd -nargs=0 CompilerExplorer call s:compiler_explorer() +vmap :CompilerExplorer + +"view the python docs for the word under cursor in a split window +function! s:pythondoc() + let l:vword = expand("") + botright vnew + setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap + execute ".!pydoc3 " . l:vword + setlocal nomodifiable + set syntax=man + 1 +endfunction +command! -complete=shellcmd -nargs=0 PythonDoc call s:pythondoc() +nnoremap h :PythonDoc +vnoremap h :PythonDoc + +"ctrlp +let g:ctrlp_map = '' +let g:ctrlp_cmd = 'CtrlP' +let g:ctrlp_show_hidden = 1 +let g:ctrlp_root_markers = ['.root'] +if executable('rg') + set grepprg=rg\ --color=never + let g:ctrlp_user_command = 'rg %s --files --color=never --glob ""' + let g:ctrlp_use_caching = 0 +endif + +"supertab +" let g:SuperTabSetDefaultCompletionType = "context" + +"snippets +nnoremap ,cmain :1read $HOME/scripts/snippets/cmain.c +nnoremap ,cppmain :1read $HOME/scripts/snippets/cppmain.cpp +nnoremap ,pypy :1read $HOME/scripts/snippets/main.py +nnoremap ,sh :1read $HOME/scripts/snippets/shebang.sh + +"highlights +highlight Search ctermfg=White ctermbg=28 cterm=Bold +highlight IncSearch ctermfg=White ctermbg=26 cterm=Bold +highlight WildMenu ctermfg=15 ctermbg=22 cterm=Bold +highlight CtrlSpaceStatus ctermfg=15 ctermbg=38 +highlight StatusLine ctermfg=16 ctermbg=22 cterm=bold +highlight WarningMsg ctermbg=16 ctermfg=202 +highlight vimWarn ctermbg=16 ctermfg=202 +highlight vimBufnrWarn ctermbg=16 ctermfg=202 +" highlight airline_tabtype ctermbg=15 ctermfg=34 + +"typos +iab strign string +iab pritn print +iab retrun return +iab return return +iab fucntion function +iab funciton function +iab tehn then +iab coutn count +iab accoutn account +iab applciation application + +"netrw +let g:netrw_sort_by = 'date' +let g:netrw_sort_direction = 'reverse' +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 1 +let g:netrw_winsize = 15 +let g:netrw_fastbrowse = 1 +let g:netrw_sort_by = 'name' +let g:netrw_sort_direction = 'normal' + +"vimcompletesme +let g:vcm_default_maps = 0 +autocmd FileType c,cpp let b:vcm_tab_complete = "omni" +autocmd FileType lua let b:vcm_tab_complete = "omni" +autocmd FileType python let b:vcm_tab_complete = "omni" +autocmd FileType javasript let b:vcm_tab_complete = "omni" + +"sets the dictionary for autocompletion with and for the +"filetypes +set dictionary+=/usr/share/dict/words +autocmd FileType markdown,text,vimwiki,tex setlocal complete+=k + +"fzf +map f :Files! +let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.7 } } +let g:fzf_colors = +\ { 'fg': ['fg', 'Normal'], + \ 'bg': ['bg', 'Normal'], + \ 'hl': ['fg', 'Comment'], + \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], + \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], + \ 'hl+': ['fg', 'Statement'], + \ 'info': ['fg', 'PreProc'], + \ 'border': ['fg', 'Ignore'], + \ 'prompt': ['fg', 'Conditional'], + \ 'pointer': ['fg', 'Exception'], + \ 'marker': ['fg', 'Keyword'], + \ 'spinner': ['fg', 'Label'], + \ 'header': ['fg', 'Comment'] } + +"asterisk.vim, is.vim, incsearch.vim, edgemotion +map * (asterisk-*) +map # (asterisk-#) +map g* (asterisk-g*) +map g# (asterisk-g#) +map z* (asterisk-z*) +map gz* (asterisk-gz*) +map z# (asterisk-z#) +map gz# (asterisk-gz#) +map / (incsearch-forward) +map ? (incsearch-backward) +map g/ (incsearch-stay) +" map (edgemotion-j) +" map (edgemotion-k) + +let g:semanticTermColors = [27,33,2,3,4,5,6,7,25,9,10,34,12,13,14,15,16,125,124,19] + +"camelcase and snakecase motions +"let g:camelchar = "A-Z" +"let g:camelchar = "A-Z0-9" +let g:camelchar = "A-Z0-9.,;:{([`'\"_" +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +vnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW')v`>o +vnoremap `>:call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W')v` +inoremap ' '' +inoremap ` `` +inoremap ( () +inoremap [ [] +inoremap { {} +inoremap { {}O +inoremap {; {};O + +"ultisnips +let g:UltiSnipsExpandTrigger="" +" let g:UltiSnipsListSnippets="" +let g:UltiSnipsJumpForwardTrigger="" +let g:UltiSnipsJumpBackwardTrigger="" + +"ycm +" let g:ycm_auto_hover = "" +nnoremap jc :YcmCompleter GoToDeclaration +nnoremap jf :YcmCompleter GoToDefinition +nnoremap jr :YcmCompleter GoToReferences +nnoremap ji :YcmCompleter GoToInclude +nnoremap jj :YcmCompleter GoTo +nnoremap jt :YcmCompleter GoToType +nnoremap gt :YcmCompleter GetType +nnoremap gd :YcmCompleter GetDoc +nnoremap rr :YcmCompleter RefactorRename +nmap D (YCMHover) +let g:ycm_collect_identifiers_from_tags_files = 1 +let g:ycm_seed_identifiers_with_syntax = 1 + +augroup YCMDocCFam + autocmd! + autocmd FileType c,cpp let b:ycm_hover = { + \ 'command': 'GetDoc', + \ 'syntax': &filetype + \ } +augroup END +augroup YCMDocJS + autocmd! + autocmd FileType javascript let b:ycm_hover = { + \ 'command': 'GetDoc', + \ 'syntax': &filetype + \ } +augroup END +augroup YCMDocPy + autocmd! + autocmd FileType python let b:ycm_hover = { + \ 'command': 'GetDoc', + \ 'syntax': &filetype + \ } +augroup END +augroup YCMDocGo + autocmd! + autocmd FileType go let b:ycm_hover = { + \ 'command': 'GetDoc', + \ 'syntax': &filetype + \ } +augroup END + +let g:ycm_language_server = [ + \ {'name': 'vim', + \ 'filetypes': [ 'vim' ], + \ 'cmdline': [ 'vim-language-server', '--stdio' ] + \ }, + \ { + \ 'name': 'bash', + \ 'cmdline': [ 'bash-language-server' , 'start' ], + \ 'filetypes': [ 'sh', 'bash' ], + \ }, + \] + +let g:qs_highlight_on_keys = ["f", "F", "t", "T"] + +let g:git_messenger_always_into_popup=v:true +nmap gg :call setbufvar(winbufnr(popup_atcursor(split(system("git log -n 1 -L " . line(".") . ",+1:" . expand("%:p")), "\n"), { "padding": [1,1,1,1], "pos": "botleft", "wrap": 0 })), "&filetype", "git") + +"vim-haskell +let g:haskell_enable_quantification = 1 +let g:haskell_enable_recursivedo = 1 +let g:haskell_enable_arrowsyntax = 1 +let g:haskell_enable_pattern_synonyms = 1 +let g:haskell_enable_typeroles = 1 +let g:haskell_enable_static_pointers = 1 +let g:haskell_backpack = 1 +let g:haskell_disable_TH = 0 + +"vim-markdown +let g:vim_markdown_strikethrough = 1 + +"keeps track of the cursor in insert mode, pull it back by one so it appears +"not to move when exiting insert +let CursorColumnI = 0 +autocmd InsertEnter * let CursorColumnI = col('.') +autocmd CursorMovedI * let CursorColumnI = col('.') +autocmd InsertLeave * if col('.') != CursorColumnI | call cursor(0, col('.')+1) | endif + +"window resizing +if bufwinnr(1) + nnoremap > + nnoremap < + nnoremap - + nnoremap + +endif + +"Tab navigation +nnoremap :tabprevious +nnoremap :tabnext +nnoremap :tabnew +nnoremap :tabclose +inoremap :tabprevious +inoremap :tabnext +inoremap :tabnew +inoremap :tabclose + +"copy and paste between different Vim instances +nmap _Y :!echo ""> ~/.vi_tmp:w! ~/.vi_tmp +vmap _Y :w! ~/.vi_tmp +nmap _P :r ~/.vi_tmp + +"gutentags +let g:gutentags_generate_on_empty_buffer = 1 +let g:gutentags_plus_nomap = 1 + +"run Vman for the word under the cursor +map v (Vman) +autocmd Filetype man setlocal relativenumber + +"context +let g:context_enabled = 0 +let g:context_add_mappings = 0 +let g:context_presenter = 'vim-popup' + +augroup AUSpell + autocmd! + autocmd FileType markdown,txt,vimwiki,tex set spell +augroup END + +nnoremap b :Make +command -nargs=* Make call s:make() + +let s:making = 0 +function s:make(args) abort + if s:making + if bufwinid(s:make_buf) == -1 + "show making buffer + exe 'sbuffer' s:make_buf + wincmd p + else + "hide making buffer + exe printf('%d wincmd q', bufwinnr(s:make_buf)) + endif + return + endif + + "delete last result + if exists('s:make_buf') && bufexists(s:make_buf) + silent! exe 'bdelete' s:make_buf + endif + + "spawn new make + let cmd = 'make' + if !empty(a:args) + let cmd.= ' ' . a:args + endif + + let options = {'close_cb': function('s:make_callback'), 'term_rows': 10} + let s:make_buf = term_start(cmd, options) + let s:making = 1 + wincmd p +endfunction + +function s:make_callback(channel) + "look, you can not get buffer content directly here. + call timer_start(10, function('s:make_callback_impl')) +endfunction + +function s:make_callback_impl(timer) abort + exe 'cgetbuffer' s:make_buf + "consider entry with num zero bufnr and lnum an error or warning + let qfl = filter(getqflist(), {k,v -> v.bufnr != 0 && v.lnum != 0}) + if empty(qfl) + echo "make successful" + else + echohl WarningMsg + echom printf('found %d qf entries', len(qfl)) + echohl None + endif + let s:making = 0 +endfunction + +"arpeggio mappings +try + call arpeggio#map('i', '', 0, 'jk', '') +catch +endtry + +let g:limelight_conceal_ctermfg = 240 +let g:limelight_default_coefficient = 0.7 +let g:limelight_paragraph_span = 1 + +let g:goyo_width = 120 +let g:goyo_height = 85 + +nnoremap ss :SignifyToggleHighligh +let g:startify_files_number = 20 +let g:startify_custom_header = 'startify#pad(startify#fortune#boxed())' + +"ale +let g:ale_linters_explicit = 1 +let g:ale_completion_enabled = 0 +let g:ale_warn_about_trailing_whitespace = 0 +let g:ale_disable_lsp = 1 +let g:ale_change_sign_column_color = 1 +let g:ale_fix_on_save = 1 +let g:ale_sign_column_always = 1 +augroup ALEJS + autocmd! + autocmd FileType javascript let b:ale_linters = {'javascript': ['eslint']} + autocmd FileType javascript let b:ale_fixers = {'javascript': ['prettier']} +augroup END +augroup ALEPY + autocmd! + autocmd FileType python let b:ale_linters = {'python': ['flake8']} + autocmd FileType python let b:ale_fixers = {'python': ['autopep8']} +augroup END + +"latex +let g:tex_flavor = 'latex' +let g:vimtex_matchparen_enabled = 0 +let g:vimtex_view_method = 'zathura' + +"indent guide +let g:indent_guides_guide_size = 1 +let g:indent_guides_start_level = 2 +let g:indent_guides_tab_guides = 0 +let g:indent_guides_enable_on_vim_startup = 1 +let g:indent_guides_exclude_filetypes = ['help', 'nerdtree', 'man', 'vimwiki', 'go'] +let g:indent_guides_default_mapping = 0 + +"ctrlspace +if executable("rg") + let g:CtrlSpaceGlobCommand = 'rg -l --color never -g ""' +endif +hi CtrlSpaceNormal ctermfg=36 ctermbg=NONE +hi CtrlSpaceSelected ctermbg=27 ctermfg=15 +hi CtrlSpaceSearch ctermfg=25 ctermbg=NONE +hi CtrlSpaceStatusLine ctermfg=99 ctermbg=NONE cterm=bold + +"vim-go +let g:go_auto_sameids = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_function_calls = 1 +let g:go_highlight_types = 1 +let g:go_highlight_operators = 1 +let g:go_highlight_function_parameters = 1 +" let g:go_highlight_variable_declarations = 1 +" let g:go_highlight_variable_assignments = 1 +let g:go_doc_popup_window = 1 +let g:go_code_completion_enabled = 0 + +"easymotion +hi EasyMotionTarget ctermbg=none ctermfg=22 cterm=bold +hi EasyMotionShade ctermbg=none ctermfg=darkgrey +hi EasyMotionTarget2First ctermbg=none ctermfg=33 cterm=bold +hi EasyMotionTarget2Second ctermbg=none ctermfg=39 cterm=bold +hi EasyMotionMoveHL ctermbg=green ctermfg=black +hi EasyMotionIncSearch ctermbg=green ctermfg=black + +"maximizer +let g:maximizer_set_default_mapping = 0 +nnoremap z :MaximizerToggle! +vnoremap z :MaximizerToggle!gv +inoremap z :MaximizerToggle! + +"pgsql +let g:sql_type_default = 'pgsql' +let b:sql_type_override='pgsql' | set ft=sql +let g:pgsql_pl = ['python'] + +" uses " register to keep last cursor position in buffers +autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' + \ | exe "normal! g`\"" + \ | endif + +"checkbashism +if executable("checkbashisms") + autocmd FileType sh compiler checkbashisms +endif +let g:checkbashisms_cwindow = 1 +let g:checkbashisms_onwrite = 1 + +"css +augroup VimCSS3Syntax + autocmd! + autocmd FileType css setlocal iskeyword+=- +augroup END + +if has('cscope') + set cscopetag cscopeverbose + + if has('quickfix') + set cscopequickfix=s-,c-,d-,i-,t-,e- + endif + + cnoreabbrev csa ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa') + cnoreabbrev csf ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf') + cnoreabbrev csk ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk') + cnoreabbrev csr ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr') + cnoreabbrev css ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css') + cnoreabbrev csh ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh') + + command -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src +endif + +"this should be here at the end so nothing else could override it +hi SpecialKey ctermbg=16 +hi Pmenu ctermbg=233 +hi SignColumn ctermbg=16 diff --git a/.vimshrc b/.vimshrc new file mode 100644 index 0000000..f5a19b2 --- /dev/null +++ b/.vimshrc @@ -0,0 +1,10 @@ +alias ll="ls -l" +alias lss="ls -sa" +alias la="ls -a" +alias clean="clear" +alias quit="exit" +alias ..="cd .." +alias ...="cd ../.." +alias ....="cd ../../.." +alias .....="cd ../../../.." +alias ......="cd ../../../../.." diff --git a/.w3m/build.sh b/.w3m/build.sh new file mode 100644 index 0000000..5b68f06 --- /dev/null +++ b/.w3m/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -x +set -e + +cd ~ && git clone https://github.com/tats/w3m && cd w3m && ./configure --with-ssl && sudo make install -j4 diff --git a/.w3m/cgi-bin/fzf_surfraw.cgi b/.w3m/cgi-bin/fzf_surfraw.cgi new file mode 100755 index 0000000..de297c1 --- /dev/null +++ b/.w3m/cgi-bin/fzf_surfraw.cgi @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOVAL'| fzf --algo=v2 -e | awk '{print $1}') +if [ "$PREFIX" = "" ]; then exit;fi +read -r -e -p " $PREFIX >>> Enter The Search Keyword: " INPUT +surfraw -p "$PREFIX" "$INPUT" | xsel -p diff --git a/.w3m/cgi-bin/fzf_surfraw_tmux.cgi b/.w3m/cgi-bin/fzf_surfraw_tmux.cgi new file mode 100755 index 0000000..11516fd --- /dev/null +++ b/.w3m/cgi-bin/fzf_surfraw_tmux.cgi @@ -0,0 +1,41 @@ +#!/usr/bin/env sh +### _ _ _ _ +### __ _ ___ | |_| |__ | | ___| |_ _ _ +### / _` |/ _ \| __| '_ \| |/ _ \ __| | | | +###| (_| | (_) | |_| |_) | | __/ |_| |_| | +### \__, |\___/ \__|_.__/|_|\___|\__|\__,_| +### |___/ +### https://www.youtube.com/user/gotbletu +### https://lbry.tv/@gotbletu +### https://twitter.com/gotbletu +### https://github.com/gotbletu +### gotbletu@gmail.com +### +### Author : gotbletu +### Name : fzf_surfraw_tmux.cgi +### Version : 0.2 +### Date : 2020-04-27 +### Description : interactive surfraw smart prefix search engine (mainly use within w3m web browser) +### Depends On : surfraw fzf tmux gawk coreutils grep procps-ng +### Video Demo : https://youtu.be/p5NZb8f8AHA +### References : https://github.com/felipesaa/A-vim-like-firefox-like-configuration-for-w3m + +### Setup +# vim ~/.w3m/keymap +# keymap xs COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw_tmux.cgi ; GOTO /usr/lib/w3m/cgi-bin/goto_tmux_clipboard.cgi" +# keymap XS COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw_tmux.cgi ; TAB_GOTO /usr/lib/w3m/cgi-bin/goto_tmux_clipboard.cgi" + +clear + +# select your elvi +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOBAL'| fzf -e | awk '{print $1}') + +# exit script if no elvi is selected (e.g hit ESC) +if [ "$PREFIX" = "" ]; then exit; fi + +# get user input +read -r -e -p " $PREFIX >> Enter Your Search Keyword: " INPUT + +# print proper url and copy to primary clipboard (aka highlighted clipboard) and tmux clipboard +# surfraw -p "$PREFIX" "$INPUT" | xsel -p +pidof tmux >/dev/null && tmux set-buffer "$(surfraw -p "$PREFIX" "$INPUT")" diff --git a/.w3m/cgi-bin/goto_clipboard.cgi b/.w3m/cgi-bin/goto_clipboard.cgi new file mode 100755 index 0000000..34eaa63 --- /dev/null +++ b/.w3m/cgi-bin/goto_clipboard.cgi @@ -0,0 +1,25 @@ +#!/usr/bin/env sh +### __ _ _ +### / _| ___| (_)_ __ ___ ___ __ _ __ _ +###| |_ / _ \ | | '_ \ / _ \/ __|/ _` |/ _` | +###| _| __/ | | |_) | __/\__ \ (_| | (_| | +###|_| \___|_|_| .__/ \___||___/\__,_|\__,_| +### |_| +### https://github.com/felipesaa +### +### Author : felipesaa +### Name : goto_clipboard.cgi +### Version : 0.1 +### Date : 2018-09-30 +### Description : paste and go feature for w3m web browser using system clipboard (aka ctrl+v) +### Depends On : w3m xsel +### Video Demo : https://youtu.be/p5NZb8f8AHA +### Source : https://github.com/felipesaa/A-vim-like-firefox-like-configuration-for-w3m +### Install : put this script in /usr/lib/w3m/cgi-bin/ + +#GOTO url in clipboard in current page. If the clipboard has a +#"non url string/nothing" an blank page is shown. +printf "%s\r\n" "W3m-control: GOTO $(xsel -ob)"; +#delete the buffer (element in history) created between the current page and +#the searched page by calling this script. +printf "W3m-control: DELETE_PREVBUF\r\n" diff --git a/.w3m/cgi-bin/goto_clipboard_primary.cgi b/.w3m/cgi-bin/goto_clipboard_primary.cgi new file mode 100755 index 0000000..a9b208e --- /dev/null +++ b/.w3m/cgi-bin/goto_clipboard_primary.cgi @@ -0,0 +1,28 @@ +#!/usr/bin/env sh +### _ _ _ _ +### __ _ ___ | |_| |__ | | ___| |_ _ _ +### / _` |/ _ \| __| '_ \| |/ _ \ __| | | | +###| (_| | (_) | |_| |_) | | __/ |_| |_| | +### \__, |\___/ \__|_.__/|_|\___|\__|\__,_| +### |___/ +### https://www.youtube.com/user/gotbletu +### https://twitter.com/gotbletu +### https://github.com/gotbletu +### gotbletu@gmail.com +### +### Author : gotbletu +### Name : goto_clipboard_primary.cgi +### Version : 0.1 +### Date : 2020-04-26 +### Description : paste and go feature for w3m web browser using system clipboard (primary aka shift+insert) +### Depends On : w3m xsel +### Video Demo : https://youtu.be/p5NZb8f8AHA +### References : https://github.com/felipesaa/A-vim-like-firefox-like-configuration-for-w3m +### Install : put this script in /usr/lib/w3m/cgi-bin/ + +#GOTO url in clipboard in current page. If the clipboard has a +#"non url string/nothing" an blank page is shown. +printf "%s\r\n" "W3m-control: GOTO $(xsel -op)"; +#delete the buffer (element in history) created between the current page and +#the searched page by calling this script. +printf "W3m-control: DELETE_PREVBUF\r\n" diff --git a/.w3m/cgi-bin/goto_tmux_clipboard.cgi b/.w3m/cgi-bin/goto_tmux_clipboard.cgi new file mode 100755 index 0000000..fe91b57 --- /dev/null +++ b/.w3m/cgi-bin/goto_tmux_clipboard.cgi @@ -0,0 +1,28 @@ +#!/usr/bin/env sh +### _ _ _ _ +### __ _ ___ | |_| |__ | | ___| |_ _ _ +### / _` |/ _ \| __| '_ \| |/ _ \ __| | | | +###| (_| | (_) | |_| |_) | | __/ |_| |_| | +### \__, |\___/ \__|_.__/|_|\___|\__|\__,_| +### |___/ +### https://www.youtube.com/user/gotbletu +### https://twitter.com/gotbletu +### https://github.com/gotbletu +### gotbletu@gmail.com +### +### Author : gotbletu +### Name : goto_tmux_clipboard.cgi +### Version : 0.1 +### Date : 2020-04-26 +### Description : paste and go feature for w3m web browser using tmux clipboard +### Depends On : w3m tmux +### Video Demo : https://youtu.be/p5NZb8f8AHA +### References : https://github.com/felipesaa/A-vim-like-firefox-like-configuration-for-w3m +### Install : put this script in /usr/lib/w3m/cgi-bin/ + +#GOTO url in clipboard in current page. If the clipboard has a +#"non url string/nothing" an blank page is shown. +printf "%s\r\n" "W3m-control: GOTO $(tmux paste-buffer)"; +#delete the buffer (element in history) created between the current page and +#the searched page by calling this script. +printf "W3m-control: DELETE_PREVBUF\r\n" diff --git a/.w3m/cgi-bin/restore_session.cgi b/.w3m/cgi-bin/restore_session.cgi new file mode 100755 index 0000000..aa0ba41 --- /dev/null +++ b/.w3m/cgi-bin/restore_session.cgi @@ -0,0 +1,49 @@ +#!/usr/bin/env sh +# AUTHOR: gotbletu (@gmail|twitter|youtube|github|lbry) +# https://www.youtube.com/user/gotbletu +# DESC: generate a script for your last w3m session then you can run script to restore all urls in new tabs +# DEMO: https://youtu.be/qYhNJ3itqWw +# DEPEND: coreutils gawk +# CLOG: 2021-04-17 first draft, no option to jump to tab 1 at the moment +# REQD: 1. Allow executable permissions and put script in ~/.w3m/cgi-bin/restore_session.cgi +# +# 2. Add binding to ~/.w3m/keymap +# +# ############################ Quit with confirmation request (QUIT) +# keymap :q QUIT +# keymap ZZ QUIT +# ############################ Quit at once (EXIT) +# keymap ZQ EXIT +# ############################ Quit at once and save session +# keymap Q COMMAND "EXTERN 'echo %s > ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; READ_SHELL ~/.w3m/cgi-bin/restore_session.cgi ; EXIT" +# +# 3. Add to ~/.bashrc or ~/.zshrc $PATH variable +# [ -d "$HOME/.w3m/bin" ] && PATH="$HOME/.w3m/bin:$PATH" +# +# 4. To load w3m with the last session +# $ w3mlastsession + +## --------------------------------------------- +mkdir -p "$HOME/.w3m/bin" +# location of generated script of last session +RESTORE_SESSSION="$HOME/.w3m/bin/w3mlastsession" +# add shell header +echo "#!/usr/bin/env sh" > "$RESTORE_SESSSION" +echo "torsocks w3m -graph \\" >> "$RESTORE_SESSSION" +# remove dupes without sorting, add -N flag at beginning and append trailing slash to each url +awk '!x[$0]++' "$HOME/.w3m/RestoreSession.txt" | while read -r line ; do echo "-N '$line' \\" >> "$RESTORE_SESSSION" ; done +echo "2>/dev/null" >> "$RESTORE_SESSSION" +chmod +x "$RESTORE_SESSSION" + +## OUTPUT SCRIPT FILE EXAMPLE ~/.w3m/bin/w3mlastsession +## -------------------------------------------------- +## #!/usr/bin/env sh +## w3m \ +## -N 'https://www.reddit.com/r/w3m/.mobile' \ +## -N 'https://www.reddit.com/r/commandline/.mobile' \ +## -N 'https://www.reddit.com/r/linux/.mobile' \ +## -N 'http://lite.cnn.com/en' \ +## -N 'https://raw.githubusercontent.com/tats/w3m/master/ChangeLog' \ +## -N 'https://github.com/gotbletu/shownotes' \ +## 2>/dev/null +## -------------------------------------------------- diff --git a/.w3m/cgi-bin/restore_tab.cgi b/.w3m/cgi-bin/restore_tab.cgi new file mode 100755 index 0000000..27b3316 --- /dev/null +++ b/.w3m/cgi-bin/restore_tab.cgi @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +TAB_RESTORE_LIMIT=30 + +last_tab=$(tail -n 1 ~/.w3m/RestoreTab.txt); +limit=$(tail -n $TAB_RESTORE_LIMIT ~/.w3m/RestoreTab.txt) +other_tabs=$(printf "%s" "$limit" | head -n -1); +printf "%s\r\n" "$other_tabs" > ~/.w3m/RestoreTab.txt; +printf "%s\r\n" "W3m-control: GOTO $last_tab"; +printf "W3m-control: DELETE PREVBUF\r\n"; diff --git a/.w3m/config b/.w3m/config new file mode 100644 index 0000000..eb09d3c --- /dev/null +++ b/.w3m/config @@ -0,0 +1,155 @@ +tabstop 8 +indent_incr 4 +pixel_per_char 9 +pixel_per_line 19 +frame 0 +target_self 0 +open_tab_blank 0 +open_tab_dl_list 0 +display_link 1 +display_link_number 1 +decode_url 0 +display_lineinfo 1 +ext_dirlist 1 +dirlist_cmd file:///$LIB/dirlist.cgi +use_dictcommand 1 +dictcommand file:///$LIB/w3mdict.cgi +multicol 0 +alt_entity 0 +graphic_char 1 +display_borders 1 +fold_textarea 0 +display_ins_del 1 +ignore_null_img_alt 1 +view_unseenobject 1 +display_image 1 +pseudo_inlines 1 +auto_image 1 +max_load_image 4 +ext_image_viewer 0 +image_scale 100 +imgdisplay /usr/libexec/w3m/w3mimgdisplay +image_map_list 0 +fold_line 0 +show_lnum 1 +show_srch_str 1 +label_topline 0 +nextpage_topline 0 +color 1 +basic_color terminal +anchor_color blue +image_color green +form_color red +mark_color cyan +bg_color terminal +active_style 1 +active_color cyan +visited_anchor 1 +visited_color magenta +pagerline 10000 +use_history 1 +history 100 +save_hist 1 +confirm_qq 1 +close_tab_back 0 +mark 0 +emacs_like_lineedit 0 +space_autocomplete 0 +vi_prec_num 0 +mark_all_pages 0 +wrap_search 0 +ignorecase_search 1 +use_mouse 1 +reverse_mouse 0 +relative_wheel_scroll 0 +relative_wheel_scroll_ratio 30 +fixed_wheel_scroll_count 5 +clear_buffer 1 +decode_cte 0 +auto_uncompress 0 +preserve_timestamp 1 +keymap_file keymap +document_root +personal_document_root +cgi_bin /usr/local/libexec/w3m/cgi-bin +index_file +mime_types ~/.w3m/mime.types, /etc/mime.types +mailcap ~/.w3m/mailcap, /etc/w3m/mailcap, /etc/mailcap +urimethodmap ~/.w3m/urimethodmap, /etc/w3m/urimethodmap +editor /bin/vi +mailto_options 1 +mailer gnome-open mailto:%s +extbrowser gnome-open +extbrowser2 +extbrowser3 +extbrowser4 +extbrowser5 +extbrowser6 +extbrowser7 +extbrowser8 +extbrowser9 +bgextviewer 1 +use_lessopen 0 +passwd_file ~/.w3m/passwd +disable_secret_security_check 0 +ftppasswd +ftppass_hostnamegen 0 +pre_form_file ~/.w3m/pre_form +siteconf_file ~/.w3m/siteconf +user_agent +no_referer 0 +accept_language en;q=1.0 +accept_encoding gzip, compress, bzip, bzip2, deflate +accept_media text/html, text/*;q=0.5, image/*, audio/*, application/* +argv_is_url 1 +retry_http 1 +default_url 1 +follow_redirection 10 +meta_refresh 1 +dns_order 0 +nntpserver +nntpmode +max_news 50 +use_proxy 1 +http_proxy +https_proxy +ftp_proxy +no_proxy +noproxy_netaddr 0 +no_cache 0 +ssl_forbid_method +ssl_verify_server 1 +ssl_cert_file +ssl_key_file +ssl_ca_path /etc/pki/tls/certs/ +ssl_ca_file +use_cookie 1 +show_cookie 0 +accept_cookie 1 +accept_bad_cookie 0 +cookie_reject_domains +cookie_accept_domains +cookie_avoid_wrong_number_of_dots +display_charset UTF-8 +document_charset UTF-8 +auto_detect 2 +system_charset UTF-8 +follow_locale 1 +ext_halfdump 0 +use_wide 1 +use_combining 1 +east_asian_width 0 +use_language_tag 1 +ucs_conv 1 +pre_conv 0 +search_conv 1 +fix_width_conv 1 +use_gb12345_map 0 +use_jisx0201 0 +use_jisc6226 0 +use_jisx0201k 0 +use_jisx0212 0 +use_jisx0213 0 +strict_iso2022 1 +gb18030_as_ucs 0 +simple_preserve_space 0 diff --git a/.w3m/keymap b/.w3m/keymap new file mode 100644 index 0000000..c78c782 --- /dev/null +++ b/.w3m/keymap @@ -0,0 +1,132 @@ +# A sample of ~/.w3m/keymap (default) +# +# Ctrl : C-, ^ +# Escape: ESC-, M-, ^[ +# Space : SPC, ' ' +# Tab : TAB, ^i, ^I +# Delete: DEL, ^? +# Up : UP, ^[[A +# Down : DOWN, ^[[B +# Right : RIGHT, ^[[C +# Left : LEFT, ^[[D + +# Page/Cursor motion +keymap C-f NEXT_PAGE +keymap C-b PREV_PAGE +keymap l MOVE_RIGHT +keymap h MOVE_LEFT +keymap j MOVE_DOWN +keymap k MOVE_UP +keymap < SHIFT_LEFT +keymap > SHIFT_RIGHT +keymap 0 LINE_BEGIN +keymap $ LINE_END +keymap Z CENTER_H +keymap zz CENTER_V +keymap gg GOTO_LINE +keymap gg BEGIN +keymap G END +keymap w NEXT_WORD +keymap b PREV_WORD +keymap TAB NEXT_LINK +keymap ESC-TAB PREV_LINK +keymap u UNDO +keymap C-r REDO +keymap :L LIST_MENU + +# Hyperlink operation +keymap M MARK_WORD +# keymap M MARK_URL +keymap C-t TAB_LINK +keymap C-s SAVE_LINK +keymap V VIEW_IMAGE +# keymap V PEEK_IMG +keymap i INFO + +keymap ESC-i SAVE_IMAGE +keymap p PEEK_LINK +keymap C-g LINE_INFO +keymap O EXTERN_LINK + +# File/Stream operation +keymap o GOTO +keymap O TAB_GOTO +keymap @ READ_SHELL +keymap # PIPE_SHELL +keymap | PIPE_BUF + +# Buffer operation +keymap B BACK +keymap L NEXT +keymap H PREV +keymap S SELECT_MENU +keymap ESC-s SAVE +keymap v VIEW +keymap P PRINT +keymap E EDIT +keymap ESC-e EDIT_SCREEN +keymap r RELOAD +keymap ESC-r RESHAPE + +# Tab operation +keymap C-p PREV_TAB +keymap C-n NEXT_TAB +keymap t NEW_TAB +keymap T TAB_MENU +keymap d CLOSE_TAB + +keymap ESC-b VIEW_BOOKMARK +keymap ESC-a ADD_BOOKMARK + +# Search +keymap / ISEARCH +keymap ? ISEARCH_BACK +keymap n SEARCH_NEXT +keymap N SEARCH_PREV + +# Dictionay look-up +keymap ESC-w DICT_WORD +keymap ESC-W DICT_WORD_AT + +# Mark operation +keymap m MARK +keymap ] NEXT_MARK +keymap [ PREV_MARK +keymap \" REG_MARK + +# bookmark operation +keymap ESC-b VIEW_BOOKMARK +keymap ESC-a ADD_BOOKMARK + +# Misc operation +keymap \\ MENU +keymap :H HELP +keymap :O OPTIONS +keymap ESC-k COOKIE +keymap ESC-h HISTORY +keymap ESC-c COMMAND +keymap ! EXEC_SHELL +keymap ESC-z INTERRUPT +keymap C CHARSET + +keymap :q EXIT +keymap Q COMMAND "EXTERN 'echo %s > ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; NEXT_TAB ; EXTERN 'echo %s >> ~/.w3m/RestoreSession.txt' ; READ_SHELL ~/.w3m/cgi-bin/restore_session.cgi ; EXIT" + +# external stuff +keymap SPC-r COMMAND "SHELL 'readable $W3M_URL -p html-title,html-content > /tmp/readable.html'; LOAD /tmp/readable.html" +keymap xt COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw_tmux.cgi ; GOTO /usr/local/libexec/w3m/cgi-bin/goto_tmux_clipboard.cgi" +keymap XT COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw_tmux.cgi ; TAB_GOTO /usr/local/libexec/w3m/cgi-bin/goto_tmux_clipboard.cgi" +# keymap xs COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw.cgi ; GOTO /usr/local/libexec/w3m/cgi-bin/goto_clipboard.cgi" +keymap xs COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw.cgi ; GOTO /usr/local/libexec/w3m/cgi-bin/goto_clipboard_primary.cgi" +keymap XS COMMAND "SHELL ~/.w3m/cgi-bin/fzf_surfraw.cgi ; TAB_GOTO /usr/local/libexec/w3m/cgi-bin/goto_clipboard_primary.cgi" +# keymap XS COMMAND "SHELL /home/bloodstalker/scripts/bin/fzf_surfraw ; TAB_GOTO /home/bloodstalker/scripts/bin/goto_clipboard.cgi" +# keymap xs COMMAND "SHELL /home/bloodstalker/scripts/bin/fzf_surfraw" +keymap go COMMAND "SHELL /usr/local/libexec/w3m/cgi-bin/goto_clipboard.cgi" +# keymap XS COMMAND "SHELL /home/bloodstalker/scripts/bin/fzf_surfraw; TAB_GOTO /home/bloodstalker/scripts/bin/goto_clipboard.cgi" +# +keymap d COMMAND "EXTERN 'echo %s >> ~/.w3m/RestoreTab.txt' ; CLOSE_TAB" +keymap u TAB_GOTO /usr/local/libexec/w3m/cgi-bin/restore_tab.cgi + +keymap SPC-m CURSOR_MIDDLE +keymap SPC-l CURSOR_BOTTOM +keymap SPC-h CURSOR_TOP diff --git a/.ycm_extra_config.py b/.ycm_extra_config.py new file mode 100644 index 0000000..5ce9a48 --- /dev/null +++ b/.ycm_extra_config.py @@ -0,0 +1,99 @@ +# Partially stolen from https://bitbucket.org/mblum/libgp/src/2537ea7329ef/.ycm_extra_conf.py +import os +import ycm_core + +# These are the compilation flags that will be used in case there's no +# compilation database set (by default, one is not set). +# CHANGE THIS LIST OF FLAGS. YES, THIS IS THE DROID YOU HAVE BEEN LOOKING FOR. +flags = [ + '-Wall', + '-Wextra', + #'-Werror', + '-Wno-long-long', + '-Wno-variadic-macros', + '-fexceptions', + # THIS IS IMPORTANT! Without a "-std=" flag, clang won't know which + # language to use when compiling headers. So it will guess. Badly. So C++ + # headers will be compiled as C headers. You don't want that so ALWAYS specify + # a "-std=". + # For a C project, you would set this to something like 'c99' instead of + # 'c++11'. + '-std=c++14', + # ...and the same thing goes for the magic -x option which specifies the + # language that the files to be compiled are written in. This is mostly + # relevant for c++ headers. + # For a C project, you would set this to 'c' instead of 'c++'. + '-x', 'c++', + # This path will only work on OS X, but extra paths that don't exist are not + # harmful + '-isystem', '/System/Library/Frameworks/Python.framework/Headers', + '-isystem', '/usr/local/include', + '-isystem', '/usr/local/include/eigen3', + '-I', 'include', + '-I.', +] + +# Set this to the absolute path to the folder (NOT the file!) containing the +# compile_commands.json file to use that instead of 'flags'. See here for +# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html +# +# Most projects will NOT need to set this to anything; you can just change the +# 'flags' list of compilation flags. Notice that YCM itself uses that approach. +compilation_database_folder = '' + +if compilation_database_folder: + database = ycm_core.CompilationDatabase( compilation_database_folder ) +else: + database = None + + +def DirectoryOfThisScript(): + return os.path.dirname( os.path.abspath( __file__ ) ) + + +def MakeRelativePathsInFlagsAbsolute( flags, working_directory ): + if not working_directory: + return list( flags ) + new_flags = [] + make_next_absolute = False + path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ] + for flag in flags: + new_flag = flag + + if make_next_absolute: + make_next_absolute = False + if not flag.startswith( '/' ): + new_flag = os.path.join( working_directory, flag ) + + for path_flag in path_flags: + if flag == path_flag: + make_next_absolute = True + break + + if flag.startswith( path_flag ): + path = flag[ len( path_flag ): ] + new_flag = path_flag + os.path.join( working_directory, path ) + break + + if new_flag: + new_flags.append( new_flag ) + return new_flags + + +def FlagsForFile( filename ): + if database: + # Bear in mind that compilation_info.compiler_flags_ does NOT return a + # python list, but a "list-like" StringVec object + compilation_info = database.GetCompilationInfoForFile( filename ) + final_flags = MakeRelativePathsInFlagsAbsolute( + compilation_info.compiler_flags_, + compilation_info.compiler_working_dir_ ) + else: + # relative_to = DirectoryOfThisScript() + relative_to = os.path.dirname(os.path.abspath(filename)) + final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to ) + + return { + 'flags': final_flags, + 'do_cache': True + } diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..9e2ab4d --- /dev/null +++ b/.zshrc @@ -0,0 +1,392 @@ +# Path to your oh-my-zsh installation. + export ZSH=/home/bloodstalker/.oh-my-zsh + +ZSH_THEME="devi" + +COMPLETION_WAITING_DOTS="true" + +plugins=(git svn zsh-syntax-highlighting autojump virtualenv virtualenvwrapper cargo nvm npm docker rustup zle-vi-visual zsh-autosuggestions zsh-kubectl-prompt kubectl docker-compose) + +export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/bloodstalker/.local/bin:/home/bloodstalker/bin" + +source $ZSH/oh-my-zsh.sh + +[[ -s /home/bloodstalker/.autojump/etc/profile.d/autojump.sh ]] && source /home/bloodstalker/.autojump/etc/profile.d/autojump.sh +autoload -U compinit && compinit -u + +alias devihome=/home/bloodstalker/devi/hell +alias devihome1=/home/bloodstalker/devi/hell1 +alias devihome2=/home/bloodstalker/devi/hell2 +alias devihome3=/home/bloodstalker/devi/hell3 +alias "$SHELL"="echo $SHELL" +#alias clang="/home/bloodstalker/llvm/llvm/build/bin/clang" +#alias clang++="/home/bloodstalker/llvm/llvm/build/bin/clang++" +#alias llvm-config="/home/bloodstalker/llvm/llvm/build/bin/llvm-config" +#alias "clang-query"="/home/bloodstalker/llvm/llvm/build/bin/clang-query" +alias la="ls -A" +alias ee="nautilus ." +#aliias "clang-format"="/home/bloodstalker/llvm/llvm/build/bin/clang-format" +alias updaterc="cp ~/scripts/.zshrc ~/.zshrc" +alias fixvimrc='cp ~/scripts/.vimrc ~/.vimrc' +alias fixtmuxrc='cp ~/scripts/.tmux.conf ~/.tmux.conf' +alias fixtmuxpowerline='cp ~/scripts/default.sh ~/tmux-powerline/themes/default.sh' +alias fixctagsrc='cp ~/scripts/.ctags ~/.ctags' +alias fixtvrc='cp ~/scripts/.tvrc ~/.tvrc' +alias tmuxpowerline='vim ~/scripts/default.sh' +alias lss="ls -s" +alias speedtest="curl -o /dev/null http://speedtest.sea01.softlayer.com/downloads/test100.zip" +alias zshrc="vim ~/scripts/.zshrc" +alias vimrc="vim ~/scripts/.vimrc" +alias tmuxrc="vim ~/scripts/.tmux.conf" +alias zshtheme="vim ~/scripts/devi.zsh-theme" +alias quit="exit" +alias xx="dtrx" +alias angband="/home/bloodstalker/angband-4.1.0/angband-master/src/angband" +alias startdocker="sudo systemctl start docker" +alias vv="vim" +alias mm="cmatrix -s -C blue" +alias contest="ping 4.2.2.4 -c 7; ping google.com -c 7" +alias solide="vim ~/scripts/makefile" +alias dropsolide="cp ~/scripts/makefile ./" +alias genjctags="find . -type f -iregex \".*\.js$\" -not -path \"./node_modules/*\" -exec jsctags {} -f \; | sed '/^$/d' | sort > tags" +alias isup="ps -aux | grep " +alias ipfsd="ipfs daemon > /dev/null 2>&1 &; disown" +alias i3rc="vim ~/scripts/.config/i3/config" +alias fixi3rc="cp ~/scripts/.config/i3/config ~/.config/i3/config && i3-msg restart" +alias muttrc="vim ~/scripts/.muttrc" +alias fixmuttrc="cp ~/scripts/.muttrc ~/.muttrc" +alias dropcmake="cp ~/scripts/makefilec ./makefile" +alias dropcppmake="cp ~/scripts/makefilecpp ./makefile" +alias droppy="cp ~/scripts/python/main.py ./main.py" +alias diff="colordiff" +alias yy="~/scripts/hived" +alias newsboaturls="vim ~/scripts/.newsboat/urls" +alias fixnewsboaturls="cp ~/scripts/.newsboat/urls ~/.newsboat/urls" +alias newsboatconfig="vim ~/scripts/.newsboat/config" +alias fixnewsboatconfig="cp ~/scripts/.newsboat/config ~/.newsboat/config" +alias qtrc="vim ~/scripts/qtbrowser/config.py" +alias fixqtrc="cp ~/scripts/qtbrowser/config.py ~/.config/qutebrowser/config.py" +alias dropcextra="cp ~/scripts/c/devi_extra.h ./devi_extra.h" +alias dropcmain="cp ~/scripts/c/main.c ./" +alias dropcppmain="cp ~/scripts/c/main.cpp ./" +alias telebot="/home/bloodstalker/scripts/telebot.py > /dev/null 2>&1 &" +alias dw="~/df/df_linux/df" +alias clean="clear" +alias lynx="lynx -lss ~/scripts/lynx.lss -cfg ~/scripts/lynx.cfg -prettysrc" +alias hplovecraft="lynx http://www.hplovecraft.com/writings/texts/" +alias casmith="lynx http://www.eldritchdark.com/writings/short-stories/" +alias tt="transmission-cli -u 1 -w ~/winshare/" +alias w3m="torsocks w3m -graph" +#alias make="colormake" +#alias gcc="COLORMAKE_COMMAND=gcc colormake" +#alias clang="COLORMAKE_COMMAND=clang colormake" +alias mv="mv -i" +alias cp="cp -i" +alias nuke="rm -rf * .[!.]* ..?*" +alias bruiser="bruiser --history ~/.bruiser/history.lua" +alias digg="dig && clear" +alias ogg="ogg123" +alias jupyterlocal="jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8775" +alias mupdf="/home/bloodstalker/extra/mupdf/build/release/mupdf-x11 -D red -P black -I" +alias googler="~/extra/googler/googler --colors GKmexy -c us -l en --count 7 --exact " +alias ddgr="ddgr --colorize always -r us-en -n 15" +alias pirate-get="pirate-get -S ~/magnets/" +alias vps="ssh 87.236.209.206 -l ubuntu" +alias vpn="ssh 192.99.102.52 -l rooot -p 1022" +alias pytags="ctags --fields=+l --languages=python --python-kinds=-iv -R ." +alias v="vim" +alias kshrc="vim ~/scripts/.kshrc" +alias fixkshrc="cp ~/scripts/.kshrc ~/.kshrc" +alias rangerrc="vim ~/scripts/.config/ranger/rc.conf" +alias fixrangerrc="cp ~/scripts/.config/ranger/rc.conf ~/.config/ranger/rc.conf" +alias zathurarc="vim ~/scripts/zathurarc" +alias fixzathurarc="cp ~/scripts/zathurarc ~/.config/zathura/" +alias lynxcfg="cp ~/scripts/lynx.cfg" +alias lynxlss="cp ~/scripts/lynx.lss" +alias w3mkeymap="vim ~/scripts/.w3m/keymap" +alias w3mconfig="vim ~/scripts/.w3m/config" +alias fixw3mkeymap="cp ~/scripts/.w3m/keymap ~/.w3m/" +alias fixw3mconfig="cp ~/scripts/.w3m/config ~/.w3m/" +alias tsc='tvm tsc' +alias batrc="vim ~/scripts/.config/bat/config" +alias fixbatrc="cp ~/scripts/.config/bat/config ~/.config/bat/config" +alias psqlrc="vim ~/scripts/.psqlrc" +alias fixpsqlrc="cp ~/scripts/.psqlrc ~/.psqlrc" +alias pgclirc="vim ~/scripts/.config/pgcli/config" +alias fixpgclirc="cp ~/scripts/.config/pgcli/config ~/.config/pgcli/config" +alias jupyter="~/.local/bin/jupyter-notebook --no-browser" +alias iredisrc="vim ~/scripts/.iredisrc" +alias fixiredisrc="cp ~/scripts/.iredisrc ~/.iredisrc" +alias irssi="irssi -n bloodstalker" +alias joplinkeymap="vim ~/scripts/.config/joplin/keymap.json" +alias fixjoplinkeymap="cp ~/scripts/.config/joplin/keymap.json ~/.config/joplin/keymap.json" +alias mpv="/mnt/c/ProgramData/chocolatey/lib/mpv.install/tools/mpv.exe" +alias postitrc="vim ~/scripts/postit" +alias rainbowrc="vim ~/scripts/.rainbow_config.json" +alias fixrainbowrc="cp ~/scripts/.rainbow_config.json ~/.rainbow_config.json" +alias irssiconfig="vim ~/scripts/irssi/config" +alias irssitheme="vim ~/scripts/irssi/solarized-powerline.theme" +alias irssistartup="vim ~/scripts/irssi/startup" +alias fixirssiconfig="cp ~/scripts/irssi/config ~/.irssi/config" +alias fixirssitheme="cp ~/scripts/irssi/solarized-powerline.theme ~/.irssi/solarized-powerline.theme" +alias fixirssistartup="cp ~/scripts/irssi/startup ~/.irssi/startup" +alias w3mlastsession="~/.w3m/bin/w3mlastsession" + +#autosuggest +ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#5f5fff,bg=#000000,bold" +ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion) +ZSH_AUTOSUGGEST_USE_ASYNC=1 +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=30 + +function lemon { + /home/bloodstalker/scripts/lemonbar.sh | lemonbar -f "DejaVu Sans Mono for Powerline:size=11" -g "x16" +} + +function docpp { + cp ~/scripts/makefilecpp ./makefile + cp ~/scripts/c/main.cpp ./ + cp ~/scripts/c/header.hpp ./ + cp ~/scripts/.ycm_extra_config.py ./.ycm_extra_conf.py + cp ~/scripts/cfam.vimrc ./.vimrc + cp ~/scripts/compiler-explorer/ceconfig.json ./ + cp ~/scripts/c/debug.dbg ./ +} + +function docc { + cp ~/scripts/makefilec ./makefile + cp ~/scripts/c/main.c ./ + cp ~/scripts/.ycm_extra_config.py ./.ycm_extra_conf.py + cp ~/scripts/cfam.vimrc ./.vimrc + cp ~/scripts/compiler-explorer/ceconfig.json ./ + cp ~/scripts/c/debug.dbg ./ +} + +function mdvv { + mdv -t 729.8953 "$@" +} + +function gdd { + #git --no-pager diff --numstat | gawk \'{print$1$2}\' + git --no-pager diff --numstat | gawk '{sum1+=$1;sum2+=$2}END{print "additions:"sum1" ""deletions:"sum2}' +} + +function math { + echo $(($@)) +} + +function pid { + ps -aux | grep "$1" | grep -v grep | awk '{print$2}' +} + +#bicon_on=$(ps -aux | grep bicon | grep -v grep | awk '{print$2}') +#if [[ -z "${bicon_on// }" ]]; then +# /usr/bin/bicon.bin +#fi + +REPORTTIME=4 +STARDICT_DATA_DIR="/home/bloodstalker/.stardict" +export STARDICT_DATA_DIR +export DISPLAY=":0" +export WWW_HOME="duckduckgo.com" +alias def="sdcv --color" +#goenv +export GOENV_ROOT="$HOME/.goenv" +export PATH="$GOENV_ROOT/bin:$PATH" + +export LESS='-R' +export LESSOPEN='|~/scripts/lesscolor.sh %s' +# libtrash settings +export LD_PRELOAD=/usr/local/lib/libtrash.so.3.5 +alias trashon=”export TRASH_OFF=NO” +alias trashoff=”export TRASH_OFF=YES” + +export BAT_THEME="Solarized (light)" + +export FZF_DEFAULT_OPTS="--color fg:7,bg:0,hl:31,fg+:24,bg+:0,hl+:63,info:208,prompt:196,spinner:24,pointer:24,marker:22" + +export YTFZF_HIST=1 +export YTFZF_LOOP=0 +# export YTFZF_PREF="bestvideo[height<=?1080]+bestaudio/best" +export YTFZF_PREF="22" +export YTFZF_ENABLE_FZF_DEFAULT_OPTS=1 +export YTFZF_CACHE=~/.cache/ytfzf + +function fixrc { + cp ~/scripts/.zshrc ~/.zshrc + source ~/.zshrc +} + +function fixtheme { + cp ~/scripts/devi.zsh-theme ~/.oh-my-zsh/themes/devi.zsh-theme + source ~/.zshrc +} + +export PATH=$PATH:/home/bloodstalker/extra/cov-analysis-linux64-2019.03/bin +#export PATH=:$PATH:/home/bloodstalker/extra/llvm-6/build/bin +#export PATH=:$PATH:/home/bloodstalker/devi/abbatoir/hole145/llvm7/build/bin +#export PATH=:$PATH:/home/bloodstalker/extra/llvm-clang-4/build/bin +#export PATH=:$PATH:/home/bloodstalker/extra/llvm-clang-4/build/lib +export PATH=:$PATH:/home/bloodstalker/extra/llvm-11/llvm-project/build/bin +export PATH=:$PATH:/home/bloodstalker/extra/llvm-11/llvm-project/build/lib +export PATH=:$PATH:/home/bloodstalker/arcanist/arcanist/bin +export PATH=:$PATH:/home/bloodstalker/devi/abbatoir/hole58/solidity_0.4.18/build/solc +export PATH=:$PATH:/home/bloodstalker/binaryen/bin +export PATH=:$PATH:/home/bloodstalker/extra/go-ethereum/build/bin +export PATH=:$PATH:/home/bloodstalker/.cargo/bin +export PATH=:$PATH:/home/bloodstalker/extra/parity/target/release +export PATH=:$PATH:/home/bloodstalker/extra/wasm-jit-prototype/build/bin +export PATH=:$PATH:/home/bloodstalker/scripts/bin +export PATH=:$PATH:/home/bloodstalker/extra/android-ndk/android-ndk-r16b +export PATH=:$PATH:/home/bloodstalker/.cargo/bin/racer +export PATH=:$PATH:/home/bloodstalker/extra/phantomjs-2.1.1-linux-i686/bin +export PATH=:$PATH:/home/bloodstalker/rigetti/forest-sdk_2.0.1-linux-barebones +export PATH=:$PATH:/home/bloodstalker/extra/tg/bin +export PATH=:$PATH:/home/bloodstalker/extra/Nim/bin +export PATH=:$PATH:/home/bloodstalker/extra/geckodriver +export PATH=:$PATH:/home/bloodstalker/extra/cppcheck +export PATH=:$PATH:/home/bloodstalker/extra/binaryen-version_91 +export PATH=:$PATH:/home/bloodstalker/extra/wabt-1.0.13/ +export PATH=:$PATH:/home/bloodstalker/devi/tabbed/tabbed-0.6 +export PATH=:$PATH:/home/bloodstalker/.dvm/bin +#emscripten +export PATH=:$PATH:/home/bloodstalker/extra/emscripten +export PATH=:$PATH:/home/bloodstalker/extra/emscripten/clang/tag-e1.39.11/build_tag-e1.39.11_64/bin +export PATH=:$PATH:/home/bloodstalker/extra/emscripten/node/8.9.1_64bit/bin +export PATH=:$PATH:/home/bloodstalker/extra/emscripten/emscripten/tag-1.39.11 +export PATH=:$PATH:/home/bloodstalker/devi/protoc/protoc-3.13.0-linux-x86_64/bin +export PATH=:$PATH:/home/devi/protobuf/bin/ +export PATH=:$PATH:/home/devi/ytfzf/ +export PATH=:$PATH:/home/devi/k3s/ +export PATH=:$PATH:/home/devi/kompose + +export EDITOR=vim +export BROWSER=w3m +export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1" + +function dig { + globalholecounter=0 + if test "$(ls -A "/home/bloodstalker/devi/abbatoir")"; then + while [ 1 ]; do + if [ -d "/home/bloodstalker/devi/abbatoir/hole$globalholecounter" ]; then + # if its not empty + if test "$(ls -A "/home/bloodstalker/devi/abbatoir/hole$globalholecounter")"; then + : + # if its empty + else + cd /home/bloodstalker/devi/abbatoir/hole$globalholecounter + break + fi + else + mkdir /home/bloodstalker/devi/abbatoir/hole$globalholecounter + cd /home/bloodstalker/devi/abbatoir/hole$globalholecounter + echo $globalholecounter + break + fi + ((globalholecounter++)) + done + else + mkdir /home/bloodstalker/devi/abbatoir + mkdir /home/bloodstalker/devi/abbatoir/hole$globalholecounter + cd /home/bloodstalker/devi/abbatoir/hole$globalholecounter + fi +} + +function clearhalf { + clear + size=$(stty size|gawk '{print$1}') + size=$(($size/2)) + tput cup $size 0 && tput ed +} +alias cleanhalf="clearhalf" +alias halfclear="clearhalf" +alias halfclean="clearhalf" +alias dighalf="dig && cleanhalf" + +function nn { + echo $1 >> ~/.devi/notes.txt +} + +function nnshow { + cat ~/.devi/notes.txt +} + +function nnedit { + vim ~/.devi/notes.txt +} + +function nnpurge { + rm ~/.devi/notes.txt +} + +function lxx { + readable $1 | lynx -stdin +} + +bindkey -v +set blink-matching-paren on +export KEYTIMEOUT=1 +export VIRTUAL_ENV_DISABLE_PROMPT=yes + +#nvm +export NVM_DIR="/home/bloodstalker/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" + +# OPAM configuration +. /home/bloodstalker/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true + +# Nix +. /home/bloodstalker/.nix-profile/etc/profile.d/nix.sh + +# fixes the weird delete key behaviour in vi mode +#bindkey "[3~" delete-char + +# make normal mode the default mode +# zle-line-init() {zle -K vicmd;} +# zle -N zle-line-init + +[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm" + +# jellybeans takes forever to load. iceberg is very fast. +function vman { + vim -c "Man $1 $2" -c 'silent only' -c 'colo iceberg' -c 'highlight Normal ctermbg=None' -c 'highlight lineNr ctermbg=16' -c 'hi EndOfBuffer ctermbg=16' +} + +function ddig { + if [[ "$2" == "" ]];then + docker exec -it $(docker ps | grep "\b$1\b" | gawk '{print $1}') bash + else + docker exec -it $(docker ps | grep "\b$1\b" | gawk '{print $1}') $2 + fi +} + +fd() { + preview="git diff $@ --color=always -- {-1}" + git diff $@ --name-only | fzf -m --ansi --preview $preview +} + +setopt APPEND_HISTORY +setopt EXTENDED_HISTORY +setopt HIST_FIND_NO_DUPS +setopt HIST_IGNORE_ALL_DUPS +setopt HIST_IGNORE_SPACE +setopt HIST_NO_STORE +setopt HIST_REDUCE_BLANKS +setopt HIST_SAVE_NO_DUPS +setopt HIST_EXPIRE_DUPS_FIRST +setopt HIST_FIND_NO_DUPS +setopt HIST_VERIFY +setopt SHARE_HISTORY +setopt AUTO_CD +setopt AUTO_PUSHD + +eval "$(goenv init -)" +export PATH="$GOROOT/bin:$PATH" +export PATH="$PATH:$GOPATH/bin" + +function fzf_postit() { + cat ~/scripts/postit | fzf --bind 'enter:execute(tmux set-buffer {})+accept' +} + +# this should be here before the end +bindkey '' autosuggest-accept +bindkey -s '' 'fzf_postit ' diff --git a/CV.tex b/CV.tex new file mode 100644 index 0000000..6e6a31e --- /dev/null +++ b/CV.tex @@ -0,0 +1,173 @@ +\documentclass[10pt]{article} +\usepackage{array, xcolor} +\usepackage[margin=3cm]{geometry} +\usepackage{longtable} +\usepackage{makecell} +\usepackage{hyperref} +\hypersetup{ + colorlinks=true, + urlcolor=blue, +} +\definecolor{lightgray}{gray}{0.8} +\newcolumntype{L}{>{\raggedleft}p{0.2\textwidth}} +\newcolumntype{R}{p{0.8\textwidth}} +\newcommand\VRule{\color{lightgray}\vrule width 0.5pt} + +\title{\bfseries\Huge Farzad Sadeghi} +\author{farzadsadeghi@protonmail.ch} +\date{2020/03/31} +\begin{document} +\maketitle +\begin{center} + \begin{minipage}[ht]{0.2\textwidth}{\centering} + \vspace*{\fill} + \centering + Tehran, Iran\\ + +99 9999 9999999 + \centering + \vspace*{\fill} + \end{minipage} +\end{center} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Professional Experience} +\begin{longtable}{L!{\VRule}R} + {\bf Feb. 2019--Now}\\16 months&{\bf Maharan International (Tehran, Iran)}\\ + &Requirement manager, designer and developer and tooling.\\[5pt] + & \\ + & \\ + {\bf July 2017--Nov. 2017}\\5 months&{\bf Truebit (Remote, 3 time-zones)}\\ + &Developed Truebit's WASM interpreter, smart contracts and CI. Also researched distributed storage networks for Truebit’s needs which included IPFS and Ethereum's swarm.\\[5pt] + & \\ + & \\ + {\bf Sept. 2016--Nov. 2016}\\2 months&{\bf Iranian Electronics Industry Engineering Corp (Tehran, Iran)}\\ + & The role primarily included devising the coding standard and style for the company plus some general consultancy on embedded software development.\\[5pt] + & \\ + & \\ + {\bf May 2016--July 2016}\\3 months&{\bf NEAT (Rome, Italy)}\\ + &Wrote an automatic refactoring tool using Clang(Libtooling) in C++. The tool would be the last piece of an automated model-driven development process for safety-critical systems.\\[5pt] + & \\ + & \\ + {\bf July 2014--March 2016}\\21 months&{\bf Crouse (Tehran, Iran)}\\ + & Embedded software developer, Safety-critical applications: Implementation of the DSP algorithm, testing, automation and tooling. The Software team’s ISO 26262 representative. Helped develop the work-flow for the team by adopting and adapting Code Reviews, FMEA and FTA for software and tooling alongside some best practices and defensive C programming guidelines. Studied AUTOSAR's SWC and RTE specifications.\\[5pt] + & \\ + & \\ + {\bf August 2010--March 2012}\\20 months&{\bf Safir Language Academy (Tehran, Iran)}\\ + & English Teacher - Later on specifically IELTS teacher.\\[5pt] +\end{longtable} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Role Breakdown} +\begin{longtable}{L!{\VRule}R} + {\bf ERTMS / ETCS DMI Development}& Derived software requirements from the system requirements, effectively splitting them into two components. Designed and implemented the software for the component on the kernel side. Wrote a tool that made the requirements' traceability files by gathering special comments from the C source files. Wrote a tool that determines all the sub-fields of aggregate types used in the function and the functions it calls(required for testing). + \\[5pt]&\\ + {\bf Embedded Safety-Critical Development}& Wrote the SRS and the SDD for the DSP algorithm, then implemented the DSP algorithm for a safety-critical hard real-time embedded system. + \\[5pt]&\\ + {\bf Code Generation}& \begin{itemize} + \vspace{-\baselineskip} + \item Wrote A tool that generates binary file (WASM, ...) parsers in C. + \item Wrote another tool that generates the C code necessary to add a C structure to Lua as a Lua table. + \end{itemize} + \\[5pt] + {\bf Automation and Tooling}& \begin{itemize} + \vspace{-\baselineskip} + \item Developed a Misra-C:2004 rule checker(open-source project) using Clang's Libtooling. + \item Developed a source code obfuscation tool(open-source project) using Clang's Libtooling. + \item Developed an interactive CLI tool aimed at object code manipulation(open-source project) in C++/C with Lua as it's scripting language. The tool also has Python embedded in it for rapid prototyping. + \item Automated the traceability matrix generation using libclang's Python bindings. + \item Automated the regression testing for a project I was involved in. + \item Automated the calculation of the WCET for all implemented functions through the use of of a Python script and an XML description file. + \end{itemize} + \\[5pt] + {\bf Automatic Refactoring}& Wrote an automatic refactoring tool using Clang's Libtooling for C.\\[5pt] + & \\ + {\bf Defensive Programming / Safety-Aware Software Design}& Studied/Implemented defensive programming practices, coding style and guidelines. Explored the use of FMEA and FTA for the software domain.\\[5pt] + & \\ + {\bf AUTOSAR}& Studied AUTOSAR SWC and RTE.\\[5pt] + & \\ + {\bf ISO 26262}& Studied the software section of the standard. I was also the software's group's representative for the study/review meetings held with the hardware and system teams on ISO 26262.\\[5pt] +\end{longtable} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Programming Languages} +\begin{tabular}{L!{\VRule}R} + {\bf Languages}&C, C++\\[5pt] + & \\ + {\bf Scripting Languages}&Python, Lua\\[5pt] + & \\ + {\bf Other}&Bash, AWK, Make\\[5pt] +\end{tabular} + +\vspace{5mm} +\hrule + +\section*{Skills} +\begin{tabular}{L!{\VRule}R} + {\bf Software Design}& Safety-aware software design.\\[5pt] + & \\ + {\bf Requirement Analysis}& Derived the functional and technical software requirements from the ERTMS/ETCS DMI system requirements for our implementation.\\[5pt] + & \\ + {\bf CI}& Appveyor for windows(cygwin-only) and TrvisCI for linux.\\[5pt] + & \\ + {\bf UML}& Requirement Modelling.\\[5pt] + {\bf Clang}& Libtooling and libclang.\\[5pt] +\end{tabular} + +\vspace{5mm} +\hrule + +\section*{Languages} +\begin{tabular}{L!{\VRule}R} + {\bf English}&{\bf Native-like}\\ + {\bf Persian}&{\bf Native}\\ + {\bf Azerbaijani}&{\bf Native}\\ + German&Intermediate\\ +\end{tabular} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Education} +\begin{tabular}{L!{\VRule}R} + 2007--2013& Bachelor's in Electrical Engineering, Iran University of Science and Technology, Tehran, Iran.\\[5pt] + &{\bf Thesis}: Determining the frequency of an audio signal using phase derivation in real time, design and implementation using an FPGA. +\end{tabular} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Links} +\begin{tabular}{L!{\VRule}R} + {\bf \href{https://ir.linkedin.com/in/farzad-sadeghi-08426277}{Linkedin}}& My Linkedin page.\\[5pt] + {\bf \href{https://github.com/terminaldweller}{Github}}& My Github page.\\[5pt] + {\bf \href{https://github.com/terminaldweller/cgrep}{Cgrep}}& Grep for C-family source files.\\[5pt] + {\bf \href{https://terminaldweller.github.io/mutator/}{Mutator}}& An experimental suite of tools aimed at C-family development.\\[5pt] + {\bf Faultreiber}&\href{https://github.com/terminaldweller/faultreiber}{Faultreiber} generates a binary file parser in C using an XML description file.\\[5pt] + {\bf Luatablegen}&\href{https://github.com/terminaldweller/luatablegen}{Luatablegen} generates C code that wraps C structures as Lua tables using an XML description file.\\[5pt] + {\bf \href{https://github.com/terminaldweller/dwasm}{Dwasm}}& A WASM dump script written in python.\\[5pt] + {\bf \href{https://github.com/terminaldweller/delf}{Delf}}& An ELF dump script in python.\\[5pt] +\end{tabular} + +\vspace{5mm} +\hrule +\vspace{5mm} + +\section*{Referene} +\begin{longtable}{L!{\VRule}R} + {\bf Jason Teutsch}& jt@truebit.io\\[5pt] + {\bf Francesco Zulliani}& francesco.zuliani@neat.it\\[5pt] +\end{longtable} + +\end{document} + diff --git a/CV_Abridged.tex b/CV_Abridged.tex new file mode 100644 index 0000000..2c2be27 --- /dev/null +++ b/CV_Abridged.tex @@ -0,0 +1,135 @@ +\documentclass[8pt]{article} +\usepackage{array, xcolor} +\usepackage[margin=2cm]{geometry} +\usepackage{longtable} +\usepackage{makecell} +\usepackage{hyperref} +\usepackage{multicol} +\hypersetup{ + colorlinks=true, + urlcolor=blue, +} +\definecolor{lightgray}{gray}{0.5} +\newcolumntype{L}{>{\raggedleft}p{0.5\textwidth}} +\newcolumntype{R}{p{0.5\textwidth}} +\newcommand\VRule{\color{lightgray}\vrule width 0.5pt} + +\title{\bfseries Farzad Sadeghi} +\author{farzadsadeghi@protonmail.ch} +\date{2021/01/08} +\begin{document} +\begin{multicols}{2} + \maketitle + \begin{center} + \begin{minipage}[ht]{0.2\textwidth}{\centering} + \vspace*{\fill} + \centering + Tehran, Iran\\ + +98 9999 9999999 + \centering + \vspace*{\fill} + \end{minipage} + \end{center} + + \section*{Professional Experience} + \bf Erfan Salamat (Tehran, Iran)\\ + Nov. 2020--Feb. 2021\\ + 4 months\\ + \normalfont Backened Developer. Developed a GIS and Notification microservice using Golang(go-kit). Containerized the entire required stack for the said microservices using Docker.\\[5pt] + \bf Maharan International (Tehran, Iran)\\ + Feb. 2019--Oct. 2020\\ + 19 months\\ + \normalfont Requirement manager, designer and developer for ERTMS/ETCS DMI.\\[5pt] + \bf Truebit (Remote, 3 time-zones)\\ + July 2017--Nov. 2017\\ + 5 months\\ + \normalfont developed Truebit's WASM interpreter and smart contracts. Also managed the CI for the repositories.\\[5pt] + \bf Iranian Electronics Industry Engineering Corp (Tehran, Iran)\\ + Sept. 2016--Nov. 2016\\ + 2 months\\ + \normalfont The role primarily included devising the coding standard and style for the company.\\[5pt] + \bf NEAT (Rome, Italy)\\ + May 2016--July 2016\\ + 3 months\\ + \normalfont Wrote an automatic refactoring tool using Clang(Libtooling) in C++. The tool would be the last piece of an automated model-driven development process for safety-critical systems.\\[5pt] + \bf Crouse (Tehran, Iran)\\ + July 2014--March 2016\\ + 21 months\\ + \normalfont Embedded software developer, Safety-critical applications: Design, implementation and automation. The Software team’s ISO 26262 representative.\\[5pt] + \bf Safir Language Academy (Tehran, Iran)\\ + August 2010--March 2012\\ + 20 months\\ + \normalfont English Teacher - Later on specifically IELTS teacher.\\[5pt] + + \section*{Skills} + \bf Software Design \normalfont Safety-critical software design.\\[5pt] + \bf Requirement Analysis \normalfont{} Derived the functional and technical software requirements from the ERTMS/ETCS DMI system requirements for our implementation.\\[5pt] + \bf CI \normalfont Appveyor for windows(cygwin-only) and TrvisCI for linux.\\[5pt] + \bf UML \normalfont Requirement Modelling.\\[5pt] + \bf Tooling \normalfont Static analysis tools using clang libraries.\\[5pt] + \bf Automation \normalfont Python and the terminal.\\[5pt] + \bf Containerization \normalfont Docker\\[5pt] + \bf DB \normalfont Postgresql, MongoDB, Redis\\[5pt] + + \section*{Programming Languages} + \bf Languages: \normalfont C, C++, Go\\[5pt] + \bf Scripting Languages: \normalfont Python, Lua\\[5pt] + \bf Other: \normalfont Bash, AWK, Cmake, Make, Docker\\[5pt] + + \section*{Languages} + \bf English: {\normalfont Native-like}\\ + \bf Persian: {\normalfont Native}\\ + \bf Azerbaijani: {\normalfont Native}\\ + \normalfont German: Beginner\\ + + \section*{Education} + 2007--2013 Bachelor's in Electrical Engineering, Iran University of Science and Technology, Tehran, Iran.\\[5pt] + \bf Thesis: \normalfont Determining the frequency of an audio signal using phase derivation in real time, design and implementation using an FPGA. + + \section*{Role Breakdown} + \bf Backend Developer\\ \normalfont Developed a GIS microservice based on the OSM stack. Containerized an entire geoserver stack (geoserver, tile server, static image server, DB) so that we could rely on our own stack. Developed a notification microservice using golang and Mongodb(with Percona memory engine). + \\[5pt]\\ + \bf ERTMS / ETCS DMI Development\\ \normalfont Split the DMI into two subsystems. Designed and implemented the software for the component on the "kernel" side. Wrote a tool that made the requirements' traceability files by gathering special comments from the C source files. Wrote a tool that determines all the sub-fields of aggregate types used in the function and the functions it calls(required for testing). + \\[5pt]\\ + \bf Embedded Safety-Critical Development\\ \normalfont Wrote the SRS and the SDD for the DSP algorithm, then implemented the DSP algorithm for a safety-critical hard real-time embedded system. + \\[5pt]\\ + \bf Code Generation\\ \begin{itemize}\normalfont + \vspace{-\baselineskip} + \item Wrote A tool that generates binary file (WASM, ...) parsers in C. + \item Wrote another tool that generates the C code necessary to add a C structure to Lua as a Lua table. +\end{itemize} +\bf Automation and Tooling\\ \begin{itemize}\normalfont + \vspace{-\baselineskip} +\item Developed a Misra-C:2004 rule checker(open-source project) using Clang's Libtooling. +\item Developed a source code obfuscation tool(open-source project) using Clang's Libtooling. +\item Developed an interactive CLI tool aimed at object code manipulation(open-source project) in C++/C with Lua as it's scripting language. The tool also has Python embedded in it for rapid prototyping. +\item Automated the traceability matrix generation using libclang's Python bindings. +\item Automated the regression testing for a project I was involved in. +\item Automated the calculation of the WCET for all implemented functions through the use of of a Python script and an XML description file. + \end{itemize} + \bf Automatic Refactoring\\ \normalfont Wrote an automatic refactoring tool using Clang's Libtooling for C.\\[5pt] + \\ + \bf Defensive Programming / Safety-Aware Software Design\\ \normalfont Studied/Implemented defensive programming practices, coding style and guidelines. Explored the use of FMEA and FTA for the software domain.\\[5pt] + \\ + \bf AUTOSAR\\ \normalfont Studied AUTOSAR SWC and RTE.\\[5pt] + \\ + \bf ISO 26262\\ \normalfont Studied the software section of the standard. I was also the software's group's representative for the study/review meetings held with the hardware and system teams on ISO 26262.\\[5pt] + + \section*{Links} + {\bf \href{https://ir.linkedin.com/in/farzad-sadeghi-08426277}{Linkedin}} My Linkedin page.\\[5pt] + {\bf \href{https://github.com/terminaldweller}{Github}} My Github page.\\[5pt] + {\bf \href{https://github.com/terminaldweller/hived}{Hived}} My personal tiny high-performance server written in Go.\\[5pt] + {\bf \href{https://github.com/terminaldweller/cgrep}{Cgrep}} Grep for C-family source files.\\[5pt] + {\bf \href{https://terminaldweller.github.io/mutator/}{Mutator}} An experimental suite of tools aimed at C-family development written C++,C and Lua.\\[5pt] + \href{https://github.com/terminaldweller/faultreiber}{Faultreiber} generates a binary file parser in C using an XML description file.\\[5pt] + \href{https://github.com/terminaldweller/luatablegen}{Luatablegen} generates C code that wraps C structures as Lua tables using an XML description file.\\[5pt] + {\bf \href{https://github.com/terminaldweller/dwasm}{Dwasm}} A WASM dump script written in python.\\[5pt] + {\bf \href{https://github.com/terminaldweller/delf}{Delf}} An ELF dump script in python.\\[5pt] + + \section*{Referene} + {\bf Jason Teutsch} jt@truebit.io\\[5pt] + {\bf Francesco Zulliani} francesco.zuliani@neat.it\\[5pt] + +\end{multicols} +\end{document} + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..19a88ab --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ + +# fedora + +My config files and some random lazy scripts.
+ diff --git a/_emacs.el b/_emacs.el new file mode 100755 index 0000000..45029d0 --- /dev/null +++ b/_emacs.el @@ -0,0 +1,121 @@ + +(require 'package) +(setq package-enable-at-startup nil) +(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + (when no-ssl + (warn "\ +Your version of Emacs does not support SSL connections, +which is unsafe because it allows man-in-the-middle attacks. +There are two things you can do about this warning: +1. Install an Emacs version that does support SSL and be safe. +2. Remove this warning from your init file so you won't see it again.")) + ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired + (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t) + ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) + (when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))) +(package-initialize) +(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/")) +(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) +(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/")) +(add-to-list 'load-path "~/.emacs.d/evil") + +(require 'evil) +(evil-mode 1) +(helm-mode 1) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ansi-color-names-vector + ["#212337" "#ff5370" "#c7f59b" "#ffbd76" "#70b0ff" "#baacff" "#34d3fb" "#e4f3fa"]) + '(column-number-mode t) + '(custom-safe-themes + (quote + ("84d2f9eeb3f82d619ca4bfffe5f157282f4779732f48a5ac1484d94d5ff5b279" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c8f959fb1ea32ddfc0f50db85fea2e7d86b72bb4d106803018be1c3566fd6c72" "2a3ffb7775b2fe3643b179f2046493891b0d1153e57ec74bbe69580b951699ca" "1728dfd9560bff76a7dc6c3f61e9f4d3e6ef9d017a83a841c117bd9bebe18613" "f589e634c9ff738341823a5a58fc200341b440611aaa8e0189df85b44533692b" "0713580a6845e8075113a70275b3421333cfe7079e48228c52300606fa5ce73b" "f30aded97e67a487d30f38a1ac48eddb49fdb06ac01ebeaff39439997cbdd869" "2d1fe7c9007a5b76cea4395b0fc664d0c1cfd34bb4f1860300347cdad67fb2f9" default))) + '(display-battery-mode t) + '(display-line-numbers-type (quote relative)) + '(display-time-mode t) + '(fci-rule-color "#383e5c") + '(jdee-db-active-breakpoint-face-colors (cons "#161a2a" "#baacff")) + '(jdee-db-requested-breakpoint-face-colors (cons "#161a2a" "#c7f59b")) + '(jdee-db-spec-breakpoint-face-colors (cons "#161a2a" "#383e5c")) + '(objed-cursor-color "#ff5370") + '(package-selected-packages + (quote + (linum-relative pdfgrep pdf-tools smart-mode-line-powerline-theme smart-mode-line powerline-evil neotree tabbar helm doom-themes evil))) + '(show-paren-mode t) + '(size-indication-mode t) + '(vc-annotate-background "#212337") + '(vc-annotate-color-map + (list + (cons 20 "#c7f59b") + (cons 40 "#d9e28e") + (cons 60 "#eccf82") + (cons 80 "#ffbd76") + (cons 100 "#ffb071") + (cons 120 "#ffa36c") + (cons 140 "#ff9668") + (cons 160 "#e89d9a") + (cons 180 "#d1a4cc") + (cons 200 "#baacff") + (cons 220 "#d18ecf") + (cons 240 "#e8709f") + (cons 260 "#ff5370") + (cons 280 "#cd4d6b") + (cons 300 "#9b4866") + (cons 320 "#694361") + (cons 340 "#383e5c") + (cons 360 "#383e5c"))) + '(vc-annotate-very-old-color nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:family "DejaVu Sans Mono for Powerline" :foundry "outline" :slant normal :weight bold :height 98 :width normal))))) +(evil-mode t) + +(require 'doom-themes) +(setq inhibit-startup-screen t) +(load-theme 'doom-one) + +(setq doom-line-numbers-style 'relative) +(setq evil-emacs-state-cursor '("red" box)) +(setq evil-normal-state-cursor '("green" box)) +(setq evil-visual-state-cursor '("orange" box)) +(setq evil-insert-state-cursor '("blue" bar)) +(setq evil-replace-state-cursor '("red" bar)) +(setq evil-operator-state-cursor '("red" hollow)) + + +(require 'powerline-evil) +(powerline-evil-vim-color-theme) + +;; These two lines are just examples +(setq powerline-arrow-shape 'curve) +(setq powerline-default-separator-dir '(right . left)) +;; These two lines you really need. +(setq sml/theme 'powerline) +(sml/setup) + +(setq shell-file-name (executable-find "zsh.exe")) +;;(setq shell-file-name (executable-find "zsh-5.5.1.exe")) + +(setenv "PATH" (concat (getenv "PATH") ":D:\\home\\apps\\cygwin\\bin")) +;;(setq exec-path (append exec-path '("D:\\home\\apps\\cygwin\\bin"))) +(setq explicit-shell-file-name "D:\\home\\apps\\cygwin\\bin\\zsh.exe") +(setq shell-file-name "zsh") +(setq explicit-zsh.exe-args '("-l" "-i")) + +(setq display-line-numbers-mode t) +(setq display-line-numbers 'relative) +;;wont be able to open pdf's in docview mode without ghostscript +(setq doc-view-ghostscript-program "C:\\Program Files\\gs\\gs9.50\\bin\\gswin64.exe") +;;settings this for zsh. basically lets zsh know its running inside emacs and not a terminal +(setenv "INSIDE_EMACS") +(windmove-default-keybindings) \ No newline at end of file diff --git a/baseline/.minttyrc b/baseline/.minttyrc new file mode 100644 index 0000000..6d1af02 --- /dev/null +++ b/baseline/.minttyrc @@ -0,0 +1,29 @@ +BoldAsFont=no +Columns=150 +Rows=55 +Font=DejaVuSansMono NF +FontWeight=700 +FontHeight=10 +Transparency=low + +ForegroundColour=#A0A0A0 +BackgroundColour=#1B1D1E +CursorColour=#A0A0A0 + +Black=#1B1D1E +Red=#FF0000 +Green=#82B414 +Yellow=#FD971F +Blue=#268BD2 +Magenta=#8C54FE +Cyan=#56C2D6 +White=#CCCCC6 + +BoldBlack=#1B1D1E +BoldRed=#FF0000 +BoldGreen=#82B414 +BoldYellow=#FD971F +BoldBlue=#268BD2 +BoldMagenta=#8C54FE +BoldCyan=#56C2D6 +BoldWhite=#CCCCC6 diff --git a/baseline/.tmux.conf b/baseline/.tmux.conf new file mode 100644 index 0000000..2c4ab08 --- /dev/null +++ b/baseline/.tmux.conf @@ -0,0 +1,62 @@ +set -g default-terminal "tmux-256color" +set-option -g prefix C-a + +#key bindings +bind | split-window -h +bind - split-window -v +bind -r k select-pane -U +bind -r j select-pane -D +bind -r h select-pane -L +bind -r l select-pane -R +bind -n C-k next-window +bind -n C-j previous-window +bind -n M-k select-pane -U +bind -n M-j select-pane -D +bind -n M-h select-pane -L +bind -n M-l select-pane -R +setw -g mode-keys vi +bind [ copy-mode +bind -T copy-mode-vi 'v' send -X begin-selection +bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel +#bind -T copy-mode-vi 'V' rectangle-toggle +bind ] paste-buffer +bind Space choose-buffer + +#move windows +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 +set-option -g history-limit 10000 + +#unbindings +unbind Up +unbind Down +unbind Left +unbind Right + +#color stuff +set -g status-bg colour25 +set -g status-position bottom +set -g status-justify left +set -g status-fg colour137 +set -g status-attr dim +set -g status-left "" +set -g status-right "#[fg=colour233,bg=colour2,bold] %d/%m #[fg=colour233,bg=colour107,bold] %H:%M:%S " +set -g status-right-length 70 +set -g status-left-length 70 +setw -g window-status-current-fg colour0 +setw -g window-status-current-bg colour22 +setw -g window-status-current-attr bold +setw -g window-status-current-format "#[fg=colour249] #I#[fg=colour255]:#[fg=colour16]#W#[fg=colour249]#F " +setw -g window-status-fg colour0 +setw -g window-status-bg colour23 +setw -g window-status-attr none +setw -g window-status-format "#[fg=colour237] #I#[fg=colour250]:#[fg=colour16]#W#[fg=colour244]#F " +setw -g window-status-bell-attr bold +setw -g window-status-bell-fg colour255 +setw -g window-status-bell-bg colour64 +# messages +set -g message-attr bold +set -g message-fg colour232 +set -g message-bg colour16 + +set -g message-style bg='#44475a',fg='#8be9fd' diff --git a/baseline/.vimrc b/baseline/.vimrc new file mode 100644 index 0000000..3cbbdb1 --- /dev/null +++ b/baseline/.vimrc @@ -0,0 +1,309 @@ +set encoding=UTF-8 +let mapleader = " " +set nocompatible +set completeopt-=preview +filetype off +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() +Plugin 'tpope/vim-surround' +Plugin 'easymotion/vim-easymotion' +Plugin 'sheerun/vim-polyglot' +Plugin 'ctrlpvim/ctrlp.vim' +Plugin 'chrisbra/Recover.vim' +Plugin 'nanotech/jellybeans.vim' +Plugin 'unblevable/quick-scope' +Plugin 'tpope/vim-repeat' +Plugin 'adelarsq/vim-matchit' +Plugin 'majutsushi/tagbar' +Plugin 'ludovicchabant/vim-gutentags' +Plugin 'mbbill/undotree' +Plugin 'tpope/vim-commentary' +call vundle#end() +filetype plugin indent on + +" jellybeans +colo jellybeans +set background=dark +let g:gruvbox_italics = 1 +let g:jellybeans_overrides = { +\ 'Todo': { 'guifg': '000000', 'guibg': '00cc00', +\ 'ctermfg': 'Black', 'ctermbg': 'Blue', +\ 'attr': 'bold' }, +\ 'Comment': { 'guifg': '339966' }, +\ 'background': { "guibg": "000000", "ctermbg":"none"}, +\ 'StorageClass': {"guifg": '9966ff' }, +\ 'Exception': {"guifg": "99cc00"}, +\ "Ignore": {"guifg": "336699"}, +\ "SpecialComment": {"guifg": "009900"}, +\ "Macro": {"guifg": "0099cc"} +\} +let g:jellybeans_use_term_italics = 1 + +"set exrc +set encoding=UTF-8 +set linebreak +set breakindent +set wrap +set tagbsearch +set secure +set list +set showmatch +set number +set relativenumber +set noerrorbells +set hidden +set novisualbell +set expandtab +set smarttab +set autoindent +set shell=ksh +set autoread +set ignorecase +set smartcase +set hlsearch +set incsearch +set magic +set lazyredraw +set ttyfast +set scrolloff=0 +set tagbsearch +set wildmenu +set diffopt=internal,algorithm:patience +set tags=./tags,tags;$HOME +syntax on +set directory^=$HOME/.vim/tmp// +nmap +nmap +nmap +nmap +nmap +nmap +nmap +nmap +imap +imap +map :bp +map :bn +nnoremap :Vexplore +map :TagbarToggle +nnoremap :UndotreeToggle +map :q +set timeoutlen=1000 ttimeoutlen=100 +set =^[[21;2~ +map +map! +nnoremap :vsp +nnoremap :sp +set pastetoggle= +nnoremap cd :cd %:p:h +nmap ]c :cn +nmap [c :cp + +function! GetBufferList() + redir =>buflist + silent! ls! + redir END + return buflist +endfunction + +function! ToggleList(bufname, pfx) + let buflist = GetBufferList() + for bufnum in map(filter(split(buflist, '\n'), 'v:val =~ "'.a:bufname.'"'), 'str2nr(matchstr(v:val, "\\d\\+"))') + if bufwinnr(bufnum) != -1 + exec(a:pfx.'close') + return + endif + endfor + if a:pfx == 'l' && len(getloclist(0)) == 0 + echohl ErrorMsg + echo "Location List is Empty." + return + endif + let winnr = winnr() + exec(a:pfx.'open') + if winnr() != winnr + wincmd p + endif +endfunction +nmap l :call ToggleList("Location List", 'l') +nmap q :call ToggleList("Quickfix List", 'c') + +set laststatus=2 +function! InsertStatuslineColor(mode) + if a:mode == 'i' + hi statusline ctermfg=22 ctermbg=15 guibg=#005f00 guifg=#ffffff + elseif a:mode == 'r' + hi statusline ctermfg=52 ctermbg=15 guibg=#5f0000 guifg=#ffffff + else + hi statusline ctermfg=25 ctermbg=63 guibg=#005faf guifg=#5f5fff + endif +endfunction + +au InsertEnter * call InsertStatuslineColor(v:insertmode) +au InsertLeave * hi statusline ctermfg=24 ctermbg=15 guibg=#005f87 guifg=#ffffff +hi statusline ctermfg=24 ctermbg=15 guibg=#005f87 guifg=#ffffff +hi statuslineNC ctermfg=0 ctermbg=24 term=bold guifg=#000000 guibg=#005f87 +set statusline=[%f] "file name +set statusline+=[%{strlen(&fenc)?&fenc:'none'}, "file encoding +set statusline+=%{&ff}] "file format +set statusline+=%y "filetype +set statusline+=%h "help file flag +set statusline+=%m "modified flag +set statusline+=\ %= " align left +set statusline+=Line:%l/%L[%p%%] " line X of Y [percent of file] +set statusline+=\ Col:%c " current column +set statusline+=\ Buf:%n " Buffer number +set statusline+=\ [%b][0x%B]\ " ASCII and byte code under cursor + +set fillchars+=vert:\ " whitespace signifacant +hi VertSplit ctermbg=0 ctermfg=0 guibg=#000000 guifg=#000000 + +" highlight groups +hi def InterestingWord1 ctermfg=16 ctermbg=214 guifg=#000000 guibg=#ffaf00 +hi def InterestingWord2 ctermfg=16 ctermbg=154 guifg=#000000 guibg=#afff00 +hi def InterestingWord3 ctermfg=16 ctermbg=121 guifg=#000000 guibg=#87ffaf +hi def InterestingWord4 ctermfg=16 ctermbg=137 guifg=#000000 guibg=#af875f +hi def InterestingWord5 ctermfg=16 ctermbg=211 guifg=#000000 guibg=#ff87af +hi def InterestingWord6 ctermfg=16 ctermbg=195 guifg=#000000 guibg=#d7ffff +hi def InterestingWord7 ctermfg=16 ctermbg=99 guifg=#000000 guibg=#875fff +hi def InterestingWord8 ctermfg=16 ctermbg=35 guifg=#000000 guibg=#00af5f +hi def InterestingWord9 ctermfg=16 ctermbg=57 guifg=#000000 guibg=#5f00ff +hi def InterestingWord0 ctermfg=16 ctermbg=39 guifg=#000000 guibg=#00afff + +" Steve Losh's highlight function +function HighInterestingWord(n) + normal! mz + normal! "zyiw + let mid = 88888 + a:n + silent! call matchdelete(mid) + let pat = '\V\<' . escape(@z, '\') . '\>' + call matchadd("InterestingWord".a:n, pat, 1, mid) + normal! `z +endfunction + +" multiple highlights +nnoremap 1 :call HighInterestingWord(1) +nnoremap 2 :call HighInterestingWord(2) +nnoremap 3 :call HighInterestingWord(3) +nnoremap 4 :call HighInterestingWord(4) +nnoremap 5 :call HighInterestingWord(5) +nnoremap 6 :call HighInterestingWord(6) +nnoremap 7 :call HighInterestingWord(7) +nnoremap 8 :call HighInterestingWord(8) +nnoremap 9 :call HighInterestingWord(9) +nnoremap 0 :call HighInterestingWord(0) + +au BufNewFile,BufEnter *.s set ft=nasm + +"copy and paste between different Vim sessions +nmap _Y :!echo ""> ~/.vi_tmp:w! ~/.vi_tmp +vmap _Y :w! ~/.vi_tmp +nmap _P :r ~/.vi_tmp + +inoremap I +inoremap A + +iab pritn print +iab retrun return +iab fucntion function +iab funciton function + +nnoremap :bd +map +nnoremap c :call clearmatches() +map w :w +nnoremap t :bel term +nnoremap r :!%:p + +let g:qs_highlight_on_keys = ["f", "F", "t", "T"] + +" undotree +if has("persistent_undo") + set undodir=~/.undodir/ + set undofile +endif +let g:undotree_WindowLayout = 4 + +"highlight search +highlight Search ctermfg=White ctermbg=DarkGreen cterm=Bold +highlight IncSearch ctermfg=White ctermbg=DarkBlue cterm=Bold +highlight WildMenu ctermfg=DarkBlue ctermbg=DarkGreen cterm=Bold + +"netrw +let g:netrw_sort_by = 'date' +let g:netrw_sort_direction = 'reverse' +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 1 +let g:netrw_winsize = 15 +let g:netrw_fastbrowse = 1 +let g:netrw_sort_by = 'name' +let g:netrw_sort_direction = 'normal' + +"tagbar +let g:tagbar_compact = 1 +let g:tagbar_show_linenumbers = 2 +let g:tagbar_width = 50 +highlight TagbarSignature ctermfg=DarkBlue + +"view the python docs for the word under cursor in a split window +function! s:pythondoc() + let l:vword = expand("") + botright vnew + setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap + execute ".!pydoc3 " . l:vword + setlocal nomodifiable + set syntax=man + 1 +endfunction +command! -complete=shellcmd -nargs=0 PythonDoc call s:pythondoc() +nnoremap h :PythonDoc + +"camel and snake case motion +let g:camelchar = "A-Z0-9.,;:{([`'\"_" +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +vnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW')v`>o +vnoremap `>:call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W')v` +inoremap ' '' +inoremap ( () +inoremap [ [] +inoremap { {} +inoremap { {}O + +"window resizing +if bufwinnr(1) + nnoremap > + nnoremap < + nnoremap - + nnoremap + +endif + +if has('cscope') + set cscopetag cscopeverbose + + if has('quickfix') + set cscopequickfix=s-,c-,d-,i-,t-,e- + endif + + cnoreabbrev csa ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs add' : 'csa') + cnoreabbrev csf ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs find' : 'csf') + cnoreabbrev csk ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs kill' : 'csk') + cnoreabbrev csr ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs reset' : 'csr') + cnoreabbrev css ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs show' : 'css') + cnoreabbrev csh ((getcmdtype() == ':' && getcmdpos() <= 4)? 'cs help' : 'csh') + + command -nargs=0 Cscope cs add $VIMSRC/src/cscope.out $VIMSRC/src +endif + +if has("gui") + set guifont=DejaVu_Sans_Mono_for_Powerline:h10 + set guioptions-=m + set guioptions-=T + set guioptions-=L + set guioptions-=r +endif diff --git a/baseline/.zshrc b/baseline/.zshrc new file mode 100644 index 0000000..f921cd7 --- /dev/null +++ b/baseline/.zshrc @@ -0,0 +1,62 @@ +export ZSH=~/.oh-my-zsh +ZSH_THEME="robbyrussell" +COMPLETION_WAITING_DOTS="true" +plugins=( + git + zsh-syntax-highlighting + autojump +) +source $ZSH/oh-my-zsh.sh +function dig { + globalholecounter=0 + if test "$(ls -A "~/abbatoir")"; then + while [ 1 ]; do + if [ -d "~/abbatoir/hole$globalholecounter" ]; then + if test "$(ls -A "~/abbatoir/hole$globalholecounter")"; then + : + else + cd ~/abbatoir/hole$globalholecounter + break + fi + else + mkdir ~/abbatoir/hole$globalholecounter + cd ~/abbatoir/hole$globalholecounter + echo $globalholecounter + break + fi + ((globalholecounter++)) + done + else + mkdir ~/abbatoir + mkdir ~/abbatoir/hole$globalholecounter + cd ~/abbatoir/hole$globalholecounter + fi +} +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='mvim' +fi +alias quit="exit" +alias clean="clear" +alias la="ls -A" +alias digg="dig && clear" +alias lss="ls -s" +function clearhalf { + size=$(stty size|gawk '{print$1}') + size=$(($size/2)) + tput cup $size 0 && tput ed +} +alias cleanhalf="clearhalf" +alias halfclear="clearhalf" +alias halfclean="clearhalf" +alias mv="mv -i" +alias cp="cp -i" +alias contest="ping 4.2.2.4 -c 7" +function math { + echo $(($1)) +} + +#nvm +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" diff --git a/baseline/startup.sh b/baseline/startup.sh new file mode 100755 index 0000000..13a4caa --- /dev/null +++ b/baseline/startup.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +DISTRO=$(sudo cat /etc/*-release | grep "\> ~/.zshrc +(cd ~; echo "[[ -s $(pwd)/.autojump/etc/profile.d/autojump.sh ]] && source $(pwd)/.autojump/etc/profile.d/autojump.sh" >> ~/.zshrc) +echo "autoload -U compinit && compinit -u" >> ~/.zshrc + +#zsh-syntax-highlighting +(cd ~/.oh-my-zsh/plugins; git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting) diff --git a/baseline/ufw-allow-mosh b/baseline/ufw-allow-mosh new file mode 100755 index 0000000..3f696ca --- /dev/null +++ b/baseline/ufw-allow-mosh @@ -0,0 +1,31 @@ +#!/bin/bash +# ripped off from here:https://stephenreescarter.net/mosh-and-ufw-without-1000-open-ports/ +# add entry in sudoers: my-awesome-user ALL:(ALL:ALL) NOPASSWD: /usr/local/bin/ufw-allow-mosh +# then add this in zshrc: sudo /usr/local/bin/ufw-allow-mosh + +# Load active ports +PORTS=`lsof -i | grep mosh-serv | cut -f2 -d":"` +STATUS=`sudo ufw status` + +# Add Rules for new ports +for PORT in $PORTS; do + + echo $STATUS | grep "$PORT/udp" > /dev/null + if [ $? -gt 0 ]; then + echo "Allowing new port $PORT" + sudo ufw allow $PORT/udp > /dev/null + fi +done + +# Remove closed ports +PORTS=`sudo ufw status | grep "^60.../udp" | cut -f1 -d"/" | sort | uniq` +OPEN=`lsof -i | grep mosh-serv` + +for PORT in $PORTS; do + + echo $OPEN | grep $PORT > /dev/null + if [ $? -gt 0 ]; then + echo "Removing closed port $PORT." + sudo ufw delete allow $PORT/udp > /dev/null + fi +done diff --git a/bin/astdump b/bin/astdump new file mode 100755 index 0000000..668913d --- /dev/null +++ b/bin/astdump @@ -0,0 +1,44 @@ +#!/bin/bash + +INPUT="./testFuncs1.c" +OUTPUT="./dump" +OPTIONS="--" +RUN="1" + +while [[ $# -gt 0 ]] +do + passarg="$1" + + case $passarg in + -i|--input) + INPUT="$2" + shift + ;; + -o|--output) + OUTPUT="$2" + shift + ;; + -op|--options) + OPTIONS="$2" + shift + ;; + -h|--help) + echo "the script simply dumps the AST of the input." + echo "-i|--input the input file full path." + echo "-o|--output the output fule full path." + echo "-op|--options extra options to pass to clang" + echo "-h|--help prints out the help." + RUN="0" + ;; + *) + echo $1 is not a valid argument... + RUN="0" + shift + esac + shift +done + +if [[ "$RUN" == "1" ]]; then + "clang" -Xclang -ast-dump -fsyntax-only "$INPUT" "$OPTIONS" > "$OUTPUT" + +fi diff --git a/bin/bruiser b/bin/bruiser new file mode 120000 index 0000000..00bea13 --- /dev/null +++ b/bin/bruiser @@ -0,0 +1 @@ +/home/bloodstalker/devi/hell2/bruiser/bruiser \ No newline at end of file diff --git a/bin/cgrep b/bin/cgrep new file mode 120000 index 0000000..80f8897 --- /dev/null +++ b/bin/cgrep @@ -0,0 +1 @@ +/home/bloodstalker/extra/cgrep/cgrep \ No newline at end of file diff --git a/bin/colo b/bin/colo new file mode 100755 index 0000000..ac2818d --- /dev/null +++ b/bin/colo @@ -0,0 +1,136 @@ +#!/usr/bin/env python3 +# _*_ coding=utf-8 _*_ + +import argparse +import code +import os +import signal +import sys +from html.parser import HTMLParser + + +# BASH_STR = 'printf "\x1b[38;5;XXXmcolourXXX YYY \x1b[0m\t";' +BASH_STR = '\x1b[38;5;XXXmcolourXXX YYY \x1b[0m\t' +BASH_ANSI_STR = '\\x1b[38;5;XXXm' +COLO_LIST = [] +LJUST_CONST = 4 + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--ansi", action="store_true", + help="bool", default=False) + parser.add_argument("--hsi", action="store_true", + help="bool", default=False) + parser.add_argument("--rgb", action="store_true", + help="bool", default=False) + parser.add_argument("--number", action="store_true", + help="bool", default=False) + parser.add_argument("--name", action="store_true", + help="bool", default=False) + parser.add_argument("--hex", action="store_true", + help="bool", default=False) + parser.add_argument("--dbg", action="store_true", + help="debug", default=False) + self.args = parser.parse_args() + + +class ColoParser(HTMLParser): + def handle_data(self, data): + if data == "\n": + pass + else: + COLO_LIST.append(data) + + +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + # here + PRINT_LIST = str() + with open(os.path.dirname(sys.argv[0])+"/index.html", "r") as colo: + lines = colo.readlines() + for line in lines: + parser = ColoParser() + parser.feed(line) + NUMBER_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 1] + + if argparser.args.hsi: + HSL_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 0] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", HSL_COLO_LIST[i]) + elif argparser.args.rgb: + RGB_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 4] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", RGB_COLO_LIST[i]) + elif argparser.args.number: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 12 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NUMBER_COLO_LIST[i]) + elif argparser.args.name: + NAME_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 2] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NAME_COLO_LIST[i]) + elif argparser.args.hex: + HEX_COLO_LIST = [COLO_LIST[j] + for j in range(0, len(COLO_LIST)) if ((j+1) % 5) == 3] + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 8 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", HEX_COLO_LIST[i]) + elif argparser.args.ansi: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 6 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", BASH_ANSI_STR.replace("XXX", NUMBER_COLO_LIST[i])) + else: + for i in range(0, len(NUMBER_COLO_LIST)): + if i % 12 == 0 and i != 0: + PRINT_LIST += "\n" + PRINT_LIST += BASH_STR.replace("XXX", NUMBER_COLO_LIST[i]).replace( + "YYY", NUMBER_COLO_LIST[i]) + print(PRINT_LIST) + + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except Exception as e: + if hasattr(e, "__doc__"): + print(e.__doc__) + if hasattr(e, "message"): + print(e.message) + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + + +if __name__ == "__main__": + main() diff --git a/bin/color b/bin/color new file mode 100755 index 0000000..d96fde3 --- /dev/null +++ b/bin/color @@ -0,0 +1,6 @@ +#!/bin/sh +for i in {0..255};do + if (( i % 12 == 0 )); then echo;fi + printf "\x1b[38;5;${i}mcolour${i}\x1b[0m\t" +done +echo diff --git a/bin/colormake b/bin/colormake new file mode 100755 index 0000000..c8f352d --- /dev/null +++ b/bin/colormake @@ -0,0 +1,40 @@ +#!/bin/bash + +# Colored Make 2016.1.21 +# Copyright (c) 2014 Renato Silva +# Licensed under BSD +# https://github.com/renatosilva/colormake + +# Enable 256 colors for MinTTY in MSYS2 +if [[ "$MSYSCON" = mintty* && "$TERM" = *256color* ]]; then + red="\e[38;05;9m" + green="\e[38;05;76m" + blue="\e[38;05;74m" + cyan="\e[0;36m" + purple="\e[38;05;165m" + yellow="\e[0;33m" + gray="\e[38;05;244m" +else + red="\e[1;31m" + green="\e[1;32m" + blue="\e[1;34m" + cyan="\e[1;36m" + purple="\e[1;35m" + yellow="\e[1;33m" + gray="\e[1;30m" +fi +normal="\e[0m" + +# Errors, warnings, notes and compiler recipes +error="s/(^error|^.*[^a-z]error:)/$(printf $red)\\1$(printf $normal)/i" +warning="s/(^warning|^.*[^a-z]warning:)/$(printf $yellow)\\1$(printf $normal)/i" +make="s/^make(\[[0-9]+\])?:/$(printf $blue)make\\1:$(printf $normal)/" +compiler_recipe="s/^((gcc|g\+\+|clang)(.exe)? .*)/$(printf $gray)\\1$(printf $normal)/" + +if [[ $(uname -or) != 1.*Msys ]]; then + command "${COLORMAKE_COMMAND:-make}" "$@" 2> >(sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe") \ + > >(sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe") +else + # MinGW MSYS does not support process substitution + command "${COLORMAKE_COMMAND:-make}" "$@" 2>&1 | sed -ru -e "$warning" -e "$error" -e "$make" -e "$compiler_recipe" +fi diff --git a/bin/delf b/bin/delf new file mode 120000 index 0000000..090f766 --- /dev/null +++ b/bin/delf @@ -0,0 +1 @@ +/home/devi/delf/delf.py \ No newline at end of file diff --git a/bin/disasm b/bin/disasm new file mode 100755 index 0000000..47cd4d6 --- /dev/null +++ b/bin/disasm @@ -0,0 +1,50 @@ +#!/usr/bin/python3 + +import argparse +import code +import readline +import signal +import sys +from capstone import * +from capstone.x86 import * + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--hex", type=str, help="the hex code") + parser.add_argument("--sp", type=str, help="separator") + parser.add_argument("--dbg", action="store_true", help="debug", default=False) + self.args = parser.parse_args() + +# write code here +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + #here + code = bytes() + if argparser.args.hex: + if argparser.args.sp: hex_str = argparser.args.hex.split(argparser.args.sp) + else: hex_str = argparser.args.hex.split(" ") + code = [int(byte, 16) for byte in hex_str] + md = Cs(CS_ARCH_X86, CS_MODE_64) + for i in md.disasm(bytes(code), 0x0): + print(hex(i.address).ljust(7), i.mnemonic.ljust(7), i.op_str) + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + +if __name__ == "__main__": + main() diff --git a/bin/dwasm b/bin/dwasm new file mode 120000 index 0000000..4e5c2b6 --- /dev/null +++ b/bin/dwasm @@ -0,0 +1 @@ +/home/bloodstalker/extra/dwasm/dwasm.py \ No newline at end of file diff --git a/bin/extractor b/bin/extractor new file mode 100755 index 0000000..c6dc4e7 --- /dev/null +++ b/bin/extractor @@ -0,0 +1,67 @@ +#!/usr/bin/env lua + +--by Egor Skriptunoff here:https://stackoverflow.com/questions/23590304/finding-a-url-in-a-string-lua-pattern +local extractor = {} +function extractor.getURLS(text_with_URLs) + local domains = [[.ac.ad.ae.aero.af.ag.ai.al.am.an.ao.aq.ar.arpa.as.asia.at.au + .aw.ax.az.ba.bb.bd.be.bf.bg.bh.bi.biz.bj.bm.bn.bo.br.bs.bt.bv.bw.by.bz.ca + .cat.cc.cd.cf.cg.ch.ci.ck.cl.cm.cn.co.com.coop.cr.cs.cu.cv.cx.cy.cz.dd.de + .dj.dk.dm.do.dz.ec.edu.ee.eg.eh.er.es.et.eu.fi.firm.fj.fk.fm.fo.fr.fx.ga + .gb.gd.ge.gf.gh.gi.gl.gm.gn.gov.gp.gq.gr.gs.gt.gu.gw.gy.hk.hm.hn.hr.ht.hu + .id.ie.il.im.in.info.int.io.iq.ir.is.it.je.jm.jo.jobs.jp.ke.kg.kh.ki.km.kn + .kp.kr.kw.ky.kz.la.lb.lc.li.lk.lr.ls.lt.lu.lv.ly.ma.mc.md.me.mg.mh.mil.mk + .ml.mm.mn.mo.mobi.mp.mq.mr.ms.mt.mu.museum.mv.mw.mx.my.mz.na.name.nato.nc + .ne.net.nf.ng.ni.nl.no.nom.np.nr.nt.nu.nz.om.org.pa.pe.pf.pg.ph.pk.pl.pm + .pn.post.pr.pro.ps.pt.pw.py.qa.re.ro.ru.rw.sa.sb.sc.sd.se.sg.sh.si.sj.sk + .sl.sm.sn.so.sr.ss.st.store.su.sv.sy.sz.tc.td.tel.tf.tg.th.tj.tk.tl.tm.tn + .to.tp.tr.travel.tt.tv.tw.tz.ua.ug.uk.um.us.uy.va.vc.ve.vg.vi.vn.vu.web.wf + .ws.xxx.ye.yt.yu.za.zm.zr.zw]] + + local tlds = {} + + for tld in domains:gmatch'%w+' do + tlds[tld] = true + end + local function max4(a,b,c,d) return math.max(a+0, b+0, c+0, d+0) end + local protocols = {[''] = 0, ['http://'] = 0, ['https://'] = 0, ['ftp://'] = 0} + local finished = {} + + for pos_start, url, prot, subd, tld, colon, port, slash, path in + text_with_URLs:gmatch'()(([%w_.~!*:@&+$/?%%#-]-)(%w[-.%w]*%.)(%w+)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))' + do + if protocols[prot:lower()] == (1 - #slash) * #path and not subd:find'%W%W' + and (colon == '' or port ~= '' and port + 0 < 65536) + and (tlds[tld:lower()] or tld:find'^%d+$' and subd:find'^%d+%.%d+%.%d+%.$' + and max4(tld, subd:match'^(%d+)%.(%d+)%.(%d+)%.$') < 256) + then + finished[pos_start] = true + print(pos_start, url) + end + end + + for pos_start, url, prot, dom, colon, port, slash, path in + text_with_URLs:gmatch'()((%f[%w]%a+://)(%w[-.%w]*)(:?)(%d*)(/?)([%w_.~!*:@&+$/?%%#=-]*))' + do + if not finished[pos_start] and not (dom..'.'):find'%W%W' + and protocols[prot:lower()] == (1 - #slash) * #path + and (colon == '' or port ~= '' and port + 0 < 65536) + then + print(pos_start, url) + end + end +end + +function main() + local input = io.read("*a") + for k,v in pairs(arg) do + if v == "--url" then + extractor.getURLS(input) + else + print("invalid args...") + os.exit(1) + end + end +end + +main() +return extractor diff --git a/bin/fzf_surfraw b/bin/fzf_surfraw new file mode 100755 index 0000000..de297c1 --- /dev/null +++ b/bin/fzf_surfraw @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOVAL'| fzf --algo=v2 -e | awk '{print $1}') +if [ "$PREFIX" = "" ]; then exit;fi +read -r -e -p " $PREFIX >>> Enter The Search Keyword: " INPUT +surfraw -p "$PREFIX" "$INPUT" | xsel -p diff --git a/bin/fzf_surfraw_tmux b/bin/fzf_surfraw_tmux new file mode 100755 index 0000000..b6344cc --- /dev/null +++ b/bin/fzf_surfraw_tmux @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +PREFIX=$(surfraw -elvi | grep -v 'LOCAL\|GLOVAL'| fzf --algo=v2 -e | awk '{print $1}') +if [ "$PREFIX" = "" ]; then exit;fi +read -r -e -p " $PREFIX >>> Enter The Search Keyword: " INPUT +pidof tmux >/dev/null && tmux set-buffer "$(surfraw -p "$PREFIX" "$INPUT")" diff --git a/bin/goto_clipboard.cgi b/bin/goto_clipboard.cgi new file mode 100755 index 0000000..faa421c --- /dev/null +++ b/bin/goto_clipboard.cgi @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +printf "%s\r\n" "W3m-control: GOTO $(xsel -ob)"; +printf "W3m-control: DELETE_PREVBUF\r\n" diff --git a/bin/hived b/bin/hived new file mode 120000 index 0000000..333bfce --- /dev/null +++ b/bin/hived @@ -0,0 +1 @@ +../hived \ No newline at end of file diff --git a/bin/index.html b/bin/index.html new file mode 100644 index 0000000..fa3d7ae --- /dev/null +++ b/bin/index.html @@ -0,0 +1,256 @@ +0Black#000000rgb(0,0,0)hsl(0,0%,0%) +1Maroon#800000rgb(128,0,0)hsl(0,100%,25%) +2Green#008000rgb(0,128,0)hsl(120,100%,25%) +3Olive#808000rgb(128,128,0)hsl(60,100%,25%) +4Navy#000080rgb(0,0,128)hsl(240,100%,25%) +5Purple#800080rgb(128,0,128)hsl(300,100%,25%) +6Teal#008080rgb(0,128,128)hsl(180,100%,25%) +7Silver#c0c0c0rgb(192,192,192)hsl(0,0%,75%) +8Grey#808080rgb(128,128,128)hsl(0,0%,50%) +9Red#ff0000rgb(255,0,0)hsl(0,100%,50%) +10Lime#00ff00rgb(0,255,0)hsl(120,100%,50%) +11Yellow#ffff00rgb(255,255,0)hsl(60,100%,50%) +12Blue#0000ffrgb(0,0,255)hsl(240,100%,50%) +13Fuchsia#ff00ffrgb(255,0,255)hsl(300,100%,50%) +14Aqua#00ffffrgb(0,255,255)hsl(180,100%,50%) +15White#ffffffrgb(255,255,255)hsl(0,0%,100%) +16Grey0#000000rgb(0,0,0)hsl(0,0%,0%) +17NavyBlue#00005frgb(0,0,95)hsl(240,100%,18%) +18DarkBlue#000087rgb(0,0,135)hsl(240,100%,26%) +19Blue3#0000afrgb(0,0,175)hsl(240,100%,34%) +20Blue3#0000d7rgb(0,0,215)hsl(240,100%,42%) +21Blue1#0000ffrgb(0,0,255)hsl(240,100%,50%) +22DarkGreen#005f00rgb(0,95,0)hsl(120,100%,18%) +23DeepSkyBlue4#005f5frgb(0,95,95)hsl(180,100%,18%) +24DeepSkyBlue4#005f87rgb(0,95,135)hsl(97,100%,26%) +25DeepSkyBlue4#005fafrgb(0,95,175)hsl(07,100%,34%) +26DodgerBlue3#005fd7rgb(0,95,215)hsl(13,100%,42%) +27DodgerBlue2#005fffrgb(0,95,255)hsl(17,100%,50%) +28Green4#008700rgb(0,135,0)hsl(120,100%,26%) +29SpringGreen4#00875frgb(0,135,95)hsl(62,100%,26%) +30Turquoise4#008787rgb(0,135,135)hsl(180,100%,26%) +31DeepSkyBlue3#0087afrgb(0,135,175)hsl(93,100%,34%) +32DeepSkyBlue3#0087d7rgb(0,135,215)hsl(02,100%,42%) +33DodgerBlue1#0087ffrgb(0,135,255)hsl(08,100%,50%) +34Green3#00af00rgb(0,175,0)hsl(120,100%,34%) +35SpringGreen3#00af5frgb(0,175,95)hsl(52,100%,34%) +36DarkCyan#00af87rgb(0,175,135)hsl(66,100%,34%) +37LightSeaGreen#00afafrgb(0,175,175)hsl(180,100%,34%) +38DeepSkyBlue2#00afd7rgb(0,175,215)hsl(91,100%,42%) +39DeepSkyBlue1#00afffrgb(0,175,255)hsl(98,100%,50%) +40Green3#00d700rgb(0,215,0)hsl(120,100%,42%) +41SpringGreen3#00d75frgb(0,215,95)hsl(46,100%,42%) +42SpringGreen2#00d787rgb(0,215,135)hsl(57,100%,42%) +43Cyan3#00d7afrgb(0,215,175)hsl(68,100%,42%) +44DarkTurquoise#00d7d7rgb(0,215,215)hsl(180,100%,42%) +45Turquoise2#00d7ffrgb(0,215,255)hsl(89,100%,50%) +46Green1#00ff00rgb(0,255,0)hsl(120,100%,50%) +47SpringGreen2#00ff5frgb(0,255,95)hsl(42,100%,50%) +48SpringGreen1#00ff87rgb(0,255,135)hsl(51,100%,50%) +49MediumSpringGreen#00ffafrgb(0,255,175)hsl(61,100%,50%) +50Cyan2#00ffd7rgb(0,255,215)hsl(70,100%,50%) +51Cyan1#00ffffrgb(0,255,255)hsl(180,100%,50%) +52DarkRed#5f0000rgb(95,0,0)hsl(0,100%,18%) +53DeepPink4#5f005frgb(95,0,95)hsl(300,100%,18%) +54Purple4#5f0087rgb(95,0,135)hsl(82,100%,26%) +55Purple4#5f00afrgb(95,0,175)hsl(72,100%,34%) +56Purple3#5f00d7rgb(95,0,215)hsl(66,100%,42%) +57BlueViolet#5f00ffrgb(95,0,255)hsl(62,100%,50%) +58Orange4#5f5f00rgb(95,95,0)hsl(60,100%,18%) +59Grey37#5f5f5frgb(95,95,95)hsl(0,0%,37%) +60MediumPurple4#5f5f87rgb(95,95,135)hsl(240,17%,45%) +61SlateBlue3#5f5fafrgb(95,95,175)hsl(240,33%,52%) +62SlateBlue3#5f5fd7rgb(95,95,215)hsl(240,60%,60%) +63RoyalBlue1#5f5fffrgb(95,95,255)hsl(240,100%,68%) +64Chartreuse4#5f8700rgb(95,135,0)hsl(7,100%,26%) +65DarkSeaGreen4#5f875frgb(95,135,95)hsl(120,17%,45%) +66PaleTurquoise4#5f8787rgb(95,135,135)hsl(180,17%,45%) +67SteelBlue#5f87afrgb(95,135,175)hsl(210,33%,52%) +68SteelBlue3#5f87d7rgb(95,135,215)hsl(220,60%,60%) +69CornflowerBlue#5f87ffrgb(95,135,255)hsl(225,100%,68%) +70Chartreuse3#5faf00rgb(95,175,0)hsl(7,100%,34%) +71DarkSeaGreen4#5faf5frgb(95,175,95)hsl(120,33%,52%) +72CadetBlue#5faf87rgb(95,175,135)hsl(150,33%,52%) +73CadetBlue#5fafafrgb(95,175,175)hsl(180,33%,52%) +74SkyBlue3#5fafd7rgb(95,175,215)hsl(200,60%,60%) +75SteelBlue1#5fafffrgb(95,175,255)hsl(210,100%,68%) +76Chartreuse3#5fd700rgb(95,215,0)hsl(3,100%,42%) +77PaleGreen3#5fd75frgb(95,215,95)hsl(120,60%,60%) +78SeaGreen3#5fd787rgb(95,215,135)hsl(140,60%,60%) +79Aquamarine3#5fd7afrgb(95,215,175)hsl(160,60%,60%) +80MediumTurquoise#5fd7d7rgb(95,215,215)hsl(180,60%,60%) +81SteelBlue1#5fd7ffrgb(95,215,255)hsl(195,100%,68%) +82Chartreuse2#5fff00rgb(95,255,0)hsl(7,100%,50%) +83SeaGreen2#5fff5frgb(95,255,95)hsl(120,100%,68%) +84SeaGreen1#5fff87rgb(95,255,135)hsl(135,100%,68%) +85SeaGreen1#5fffafrgb(95,255,175)hsl(150,100%,68%) +86Aquamarine1#5fffd7rgb(95,255,215)hsl(165,100%,68%) +87DarkSlateGray2#5fffffrgb(95,255,255)hsl(180,100%,68%) +88DarkRed#870000rgb(135,0,0)hsl(0,100%,26%) +89DeepPink4#87005frgb(135,0,95)hsl(17,100%,26%) +90DarkMagenta#870087rgb(135,0,135)hsl(300,100%,26%) +91DarkMagenta#8700afrgb(135,0,175)hsl(86,100%,34%) +92DarkViolet#8700d7rgb(135,0,215)hsl(77,100%,42%) +93Purple#8700ffrgb(135,0,255)hsl(71,100%,50%) +94Orange4#875f00rgb(135,95,0)hsl(2,100%,26%) +95LightPink4#875f5frgb(135,95,95)hsl(0,17%,45%) +96Plum4#875f87rgb(135,95,135)hsl(300,17%,45%) +97MediumPurple3#875fafrgb(135,95,175)hsl(270,33%,52%) +98MediumPurple3#875fd7rgb(135,95,215)hsl(260,60%,60%) +99SlateBlue1#875fffrgb(135,95,255)hsl(255,100%,68%) +100Yellow4#878700rgb(135,135,0)hsl(60,100%,26%) +101Wheat4#87875frgb(135,135,95)hsl(60,17%,45%) +102Grey53#878787rgb(135,135,135)hsl(0,0%,52%) +103LightSlateGrey#8787afrgb(135,135,175)hsl(240,20%,60%) +104MediumPurple#8787d7rgb(135,135,215)hsl(240,50%,68%) +105LightSlateBlue#8787ffrgb(135,135,255)hsl(240,100%,76%) +106Yellow4#87af00rgb(135,175,0)hsl(3,100%,34%) +107DarkOliveGreen3#87af5frgb(135,175,95)hsl(90,33%,52%) +108DarkSeaGreen#87af87rgb(135,175,135)hsl(120,20%,60%) +109LightSkyBlue3#87afafrgb(135,175,175)hsl(180,20%,60%) +110LightSkyBlue3#87afd7rgb(135,175,215)hsl(210,50%,68%) +111SkyBlue2#87afffrgb(135,175,255)hsl(220,100%,76%) +112Chartreuse2#87d700rgb(135,215,0)hsl(2,100%,42%) +113DarkOliveGreen3#87d75frgb(135,215,95)hsl(100,60%,60%) +114PaleGreen3#87d787rgb(135,215,135)hsl(120,50%,68%) +115DarkSeaGreen3#87d7afrgb(135,215,175)hsl(150,50%,68%) +116DarkSlateGray3#87d7d7rgb(135,215,215)hsl(180,50%,68%) +117SkyBlue1#87d7ffrgb(135,215,255)hsl(200,100%,76%) +118Chartreuse1#87ff00rgb(135,255,0)hsl(8,100%,50%) +119LightGreen#87ff5frgb(135,255,95)hsl(105,100%,68%) +120LightGreen#87ff87rgb(135,255,135)hsl(120,100%,76%) +121PaleGreen1#87ffafrgb(135,255,175)hsl(140,100%,76%) +122Aquamarine1#87ffd7rgb(135,255,215)hsl(160,100%,76%) +123DarkSlateGray1#87ffffrgb(135,255,255)hsl(180,100%,76%) +124Red3#af0000rgb(175,0,0)hsl(0,100%,34%) +125DeepPink4#af005frgb(175,0,95)hsl(27,100%,34%) +126MediumVioletRed#af0087rgb(175,0,135)hsl(13,100%,34%) +127Magenta3#af00afrgb(175,0,175)hsl(300,100%,34%) +128DarkViolet#af00d7rgb(175,0,215)hsl(88,100%,42%) +129Purple#af00ffrgb(175,0,255)hsl(81,100%,50%) +130DarkOrange3#af5f00rgb(175,95,0)hsl(2,100%,34%) +131IndianRed#af5f5frgb(175,95,95)hsl(0,33%,52%) +132HotPink3#af5f87rgb(175,95,135)hsl(330,33%,52%) +133MediumOrchid3#af5fafrgb(175,95,175)hsl(300,33%,52%) +134MediumOrchid#af5fd7rgb(175,95,215)hsl(280,60%,60%) +135MediumPurple2#af5fffrgb(175,95,255)hsl(270,100%,68%) +136DarkGoldenrod#af8700rgb(175,135,0)hsl(6,100%,34%) +137LightSalmon3#af875frgb(175,135,95)hsl(30,33%,52%) +138RosyBrown#af8787rgb(175,135,135)hsl(0,20%,60%) +139Grey63#af87afrgb(175,135,175)hsl(300,20%,60%) +140MediumPurple2#af87d7rgb(175,135,215)hsl(270,50%,68%) +141MediumPurple1#af87ffrgb(175,135,255)hsl(260,100%,76%) +142Gold3#afaf00rgb(175,175,0)hsl(60,100%,34%) +143DarkKhaki#afaf5frgb(175,175,95)hsl(60,33%,52%) +144NavajoWhite3#afaf87rgb(175,175,135)hsl(60,20%,60%) +145Grey69#afafafrgb(175,175,175)hsl(0,0%,68%) +146LightSteelBlue3#afafd7rgb(175,175,215)hsl(240,33%,76%) +147LightSteelBlue#afafffrgb(175,175,255)hsl(240,100%,84%) +148Yellow3#afd700rgb(175,215,0)hsl(1,100%,42%) +149DarkOliveGreen3#afd75frgb(175,215,95)hsl(80,60%,60%) +150DarkSeaGreen3#afd787rgb(175,215,135)hsl(90,50%,68%) +151DarkSeaGreen2#afd7afrgb(175,215,175)hsl(120,33%,76%) +152LightCyan3#afd7d7rgb(175,215,215)hsl(180,33%,76%) +153LightSkyBlue1#afd7ffrgb(175,215,255)hsl(210,100%,84%) +154GreenYellow#afff00rgb(175,255,0)hsl(8,100%,50%) +155DarkOliveGreen2#afff5frgb(175,255,95)hsl(90,100%,68%) +156PaleGreen1#afff87rgb(175,255,135)hsl(100,100%,76%) +157DarkSeaGreen2#afffafrgb(175,255,175)hsl(120,100%,84%) +158DarkSeaGreen1#afffd7rgb(175,255,215)hsl(150,100%,84%) +159PaleTurquoise1#afffffrgb(175,255,255)hsl(180,100%,84%) +160Red3#d70000rgb(215,0,0)hsl(0,100%,42%) +161DeepPink3#d7005frgb(215,0,95)hsl(33,100%,42%) +162DeepPink3#d70087rgb(215,0,135)hsl(22,100%,42%) +163Magenta3#d700afrgb(215,0,175)hsl(11,100%,42%) +164Magenta3#d700d7rgb(215,0,215)hsl(300,100%,42%) +165Magenta2#d700ffrgb(215,0,255)hsl(90,100%,50%) +166DarkOrange3#d75f00rgb(215,95,0)hsl(6,100%,42%) +167IndianRed#d75f5frgb(215,95,95)hsl(0,60%,60%) +168HotPink3#d75f87rgb(215,95,135)hsl(340,60%,60%) +169HotPink2#d75fafrgb(215,95,175)hsl(320,60%,60%) +170Orchid#d75fd7rgb(215,95,215)hsl(300,60%,60%) +171MediumOrchid1#d75fffrgb(215,95,255)hsl(285,100%,68%) +172Orange3#d78700rgb(215,135,0)hsl(7,100%,42%) +173LightSalmon3#d7875frgb(215,135,95)hsl(20,60%,60%) +174LightPink3#d78787rgb(215,135,135)hsl(0,50%,68%) +175Pink3#d787afrgb(215,135,175)hsl(330,50%,68%) +176Plum3#d787d7rgb(215,135,215)hsl(300,50%,68%) +177Violet#d787ffrgb(215,135,255)hsl(280,100%,76%) +178Gold3#d7af00rgb(215,175,0)hsl(8,100%,42%) +179LightGoldenrod3#d7af5frgb(215,175,95)hsl(40,60%,60%) +180Tan#d7af87rgb(215,175,135)hsl(30,50%,68%) +181MistyRose3#d7afafrgb(215,175,175)hsl(0,33%,76%) +182Thistle3#d7afd7rgb(215,175,215)hsl(300,33%,76%) +183Plum2#d7afffrgb(215,175,255)hsl(270,100%,84%) +184Yellow3#d7d700rgb(215,215,0)hsl(60,100%,42%) +185Khaki3#d7d75frgb(215,215,95)hsl(60,60%,60%) +186LightGoldenrod2#d7d787rgb(215,215,135)hsl(60,50%,68%) +187LightYellow3#d7d7afrgb(215,215,175)hsl(60,33%,76%) +188Grey84#d7d7d7rgb(215,215,215)hsl(0,0%,84%) +189LightSteelBlue1#d7d7ffrgb(215,215,255)hsl(240,100%,92%) +190Yellow2#d7ff00rgb(215,255,0)hsl(9,100%,50%) +191DarkOliveGreen1#d7ff5frgb(215,255,95)hsl(75,100%,68%) +192DarkOliveGreen1#d7ff87rgb(215,255,135)hsl(80,100%,76%) +193DarkSeaGreen1#d7ffafrgb(215,255,175)hsl(90,100%,84%) +194Honeydew2#d7ffd7rgb(215,255,215)hsl(120,100%,92%) +195LightCyan1#d7ffffrgb(215,255,255)hsl(180,100%,92%) +196Red1#ff0000rgb(255,0,0)hsl(0,100%,50%) +197DeepPink2#ff005frgb(255,0,95)hsl(37,100%,50%) +198DeepPink1#ff0087rgb(255,0,135)hsl(28,100%,50%) +199DeepPink1#ff00afrgb(255,0,175)hsl(18,100%,50%) +200Magenta2#ff00d7rgb(255,0,215)hsl(09,100%,50%) +201Magenta1#ff00ffrgb(255,0,255)hsl(300,100%,50%) +202OrangeRed1#ff5f00rgb(255,95,0)hsl(2,100%,50%) +203IndianRed1#ff5f5frgb(255,95,95)hsl(0,100%,68%) +204IndianRed1#ff5f87rgb(255,95,135)hsl(345,100%,68%) +205HotPink#ff5fafrgb(255,95,175)hsl(330,100%,68%) +206HotPink#ff5fd7rgb(255,95,215)hsl(315,100%,68%) +207MediumOrchid1#ff5fffrgb(255,95,255)hsl(300,100%,68%) +208DarkOrange#ff8700rgb(255,135,0)hsl(1,100%,50%) +209Salmon1#ff875frgb(255,135,95)hsl(15,100%,68%) +210LightCoral#ff8787rgb(255,135,135)hsl(0,100%,76%) +211PaleVioletRed1#ff87afrgb(255,135,175)hsl(340,100%,76%) +212Orchid2#ff87d7rgb(255,135,215)hsl(320,100%,76%) +213Orchid1#ff87ffrgb(255,135,255)hsl(300,100%,76%) +214Orange1#ffaf00rgb(255,175,0)hsl(1,100%,50%) +215SandyBrown#ffaf5frgb(255,175,95)hsl(30,100%,68%) +216LightSalmon1#ffaf87rgb(255,175,135)hsl(20,100%,76%) +217LightPink1#ffafafrgb(255,175,175)hsl(0,100%,84%) +218Pink1#ffafd7rgb(255,175,215)hsl(330,100%,84%) +219Plum1#ffafffrgb(255,175,255)hsl(300,100%,84%) +220Gold1#ffd700rgb(255,215,0)hsl(0,100%,50%) +221LightGoldenrod2#ffd75frgb(255,215,95)hsl(45,100%,68%) +222LightGoldenrod2#ffd787rgb(255,215,135)hsl(40,100%,76%) +223NavajoWhite1#ffd7afrgb(255,215,175)hsl(30,100%,84%) +224MistyRose1#ffd7d7rgb(255,215,215)hsl(0,100%,92%) +225Thistle1#ffd7ffrgb(255,215,255)hsl(300,100%,92%) +226Yellow1#ffff00rgb(255,255,0)hsl(60,100%,50%) +227LightGoldenrod1#ffff5frgb(255,255,95)hsl(60,100%,68%) +228Khaki1#ffff87rgb(255,255,135)hsl(60,100%,76%) +229Wheat1#ffffafrgb(255,255,175)hsl(60,100%,84%) +230Cornsilk1#ffffd7rgb(255,255,215)hsl(60,100%,92%) +231Grey100#ffffffrgb(255,255,255)hsl(0,0%,100%) +232Grey3#080808rgb(8,8,8)hsl(0,0%,3%) +233Grey7#121212rgb(18,18,18)hsl(0,0%,7%) +234Grey11#1c1c1crgb(28,28,28)hsl(0,0%,10%) +235Grey15#262626rgb(38,38,38)hsl(0,0%,14%) +236Grey19#303030rgb(48,48,48)hsl(0,0%,18%) +237Grey23#3a3a3argb(58,58,58)hsl(0,0%,22%) +238Grey27#444444rgb(68,68,68)hsl(0,0%,26%) +239Grey30#4e4e4ergb(78,78,78)hsl(0,0%,30%) +240Grey35#585858rgb(88,88,88)hsl(0,0%,34%) +241Grey39#626262rgb(98,98,98)hsl(0,0%,37%) +242Grey42#6c6c6crgb(108,108,108)hsl(0,0%,40%) +243Grey46#767676rgb(118,118,118)hsl(0,0%,46%) +244Grey50#808080rgb(128,128,128)hsl(0,0%,50%) +245Grey54#8a8a8argb(138,138,138)hsl(0,0%,54%) +246Grey58#949494rgb(148,148,148)hsl(0,0%,58%) +247Grey62#9e9e9ergb(158,158,158)hsl(0,0%,61%) +248Grey66#a8a8a8rgb(168,168,168)hsl(0,0%,65%) +249Grey70#b2b2b2rgb(178,178,178)hsl(0,0%,69%) +250Grey74#bcbcbcrgb(188,188,188)hsl(0,0%,73%) +251Grey78#c6c6c6rgb(198,198,198)hsl(0,0%,77%) +252Grey82#d0d0d0rgb(208,208,208)hsl(0,0%,81%) +253Grey85#dadadargb(218,218,218)hsl(0,0%,85%) +254Grey89#e4e4e4rgb(228,228,228)hsl(0,0%,89%) +255Grey93#eeeeeergb(238,238,238)hsl(0,0%,93%) diff --git a/bin/kaminokumo b/bin/kaminokumo new file mode 120000 index 0000000..f116475 --- /dev/null +++ b/bin/kaminokumo @@ -0,0 +1 @@ +/home/devi/kaminokumo/kaminokumo \ No newline at end of file diff --git a/bin/leb128 b/bin/leb128 new file mode 100755 index 0000000..02a11e5 --- /dev/null +++ b/bin/leb128 @@ -0,0 +1,117 @@ +#!/bin/python3 + +import argparse +import code +import signal +import sys + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +def devibytes(val): + ret = [] + for byte in val.split(","): + ret.append(int(byte, 16)) + return bytes(ret) + + +def LEB128UnsignedDecode(bytelist): + result = 0 + shift = 0 + for byte in bytelist: + result |= (byte & 0x7f) << shift + if (byte & 0x80) == 0: + break + shift += 7 + return(result) + + +def LEB128SignedDecode(bytelist): + result = 0 + shift = 0 + for byte in bytelist: + result |= (byte & 0x7f) << shift + last_byte = byte + shift += 7 + if (byte & 0x80) == 0: + break + if last_byte & 0x40: + result |= - (1 << shift) + return(result) + + +def LEB128UnsignedEncode(int_val): + if int_val < 0: + raise Exception("value must not be negative") + elif int_val == 0: + return bytes([0]) + byte_array = bytearray() + while int_val: + byte = int_val & 0x7f + byte_array.append(byte | 0x80) + int_val >>= 7 + byte_array[-1] ^= 0x80 + return(byte_array) + + +def LEB128SignedEncode(int_val): + byte_array = bytearray() + while True: + byte = int_val & 0x7f + byte_array.append(byte | 0x80) + int_val >>= 7 + if (int_val == 0 and byte & 0x40 == 0) or (int_val == -1 and byte & 0x40): + byte_array[-1] ^= 0x80 + break + return(byte_array) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--se", type=int, help="leb128 signed encode") + parser.add_argument("--ue", type=int, help="leb128 unsigned encode") + parser.add_argument( + "--sd", type=devibytes, help="leb128 signed decode. pass a string like ef1289.") + parser.add_argument( + "--ud", type=devibytes, help="leb128 unsigned decode. pass a string like ef1290") + self.args = parser.parse_args() + +# write code here + + +def premain(): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + argparser = Argparser() + # here + if argparser.args.se: + res = LEB128SignedEncode(argparser.args.se) + for byte in res: + print(format(byte, "02x"), end=" ") + print() + if argparser.args.ue: + res = LEB128UnsignedEncode(argparser.args.ue) + for byte in res: + print(format(byte, "02x"), end=" ") + print() + if argparser.args.sd: + print(LEB128SignedDecode(argparser.args.sd)) + if argparser.args.ud: + print(LEB128UnsignedDecode(argparser.args.ud)) + + +def main(): + try: + premain() + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="LEB128 DEBUG REPL") + + +if __name__ == "__main__": + main() diff --git a/bin/llvm-wasm b/bin/llvm-wasm new file mode 100755 index 0000000..a1d0cfd --- /dev/null +++ b/bin/llvm-wasm @@ -0,0 +1,10 @@ +#!/bin/bash + +fullname=$1 +namelength=${#fullname} +offset=$((${#fullname} - 2)) +filename=${fullname:0:$offset} +"clang" -emit-llvm --target=wasm32 -Oz "$1" -c +"llc" -asm-verbose=false -o $filename.s $filename.bc +"s2wasm" $filename.s > $filename.wast +"wast2wasm" $filename.wast -o $filename.wasm diff --git a/bin/lorem-ipsum b/bin/lorem-ipsum new file mode 100755 index 0000000..e6ff643 --- /dev/null +++ b/bin/lorem-ipsum @@ -0,0 +1,9 @@ +#!/usr/bin/env perl + +use Text::Lorem; + +my $text = Text::Lorem->new(); +$paragraphs = $text->paragraphs(10); + +print $paragraphs; +print "\n"; diff --git a/bin/manga_dmenu.sh b/bin/manga_dmenu.sh new file mode 100755 index 0000000..436968b --- /dev/null +++ b/bin/manga_dmenu.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh +# until kaminokumo --manga; do done | dmenu -nhb "dark slate gray" -nhf white -shb "forest green" -shf white -l 12 -p "Manga List:" > /dev/null +source ~/scripts/zshrc_stripped.sh +until kaminokumo --manga; do done | dmenu -p "Manga List:" > /dev/null + diff --git a/bin/mushi b/bin/mushi new file mode 120000 index 0000000..40079cb --- /dev/null +++ b/bin/mushi @@ -0,0 +1 @@ +../mushi.py \ No newline at end of file diff --git a/bin/postit.sh b/bin/postit.sh new file mode 100755 index 0000000..d0556a8 --- /dev/null +++ b/bin/postit.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +POSTIT=$(cat ~/devi/abbatoir/postit | dmenu -l 20 -p "Select Postit:") +echo -n "${POSTIT:0:${#POSTIT}}" | xsel -ip diff --git a/bin/ramdump b/bin/ramdump new file mode 120000 index 0000000..7fe85cf --- /dev/null +++ b/bin/ramdump @@ -0,0 +1 @@ +/home/bloodstalker/extra/MemDump/ramdump \ No newline at end of file diff --git a/bin/run_with_dmenu.sh b/bin/run_with_dmenu.sh new file mode 100755 index 0000000..c7bf9dd --- /dev/null +++ b/bin/run_with_dmenu.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env zsh + +# set -o pipefail +source ~/scripts/zshrc_stripped.sh +COMMAND=$(echo "" | dmenu -h 20 -p "Quick Term:") +RESULT=$(eval "$COMMAND") +echo $RESULT | dmenu -h 20 -p "Quick Term Out:" > /dev/null diff --git a/bin/sniff b/bin/sniff new file mode 100755 index 0000000..3ecf3f4 --- /dev/null +++ b/bin/sniff @@ -0,0 +1,105 @@ +#!/usr/bin/python3 + +import argparse +import code +import signal +import sys +import re +from requests import get +from requests.exceptions import RequestException +from contextlib import closing +from bs4 import BeautifulSoup + + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + + +def simple_get(url): + try: + with closing(get(url, stream=True)) as resp: + if is_good_response(resp): + return resp.content + else: + return None + except RequestException as e: + log_error("Error during requests to {0} : {1}".format(url, str(e))) + return None + + +def is_good_response(resp): + content_type = resp.headers['Content-Type'].lower() + return (resp.status_code == 200 and content_type is not None and content_type.find("html") > -1) + + +def log_error(e): + print(e) + + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--src", type=str, help="url") + parser.add_argument("--str", type=str, help="what string to look for") + parser.add_argument("--vid", action="store_true", + help="video", default=False) + parser.add_argument("--dbg", action="store_true", + help="debug", default=False) + parser.add_argument("--url", action="store_true", + help="url", default=False) + self.args = parser.parse_args() + + +VID_FMT = ["webm", "mpg", "mp2", "mpeg", "mpe", "mpv", "ogg", + "mp4", "m4p", "m4v", "flv", "avi", "wmv", "mkv", "svi"] +# write code here + + +def premain(argparser): + signal.signal(signal.SIGINT, SigHandler_SIGINT) + # here + raw_ml = simple_get(argparser.args.src) + # print("raw html length is " + repr(len(raw_ml))) + ml = BeautifulSoup(raw_ml, "lxml") + ml_str = repr(ml) + tmp = open("/tmp/riecher", "w") + tmp.write(ml_str) + tmp.close() + tmp = open("/tmp/riecher", "r") + if argparser.args.src: + if argparser.args.vid: + for line in tmp: + # hit = False + for elem in VID_FMT: + if line.find("."+elem) > -1: + print(line) + # hit = True + if argparser.args.url: + dump_list = [] + for line in tmp: + dummy = re.findall( + 'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', line) + dump_list += dummy + for elem in dump_list: + print(elem) + + tmp.close() + + +def main(): + argparser = Argparser() + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + + +if __name__ == "__main__": + main() diff --git a/c/debug.dbg b/c/debug.dbg new file mode 100644 index 0000000..36b21f6 --- /dev/null +++ b/c/debug.dbg @@ -0,0 +1,15 @@ + +set width 0 +set height 0 +set verbose off + +b main +commands 1 + print argc + print argv[0] + continue +end + +file ./main-dbg +run + diff --git a/c/devi_extra.h b/c/devi_extra.h new file mode 100644 index 0000000..9ef66b3 --- /dev/null +++ b/c/devi_extra.h @@ -0,0 +1,33 @@ + +/*first line intentionally left blank.*/ +/**********************************************************************************************************************/ +#include +#include +/**********************************************************************************************************************/ +#ifndef DEVI_EXTRA_H +#define DEVI_EXTRA_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define RED "\033[1;31m" +#define CYAN "\033[1;36m" +#define GREEN "\033[1;32m" +#define BLUE "\033[1;34m" +#define BLACK "\033[1;30m" +#define BROWN "\033[1;33m" +#define MAGENTA "\033[1;35m" +#define GRAY "\033[1;37m" +#define DARKGRAY "\033[1;30m" +#define YELLOW "\033[1;33m" +#define NORMAL "\033[0m" +#define CLEAR "\033[2J" + +#ifdef __cplusplus +} +#endif +#endif +/**********************************************************************************************************************/ +/*last line intentionally left blank.*/ + diff --git a/c/header.hpp b/c/header.hpp new file mode 100644 index 0000000..2df2a5a --- /dev/null +++ b/c/header.hpp @@ -0,0 +1,4 @@ + +#include +#include +#include diff --git a/c/main.c b/c/main.c new file mode 100644 index 0000000..8cc320a --- /dev/null +++ b/c/main.c @@ -0,0 +1,12 @@ + +#include +#include +#include +#include + +#define __maybe_unused__ __attribute__((unused)) + +#pragma weak main +int main (int argc, char** argv) { + return 0; +} diff --git a/c/main.cpp b/c/main.cpp new file mode 100644 index 0000000..4e1d93b --- /dev/null +++ b/c/main.cpp @@ -0,0 +1,6 @@ + +#include "header.hpp" + +int main (int argc, char** argv) { + return 0; +} diff --git a/cfam.vimrc b/cfam.vimrc new file mode 100644 index 0000000..e34c70f --- /dev/null +++ b/cfam.vimrc @@ -0,0 +1,10 @@ +set tabstop=2 +"set softtabstop=4 +set shiftwidth=2 +set noexpandtab +augroup project + autocmd! + autocmd BufRead,BufNewFile *.h,*.c set filetype=c.doxygen +augroup END + +set tags=./tags diff --git a/checknodeversion.sh b/checknodeversion.sh new file mode 100755 index 0000000..9f13e80 --- /dev/null +++ b/checknodeversion.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +function check_node_version() { + MIN_VERSION="7.6.0" + if [[ "$MIN_VERSION" == "$1" ]]; then return 0;fi + local IFS=. + VERSION="${1:1}" + local i ver1=($MIN_VERSION) ver2=($VERSION) + for ((i=0; i < ${#ver1[@]}; i++)); do + if [[ 10#${ver1[i]} > 10#${ver2[i]} ]]; then return 1;fi + if [[ 10#${ver1[i]} < 10#${ver2[i]} ]]; then return 0;fi + done +} + +NODE_VERSION=$(node --version) +check_node_version $NODE_VERSION +if [[ $? == 1 ]]; then echo "node version is too old. please use v.7.6.0 or newer." && exit 1; fi +echo "node version is new enough!" diff --git a/compiler-explorer/ceconfig.json b/compiler-explorer/ceconfig.json new file mode 100644 index 0000000..386a2cc --- /dev/null +++ b/compiler-explorer/ceconfig.json @@ -0,0 +1,14 @@ +{"userArguments":"-O3", + "filters":{ + "binary":false, + "commentOnly":true, + "demangle":true, + "directives":true, + "execute":false, + "intel":true, + "labels":true, + "lables":true, + "libraryCode":false, + "trim":false + } +} diff --git a/compiler-explorer/index.js b/compiler-explorer/index.js new file mode 100644 index 0000000..fae05b7 --- /dev/null +++ b/compiler-explorer/index.js @@ -0,0 +1,21 @@ + +const fetch = require('node-fetch') +const fs = require("fs") +const util = require("util") +const readFile = util.promisify(fs.readFile) + +async function JSON_POST_req(data,options) { + var dummy = {"source": data.toString(), "options":"{}"} + return await {method:"POST", body:JSON.stringify(dummy), headers:{"Content-Type":"application/json"}} +} + +function compiler_explorer(data, options) { + JSON_POST_req(data, options).then(post_arg=> + fetch("https://godbolt.org/api/compiler/g92/compile?options=-O3", post_arg)).then(res=> + res.text()).then(body=> + console.log(body.split("\n").slice(1,body.split("\n").length).join("\n"))).catch(error=> + console.log(error)) +} + +const config = JSON.parse(fs.readFileSync("./ceconfig.json")) +compiler_explorer(process.argv[2], config) diff --git a/compiler-explorer/main.js b/compiler-explorer/main.js new file mode 100644 index 0000000..1b142c3 --- /dev/null +++ b/compiler-explorer/main.js @@ -0,0 +1,45 @@ + +const fetch = require('node-fetch') +const fs = require("fs") +const util = require("util") +const readFile = util.promisify(fs.readFile) +const path = require("path") +const defaultOpts = { +"userArguments":"-O3", "filters": + {"binary":false, + "commentOnly":true, + "demangle":true, + "directives":true, + "execute":false, + "intel":true, + "labels":true, + "lables":true, + "libraryCode":false, + "trim":false + } +} + +async function read_C_source(path) { + return await readFile(path, "utf-8") +} + +function JSON_POST_req(data, options) { + const config = fs.readFileSync(options, "utf-8") + var dummy = {"source": data, "options": JSON.parse(config)} + /* if no config found, then run default + var dummy = {"source": data, "options": defaultOpts} + */ + return {method:"POST", body:JSON.stringify(dummy), headers:{"Content-Type":"application/json"}} +} + +function compiler_explorer(path, options) { + read_C_source(path).then(data=> + JSON_POST_req(data, options)).then(post_arg=> + fetch("https://godbolt.org/api/compiler/g92/compile", post_arg)).then(res=> + res.text()).then(body=> + console.log(body.split("\n").slice(1,body.split("\n").length).join("\n"))).catch(error=> + console.log(error)) +} + +if (process.argv.length < 3) {console.log("you did not specify enough args. needs two. path to source code and path to options to pass to compiler explorer.")} +else {compiler_explorer(process.argv[2], process.argv[3])} diff --git a/compiler-explorer/package.json b/compiler-explorer/package.json new file mode 100644 index 0000000..1b60c79 --- /dev/null +++ b/compiler-explorer/package.json @@ -0,0 +1,14 @@ +{ + "name": "compiler-explorer", + "version": "1.0.0", + "description": "", + "main": "main.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Farzad Sadeghi", + "license": "GPL-3.0-or-later", + "dependencies": { + "node-fetch": ">=2.1.2" + } +} diff --git a/crontab b/crontab new file mode 100644 index 0000000..add2fb7 --- /dev/null +++ b/crontab @@ -0,0 +1 @@ +59 * * * * if [[ $(yy --alive) == hived ]]; then :;else yy --demon &;fi diff --git a/cygwin/.tmux.conf b/cygwin/.tmux.conf new file mode 100644 index 0000000..5fbae37 --- /dev/null +++ b/cygwin/.tmux.conf @@ -0,0 +1,59 @@ + +set -g default-terminal "tmux-256color" +set-option -g prefix C-a + +#key bindings +bind | split-window -h +bind - split-window -v +bind -r k select-pane -U +bind -r j select-pane -D +bind -r h select-pane -L +bind -r l select-pane -R +bind -n S-Right next-window +bind -n S-Left previous-window +bind -n M-Up select-pane -U +bind -n M-Down select-pane -D +bind -n M-Left select-pane -L +bind -n M-Right select-pane -R +setw -g mode-keys vi +bind [ copy-mode +bind -T copy-mode-vi 'v' send -X begin-selection +bind -T copy-mode-vi 'y' send -X copy-selection-and-cancel +#bind -T copy-mode-vi 'V' rectangle-toggle +bind ] paste-buffer +bind Space choose-buffer + +#move windows +bind-key -n C-S-Left swap-window -t -1 +bind-key -n C-S-Right swap-window -t +1 + +#unbindings +unbind Up +unbind Down +unbind Left +unbind Right + +#color stuff +set -g status-bg colour16 +set -g status-position bottom +set -g status-justify left +set -g status-fg colour137 +set -g status-attr dim +set -g status-left "" +set -g status-right "#[fg=colour16,bg=colour32,bold] %d/%m #[fg=colour16,bg=colour22,bold] %H:%M:%S " +set -g status-right-length 70 +set -g status-left-length 70 +setw -g window-status-current-fg colour6 +setw -g window-status-current-bg colour22 +setw -g window-status-current-attr bold +setw -g window-status-current-format " #I#[fg=colour16]:#[fg=colour16]#W#[fg=colour16]#F " +setw -g window-status-fg colour0 +setw -g window-status-bg colour23 +setw -g window-status-attr none +setw -g window-status-format "#[fg=colour1, bold] #I#[fg=colour1, bold]:#[fg=colour16]#W#[fg=colour16]#F " +setw -g window-status-bell-attr bold +setw -g window-status-bell-fg colour255 +setw -g window-status-bell-bg colour64 +# message text +set -g message-attr bold +set -g message-style bg='#44475a',fg='#8be9fd' diff --git a/cygwin/.zshrc b/cygwin/.zshrc new file mode 100644 index 0000000..eedd697 --- /dev/null +++ b/cygwin/.zshrc @@ -0,0 +1,89 @@ + +COMPLETION_WAITING_DOTS="true" +plugins=(git svn zsh-syntax-highlighting autojump vi-mode) +export ZSH=~/.oh-my-zsh + +if [[ -n "$INSIDE_EMACS" ]]; then + ZSH_THEME="simple" +else + ZSH_THEME="devi" +fi + +COMPLETION_WAITING_DOTS="true" +plugins=( + git + zsh-syntax-highlighting + autojump +) +source $ZSH/oh-my-zsh.sh +function dig { + globalholecounter=0 + if [ -d ~/abbatoir ]; then + while [ 1 ]; do + if [ -d ~/abbatoir/hole$globalholecounter ]; then + if test "$(ls -A ~/abbatoir/hole$globalholecounter)"; then + : + else + cd ~/abbatoir/hole$globalholecounter + break + fi + else + mkdir ~/abbatoir/hole$globalholecounter + cd ~/abbatoir/hole$globalholecounter + echo $globalholecounter + break + fi + ((globalholecounter++)) + done + else + mkdir ~/abbatoir + mkdir ~/abbatoir/hole$globalholecounter + cd ~/abbatoir/hole$globalholecounter + fi +} +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='mvim' +fi +alias quit="exit" +alias clean="clear" +alias la="ls -A" +alias digg="dig && clear" +alias lss="ls -s" +alias diff="colordiff" +function clearhalf { + size=$(stty size|gawk '{print$1}') + size=$(($size/2)) + tput cup $size 0 && tput ed +} +alias cleanhalf="clearhalf" +alias halfclear="clearhalf" +alias halfclean="clearhalf" +alias mv="mv -i" +alias cp="cp -i" +alias contest="ping 4.2.2.4 -c 7" +function math { + echo $(($1)) +} + +alias ee="explorer ." +alias vi="vim" +alias lynx="lynx -lss ~/lynx.lss -prettysrc " +alias tmux="tmux -2" +function pdfsearch { + tempfile=$(mktemp) + for filename in /cygdrive/d/mi-server/ETCS/ONBOARD.KERNEL/RM/STD/*.pdf; do + echo $filename >> $tempfile + done + RGX=$1 + shift + pdfgrep $RGX "$@" $(cat $tempfile) +} + +REPORTTIME=4 +export BROWSER=lynx +bindkey -v +export KEYTIMEOUT=1 +export VIRTUAL_ENV_DISABLE_PROMPT=yes +export TERM=screen-256color diff --git a/cygwin/ChangeCapsToControl.reg b/cygwin/ChangeCapsToControl.reg new file mode 100755 index 0000000..4bdf091 Binary files /dev/null and b/cygwin/ChangeCapsToControl.reg differ diff --git a/cygwin/_emacs.el b/cygwin/_emacs.el new file mode 100755 index 0000000..c68c7d7 --- /dev/null +++ b/cygwin/_emacs.el @@ -0,0 +1,124 @@ + +(require 'package) +(setq package-enable-at-startup nil) +(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) + (not (gnutls-available-p)))) + (proto (if no-ssl "http" "https"))) + (when no-ssl + (warn "\ +Your version of Emacs does not support SSL connections, +which is unsafe because it allows man-in-the-middle attacks. +There are two things you can do about this warning: +1. Install an Emacs version that does support SSL and be safe. +2. Remove this warning from your init file so you won't see it again.")) + ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired +(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) +;;(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) +(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t) +(add-to-list 'package-archives (cons "org" (concat proto "://orgmode.org/elpa/")) t) +(when (< emacs-major-version 24) + ;; For important compatibility libraries like cl-lib + (add-to-list 'package-archives (cons "elpa" (concat proto "://elpa.gnu.org/packages/"))))) +;;(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) +(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t) +(package-initialize) +(add-to-list 'load-path "~/.emacs.d/evil") + +(require 'evil) +(evil-mode 1) +(helm-mode 1) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ansi-color-names-vector + ["#212337" "#ff5370" "#c7f59b" "#ffbd76" "#70b0ff" "#baacff" "#34d3fb" "#e4f3fa"]) + '(column-number-mode t) + '(custom-safe-themes + (quote + ("84d2f9eeb3f82d619ca4bfffe5f157282f4779732f48a5ac1484d94d5ff5b279" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c8f959fb1ea32ddfc0f50db85fea2e7d86b72bb4d106803018be1c3566fd6c72" "2a3ffb7775b2fe3643b179f2046493891b0d1153e57ec74bbe69580b951699ca" "1728dfd9560bff76a7dc6c3f61e9f4d3e6ef9d017a83a841c117bd9bebe18613" "f589e634c9ff738341823a5a58fc200341b440611aaa8e0189df85b44533692b" "0713580a6845e8075113a70275b3421333cfe7079e48228c52300606fa5ce73b" "f30aded97e67a487d30f38a1ac48eddb49fdb06ac01ebeaff39439997cbdd869" "2d1fe7c9007a5b76cea4395b0fc664d0c1cfd34bb4f1860300347cdad67fb2f9" default))) + '(display-battery-mode t) + '(display-line-numbers-type (quote relative)) + '(display-time-mode t) + '(fci-rule-color "#383e5c") + '(jdee-db-active-breakpoint-face-colors (cons "#161a2a" "#baacff")) + '(jdee-db-requested-breakpoint-face-colors (cons "#161a2a" "#c7f59b")) + '(jdee-db-spec-breakpoint-face-colors (cons "#161a2a" "#383e5c")) + '(objed-cursor-color "#ff5370") + '(package-selected-packages + (quote + (powerline linum-relative pdfgrep pdf-tools smart-mode-line-powerline-theme smart-mode-line powerline-evil neotree tabbar helm doom-themes evil))) + '(show-paren-mode t) + '(size-indication-mode t) + '(vc-annotate-background "#212337") + '(vc-annotate-color-map + (list + (cons 20 "#c7f59b") + (cons 40 "#d9e28e") + (cons 60 "#eccf82") + (cons 80 "#ffbd76") + (cons 100 "#ffb071") + (cons 120 "#ffa36c") + (cons 140 "#ff9668") + (cons 160 "#e89d9a") + (cons 180 "#d1a4cc") + (cons 200 "#baacff") + (cons 220 "#d18ecf") + (cons 240 "#e8709f") + (cons 260 "#ff5370") + (cons 280 "#cd4d6b") + (cons 300 "#9b4866") + (cons 320 "#694361") + (cons 340 "#383e5c") + (cons 360 "#383e5c"))) + '(vc-annotate-very-old-color nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:family "DejaVu Sans Mono" :foundry "outline" :slant normal :weight bold :height 98 :width normal))))) +;;(evil-mode t) + +(require 'doom-themes) +(setq inhibit-startup-screen t) +(load-theme 'doom-one) + +(setq doom-line-numbers-style 'relative) +(setq evil-emacs-state-cursor '("red" box)) +(setq evil-normal-state-cursor '("green" box)) +(setq evil-visual-state-cursor '("orange" box)) +(setq evil-insert-state-cursor '("blue" bar)) +(setq evil-replace-state-cursor '("red" bar)) +(setq evil-operator-state-cursor '("red" hollow)) + + +(require 'powerline-evil) +(powerline-evil-vim-color-theme) + +;; These two lines are just examples +;;(setq powerline-arrow-shape 'curve) +;;(setq powerline-default-separator-dir '(right . left)) +;; These two lines you really need. +(setq sml/theme 'powerline) +(sml/setup) + +(setq shell-file-name (executable-find "zsh.exe")) +;;(setq shell-file-name (executable-find "zsh-5.5.1.exe")) + +(setenv "PATH" (concat (getenv "PATH") ":D:\\home\\apps\\cygwin\\bin")) +;;(setq exec-path (append exec-path '("D:\\home\\apps\\cygwin\\bin"))) +(setq explicit-shell-file-name "D:\\home\\apps\\cygwin\\bin\\zsh.exe") +(setq shell-file-name "zsh") +(setq explicit-zsh.exe-args '("-l" "-i")) + +(setq display-line-numbers-mode t) +(setq display-line-numbers 'relative) +;;wont be able to open pdf's in docview mode without ghostscript +(setq doc-view-ghostscript-program "C:\\Program Files\\gs\\gs9.50\\bin\\gswin64.exe") +;;settings this for zsh. basically lets zsh know its running inside emacs and not a terminal +(setenv "INSIDE_EMACS") +(windmove-default-keybindings) + +(global-display-line-numbers-mode) diff --git a/cygwin/alac.bat b/cygwin/alac.bat new file mode 100755 index 0000000..52c5fc6 --- /dev/null +++ b/cygwin/alac.bat @@ -0,0 +1,2 @@ +"C:\Program Files\Alacritty\alacritty.exe" -e E:\cygwin\bin\zsh.exe -l -i +pause diff --git a/cygwin/alacritty.yml b/cygwin/alacritty.yml new file mode 100644 index 0000000..68cf978 --- /dev/null +++ b/cygwin/alacritty.yml @@ -0,0 +1,747 @@ +# Configuration for Alacritty, the GPU enhanced terminal emulator + +# Any items in the `env` entry below will be added as +# environment variables. Some entries may override variables +# set by alacritty it self. +# env: + # TERM env customization. + # + # If this property is not set, alacritty will set it to xterm-256color. + # + # Note that some xterm terminfo databases don't declare support for italics. + # You can verify this by checking for the presence of `smso` and `sitm` in + # `infocmp xterm-256color`. + # TERM: cygwin + +window: + # Window dimensions (changes require restart) + # + # Specified in number of columns/lines, not pixels. If both are zero this + # setting is ignored. + dimensions: + columns: 100 + lines: 85 + + # Window padding (changes require restart) + # + # Blank space added around the window in pixels. This padding is not scaled by + # DPI and the specified value is always added at both opposing sides. + padding: + x: 0 + y: 0 + + # Spread additional padding evenly around the terminal content. + dynamic_padding: false + + # Window decorations + # + # Available values: + # - full: borders and title bar + # - none: neither borders nor title bar + # - transparent: title bar, transparent background and title bar buttons + # - buttonless: title bar, transparent background, but no title bar buttons + decorations: full + + # Startup Mode (changes require restart) + # + # Values for `startup_mode`: + # - Windowed + # - Maximized + # - Fullscreen + # + # Values for `startup_mode` (macOS only): + # - SimpleFullscreen + startup_mode: Windowed + +scrolling: + # maximum number of lines in the scrollback buffer. Specifying '0' will + # disable scrolling. + history: 0 + + # Number of lines the viewport will move for every line scrolled when + # scrollback is enabled (history > 0). + multiplier: 3 + +# Font configuration (changes require restart) +font: + # The normal (roman) font face to use. + # Style can be specified to pick a specific face. + normal: + family: DejaVuSansMono NF + # family: "Fira Code" + # family: "Source Code Pro" + # style: Retina + + # The bold font face + bold: + family: DejaVuSansMono NF + # family: "Fira Code" + # family: "Source Code Pro" + + # The italic font face + italic: + family: DejaVuSansMono NF + # family: "Fira Code" + # family: "Source Code Pro" + # style: "Medium Italic" + + # Point size of the font + size: 12.0 + + # Offset is the extra space around each character. offset.y can be thought of + # as modifying the linespacing, and offset.x as modifying the letter spacing. + offset: + x: 0 + y: 0 + + # Glyph offset determines the locations of the glyphs within their cells with + # the default being at the bottom. Increase the x offset to move the glyph to + # the right, increase the y offset to move the glyph upward. + glyph_offset: + x: 0 + y: 0 + + # Thin stroke font rendering (macOS only) + # + # Thin strokes are suitable for retina displays, but for non-retina you + # probably want this set to false. + # + # macOS >= 10.14.x: + # + # If the font quality on non-retina display looks bad then set + # `use_thin_strokes` to `true` and enable font smoothing by running the + # following command: + # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` + # + # This is a global setting and will require a log out or restart to take + # effect. + use_thin_strokes: true + +# When true, bold text is drawn using the bright variant of colors. +draw_bold_text_with_bright_colors: false + +# Use custom cursor colors. If true, display the cursor in the cursor.foreground +# and cursor.background colors, otherwise invert the colors of the cursor. +# custom_cursor_colors: false + +# Colors +colors: + # Default colours + primary: + background: '0x000000' + foreground: '0x808080' + + # Colors that should be used to draw the terminal cursor. If these are unset, + # the cursor colour will be the inverse of the cell colour. + # cursor: + text: '0x2e2e2d' + # text: '0x000000' + cursor: '0xffffff' + + # Normal colors + normal: + black: '0x000000' + red: '0xc62828' + green: '0x558b2f' + yellow: '0xf9a825' + blue: '0x1565c0' + magenta: '0x6a1e9a' + cyan: '0x00838f' + white: '0xffffff' + + # Bright colors + bright: + black: '0x000000' + red: '0xef5350' + green: '0x8bc34a' + yellow: '0xffeb3b' + blue: '0x64b5f6' + magenta: '0xba68c8' + cyan: '0x26c6da' + white: '0xffffff' + + # Dim colors (Optional) + dim: + black: '0x000000' + red: '0xf2777a' + green: '0x99cc99' + yellow: '0xffcc66' + blue: '0x6699cc' + magenta: '0xcc99cc' + cyan: '0x66cccc' + white: '0xffffff' + + # Tomorrow Night Bright + # primary: + # background: '0x000000' + # foreground: '0xeaeaea' + # + # cursor: + # text: '0x000000' + # cursor: '0xffffff' + # + # normal: + # black: '0x000000' + # red: '0xd54e53' + # green: '0xb9ca4a' + # yellow: '0xe6c547' + # blue: '0x7aa6da' + # magenta: '0xc397d8' + # cyan: '0x70c0ba' + # white: '0xffffff' + # + # bright: + # black: '0x666666' + # red: '0xff3334' + # green: '0x9ec400' + # yellow: '0xe7c547' + # blue: '0x7aa6da' + # magenta: '0xb77ee0' + # cyan: '0x54ced6' + # white: '0xffffff' + + # Indexed Colors + # + # The indexed colors include all colors from 16 to 256. + # When these are not set, they're filled with sensible defaults. + # + # Example: + # `- { index: 16, color: '0xff00ff' }` + # + indexed_colors: [] + +# Visual Bell +# +# Any time the BEL code is received, Alacritty "rings" the visual bell. Once +# rung, the terminal background will be set to white and transition back to the +# default background color. You can control the rate of this transition by +# setting the `duration` property (represented in milliseconds). You can also +# configure the transition function by setting the `animation` property. +# +# Possible values for `animation` +# `Ease` +# `EaseOut` +# `EaseOutSine` +# `EaseOutQuad` +# `EaseOutCubic` +# `EaseOutQuart` +# `EaseOutQuint` +# `EaseOutExpo` +# `EaseOutCirc` +# `Linear` +# +# To completely disable the visual bell, set its duration to 0. +# +bell: + animation: EaseOutExpo + color: '0xffffff' + duration: 0 + +# Background opacity +background_opacity: 1.0 + +# Key bindings +# +# Key bindings are specified as a list of objects. Each binding will specify a +# key and modifiers required to trigger it, terminal modes where the binding is +# applicable, and what should be done when the key binding fires. It can either +# send a byte sequence to the running application (`chars`), execute a +# predefined action (`action`) or fork and execute a specified command plus +# arguments (`command`). +# +# Bindings are always filled by default, but will be replaced when a new binding +# with the same triggers is defined. To unset a default binding, it can be +# mapped to the `None` action. +# +# Example: +# `- { key: V, mods: Control|Shift, action: Paste }` +# +# Available fields: +# - key +# - mods (optional) +# - chars | action | command (exactly one required) +# - mode (optional) +# +# Values for `key`: +# - `A` -> `Z` +# - `F1` -> `F12` +# - `Key1` -> `Key0` +# +# A full list with available key codes can be found here: +# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants +# +# Instead of using the name of the keys, the `key` field also supports using +# the scancode of the desired key. Scancodes have to be specified as a +# decimal number. +# This command will allow you to display the hex scancodes for certain keys: +# `showkey --scancodes` +# +# Values for `mods`: +# - Command +# - Control +# - Option +# - Super +# - Shift +# - Alt +# +# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. +# Whitespace and capitalization is relevant and must match the example. +# +# Values for `chars`: +# The `chars` field writes the specified string to the terminal. This makes +# it possible to pass escape sequences. +# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run +# the command `showkey -a` outside of tmux. +# Note that applications use terminfo to map escape sequences back to +# keys. It is therefore required to update the terminfo when +# changing an escape sequence. +# +# Values for `action`: +# - Paste +# - PasteSelection +# - Copy +# - IncreaseFontSize +# - DecreaseFontSize +# - ResetFontSize +# - ScrollPageUp +# - ScrollPageDown +# - ScrollLineUp +# - ScrollLineDown +# - ScrollToTop +# - ScrollToBottom +# - ClearHistory +# - Hide +# - Quit +# - ClearLogNotice +# - SpawnNewInstance +# - ToggleFullscreen +# - None +# +# Values for `action` (macOS only): +# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space +# +# Values for `command`: +# The `command` field must be a map containing a `program` string and +# an `args` array of command line parameter strings. +# +# Example: +# `command: { program: "alacritty", args: ["-e", "vttest"] }` +# +# Values for `mode`: +# - ~AppCursor +# - AppCursor +# - ~AppKeypad +# - AppKeypad +# +key_bindings: + - { key: V, mods: Command, action: Paste } + - { key: C, mods: Command, action: Copy } + - { key: Q, mods: Command, action: Quit } + - { key: N, mods: Command, action: SpawnNewInstance } + - { key: Return, mods: Command, action: ToggleFullscreen } + + - { key: Home, chars: "\x1bOH", mode: AppCursor } + - { key: Home, chars: "\x1b[H", mode: ~AppCursor } + - { key: End, chars: "\x1bOF", mode: AppCursor } + - { key: End, chars: "\x1b[F", mode: ~AppCursor } + - { key: Equals, mods: Command, action: IncreaseFontSize } + - { key: Minus, mods: Command, action: DecreaseFontSize } + - { key: Minus, mods: Command|Shift, action: ResetFontSize } + - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } + - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } + - { key: PageUp, chars: "\x1b[5~" } + - { key: PageDown, mods: Shift, chars: "\x1b[6;2~" } + - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } + - { key: PageDown, chars: "\x1b[6~" } + - { key: Left, mods: Shift, chars: "\x1b[1;2D" } + - { key: Left, mods: Control, chars: "\x1b[1;5D" } + - { key: Left, mods: Alt, chars: "\x1b[1;3D" } + - { key: Left, chars: "\x1b[D", mode: ~AppCursor } + - { key: Left, chars: "\x1bOD", mode: AppCursor } + - { key: Right, mods: Shift, chars: "\x1b[1;2C" } + - { key: Right, mods: Control, chars: "\x1b[1;5C" } + - { key: Right, mods: Alt, chars: "\x1b[1;3C" } + - { key: Right, chars: "\x1b[C", mode: ~AppCursor } + - { key: Right, chars: "\x1bOC", mode: AppCursor } + - { key: Up, mods: Shift, chars: "\x1b[1;2A" } + - { key: Up, mods: Control, chars: "\x1b[1;5A" } + - { key: Up, mods: Alt, chars: "\x1b[1;3A" } + - { key: Up, chars: "\x1b[A", mode: ~AppCursor } + - { key: Up, chars: "\x1bOA", mode: AppCursor } + - { key: Down, mods: Shift, chars: "\x1b[1;2B" } + - { key: Down, mods: Control, chars: "\x1b[1;5B" } + - { key: Down, mods: Alt, chars: "\x1b[1;3B" } + - { key: Down, chars: "\x1b[B", mode: ~AppCursor } + - { key: Down, chars: "\x1bOB", mode: AppCursor } + - { key: Tab, mods: Shift, chars: "\x1b[Z" } + # - { key: F1, chars: "\x1bOP" } + # - { key: F2, chars: "\x1bOQ" } + # - { key: F3, chars: "\x1bOR" } + # - { key: F4, chars: "\x1bOS" } + # - { key: F5, chars: "\x1b[15~" } + # - { key: F6, chars: "\x1b[17~" } + # - { key: F7, chars: "\x1b[18~" } + # - { key: F8, chars: "\x1b[19~" } + # - { key: F9, chars: "\x1b[20~" } + # - { key: F10, chars: "\x1b[21~" } + # - { key: F11, chars: "\x1b[23~" } + # - { key: F12, chars: "\x1b[24~" } + - { key: Back, chars: "\x7f" } + - { key: Back, mods: Alt, chars: "\x1b\x7f" } + - { key: Insert, chars: "\x1b[2~" } + - { key: Delete, chars: "\x1b[3~" } + - { key: Space, mods: Control, chars: "\x00" } + - { key: Home, mods: Shift, chars: "\x1b[2J", mode: ~AppCursor} + - { key: Home, mods: Shift, chars: "\x1b[1;2H", mode: AppCursor} + - { key: Home, mods: Control, chars: "\x1b[H", mode: ~AppCursor} + - { key: Home, mods: Control, chars: "\x1b[1~", mode: AppCursor} + - { key: PageUp, mods: Shift, chars: "\x1b[5;2~"} + - { key: PageUp, mods: Control, chars: "\x1b[5~"} + - { key: PageUp, mods: Alt, chars: "\x1b[5~"} + # - { key: Begin, mods: Shift, chars: "\x1b[E"} + # - { key: Begin, mods: Control, chars: "\x1b[E"} + # - { key: Begin, mods: Alt, chars: "\x1b[E"} + - { key: End, mods: Control, chars: "\x1b[J", mode: ~AppKeypad} + - { key: End, mods: Control, chars: "\x1b[1;5F", mode: AppKeypad} + - { key: End, mods: Shift, chars: "\x1b[K", mode: ~AppKeypad} + - { key: End, mods: Shift, chars: "\x1b[1;2F", mode: AppKeypad} + - { key: End, mods: Alt, chars: "\x1b[4~"} + - { key: PageDown, mods: Shift, chars: "\x1b[6;2~"} + - { key: PageDown, mods: Control, chars: "\x1b[6~"} + - { key: PageDown, mods: Alt, chars: "\x1b[6~"} + # - { key: Insert, mods: Shift, chars: "\x1b[2;2~", mode: AppKeypad} + # - { key: Insert, mods: Shift, chars: "\x1b[4l", mode: ~AppKeypad} + # - { key: Insert, mods: Control, chars: "\x1b[L", mode: ~AppKeypad} + # - { key: Insert, mods: Control, chars: "\x1b[2;5~", mode: AppKeypad} + # - { key: Insert, mods: Alt, chars: "\x1b[4h", mode: ~AppKeypad} + # - { key: Insert, mods: Alt, chars: "\x1b[2~", mode: AppKeypad} + - { key: Delete, mods: Control, chars: "\x1b[M", mode: ~AppKeypad} + - { key: Delete, mods: Control, chars: "\x1b[3;5~", mode: AppKeypad} + # - { key: Delete, mods: Shift, chars: "\x1b[2K", mode: ~AppKeypad} + # - { key: Delete, mods: Shift, chars: "\x1b[3;2~", mode: AppKeypad} + - { key: Delete, mods: Shift, chars: "\x1b[3;2~"} + - { key: Delete, mods: Alt, chars: "\x1b[P", mode: ~AppKeypad} + - { key: Delete, mods: Alt, chars: "\x1b[3~", mode: AppKeypad} + - { key: NumpadMultiply, mods: Shift, chars: "\x1bOj", mode: AppKeypad} + - { key: NumpadMultiply, mods: Control, chars: "\x1bOj", mode: AppKeypad} + - { key: NumpadMultiply, mods: Alt, chars: "\x1bOj", mode: AppKeypad} + - { key: NumpadAdd, mods: Shift, chars: "\x1bOk", mode: AppKeypad} + - { key: NumpadAdd, mods: Control, chars: "\x1bOk", mode: AppKeypad} + - { key: NumpadAdd, mods: Alt, chars: "\x1bOk", mode: AppKeypad} + - { key: NumpadEnter, mods: Shift, chars: "\x1bOM", mode: AppKeypad} + - { key: NumpadEnter, mods: Control, chars: "\x1bOM", mode: AppKeypad} + - { key: NumpadEnter, mods: Alt, chars: "\x1bOM", mode: AppKeypad} + - { key: NumpadEnter, mods: Shift, chars: "\r", mode: ~AppKeypad} + - { key: NumpadEnter, mods: Control, chars: "\r", mode: ~AppKeypad} + - { key: NumpadEnter, mods: Alt, chars: "\r", mode: ~AppKeypad} + - { key: NumpadSubtract, mods: Shift, chars: "\x1bOm", mode: AppKeypad} + - { key: NumpadSubtract, mods: Control, chars: "\x1bOm", mode: AppKeypad} + - { key: NumpadSubtract, mods: Alt, chars: "\x1bOm", mode: AppKeypad} + - { key: NumpadDecimal, mods: Shift, chars: "\x1bOn", mode: AppKeypad} + - { key: NumpadDecimal, mods: Control, chars: "\x1bOn", mode: AppKeypad} + - { key: NumpadDecimal, mods: Alt, chars: "\x1bOn", mode: AppKeypad} + - { key: NumpadDivide, mods: Shift, chars: "\x1bOo", mode: AppKeypad} + - { key: NumpadDivide, mods: Control, chars: "\x1bOo", mode: AppKeypad} + - { key: NumpadDivide, mods: Alt, chars: "\x1bOo", mode: AppKeypad} + - { key: Key0, mods: Shift, chars: "\x1bOp", mode: AppKeypad} + - { key: Key0, mods: Control, chars: "\x1bOp", mode: AppKeypad} + - { key: Key0, mods: Alt, chars: "\x1bOp", mode: AppKeypad} + - { key: Key1, mods: Shift, chars: "\x1bOq", mode: AppKeypad} + - { key: Key1, mods: Control, chars: "\x1bOq", mode: AppKeypad} + - { key: Key1, mods: Alt, chars: "\x1bOq", mode: AppKeypad} + - { key: Key2, mods: Shift, chars: "\x1bOr", mode: AppKeypad} + - { key: Key2, mods: Control, chars: "\x1bOr", mode: AppKeypad} + - { key: Key2, mods: Alt, chars: "\x1bOr", mode: AppKeypad} + - { key: Key3, mods: Shift, chars: "\x1bOs", mode: AppKeypad} + - { key: Key3, mods: Control, chars: "\x1bOs", mode: AppKeypad} + - { key: Key3, mods: Alt, chars: "\x1bOs", mode: AppKeypad} + - { key: Key4, mods: Shift, chars: "\x1bOt", mode: AppKeypad} + - { key: Key4, mods: Control, chars: "\x1bOt", mode: AppKeypad} + - { key: Key4, mods: Alt, chars: "\x1bOt", mode: AppKeypad} + - { key: Key5, mods: Shift, chars: "\x1bOu", mode: AppKeypad} + - { key: Key5, mods: Control, chars: "\x1bOu", mode: AppKeypad} + - { key: Key5, mods: Alt, chars: "\x1bOu", mode: AppKeypad} + - { key: Key6, mods: Shift, chars: "\x1bOv", mode: AppKeypad} + - { key: Key6, mods: Control, chars: "\x1bOv", mode: AppKeypad} + - { key: Key6, mods: Alt, chars: "\x1bOv", mode: AppKeypad} + - { key: Key7, mods: Shift, chars: "\x1bOw", mode: AppKeypad} + - { key: Key7, mods: Control, chars: "\x1bOw", mode: AppKeypad} + - { key: Key7, mods: Alt, chars: "\x1bOw", mode: AppKeypad} + - { key: Key8, mods: Shift, chars: "\x1bOx", mode: AppKeypad} + - { key: Key8, mods: Control, chars: "\x1bOx", mode: AppKeypad} + - { key: Key8, mods: Alt, chars: "\x1bOx", mode: AppKeypad} + - { key: Key9, mods: Shift, chars: "\x1bOy", mode: AppKeypad} + - { key: Key9, mods: Control, chars: "\x1bOy", mode: AppKeypad} + - { key: Key9, mods: Alt, chars: "\x1bOy", mode: AppKeypad} + - { key: Up, mods: Shift, chars: "\x1b[1;2A"} + # - { key: Up, mods: Mod1Mask, chars: "\x1b[1;3A"} + # - { key: Up, mods: Shift|Mod1Mask, chars: "\x1b[1;4A"} + - { key: Up, mods: Control, chars: "\x1b[1;5A"} + - { key: Up, mods: Shift|Control, chars: "\x1b[1;6A"} + # - { key: Up, mods: Control|Mod1Mask, chars: "\x1b[1;7A"} + # - { key: Up, mods: Shift|Control|Mod1Mask, chars: "\x1b[1;8A"} + - { key: Up, chars: "\x1b[A", mode: ~AppCursor} + - { key: Up, mods: Alt, chars: "\x1bOA", mode: AppCursor} + - { key: Down, mods: Shift, chars: "\x1b[1;2B"} + # - { key: Down, mods: Mod1Mask, chars: "\x1b[1;3B"} + # - { key: Down, mods: Shift|Mod1Mask, chars: "\x1b[1;4B"} + - { key: Down, mods: Control, chars: "\x1b[1;5B"} + - { key: Down, mods: Shift|Control, chars: "\x1b[1;6B"} + # - { key: Down, mods: Control|Mod1Mask, chars: "\x1b[1;7B"} + # - { key: Down, mods: Shift|Control|Mod1Mask, chars: "\x1b[1;8B"} + - { key: Down, mods: Alt, chars: "\x1b[B", mode: ~AppCursor} + - { key: Down, mods: Alt, chars: "\x1bOB", mode: AppCursor} + - { key: Left, mods: Shift, chars: "\x1b[1;2D"} + # - { key: Left, mods: Mod1Mask, chars: "\x1b[1;3D"} + # - { key: Left, mods: Shift|Mod1Mask, chars: "\x1b[1;4D"} + - { key: Left, mods: Control, chars: "\x1b[1;5D"} + - { key: Left, mods: Shift|Control, chars: "\x1b[1;6D"} + # - { key: Left, mods: Control|Mod1Mask, chars: "\x1b[1;7D"} + # - { key: Left, mods: Shift|Control|Mod1Mask, chars: "\x1b[1;8D"} + - { key: Left, mods: Alt, chars: "\x1b[D", mode: ~AppCursor} + - { key: Left, mods: Alt, chars: "\x1bOD", mode: AppCursor} + - { key: Right, mods: Shift, chars: "\x1b[1;2C"} + # - { key: Right, mods: Mod1Mask, chars: "\x1b[1;3C"} + # - { key: Right, mods: Shift|Mod1Mask, chars: "\x1b[1;4C"} + - { key: Right, mods: Control, chars: "\x1b[1;5C"} + - { key: Right, mods: Shift|Control, chars: "\x1b[1;6C"} + # - { key: Right, mods: Control|Mod1Mask,chars: "\x1b[1;7C"} + # - { key: Right,Shift|Control|Mod1Mask,chars: "\x1b[1;8C"} + - { key: Right, mods: Alt, chars: "\x1b[C", mode: ~AppCursor} + - { key: Right, mods: Alt, chars: "\x1bOC", mode: AppCursor} + # - { key: ISO_Left_Tab, mods: Shift, chars: "\x1b[Z"} + # - { key: Return, mods: Mod1Mask, chars: "\x1b\r"} + # - { key: Return, mods: XK_ANY_MOD, chars: "\r"} + # - { key: Insert, mods: Shift, chars: "\x1b[4l", mode: ~AppKeypad} + # - { key: Insert, mods: Shift, chars: "\x1b[2;2~", mode: AppKeypad} + - { key: Insert, mods: Control, chars: "\x1b[L", mode: ~AppKeypad} + - { key: Insert, mods: Control, chars: "\x1b[2;5~", mode: AppKeypad} + - { key: Insert, mods: Alt, chars: "\x1b[4h", mode: ~AppKeypad} + - { key: Insert, mods: Alt, chars: "\x1b[2~", mode: AppKeypad} + # - { key: Delete, mods: Control, chars: "\x1b[M", mode: ~AppKeypad} + # - { key: Delete, mods: Control, chars: "\x1b[3;5~", mode: AppKeypad} + # - { key: Delete, mods: Shift, chars: "\x1b[2K", mode: ~AppKeypad} + # - { key: Delete, mods: Shift, chars: "\x1b[3;2~", mode: AppKeypad} + # - { key: Delete, mods: Alt, chars: "\x1b[P", mode: ~AppKeypad} + # - { key: Delete, mods: Alt, chars: "\x1b[3~", mode: AppKeypad} + # - { key: BackSpace, chars: "\177"} + # - { key: BackSpace, mods: Mod1Mask, chars: "\x1b\177"} + - { key: Home, mods: Shift, chars: "\x1b[2J", mode: ~AppCursor} + - { key: Home, mods: Shift, chars: "\x1b[1;2H", mode: AppCursor} + - { key: Home, mods: Control, chars: "\x1b[H", mode: ~AppCursor} + - { key: Home, mods: Control, chars: "\x1b[1~", mode: ~AppCursor} + - { key: Home, mods: Alt, chars: "\x1b[H", mode: ~AppCursor} + - { key: Home, mods: Alt, chars: "\x1b[1~", mode: ~AppCursor} + - { key: End, mods: Control, chars: "\x1b[J", mode: ~AppKeypad} + - { key: End, mods: Control, chars: "\x1b[1;5F", mode: AppKeypad} + - { key: End, mods: Shift, chars: "\x1b[K", mode: ~AppKeypad} + - { key: End, mods: Shift, chars: "\x1b[1;2F", mode: AppKeypad} + - { key: End, mods: Alt, chars: "\x1b[4~"} + - { key: PageUp, mods: Control, chars: "\x1b[5;5~"} + - { key: PageUp, mods: Shift, chars: "\x1b[5;2~"} + - { key: PageUp, mods: Alt, chars: "\x1b[5~"} + - { key: PageDown, mods: Control, chars: "\x1b[6;5~"} + - { key: PageDown, mods: Shift, chars: "\x1b[6;2~"} + - { key: PageDown, mods: Alt, chars: "\x1b[6~"} + - { key: F1, chars: "\x1bOP"} + - { key: F1, mods: Shift, chars: "\x1b[1;2P"} + - { key: F1, mods: Control, chars: "\x1b[1;5P"} + # - { key: F1, mods: Mod4Mask, chars: "\x1b[1;6P"} + # - { key: F1, mods: Mod1Mask, chars: "\x1b[1;3P"} + # - { key: F1, mods: Mod3Mask, chars: "\x1b[1;4P"} + - { key: F2, chars: "\x1bOQ"} + - { key: F2, mods: Shift, chars: "\x1b[1;2Q"} + - { key: F2, mods: Control, chars: "\x1b[1;5Q"} + # - { key: F2, mods: Mod4Mask, chars: "\x1b[1;6Q"} + # - { key: F2, mods: Mod1Mask, chars: "\x1b[1;3Q"} + # - { key: F2, mods: Mod3Mask, chars: "\x1b[1;4Q"} + - { key: F3, chars: "\x1bOR"} + - { key: F3, mods: Shift, chars: "\x1b[1;2R"} + - { key: F3, mods: Control, chars: "\x1b[1;5R"} + # - { key: F3, mods: Mod4Mask, chars: "\x1b[1;6R"} + # - { key: F3, mods: Mod1Mask, chars: "\x1b[1;3R"} + # - { key: F3, mods: Mod3Mask, chars: "\x1b[1;4R"} + - { key: F4, chars: "\x1bOS"} + - { key: F4, mods: Shift, chars: "\x1b[1;2S"} + - { key: F4, mods: Control, chars: "\x1b[1;5S"} + # - { key: F4, mods: Mod4Mask, chars: "\x1b[1;6S"} + # - { key: F4, mods: Mod1Mask, chars: "\x1b[1;3S"} + - { key: F5, chars: "\x1b[15~"} + - { key: F5, mods: Shift, chars: "\x1b[15;2~"} + - { key: F5, mods: Control, chars: "\x1b[15;5~"} + # - { key: F5, mods: Mod4Mask, chars: "\x1b[15;6~"} + # - { key: F5, mods: Mod1Mask, chars: "\x1b[15;3~"} + - { key: F6, chars: "\x1b[17~"} + - { key: F6, mods: Shift, chars: "\x1b[17;2~"} + - { key: F6, mods: Control, chars: "\x1b[17;5~"} + # - { key: F6, mods: Mod4Mask, chars: "\x1b[17;6~"} + # - { key: F6, mods: Mod1Mask, chars: "\x1b[17;3~"} + - { key: F7, chars: "\x1b[18~"} + - { key: F7, mods: Shift, chars: "\x1b[18;2~"} + - { key: F7, mods: Control, chars: "\x1b[18;5~"} + # - { key: F7, mods: Mod4Mask, chars: "\x1b[18;6~"} + # - { key: F7, mods: Mod1Mask, chars: "\x1b[18;3~"} + - { key: F8, chars: "\x1b[19~"} + - { key: F8, mods: Shift, chars: "\x1b[19;2~"} + - { key: F8, mods: Control, chars: "\x1b[19;5~"} + # - { key: F8, mods: Mod4Mask, chars: "\x1b[19;6~"} + # - { key: F8, mods: Mod1Mask, chars: "\x1b[19;3~"} + - { key: F9, chars: "\x1b[20~"} + - { key: F9, mods: Shift, chars: "\x1b[20;2~"} + - { key: F9, mods: Control, chars: "\x1b[20;5~"} + # - { key: F9, mods: Mod4Mask, chars: "\x1b[20;6~"} + # - { key: F9, mods: Mod1Mask, chars: "\x1b[20;3~"} + - { key: F10, chars: "\x1b[21~"} + - { key: F10, mods: Shift, chars: "\x1b[21;2~"} + - { key: F10, mods: Control, chars: "\x1b[21;5~"} + # - { key: F10, mods: Mod4Mask, chars: "\x1b[21;6~"} + # - { key: F10, mods: Mod1Mask, chars: "\x1b[21;3~"} + - { key: F11, chars: "\x1b[23~"} + - { key: F11, mods: Shift, chars: "\x1b[23;2~"} + - { key: F11, mods: Control, chars: "\x1b[23;5~"} + # - { key: F11, mods: Mod4Mask, chars: "\x1b[23;6~"} + # - { key: F11, mods: Mod1Mask, chars: "\x1b[23;3~"} + - { key: F12, chars: "\x1b[24~"} + - { key: F12, mods: Shift, chars: "\x1b[24;2~"} + - { key: F12, mods: Control, chars: "\x1b[24;5~"} + # - { key: F12, mods: Mod4Mask, chars: "\x1b[24;6~"} + # - { key: F12, mods: Mod1Mask, chars: "\x1b[24;3~"} + - { key: F13, chars: "\x1b[1;2P"} + - { key: F14, chars: "\x1b[1;2Q"} + - { key: F15, chars: "\x1b[1;2R"} + - { key: F16, chars: "\x1b[1;2S"} + - { key: F17, chars: "\x1b[15;2~"} + - { key: F18, chars: "\x1b[17;2~"} + - { key: F19, chars: "\x1b[18;2~"} + - { key: F20, chars: "\x1b[19;2~"} + - { key: F21, chars: "\x1b[20;2~"} + - { key: F22, chars: "\x1b[21;2~"} + - { key: F23, chars: "\x1b[23;2~"} + - { key: F24, chars: "\x1b[24;2~"} + # - { key: F25, chars: "\x1b[1;5P"} + # - { key: F26, chars: "\x1b[1;5Q"} + # - { key: F27, chars: "\x1b[1;5R"} + # - { key: F28, chars: "\x1b[1;5S"} + # - { key: F29, chars: "\x1b[15;5~"} + # - { key: F30, chars: "\x1b[17;5~"} + # - { key: F31, chars: "\x1b[18;5~"} + # - { key: F32, chars: "\x1b[19;5~"} + # - { key: F33, chars: "\x1b[20;5~"} + # - { key: F34, chars: "\x1b[21;5~"} + # - { key: F35, chars: "\x1b[23;5~"} + + # shortcuts for tmux. the leader key is control-b (0x02) + - { key: W, mods: Command, chars: "\x02&" } # close tab (kill) + - { key: T, mods: Command, chars: "\x02c" } # new tab + - { key: RBracket, mods: Command|Shift, chars: "\x02n" } # select next tab + - { key: LBracket, mods: Command|Shift, chars: "\x02p" } # select previous tab + - { key: RBracket, mods: Command, chars: "\x02o" } # select next pane + - { key: LBracket, mods: Command, chars: "\x02;" } # select last (previously used) pane + - { key: F, mods: Command, chars: "\x02/" } # search (upwards) (see tmux.conf) + +mouse: + # Click settings + # + # The `double_click` and `triple_click` settings control the time + # alacritty should wait for accepting multiple clicks as one double + # or triple click. + double_click: { threshold: 300 } + triple_click: { threshold: 300 } + + # If this is `true`, the cursor is temporarily hidden when typing. + hide_when_typing: true + + # URL launcher + # url: + # This program is executed when clicking on a text which is recognized as a URL. + # The URL is always added to the command as the last parameter. + # + # When set to `None`, URL launching will be disabled completely. + # + # Default: + # - (macOS) open + # - (Linux) xdg-open + # - (Windows) explorer + # launcher: + # program: xdg-open + # args: [] + + # These are the modifiers that need to be held down for opening URLs when clicking + # on them. The available modifiers are documented in the key binding section. + # modifiers: Control|Shift + +selection: + semantic_escape_chars: ",│`|:\"' ()[]{}<>" + + # When set to `true`, selected text will be copied to the primary clipboard. + save_to_clipboard: true + +# Mouse bindings +# +# Available fields: +# - mouse +# - action +# - mods (optional) +# +# Values for `mouse`: +# - Middle +# - Left +# - Right +# - Numeric identifier such as `5` +# +# All available `mods` and `action` values are documented in the key binding +# section. +mouse_bindings: + - { mouse: Middle, action: PasteSelection } + +cursor: + # Cursor style + # + # Values for 'style': + # - ▇ Block + # - _ Underline + # - | Beam + style: Block + + # If this is `true`, the cursor will be rendered as a hollow box when the + # window is not focused. + unfocused_hollow: true + +# dynamic_title: false + +# Live config reload (changes require restart) +hive_config_reload: true + +# Shell +# +# You can set shell.program to the path of your favorite shell, e.g. /bin/fish. +# Entries in shell.args are passed unmodified as arguments to the shell. +shell: + program: powershell.exe + # args: + +debug: + # Should display the render timer + render_timer: false + + # Keep the log file after quitting Alacritty. + persistent_logging: false + + # Log level + # + # Values for `log_level`: + # - None + # - Error + # - Warn + # - Info + # - Debug + # - Trace + log_level: Off + + # Print all received window events. + print_events: false + + # Record all characters and escape sequences as test data. + ref_test: false + +# vim: nospell diff --git a/cygwin/conemu.xml b/cygwin/conemu.xml new file mode 100644 index 0000000..a901db0 --- /dev/null +++ b/cygwin/conemu.xml @@ -0,0 +1,775 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cygwin/devi.zsh-theme b/cygwin/devi.zsh-theme new file mode 100644 index 0000000..c1925ff --- /dev/null +++ b/cygwin/devi.zsh-theme @@ -0,0 +1,264 @@ +# vcs_info modifications from Bart Trojanowski's zsh prompt: +# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt +# +# git untracked files modification from Brian Carper: +# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt + +function virtualenv_info { + if [[ -a ./bin/activate ]]; then + source ./bin/activate > /dev/null + fi + [ $VIRTUAL_ENV ] && echo ' ('`basename $VIRTUAL_ENV`')' +} +#add-zsh-hook chpwd virtualenv_info + +PR_GIT_UPDATE=1 + +setopt prompt_subst + +autoload -U add-zsh-hook +autoload -Uz vcs_info + +#use extended color pallete if available +if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then + turquoise="%F{81}" + orange="%F{166}" + purple="%F{135}" + hotpink="%F{161}" + limegreen="%F{118}" + lorange="%F{222}" + batyellow="%F{226}" + muckgreen="%F{29}" + batgreen="%F{76}" + batred="%F{88}" + purblue="%F{69}" + swampgreen="%F{64}" + purple4="%F{54}" + deeppink="%F{109}" + limblue="%F{154}" + skyblue="%F{30}" + teal="%F{31}" + new="%F{45}" + new2="%F{50}" + sneakyc="%F{63}" + gnew="%F{65}" + gnew2="%F{67}" + gover="%F{111}" + rust="%F{36}" + typescript="%F{37}" + viinsert="%F{33}" + someblue="%F{27}" +else + turquoise="$fg[cyan]" + orange="$fg[yellow]" + purple="$fg[magenta]" + hotpink="$fg[red]" + limegreen="$fg[green]" + batyellow="%fg[yellow]" + batgreen="%fg[green]" + batred="%fg[red]" +fi + +# enable VCS systems you use +zstyle ':vcs_info:*' enable git svn + +# check-for-changes can be really slow. +# you should disable it, if you work with large repositories +#zstyle ':vcs_info:*:prompt:*' check-for-changes true + +# set formats +# %b - branchname +# %u - unstagedstr (see below) +# %c - stagedstr (see below) +# %a - action (e.g. rebase-i) +# %R - repository path +# %S - path in the repository +PR_RST="%{${reset_color}%}" +FMT_BRANCH=" on %{$turquoise%}%s-➜%r-➜%b%u%c%a${PR_RST} " +FMT_ACTION=" performing a %{$limegreen%}%a${PR_RST}" +FMT_UNSTAGED="%{$orange%} ●" +FMT_STAGED="%{$limegreen%} ●" + +zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}" +zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}" +zstyle ':vcs_info:*:prompt:*' actionformats "${FMT_BRANCH}${FMT_ACTION}" +zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" +zstyle ':vcs_info:*:prompt:*' nvcsformats "" + +function steeef_preexec { + #case "$(history $HISTCMD)" in + case "$2" in + *git*) + PR_GIT_UPDATE=1 + ;; + *svn*) + PR_GIT_UPDATE=1 + ;; + esac +} +add-zsh-hook preexec steeef_preexec + +function steeef_chpwd { + #this is here so we dont get errors when we are in a bare git dir + result=$(git rev-parse --is-bare-repository 2> /dev/null) + if [[ $? == 0 ]]; then + if [[ $result == true ]]; then + PR_GIT_UPDATE= + else + PR_GIT_UPDATE=1 + fi + else + PR_GIT_UPDATE=1 + fi +} +add-zsh-hook chpwd steeef_chpwd + +function steeef_precmd { + if [[ -n "$PR_GIT_UPDATE" ]] ; then + # check for untracked files or updated submodules, since vcs_info doesn't + if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then + PR_GIT_UPDATE=1 + FMT_BRANCH="${PM_RST} on %{$turquoise%}%s-➜%r-➜%b%u%c%a%{$hotpink%} ●${PR_RST} " + else + FMT_BRANCH="${PM_RST} on %{$turquoise%}%s-➜%r-➜%b%u%c%a${PR_RST} " + fi + zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" + + vcs_info 'prompt' + PR_GIT_UPDATE= + fi +} +add-zsh-hook precmd steeef_precmd + +# function guess_who { +# upower -e > /dev/null 2>&1 + +# if [ $? -eq 0 ]; then +# os="lin" +# else +# os="win" +# fi +# } +# add-zsh-hook precmd guess_who + +function time_function { + date | gawk '{print $2" "$3" "$4}' +} + +function node_version { + version=$(nvm current) + echo " <$version>" +} + +function sudo_query { + sudo -nv > /dev/null 2>&1 + if [[ $? == 0 ]]; then + #echo  + echo " " + else + : + fi +} + +function dir_writeable { + if [ -w $(pwd) ]; then :;else echo ;fi +} + +function sneaky { + if [[ $! -ne 0 ]]; then + echo " $!" + fi +} + +function gitadditions { + git rev-parse --git-dir > /dev/null 2>&1 + if [[ $? == 0 ]]; then + insertions=$(git --no-pager diff --numstat 2> /dev/null | awk '{sum1+=$1}END{print sum1}') + if [[ $insertions == "" ]]; then + : + else + echo " "$insertions: + fi + fi +} + +function gitdeletions { + git rev-parse --git-dir > /dev/null 2>&1 + if [[ $? == 0 ]]; then + deletions=$(git --no-pager diff --numstat 2> /dev/null | awk '{sum2+=$2}END{print sum2}') + if [[ $deletions == "" ]]; then + : + else + echo $deletions" " + fi + fi +} + +function goversion { + VERSION=$("go" version | gawk '{print $3}') + echo " <${VERSION:2:$((${#VERSION}))}>" +} + +function rustversion { + VERSION=$(rustc --version | gawk '{print $2}') + echo " <$VERSION>" +} + +function typescriptversion { + VERSION=$(tvm tsc --version | gawk '{print $2}') + echo " <$VERSION>" +} + +PROMPT=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$limegreen%}%/%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%}%{$teal%}$(node_version)%{$reset_color%}%{$gover%}$(goversion)%{$reset_color%}%{$rust%}$(rustversion)%{$reset_color%}%{$sneakyc%}$(sneaky)%{$reset_color%}%{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%}\n%{$limblue%}--➜%{$reset_color%}' + +function rebuildquery { + make -q > /dev/null 2>&1 + if [[ $? == 1 ]]; then + echo " ::rebuild::" + else + : + fi +} + + + +#function vi-replacee { +# RPS1="$VIM_PROMPT_REPLACE %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +# zle vi-replace +#} +#zle -N vi-replace-mode-widget vi-replacee +# bind R only in vicmd keymapping +#bindkey -M vicmd 'R' vi-replace-mode-widget + +#https://raw.githubusercontent.com/alfredodeza/zsh-plugins/master/vi/zle_vi_visual.zsh +#this gives us vivis and vivli +source ~/.oh-my-zsh/plugins/zle-vi-visual/zle_vi_visual.zsh + +function zle-line-init zle-keymap-select { +VIM_PROMPT_INSERT="%{$fg_bold[cyan]%}% [% INS]% %{$reset_color%}" +VIM_PROMPT_MAIN="%{$fg_bold[blue]%}% [% INSERT]% %{$reset_color%}" +VIM_PROMPT_REPLACE="%{$fg_bold[black]%}% %{$bg_bold[red]%}% [% REPLACE]% %{$reset_color%}" +VIM_PROMPT_VISUAL_LINE="%{$fg_bold[red]%}% [% VISUAL-LINE]% %{$reset_color%}" +VIM_PROMPT_VISUAL_CHAR="%{$fg_bold[red]%}% [% VISUAL]% %{$reset_color%}" +VIM_PROMPT_CMD="%{$fg_bold[green]%}% [% NORMAL]% %{$reset_color%}" +if [[ $KEYMAP == vivis ]]; then + RPS1="$VIM_PROMPT_VISUAL_CHAR %{$lorange%}%?↵%{$reset_color%}" +elif [[ $KEYMAP == vivli ]]; then + RPS1="$VIM_PROMPT_VISUAL_LINE %{$lorange%}%?↵%{$reset_color%}" +elif [[ $KEYMAP == vicmd ]];then + RPS1="$VIM_PROMPT_CMD %{$lorange%}%?↵%{$reset_color%}" +elif [[ $KEYMAP == viins ]]; then + RPS1="$VIM_PROMPT_INSERT %{$lorange%}%?↵%{$reset_color%}" +elif [[ $KEYMAP == main ]]; then + RPS1="$VIM_PROMPT_MAIN %{$lorange%}%?↵%{$reset_color%}" + VI_MODE_R_ENTERED="no" +fi +zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select +#bindkey "^[[3~" delete-char +#bindkey "^[3;5~" delete-char +export KEYTIMEOUT=1 + diff --git a/cygwin/sumatrapdf/SumatraPDF-settings.txt b/cygwin/sumatrapdf/SumatraPDF-settings.txt new file mode 100644 index 0000000..f1aa03b --- /dev/null +++ b/cygwin/sumatrapdf/SumatraPDF-settings.txt @@ -0,0 +1,67 @@ +# For documentation, see http://www.sumatrapdfreader.org/settings3.1.html + +MainWindowBackground = #80fff200 +EscToExit = false +ReuseInstance = false +UseSysColors = false +RestoreSession = true + +FixedPageUI [ + TextColor = #006666 + BackgroundColor = #101010 + SelectionColor = #f5fc0c + WindowMargin = 2 4 2 4 + PageSpacing = 4 4 + GradientColors = #005f87 #005f5f #101010 +] +EbookUI [ + FontName = Georgia + FontSize = 12.5 + TextColor = #006666 + BackgroundColor = #101010 + UseFixedPageUI = false +] +ComicBookUI [ + WindowMargin = 0 0 0 0 + PageSpacing = 4 4 + CbxMangaMode = false +] +ChmUI [ + UseFixedPageUI = false +] +ExternalViewers [ +] +ShowMenubar = true +ReloadModifiedDocuments = true +FullPathInTitle = false +ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400 +ZoomIncrement = 0 + +PrinterDefaults [ + PrintScale = shrink +] +ForwardSearch [ + HighlightOffset = 0 + HighlightWidth = 15 + HighlightColor = #6581ff + HighlightPermanent = true +] +CustomScreenDPI = 0 + +RememberStatePerDocument = true +UiLanguage = en +ShowToolbar = false +ShowFavorites = false +AssociateSilently = false +CheckForUpdates = true +RememberOpenedFiles = true +EnableTeXEnhancements = true +DefaultDisplayMode = automatic +DefaultZoom = fit page +WindowState = 2 +WindowPos = -1135 195 974 824 +ShowToc = true +SidebarDx = 285 +TocDy = 0 +ShowStartPage = true +UseTabs = true diff --git a/cygwin/xserver.bat b/cygwin/xserver.bat new file mode 100755 index 0000000..130c40a --- /dev/null +++ b/cygwin/xserver.bat @@ -0,0 +1,2 @@ +"C:\Program Files\VcXsrv\vcxsrv.exe" -ac -multiwindow -clipboard -wgl +pause diff --git a/default.sh b/default.sh new file mode 100644 index 0000000..344fafb --- /dev/null +++ b/default.sh @@ -0,0 +1,63 @@ +# Default Theme + +if patched_font_in_use; then + TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="" + #TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="▶" + TMUX_POWERLINE_SEPARATOR_LEFT_THIN="" + TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="" + #TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶" + TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="" +else + TMUX_POWERLINE_SEPARATOR_LEFT_BOLD="◀" + TMUX_POWERLINE_SEPARATOR_LEFT_THIN="" + TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD="▶" + TMUX_POWERLINE_SEPARATOR_RIGHT_THIN="" +fi + +TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_BACKGROUND_COLOR:-'16'} +TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR=${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR:-'255'} + +TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_LEFTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_RIGHT_BOLD} +TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR=${TMUX_POWERLINE_DEFAULT_RIGHTSIDE_SEPARATOR:-$TMUX_POWERLINE_SEPARATOR_LEFT_BOLD} + + +# Format: segment_name background_color foreground_color [non_default_separator] +TMUX_POWERLINE_SEG_WEATHER_LOCATION="2251945" +if [ -z $TMUX_POWERLINE_LEFT_STATUS_SEGMENTS ]; then + TMUX_POWERLINE_LEFT_STATUS_SEGMENTS=( + "tmux_session_info 148 16" \ + #"hostname 33 255" \ + "pwd 69 255" \ + #"ifstat 30 255" \ + #"ifstat_sys 30 255" \ + #"lan_ip 24 255 ${TMUX_POWERLINE_SEPARATOR_RIGHT_THIN}" \ + #"wan_ip 24 255" \ + "vcs_branch 29 255" \ + "vcs_compare 60 255" \ + "vcs_staged 64 255" \ + "vcs_modified 9 255" \ + "vcs_others 245 255" \ + ) +fi + +if [ -z $TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS ]; then + TMUX_POWERLINE_RIGHT_STATUS_SEGMENTS=( + #"earthquake 3 0" \ + #"macos_notification_count 29 255" \ + #"mailcount 9 255" \ + #"now_playing 234 37" \ + #"cpu 240 136" \ + #"load 63 255" \ + #"tmux_mem_cpu_load 234 136" \ + #"battery 24 255" \ + "jdat 29 255" \ + #"weather 37 255" \ + #"rainbarf 0 ${TMUX_POWERLINE_DEFAULT_FOREGROUND_COLOR}" \ + #"xkb_layout 125 117" \ + "date_day 31 255"\ + "date 31 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ + #"time 31 235 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ + "time 31 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_THIN}" \ + "utc_time 75 255 ${TMUX_POWERLINE_SEPARATOR_LEFT_BOLD}" \ + ) +fi diff --git a/devi.zsh-theme b/devi.zsh-theme new file mode 100644 index 0000000..1e68d7e --- /dev/null +++ b/devi.zsh-theme @@ -0,0 +1,299 @@ +# vcs_info modifications from Bart Trojanowski's zsh prompt: +# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt +# +# git untracked files modification from Brian Carper: +# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt + +function virtualenv_info { + if [[ -a ./bin/activate ]]; then + source ./bin/activate > /dev/null + fi + [ $VIRTUAL_ENV ] && echo ' ('`basename $VIRTUAL_ENV`') ' +} +#add-zsh-hook chpwd virtualenv_info + +PR_GIT_UPDATE=1 + +setopt prompt_subst + +autoload -U add-zsh-hook +autoload -Uz vcs_info + +#use extended color pallete if available +if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then + turquoise="%F{81}" + orange="%F{166}" + purple="%F{135}" + hotpink="%F{161}" + limegreen="%F{118}" + lorange="%F{222}" + batyellow="%F{226}" + muckgreen="%F{29}" + batgreen="%F{76}" + batred="%F{88}" + purblue="%F{69}" + swampgreen="%F{64}" + purple4="%F{54}" + deeppink="%F{109}" + limblue="%F{154}" + skyblue="%F{30}" + teal="%F{31}" + new="%F{45}" + new2="%F{50}" + sneakyc="%F{63}" + gnew="%F{65}" + gnew2="%F{67}" + gover="%F{111}" + rust="%F{36}" + typescript="%F{37}" + viinsert="%F{33}" +else + turquoise="$fg[cyan]" + orange="$fg[yellow]" + purple="$fg[magenta]" + hotpink="$fg[red]" + limegreen="$fg[green]" + batyellow="%fg[yellow]" + batgreen="%fg[green]" + batred="%fg[red]" +fi + +# enable VCS systems you use +zstyle ':vcs_info:*' enable git svn + +# check-for-changes can be really slow. +# you should disable it, if you work with large repositories +#zstyle ':vcs_info:*:prompt:*' check-for-changes true + +# set formats +# %b - branchname +# %u - unstagedstr (see below) +# %c - stagedstr (see below) +# %a - action (e.g. rebase-i) +# %R - repository path +# %S - path in the repository +PR_RST="%{${reset_color}%}" +FMT_BRANCH=" on %{$turquoise%}%s-➜%r-➜%b%u%c%a${PR_RST} " +FMT_ACTION=" performing a %{$limegreen%}%a${PR_RST}" +FMT_UNSTAGED="%{$orange%} ●" +FMT_STAGED="%{$limegreen%} ●" + +zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}" +zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}" +zstyle ':vcs_info:*:prompt:*' actionformats "${FMT_BRANCH}${FMT_ACTION}" +zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" +zstyle ':vcs_info:*:prompt:*' nvcsformats "" + + +function steeef_preexec { + #case "$(history $HISTCMD)" in + case "$2" in + *git*) + PR_GIT_UPDATE=1 + ;; + *svn*) + PR_GIT_UPDATE=1 + ;; + esac +} +add-zsh-hook preexec steeef_preexec + +function steeef_chpwd { + #this is here so we dont get errors when we are in a bare git dir + result=$(git rev-parse --is-bare-repository 2> /dev/null) + if [[ $? == 0 ]]; then + if [[ $result == true ]]; then + PR_GIT_UPDATE= + else + PR_GIT_UPDATE=1 + fi + else + PR_GIT_UPDATE=1 + fi +} +add-zsh-hook chpwd steeef_chpwd + +function steeef_precmd { + if [[ -n "$PR_GIT_UPDATE" ]] ; then + # check for untracked files or updated submodules, since vcs_info doesn't + if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then + PR_GIT_UPDATE=1 + FMT_BRANCH="${PM_RST} on %{$turquoise%}%s-➜%r-➜%b%u%c%a%{$hotpink%} ●${PR_RST} " + else + FMT_BRANCH="${PM_RST} on %{$turquoise%}%s-➜%r-➜%b%u%c%a${PR_RST} " + fi + zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" + + vcs_info 'prompt' + PR_GIT_UPDATE= + fi +} +add-zsh-hook precmd steeef_precmd + +function guess_who { + upower -e > /dev/null 2>&1 + + if [ $? -eq 0 ]; then + os="lin" + else + os="win" + fi +} +add-zsh-hook precmd guess_who + +function time_function { + $guess_who + if [[ "$os" = "win" ]]; then + date | gawk 'BEGIN{RS=","}END{print $2" "$3}' + else + date | gawk '{print $4" "$5}' + fi +} + +function node_version { + nvm current +} + +function sudo_query { + sudo -nv > /dev/null 2>&1 + if [[ $? == 0 ]]; then + #echo  + echo " " + else + : + fi +} + +function dir_writeable { + if [ -w $(pwd) ]; then :;else echo ;fi +} + +function sneaky { + if [[ $! -ne 0 ]]; then + echo $! + fi +} + +function gitadditions { + git rev-parse --git-dir > /dev/null 2>&1 + if [[ $? == 0 ]]; then + insertions=$(git --no-pager diff --numstat 2> /dev/null | awk '{sum1+=$1}END{print sum1}') + if [[ $insertions == "" ]]; then + : + else + echo " "$insertions: + fi + fi +} + +function gitdeletions { + git rev-parse --git-dir > /dev/null 2>&1 + if [[ $? == 0 ]]; then + deletions=$(git --no-pager diff --numstat 2> /dev/null | awk '{sum2+=$2}END{print sum2}') + if [[ $deletions == "" ]]; then + : + else + echo $deletions" " + fi + fi +} + +function goversion { + VERSION=$("go" version | gawk '{print $3}') + echo ${VERSION:2:$((${#VERSION}))} +} + +function rustversion { + VERSION=$(rustc --version | gawk '{print $2}') + echo $VERSION +} + +function typescriptversion { + VERSION=$(tvm tsc --version | gawk '{print $2}') + echo $VERSION +} + +PROMPT=$'%{$new2%}$(sudo_query)%{$reset_color%}%{$swampgreen%}%n%{$reset_color%} on %{$purblue%}%M%{$reset_color%} in %{$limegreen%}%/%{$reset_color%} at %{$muckgreen%}$(time_function)%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$limblue%}%{$gnew%}$(gitadditions)%{$gnew2%}$(gitdeletions)%{$reset_color%}%{$deeppink%}$(virtualenv_info)%{$reset_color%} %{$teal%}<$(node_version)>%{$reset_color%} %{$gover%}<$(goversion)>%{$reset_color%} %{$rust%}<$(rustversion)>%{$reset_color%} %{$sneakyc%}$(sneaky)%{$reset_color%} %{$new%}$(rebuildquery)%{$reset_color%} %{$someblue%}<$ZSH_KUBECTL_PROMPT>%{$reset_color%}%{$batred%}$(dir_writeable)%{$reset_color%} \n%{$limblue%}--➜%{$reset_color%}' + +function battery_charge { + upower -e > /dev/null 2>&1 + + if [ $? -eq 0 ]; then + batpath=$(upower -e | grep BAT0) + batcharge=$(upower -i $batpath | grep percentage | gawk '{print $2}') + else + batcharge=$(wmic path win32_battery get estimatedchargeremaining | gawk 'BEGIN{RS=" \n"}{print$3}') + fi + + batfull=100 + batgood=66 + batbad=33 + + batcolor=$batgreen + + if [[ ($batcharge > $batgood) || ($batcharge == $batgood) || ("$batcharge"=="$batfull") ]]; then + batcolor=$batgreen + elif [[ ($batcharge < $batgood) && ($batcharge > $batbad) || ($batcharge == $batbad) ]]; then + batcolor=$batyellow + elif [[ ($batcharge < $batbad) ]]; then + batcolor=$batred + else + batcolor=$purple + fi +} +add-zsh-hook precmd battery_charge + +function batcharge_printer { + $battery_charge + echo $(if [ $(upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep state | gawk 'BEGIN{FS ~ ":"}{print $2}') = "charging" ]; then echo ++;else :;fi)$batcharge +} + +function rebuildquery { + make -q > /dev/null 2>&1 + if [[ $? == 1 ]]; then + echo ::rebuild:: + else + : + fi +} + +#function vi-replacee { +# RPS1="$VIM_PROMPT_REPLACE %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +# zle vi-replace +#} +#zle -N vi-replace-mode-widget vi-replacee +# bind R only in vicmd keymapping +#bindkey -M vicmd 'R' vi-replace-mode-widget + +#https://raw.githubusercontent.com/alfredodeza/zsh-plugins/master/vi/zle_vi_visual.zsh +#this gives us vivis and vivli +source ~/.oh-my-zsh/plugins/zle-vi-visual/zle_vi_visual.zsh + +function zle-line-init zle-keymap-select { +VIM_PROMPT_INSERT="%{$fg_bold[cyan]%}% [% INS]% %{$reset_color%}" +VIM_PROMPT_MAIN="%{$fg_bold[blue]%}% [% INSERT]% %{$reset_color%}" +VIM_PROMPT_REPLACE="%{$fg_bold[black]%}% %{$bg_bold[red]%}% [% REPLACE]% %{$reset_color%}" +VIM_PROMPT_VISUAL_LINE="%{$fg_bold[red]%}% [% VISUAL-LINE]% %{$reset_color%}" +VIM_PROMPT_VISUAL_CHAR="%{$fg_bold[red]%}% [% VISUAL]% %{$reset_color%}" +VIM_PROMPT_CMD="%{$fg_bold[green]%}% [% NORMAL]% %{$reset_color%}" +if [[ $KEYMAP == vivis ]]; then + RPS1="$VIM_PROMPT_VISUAL_CHAR %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +elif [[ $KEYMAP == vivli ]]; then + RPS1="$VIM_PROMPT_VISUAL_LINE %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +elif [[ $KEYMAP == vicmd ]];then + RPS1="$VIM_PROMPT_CMD %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +elif [[ $KEYMAP == viins ]]; then + RPS1="$VIM_PROMPT_INSERT %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" +elif [[ $KEYMAP == main ]]; then + RPS1="$VIM_PROMPT_MAIN %{$lorange%}%?↵%{$reset_color%} %{$batcolor%}$(batcharge_printer)%%{$reset_color%}" + VI_MODE_R_ENTERED="no" +fi +zle reset-prompt +} + +zle -N zle-line-init +zle -N zle-keymap-select +#bindkey "^[[3~" delete-char +#bindkey "^[3;5~" delete-char +export KEYTIMEOUT=1 + diff --git a/df/colors.txt b/df/colors.txt new file mode 100644 index 0000000..a046612 --- /dev/null +++ b/df/colors.txt @@ -0,0 +1,50 @@ +These are the display colors in RGB. The game is actually displaying extended ASCII characters in OpenGL, so you can modify the colors. + +[BLACK_R:0] +[BLACK_G:0] +[BLACK_B:0] +[BLUE_R:51] +[BLUE_G:153] +[BLUE_B:153] +[GREEN_R:0] +[GREEN_G:102] +[GREEN_B:51] +[CYAN_R:51] +[CYAN_G:204] +[CYAN_B:204] +[RED_R:102] +[RED_G:0] +[RED_B:0] +[MAGENTA_R:153] +[MAGENTA_G:152] +[MAGENTA_B:204] +[BROWN_R:153] +[BROWN_G:51] +[BROWN_B:0] +[LGRAY_R:153] +[LGRAY_G:153] +[LGRAY_B:153] +[DGRAY_R:102] +[DGRAY_G:102] +[DGRAY_B:102] +[LBLUE_R:0] +[LBLUE_G:153] +[LBLUE_B:204] +[LGREEN_R:51] +[LGREEN_G:153] +[LGREEN_B:0] +[LCYAN_R:0] +[LCYAN_G:102] +[LCYAN_B:204] +[LRED_R:153] +[LRED_G:0] +[LRED_B:51] +[LMAGENTA_R:102] +[LMAGENTA_G:51] +[LMAGENTA_B:153] +[YELLOW_R:204] +[YELLOW_G:204] +[YELLOW_B:51] +[WHITE_R:204] +[WHITE_G:255] +[WHITE_B:255] diff --git a/df/df-init b/df/df-init new file mode 100644 index 0000000..df59230 --- /dev/null +++ b/df/df-init @@ -0,0 +1,6 @@ +deteriorateclothes start +devel/annc-monitor enable +fix/fat-dwarves +tweak fast-heat enable +tweak nestbox-color +tweak stable-cursor diff --git a/df/init.txt b/df/init.txt new file mode 100644 index 0000000..21cd652 --- /dev/null +++ b/df/init.txt @@ -0,0 +1,150 @@ +WARNING: Do NOT copy over the init.txt from an earlier version of DF. +Always read the file carefully, including the comments. + +In general, you can copy savegames and tilesets from older DF +versions, but you should not copy anything else. You should not, under any +circumstances, unpack a new DF on top of an older one. + + +Change this to turn sound off. + +[SOUND:NO] + +The sound volume runs from 0 (off) to 255 (full). You can set the volume from the ESC options menu as well. + +[VOLUME:255] + +Change this to skip the wonderful intro movies. + +[INTRO:NO] + +This lets you set the starting windowed/fullscreen setting. Can be YES, NO or PROMPT. + +[WINDOWED:YES] + +This is the size and font for windowed mode. Changing to the 800x600 font might make you happier. +If set below 256x256 it specifies the grid size instead, with a minimum of 80x25. + +[WINDOWEDX:80] +[WINDOWEDY:25] +[FONT:curses_square_24x24.png] + +You may disable window resizing if you wish. +[RESIZABLE:YES] + +Full screen info. The 0s below mean that the game will choose a resolution for you, but you can set it yourself as well. + +[FULLSCREENX:0] +[FULLSCREENY:0] +[FULLFONT:curses_square_24x24.png] + +If this is set to NO, tiles will be stretched to fit the screen if there is a resolution mismatch. +If this is set to YES, the tiles will not be stretched, but rather the game view will be centralized, surrounded by black space. Tiles that are too large will always be compressed rather than running off the screen. + +[BLACK_SPACE:YES] + +Graphics info, most of it as above. Set GRAPHICS to YES to turn it all on. This will use the "raw/graphics" folder for tile information. Currently this is limited to whatever creature graphics you have downloaded. The game comes with a few pictures to demonstrate. As of April 2018, the Dwarf Fortress Wiki has custom tilesets available at http://dwarffortresswiki.org/index.php/Tileset_repository and creature graphics at http://dwarffortresswiki.org/index.php/Graphics_set_repository. + +[GRAPHICS:NO] +[GRAPHICS_WINDOWEDX:0] +[GRAPHICS_WINDOWEDY:0] +[GRAPHICS_FONT:curses_square_24x24.png] +[GRAPHICS_FULLSCREENX:0] +[GRAPHICS_FULLSCREENY:0] +[GRAPHICS_FULLFONT:curses_square_24x24.png] +[GRAPHICS_BLACK_SPACE:YES] + +These settings can have a significant impact on frame rate, especially for people that have slow frame rates on the title screen. Available modes are 2D, 2DSW, 2DASYNC, STANDARD, PARTIAL:, ACCUM_BUFFER, FRAME_BUFFER and VBO. The number after PARTIAL refers to how many frames it will redo a printed tile before skipping it, so you might try increasing it a bit if you have flickering when PARTIAL is set. Please note that any of these combinations might cause frame rates to drop significantly or cause unpleasant side effects like flickering. + +By and large, 2D should be the most reliable, while STANDARD has a good combination of speed and reliability. However, all 2D modes are normally far slower than even STANDARD, which may be the slowest OpenGL mode. + +On a multi-core machine none of this is very likely to matter; stick to 2D. + +2DASYNC may be slightly more responsive than 2D on a multi-core machine, but this has recently become doubtful due to improvements to the other modes. + +Linux/OS X users may also use PRINT_MODE:TEXT for primitive ncurses output. + +[PRINT_MODE:2D] + Mode examples: + PRINT_MODE:2D + PRINT_MODE:TEXT + PRINT_MODE:FRAME_BUFFER + PRINT_MODE:PARTIAL:0 +[SINGLE_BUFFER:NO] + +Switches truetype on whenever the vertical tile size is this many pixels or larger. You may also use YES/NO to force it on/off. Turning it off may provide a minor speed boost (using font small enough that it doesn't activate won't). + +[TRUETYPE:24] + +Change this to YES to keep the DF window on top of your other windows. + +[TOPMOST:NO] + +Change this to YES if you want to see an FPS counter at the top left. + +[FPS:YES] + +Use this to set the maximum frame rate during play. The movies are always capped at 100. A frame in this case is not graphical but related to the movement speed of a creature. A healthy, unencumbered dwarven peasant takes one step every 10 frames. + +You may set FPS_CAP to 0 to make it uncapped. + +[FPS_CAP:100] + +Use this to set the maximum graphical frame refresh rate during play. + +[G_FPS_CAP:20] + +On cards that support the OpenGL ARB_sync extension, turning this on can improve framerates in GPU overload conditions. It defaults to NO, as many cards that claim to support this will crash if asked to do so. + +[ARB_SYNC:NO] + +This sets the applications vertical synchronization behavior. Changing this to YES can impact your FPS if your G_FPS is high. ARB_SYNC is a better option, if your system supports it. + +[VSYNC:NO] + +Change this to NEAREST if you want the texture values to use the nearest pixel without averaging. +Change this to LINEAR if you want the texture values to be averaged over the adjacent pixels. + +[TEXTURE_PARAM:LINEAR] + +Change this to make the dwarfort.exe process have a different priority. From highest to lowest, the options are REALTIME, HIGH, ABOVE_NORMAL, NORMAL, BELOW_NORMAL and IDLE. + +[PRIORITY:NORMAL] + +Use this to set how fast the game zooms. The default corresponds to +increasing grid size by 10 units each time you zoom. + +[ZOOM_SPEED:10] + +Change this to NO if you don't want to have the mouse involved at all. + +[MOUSE:YES] + +Change this to YES if you'd like to use a BMP for the mouse cursor. The image currently lags when the game is lagging however. + +[MOUSE_PICTURE:NO] + +This controls the number of milliseconds that must pass before a held key sends an initial repeat press to the game. You might need to adjust this. + +[KEY_HOLD_MS:250] + +This controls the number of milliseconds that must pass before a held key sends a repeat press to the game after the repeat process has begun. + +[KEY_REPEAT_MS:150] + +If you set KEY_REPEAT_ACCEL_LIMIT above one, then after KEY_REPEAT_ACCEL_START repetitions the repetition delay will smoothly decrease until repetition is this number of times faster than at the start. + +[KEY_REPEAT_ACCEL_LIMIT:8] +[KEY_REPEAT_ACCEL_START:10] + +This controls the number of milliseconds between macro instructions. + +[MACRO_MS:15] + +This controls the number of milliseconds that must pass before input works again after the view recenters on an event in dwarf mode. + +[RECENTER_INTERFACE_SHUTDOWN_MS:0] + +Change this to NO if you want to leave save uncompressed (you might want to do this if you are experience save corruption). + +[COMPRESSED_SAVES:YES] diff --git a/df/world_gen.txt b/df/world_gen.txt new file mode 100644 index 0000000..d83e061 --- /dev/null +++ b/df/world_gen.txt @@ -0,0 +1,88 @@ +[WORLD_GEN] + [TITLE:LOCO] + [DIM:65:65] + [EMBARK_POINTS:1504] + [END_YEAR:125] + [BEAST_END_YEAR:125:10] + [REVEAL_ALL_HISTORY:1] + [CULL_HISTORICAL_FIGURES:1] + [ELEVATION:1:400:202:202] + [RAINFALL:0:100:101:101] + [TEMPERATURE:25:75:101:101] + [DRAINAGE:0:100:101:101] + [VOLCANISM:10:100:101:101] + [SAVAGERY:30:100:101:101] + [ELEVATION_FREQUENCY:1:1:1:1:1:1] + [RAIN_FREQUENCY:1:1:1:1:1:1] + [DRAINAGE_FREQUENCY:1:1:1:1:1:1] + [TEMPERATURE_FREQUENCY:1:1:1:1:1:1] + [SAVAGERY_FREQUENCY:1:1:1:1:1:1] + [VOLCANISM_FREQUENCY:1:1:1:1:1:1] + [POLE:NORTH_AND_OR_SOUTH] + [MINERAL_SCARCITY:50] + [MEGABEAST_CAP:200] + [SEMIMEGABEAST_CAP:100] + [TITAN_NUMBER:200] + [TITAN_ATTACK_TRIGGER:80:0:50000] + [DEMON_NUMBER:56] + [NIGHT_TROLL_NUMBER:26] + [BOGEYMAN_NUMBER:26] + [VAMPIRE_NUMBER:26] + [WEREBEAST_NUMBER:56] + [SECRET_NUMBER:56] + [REGIONAL_INTERACTION_NUMBER:56] + [DISTURBANCE_INTERACTION_NUMBER:56] + [EVIL_CLOUD_NUMBER:56] + [EVIL_RAIN_NUMBER:56] + [GENERATE_DIVINE_MATERIALS:1] + [GOOD_SQ_COUNTS:6:63:127] + [EVIL_SQ_COUNTS:41:77:127] + [PEAK_NUMBER_MIN:1] + [PARTIAL_OCEAN_EDGE_MIN:0] + [COMPLETE_OCEAN_EDGE_MIN:0] + [VOLCANO_MIN:10] + [REGION_COUNTS:SWAMP:528:0:0] + [REGION_COUNTS:DESERT:0:0:0] + [REGION_COUNTS:FOREST:528:0:0] + [REGION_COUNTS:MOUNTAINS:0:0:0] + [REGION_COUNTS:OCEAN:66:0:0] + [REGION_COUNTS:GLACIER:0:0:0] + [REGION_COUNTS:TUNDRA:264:0:0] + [REGION_COUNTS:GRASSLAND:528:0:0] + [REGION_COUNTS:HILLS:0:0:0] + [EROSION_CYCLE_COUNT:250] + [RIVER_MINS:25:25] + [PERIODICALLY_ERODE_EXTREMES:1] + [OROGRAPHIC_PRECIPITATION:1] + [SUBREGION_MAX:2750] + [CAVERN_LAYER_COUNT:3] + [CAVERN_LAYER_OPENNESS_MIN:100] + [CAVERN_LAYER_OPENNESS_MAX:100] + [CAVERN_LAYER_PASSAGE_DENSITY_MIN:100] + [CAVERN_LAYER_PASSAGE_DENSITY_MAX:100] + [CAVERN_LAYER_WATER_MIN:0] + [CAVERN_LAYER_WATER_MAX:100] + [HAVE_BOTTOM_LAYER_1:1] + [HAVE_BOTTOM_LAYER_2:1] + [LEVELS_ABOVE_GROUND:15] + [LEVELS_ABOVE_LAYER_1:20] + [LEVELS_ABOVE_LAYER_2:20] + [LEVELS_ABOVE_LAYER_3:20] + [LEVELS_ABOVE_LAYER_4:20] + [LEVELS_ABOVE_LAYER_5:20] + [LEVELS_AT_BOTTOM:1] + [CAVE_MIN_SIZE:5] + [CAVE_MAX_SIZE:25] + [MOUNTAIN_CAVE_MIN:60] + [NON_MOUNTAIN_CAVE_MIN:120] + [ALL_CAVES_VISIBLE:1] + [SHOW_EMBARK_TUNNEL:2] + [TOTAL_CIV_NUMBER:50] + [TOTAL_CIV_POPULATION:30000] + [SITE_CAP:264] + [PLAYABLE_CIVILIZATION_REQUIRED:1] + [ELEVATION_RANGES:0:1056:0] + [RAIN_RANGES:264:528:264] + [DRAINAGE_RANGES:264:528:264] + [SAVAGERY_RANGES:264:528:264] + [VOLCANISM_RANGES:264:528:264] diff --git a/docker/devdocs.bat b/docker/devdocs.bat new file mode 100755 index 0000000..cd356b2 --- /dev/null +++ b/docker/devdocs.bat @@ -0,0 +1,2 @@ +docker run -d -p 9292:9292 -t devdocs/devdocs:alpine +pause \ No newline at end of file diff --git a/docker/mongo.sh b/docker/mongo.sh new file mode 100755 index 0000000..6eeb863 --- /dev/null +++ b/docker/mongo.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +docker run -p 27017:27017 -p 27018:27018 -p 27019:27019 -v mongo-data:/data/db mongo:4.4.4-bionic diff --git a/docker/postgres.sh b/docker/postgres.sh new file mode 100755 index 0000000..14f9adf --- /dev/null +++ b/docker/postgres.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env sh + +docker run -d -p 5432:5432 -v postgres-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=devi -e POSTGRES_USER=devi -e POSTGRES_DB=devi postgres:13.2-alpine +# docker run --add-host=localhost:127.0.0.1 -p 5432:5432 -v postgres-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=devi -e POSTGRES_USER=devi -e POSTGRES_DB=devi postgres:13 diff --git a/docker/searx.bat b/docker/searx.bat new file mode 100755 index 0000000..78ec1a7 --- /dev/null +++ b/docker/searx.bat @@ -0,0 +1,2 @@ +D:\home\apps\cygwin\bin\zsh.exe -c "docker run --rm -d -v ${PWD}/searx:/etc/searx -p 11111:8080 -e BASE_URL=http://localhost:11111/ searx/searx" +pause diff --git a/docker/yacy.bat b/docker/yacy.bat new file mode 100755 index 0000000..f4f5cbe --- /dev/null +++ b/docker/yacy.bat @@ -0,0 +1,2 @@ +docker run -d -v yacy_volume:/opt/yacy_search_server/DATA -p 8090:8090 -p 8443:8443 --log-opt max-size=200m --log-opt max-file=2 luccioman/yacy +pause \ No newline at end of file diff --git a/etc/fonts/local.conf b/etc/fonts/local.conf new file mode 100644 index 0000000..eeb3658 --- /dev/null +++ b/etc/fonts/local.conf @@ -0,0 +1,39 @@ + + + + + + true + + + false + + + true + + + hintslight + + + lcddefault + + + normal + + + regular + + + false + + + rgb + + + 75 + + + true + + + diff --git a/fedpackages.txt b/fedpackages.txt new file mode 100644 index 0000000..4c43932 --- /dev/null +++ b/fedpackages.txt @@ -0,0 +1,573 @@ +ModemManager +NetworkManager +NetworkManager-adsl +NetworkManager-bluetooth +NetworkManager-openconnect +NetworkManager-openvpn-gnome +NetworkManager-pptp-gnome +NetworkManager-vpnc-gnome +NetworkManager-wifi +NetworkManager-wwan +PackageKit-command-not-found +PackageKit-gstreamer-plugin +PackageKit-gtk3-module +R +SDL2_image-devel +SDL_image +SDL_ttf +ShellCheck +VirtualBox-5.1 +aajohan-comfortaa-fonts +abattis-cantarell-fonts +abrt-cli +abrt-desktop +abrt-java-connector +acl +acpi +adcli +adobe-source-han-sans-cn-fonts +adobe-source-han-sans-tw-fonts +adwaita-qt4 +alsa-plugins-pulseaudio +alsa-utils +anaconda +android-tools +apvlv +at +at-spi2-atk +at-spi2-core +atmel-firmware +attr +audit +authconfig +automake +avahi +b43-fwcutter +b43-openfwwf +baobab +basesystem +bash +bash-completion +bc +beep +bicon +bijiben +bind-utils +binutils-devel +binutils-x86_64-linux-gnu +bison +bluez-cups +boost +boost-devel +boost-static +bridge-utils +btrfs-progs +bzip2 +bzip2-libs-debuginfo +calcurse +capstone-debuginfo +capstone-devel +caribou +caribou-gtk2-module +caribou-gtk3-module +cheese +chrony +cifs-utils +clisp +cmake +colord +colordiff +control-center +coreutils +cpio +cronie +crontabs +cryptsetup +cups +cups-filters +cups-pk-helper +curl +cyrus-sasl-plain +dbus +dconf +dejagnu +dejavu-sans-fonts +dejavu-sans-mono-fonts +dejavu-serif-fonts +deltarpm +deluge-console +device-mapper-multipath +dhcp-client +dkms +dmraid +dnf +dnf-plugins-core +dnf-yum +docker-ce +dos2unix +dosfstools +dracut-config-rescue +dracut-live +dracut-network +dtrx +e2fsprogs +eclipse-jdt +efibootmgr +elfutils-libelf-devel +emacs +emacs-nox +empathy +eog +erlang +ethtool +evince +evince-browser-plugin +evince-djvu +evince-nautilus +evolution +evolution-ews +evolution-help +fcoe-utils +fedora-productimg-workstation +fedora-release-workstation +fedora-user-agent-chrome +file +file-roller +filesystem +firefox +firewalld +fish +flex +foomatic +foomatic-db-ppds +fpaste +fprintd-pam +freerdp1.2 +freetype-freeworld +fribidi +fribidi-devel +fros-gnome +frotz +fwupd-labels +gcc +gcc-c++ +gdm +gdouros-symbola-fonts +gedit +ghc-libffi-devel +ghostscript +git +glances +glib-devel +glib-networking +glib2-devel +glibc +glibc-debuginfo +glibc-devel +glx-utils +gmp-devel +gnome-backgrounds +gnome-bluetooth +gnome-boxes +gnome-calculator +gnome-characters +gnome-classic-session +gnome-clocks +gnome-color-manager +gnome-contacts +gnome-disk-utility +gnome-documents +gnome-font-viewer +gnome-getting-started-docs +gnome-initial-setup +gnome-screenshot +gnome-session-wayland-session +gnome-session-xsession +gnome-settings-daemon +gnome-shell +gnome-shell-extension-background-logo +gnome-software +gnome-system-monitor +gnome-terminal +gnome-themes-standard +gnome-tweak-tool +gnome-user-docs +gnome-user-share +gnome-weather +gnu-free-mono-fonts +gnu-free-sans-fonts +gnu-free-serif-fonts +gnupg2 +gnupg2-smime +gobject-introspection-devel +golang +google-android-emoji-fonts +google-noto-emoji-fonts +google-noto-sans-lisu-fonts +google-noto-sans-mandaic-fonts +google-noto-sans-meetei-mayek-fonts +google-noto-sans-tagalog-fonts +google-noto-sans-tai-tham-fonts +google-noto-sans-tai-viet-fonts +gource +gparted +grubby +gsl-devel +gstreamer1-plugins-bad-free +gstreamer1-plugins-bad-free-gtk +gstreamer1-plugins-good +gutenprint +gutenprint-cups +gvfs-afc +gvfs-afp +gvfs-archive +gvfs-fuse +gvfs-goa +gvfs-gphoto2 +gvfs-mtp +gvfs-smb +haskell-platform +hfsplus-tools +hostname +hplip +htop +http-parser +hunspell +hyperv-daemons +i3 +ibus-gtk2 +ibus-gtk3 +ibus-hangul +ibus-kkc +ibus-libpinyin +ibus-libzhuyin +ibus-m17n +ibus-qt +ibus-rawcode +ibus-typing-booster +initscripts +iproute +iptstate +iputils +ipw2100-firmware +ipw2200-firmware +irssi +iscsi-initiator-utils +iwl100-firmware +iwl1000-firmware +iwl105-firmware +iwl135-firmware +iwl2000-firmware +iwl2030-firmware +iwl3160-firmware +iwl3945-firmware +iwl4965-firmware +iwl5000-firmware +iwl5150-firmware +iwl6000-firmware +iwl6000g2a-firmware +iwl6000g2b-firmware +iwl6050-firmware +iwl7260-firmware +jansson-devel +jcal +jomolhari-fonts +jwhois +kbd +kernel +kernel-core +kernel-devel +kernel-modules +khmeros-base-fonts +leafpad +less +libX11-devel +libbsd +libcanberra-gtk2 +libcanberra-gtk3 +libconfig-devel +libcurl-devel +libdnet-devel +libedit-devel +liberation-mono-fonts +liberation-sans-fonts +liberation-serif-fonts +libertas-usb8388-firmware +libevent-devel +libfdt-devel +libffi-debuginfo +libffi-devel +libgcc-debuginfo +libglvnd +libglvnd-egl +libglvnd-gles +libglvnd-glx +liblangtag-data +libmpc-devel +libpcap-devel +libpng-devel +libpng12 +libproxy-mozjs +libpskc +libreoffice-calc +libreoffice-draw +libreoffice-emailmerge +libreoffice-graphicfilter +libreoffice-impress +libreoffice-math +libreoffice-writer +librsvg2 +libsane-hpaio +libstdc++-debuginfo +libtool +libuv +libvirt-devel +libxml2-devel +lklug-fonts +lm_sensors +lm_sensors-libs +logrotate +lohit-assamese-fonts +lohit-bengali-fonts +lohit-devanagari-fonts +lohit-gujarati-fonts +lohit-gurmukhi-fonts +lohit-kannada-fonts +lohit-odia-fonts +lohit-tamil-fonts +lohit-telugu-fonts +lrzsz +lsof +lua-devel +lua-libs-debuginfo +luarocks +lvm2 +mactel-boot +mailcap +man-db +man-pages +mc +mcelog +mdadm +memtest86+ +mesa-dri-drivers +microcode_ctl +mlocate +mousetweaks +mpage +mpfr-devel +mpg123 +mtr +mupdf +mutt +nasm +nautilus +nautilus-sendto +naver-nanum-gothic-fonts +ncdu +ncurses +ncurses-compat-libs +ncurses-libs-debuginfo +neofetch +neomutt +net-tools +nethack +newsbeuter +nfs-utils +nm-connection-editor +nmap +nmap-ncat +npm +nss-mdns +nss-pem +ntfs-3g +ntfsprogs +nudoku +nyquist +ocaml +ocaml-cryptokit-devel +ocaml-findlib +open-vm-tools-desktop +opencv-devel +openssh-clients +openssh-server +openssl-devel +openssl-libs-debuginfo +orca +ostree-libs +paktype-naskh-basic-fonts +pam_krb5 +pam_pkcs11 +pandoc +paps +paratype-pt-sans-fonts +parted +passwd +passwdqc +patch +pciutils +pcmciautils +php-cli +pinentry-gnome3 +pinfo +platform-python-tkinter +plymouth +plymouth-system-theme +policycoreutils +powerline-fonts +ppp +prboom +procps-ng +psacct +pulseaudio +pulseaudio-module-x11 +pulseaudio-utils +putty +pypy3 +python2-virtualenv +python3-Cython +python3-bind +python3-debuginfo +python3-devel +python3-ipython +python3-pygments +python3-tkinter +qemu +qemu-guest-agent +qodem-x11 +qt +qt-settings +qt-x11 +qt5-qtbase +qt5-qtbase-gui +qt5-qtdeclarative +qt5-qtxmlpatterns +quota +qutebrowser +ranger +rdist +readline-debuginfo +readline-devel +realmd +redhat-lsb-core +redhat-rpm-config +rhash +rhythmbox +rng-tools +rootfiles +rp-pppoe +rpm +rpmfusion-free-release +rsync +rtv +ruby +ruby-devel +rygel +samba +samba-client +sane-backends-daemon +sane-backends-drivers-scanners +scl-utils +screen +screenfetch +sdcv +seahorse +selinux-policy-targeted +setroubleshoot +setup +setuptool +shadow-utils +shotwell +sil-abyssinica-fonts +sil-mingzat-fonts +sil-nuosu-fonts +sil-padauk-fonts +smc-meera-fonts +snapd +sos +spice-vdagent +sssd +sssd-nfs-idmap +steghide +stix-fonts +stunnel +subversion +sudo +sushi +swig +symlinks +sysconftool +syslinux +syslinux-extlinux +system-config-printer-udev +systemd +systemd-devel +tabish-eeyek-fonts +tar +tcp_wrappers +tcpdump +teamd +telegram-cli +telnet +texlive +thai-scalable-waree-fonts +time +tinyxml2 +tlomt-orbitron-fonts +tmux +tmux-powerline +tor +totem +totem-nautilus +traceroute +transmission-cli +tree +trousers +uboot-tools +unoconv +unzip +usb_modeswitch +usbutils +util-linux +vconfig +vim-enhanced +vim-minimal +vinagre +vlgothic-fonts +vorbis-tools +w3m +wget +which +wireless-tools +wordgrinder +words +wvdial +xdg-desktop-portal +xdg-desktop-portal-gtk +xdg-user-dirs-gtk +xfsprogs +xmlsec1 +xmlsec1-openssl +xorg-x11-drv-ati +xorg-x11-drv-evdev +xorg-x11-drv-fbdev +xorg-x11-drv-intel +xorg-x11-drv-libinput +xorg-x11-drv-nouveau +xorg-x11-drv-openchrome +xorg-x11-drv-qxl +xorg-x11-drv-vesa +xorg-x11-drv-vmware +xorg-x11-drv-wacom +xorg-x11-server-Xorg +xorg-x11-utils +xorg-x11-xauth +xorg-x11-xinit +xz-libs-debuginfo +yelp +z3 +zd1211-firmware +zip +zlib-debuginfo +zlib-devel +zsh diff --git a/fzfinit.sh b/fzfinit.sh new file mode 100755 index 0000000..0ca8870 --- /dev/null +++ b/fzfinit.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +mkdir -p ~/.postit && cp ~/scripts/postit ~/.postit/postit diff --git a/gen_wg_config.sh b/gen_wg_config.sh new file mode 100755 index 0000000..983c7b7 --- /dev/null +++ b/gen_wg_config.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# run with su -i;e.g. su -i && gen_wg_config.sh +set -x +set -e + +CONFIG_CONTENT="[Interface]\n +Address = 10.10.0./32\n +Address = fd86:ea04:1111::/128\n +PrivateKey = \n +DNS = 1.1.1.1\n +\n +[Peer]\n +PublicKey = SERVERPUBKEY\n +Endpoint = :51820\n +AllowedIPs = 0.0.0.0/0, ::/0" + +CONFIG_FILE_DIR=~/config +mkdir -p $CONFIG_FILE_DIR +RAND_NAME=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) + +RAND_ADDRESS=$(shuf -i 1-255 -n 1) + +OWNER=$(echo $USER) + +TMPDIR=$(mktemp -d) +cd $TMPDIR +wg genkey | sudo tee privatekey"$RAND_NAME" | wg pubkey | sudo tee publickey"$RAND_NAME" + +SERVER_PUB_KEY=$(cat /etc/wireguard/publickey) +CLIENT_PRIV_KEY=$(cat privatekey"$RAND_NAME") +PUB_IP_ADDRESS=$(curl ipinfo.io/ip) + +OUTPUT=$(echo $CONFIG_CONTENT | sed "s%SERVERPUBKEY%$SERVER_PUB_KEY%") +OUTPUT=$(echo $OUTPUT | sed "s%%$CLIENT_PRIV_KEY%") +OUTPUT=$(echo $OUTPUT | sed "s//$PUB_IP_ADDRESS/") +OUTPUT=$(echo $OUTPUT | sed "s//$RAND_ADDRESS/g") + +cd $CONFIG_FILE_DIR +echo $OUTPUT > wg"$RAND_NAME".conf +chmod 600 wg"$RAND_NAME".conf +chown $USER:$USER wg"$RAND_NAME".conf + +CLIENT_PUB_KEY=$(cat $TMPDIR/publickey"$RAND_NAME") +wg set wg0 peer $CLIENT_PUB_KEY allowed-ips 10.10.0."$RAND_ADDRESS"/32,fd86:ea04:1111::"$RAND_ADDRESS"/128 +rm -rf $TEMPDIR diff --git a/header.hpp b/header.hpp new file mode 100644 index 0000000..2df2a5a --- /dev/null +++ b/header.hpp @@ -0,0 +1,4 @@ + +#include +#include +#include diff --git a/hived b/hived new file mode 100755 index 0000000..d6346bc --- /dev/null +++ b/hived @@ -0,0 +1,704 @@ +#!/usr/bin/python3 + +import argparse +import hashlib +import hmac +import json +import requests +import os +import sys +# import csv +import socket +import time +import threading +import atexit +import signal +# import selectors +# from tempfile import TemporaryFile +from abc import ABCMeta, abstractmethod +from io import TextIOWrapper, BytesIO +# import subprocess +from _thread import * +import threading +sys.path.insert(0, "/home/bloodstalker/extra/seer/") +shut_up = sys.stdout +seriously = sys.stderr +sys.stdout = TextIOWrapper(BytesIO(), sys.stdout.encoding) +sys.stderr = TextIOWrapper(BytesIO(), sys.stdout.encoding) +# from seer import launch_ais +sys.stdout = shut_up +sys.stderr = seriously + +api_url_base = "https://api.coinmarketcap.com/v1/ticker/" +assets_file = "/home/bloodstalker/scripts/assets.json" +api_url_base_shapeshift = "https://shapeshift.io/getcoins" +test_url = "https://api.coinmarketcap.com/v1/ticker/?start=0&limit=300" +cryptocompare_price_url = "https://min-api.cryptocompare.com/data/price?" + +# argument parser calls sys.exit() on exception, we don't want that. + + +class ArgumentParseError(Exception): + pass + + +class ArgumentParserWithoutExit(argparse.ArgumentParser): + def error(self, message): + raise ArgumentParseError(message) + + +class Argparser(object): + def __init__(self): + self.parser = ArgumentParserWithoutExit() + self.parser.add_argument( + "--name", type=str, help="price of the chose crypto") + self.parser.add_argument( + "--worth", type=str, help="single asset worth") + self.parser.add_argument("--xx", type=str, nargs=2, help="convert") + self.parser.add_argument("--xxv", type=float, help="xx multiplier") + self.parser.add_argument( + "--gen", type=str, nargs=2, help="general option") + self.parser.add_argument("--cap", type=str, help="market cap") + self.parser.add_argument("--rank", type=str, help="market cap rank") + self.parser.add_argument( + "--total", action="store_true", help="total", default=False) + self.parser.add_argument( + "--ava", type=str, help="is currency available on changelly") + self.parser.add_argument( + "--avass", type=str, help="is currency available on shapeshift") + self.parser.add_argument("--cglistall", action="store_true", + help="list all currencies available on changelly", default=False) + self.parser.add_argument( + "--test", action="store_true", help="test switch", default=False) + self.parser.add_argument( + "--watchlist", type=str, nargs="+", help="watch list") + self.parser.add_argument( + "--ss", type=str, nargs="+", help="watchlist on shapeshift") + self.parser.add_argument("--dy", type=int, help="lazy") + self.parser.add_argument( + "--demon", action="store_true", help="daemon mode", default=False) + self.parser.add_argument( + "--al1", action="store_true", help="alert1", default=False) + self.parser.add_argument( + "--al2", action="store_true", help="alert2", default=False) + self.parser.add_argument( + "--al3", action="store_true", help="alert3", default=False) + self.parser.add_argument( + "--al4", action="store_true", help="alert4", default=False) + self.parser.add_argument( + "--al5", action="store_true", help="alert5", default=False) + self.parser.add_argument( + "--dbg", action="store_true", help="debug", default=False) + self.parser.add_argument( + "--alive", action="store_true", help="is hived up", default=False) + self.parser.add_argument( + "--tg", action="store_true", help="tg", default=False) + self.parser.add_argument( + "--mahsaread", action="store_true", help="mark as read", default=False) + self.parser.add_argument( + "--ai", action="store_true", help="which ai to launch", default=False) + + def parse(self, argv): + self.args, self.rest = self.parser.parse_known_args(argv) + + +class Colors: + purple = '\033[95m' + blue = '\033[94m' + green = '\033[92m' + yellow = '\033[93m' + red = '\033[91m' + grey = '\033[1;37m' + darkgrey = '\033[1;30m' + cyan = '\033[1;36m' + ENDC = '\033[0m' + BOLD = '\033[1m' + UNDERLINE = '\033[4m' + + +def get_info_w_name(api_url, name): + cc_key = json.load( + open("/home/bloodstalker/scripts/cryptocompare_key.json"))["key"] + #response = requests.get(cryptocompare_price_url + "fsym=" + name + "&" + "tsyms=USD&" + "api_key=" + cc_key) + response = requests.get(cryptocompare_price_url + + "fsym=" + name + "&" + "tsyms=USD&") + if response.status_code == 200: + return json.loads(response.content.decode('utf-8')) + else: + return None + + +def changelly(): + API_URL = 'https://api.changelly.com' + API_KEY = '1a17d70c8b624a398c3ec1e4dbffbaa5' + API_SECRET = json.load( + open("/home/bloodstalker/scripts/changelly_api_secret.json"))["key"] + message = { + 'jsonrpc': '2.0', + 'id': 1, + 'method': 'getCurrencies', + 'params': [] + } + + serialized_data = json.dumps(message) + sign = hmac.new(API_SECRET.encode('utf-8'), + serialized_data.encode('utf-8'), hashlib.sha512).hexdigest() + headers = {'api-key': API_KEY, 'sign': sign, + 'Content-type': 'application/json'} + response = requests.post(API_URL, headers=headers, data=serialized_data) + if response.status_code == 200: + return (response.json()['result']) + else: + return None + + +def vocalize(sound): + # for whatever weird reason this causes a hang + # subprocess.call([os.path.expanduser("~")+"/scripts/voice.sh", sound]) + pass + + +def trim(num, dig): + from math import log10, floor, ceil + power = ceil(log10(num)) + power = dig - power + result = int(num * pow(10, power)) + count = ceil(log10(result)) + digits = list(str(result)) + if power > ceil(log10(num)): + for i in range(0, abs(power)-count): + digits.insert(0, "0") + digits.insert(ceil(log10(num)) if log10(num) > 0 else 0, ".") + elif power < 0: + for i in range(0, abs(power)): + digits.insert(len(digits), "0") + else: + digits.insert(-abs(power) + count, ".") + return("".join(digits)) + + +def highpercentdump(number): + dic_7d = {} + dic_7d_sorted = {} + list_7d_key = [] + list_7d_value = [] + + dic_24h = {} + dic_24h_sorted = {} + list_24h_key = [] + list_24h_value = [] + + dic_1h = {} + dic_1h_sorted = {} + list_1h_key = [] + list_1h_value = [] + + res = get_info_w_name(test_url, "") + + for i in range(0, 300): + price = res[i]["percent_change_7d"] + if price == None: + price = 0 + dic_7d[res[i]["name"]] = float(price) + for key, value in sorted(dic_7d.items(), key=lambda kv: (kv[1], kv[0])): + dic_7d_sorted[key] = value + for k, v in dic_7d_sorted.items(): + list_7d_key.append(k) + list_7d_value.append(v) + + for i in range(0, 300): + price = res[i]["percent_change_24h"] + if price == None: + price = 0 + dic_24h[res[i]["name"]] = float(price) + for key, value in sorted(dic_24h.items(), key=lambda kv: (kv[1], kv[0])): + dic_24h_sorted[key] = value + for k, v in dic_24h_sorted.items(): + list_24h_key.append(k) + list_24h_value.append(v) + + for i in range(0, 300): + price = res[i]["percent_change_1h"] + if price == None: + price = 0 + dic_1h[res[i]["name"]] = float(price) + for key, value in sorted(dic_1h.items(), key=lambda kv: (kv[1], kv[0])): + dic_1h_sorted[key] = value + for k, v in dic_1h_sorted.items(): + list_1h_key.append(k) + list_1h_value.append(v) + + col_width_1 = max(len(word) for word in list_7d_key) + \ + max(len(repr(word)) for word in list_7d_value) + 2 + col_width_2 = max(len(word) for word in list_7d_key) + \ + max(len(repr(word)) for word in list_7d_value) + 2 + col_width_3 = max(len(word) for word in list_7d_key) + \ + max(len(repr(word)) for word in list_7d_value) + 2 + col_width = max(col_width_1, col_width_2, col_width_3, 40) + print(("\t" + Colors.green + Colors.BOLD + + "7d:").ljust(col_width + 10), end="") + print("24h:".ljust(col_width), end="") + print(("1h:" + Colors.ENDC).ljust(col_width)) + for i in range(300-number, 300): + print((Colors.red + Colors.BOLD + repr(300-i) + + Colors.ENDC).ljust(21), end="") + print((Colors.blue+list_7d_key[i]+Colors.ENDC+":"+Colors.cyan+Colors.BOLD+repr( + list_7d_value[i])+Colors.ENDC).ljust(col_width + 24), end="") + print((Colors.blue+list_24h_key[i]+Colors.ENDC+":"+Colors.cyan+Colors.BOLD+repr( + list_24h_value[i])+Colors.ENDC).ljust(col_width+24), end="") + print((Colors.blue+list_1h_key[i]+Colors.ENDC+":"+Colors.cyan + + Colors.BOLD+repr(list_1h_value[i])+Colors.ENDC).ljust(col_width)) + print() + for i in range(number, -1, -1): + print((Colors.red + Colors.BOLD + repr(300-i) + + Colors.ENDC).ljust(21), end="") + print((Colors.blue+list_7d_key[i]+Colors.ENDC+":"+Colors.cyan+Colors.BOLD+repr( + list_7d_value[i])+Colors.ENDC).ljust(col_width + 24), end="") + print((Colors.blue+list_24h_key[i]+Colors.ENDC+":"+Colors.cyan+Colors.BOLD+repr( + list_24h_value[i])+Colors.ENDC).ljust(col_width+24), end="") + print((Colors.blue+list_1h_key[i]+Colors.ENDC+":"+Colors.cyan + + Colors.BOLD+repr(list_1h_value[i])+Colors.ENDC).ljust(col_width)) + + one = [] + one.append("7d:\n\n") + for i in range(299, 300-number, -1): + one.append(repr(list_7d_key[i])) + one.append("\t") + one.append(repr(list_7d_value[i])) + one.append("\n") + for i in range(number, -1, -1): + one.append(repr(list_7d_key[i])) + one.append("\t") + one.append(repr(list_7d_value[i])) + one.append("\n") + + one.append("\n\n24h:\n\n") + for i in range(299, 300-number, -1): + one.append(repr(list_24h_key[i])) + one.append("\t") + one.append(repr(list_24h_value[i])) + one.append("\n") + for i in range(number, -1, -1): + one.append(repr(list_24h_key[i])) + one.append("\t") + one.append(repr(list_24h_value[i])) + one.append("\n") + + one.append("\n\n1h:\n\n") + for i in range(299, 300-number, -1): + one.append(repr(list_1h_key[i])) + one.append("\t") + one.append(repr(list_1h_value[i])) + one.append("\n") + for i in range(number, -1, -1): + one.append(repr(list_1h_key[i])) + one.append("\t") + one.append(repr(list_1h_value[i])) + one.append("\n") + + return one + + +class Void_Spawner(object): + __metalclass__ = ABCMeta + + def __init__(self): + thread = threading.Thread(target=self.run, args=()) + thread.daemon = True + thread.start() + + @abstractmethod + def run(self): + pass + + +class V_Spawn_cnn(Void_Spawner): + def run(self): + launch_ais("cnn_type_1") + + +class V_Spawn_ltsm(Void_Spawner): + def run(self): + launch_ais("ltsm_type_2") + + +class V_Spawn_marionette(Void_Spawner): + def run(self): + launch_ais("marionette_type_1") + + +class Demon_Father: + __metalclass__ = ABCMeta + + def __init__(self, pidfile): + self.pidfile = pidfile + self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self.server_address = ('localhost', 10111) + + def demonize(self): + try: + pid = os.fork() + if pid > 0: + sys.exit(0) + except OSError as err: + sys.stderr.write('fork #1 failed: {0}\n'.format(err)) + sys.exit(1) + os.chdir('/') + os.setsid() + os.umask(0) + try: + pid = os.fork() + if pid > 0: + sys.exit(0) + except OSError as err: + sys.stderr.write('fork #2 failed: {0}\n'.format(err)) + sys.exit(1) + sys.stdout.flush() + sys.stderr.flush() + si = open(os.devnull, 'r') + so = open(os.devnull, 'a+') + se = open(os.devnull, 'a+') + os.dup2(si.fileno(), sys.stdin.fileno()) + os.dup2(so.fileno(), sys.stdout.fileno()) + os.dup2(se.fileno(), sys.stderr.fileno()) + atexit.register(self.delpid) + pid = str(os.getpid()) + with open(self.pidfile, 'w+') as f: + f.write(pid + '\n') + + def delpid(self): + self.pidfile.close() + os.remove(self.pidfile) + + def start(self): + try: + with open(self.pidfile, 'r') as pf: + pid = int(pf.read().strip()) + except IOError: + pid = None + ''' + if pid: + message = "pidfile {0} already exist. " + "Daemon already running?\n" + sys.stderr.write(message.format(self.pidfile)) + sys.exit(1) + ''' + self.demonize() + self.run() + + def stop(self): + try: + with open(self.pidfile, 'r') as pf: + pid = int(pf.read().strip()) + except IOError: + pid = None + if not pid: + message = "pidfile {0} does not exist. " + "Daemon not running?\n" + sys.stderr.write(message.format(self.pidfile)) + return + try: + while 1: + os.kill(pid, signal.SIGTERM) + time.sleep(0.1) + except OSError as err: + e = str(err.args) + if e.find("No such process") > 0: + if os.path.exists(self.pidfile): + os.remove(self.pidfile) + else: + print(str(err.args)) + sys.exit(1) + + def restart(self): + self.stop() + self.start() + + @abstractmethod + def run(self): + pass + + +class Demon(Demon_Father): + def __init__(self, argparser, pidfile): + self.pidfile = pidfile + self.connection = [] + self.client_address = [] + self.argparser = argparser + + def run(self): + premain(self.argparser) + + +def networth(): + net = float() + assets = json.load(open(assets_file)) + for asset in assets: + price = get_info_w_name(api_url_base, asset)["USD"] + net += assets[asset] * float(price) + return int(net) + + +def alert_1(): + res1 = get_info_w_name(api_url_base, "doge")["USD"] + res2 = get_info_w_name(api_url_base, "eth")["USD"] + value = 600000 + print("%.2f" % (value*float(res1)/float(res2))) + if value*float(res1)/float(res2) < 2: + vocalize("./mila/alert_1.ogg") + + +def alert_2(): + res1 = get_info_w_name(api_url_base, "gnt")["USD"] + res2 = get_info_w_name(api_url_base, "eth")["USD"] + value = 1765 + print("%.2f" % (value*float(res1)/float(res2))) + if value*float(res1)/float(res2) > 2: + vocalize("./mila/alert_2.ogg") + + +def alert_3(): + res1 = get_info_w_name(api_url_base, "ant")["USD"] + res2 = get_info_w_name(api_url_base, "eth")["USD"] + value = 196 + print("%.2f" % (value*float(res1)/float(res2))) + if value*float(res1)/float(res2) > 2: + vocalize("./mila/alert_3.ogg") + + +def alert_4(): + res1 = get_info_w_name(api_url_base, "sc")["USD"] + res2 = get_info_w_name(api_url_base, "eth")["USD"] + value = 35695 + print("%.2f" % (value*float(res1)/float(res2))) + if value*float(res1)/float(res2) > 2: + vocalize("./mila/alert_4.ogg") + + +def alert_5(): + res1 = get_info_w_name(api_url_base, "bat")["USD"] + res2 = get_info_w_name(api_url_base, "eth")["USD"] + value = 4013 + print("%.2f" % (value*float(res1)/float(res2))) + if value*float(res1)/float(res2) > 2: + vocalize("./mila/alert_4.ogg") + + +def highpercentdump_bot(): + return highpercentdump(22) + + +def com_name(name): + res = get_info_w_name(api_url_base, name) + if res is not None: + print(trim(float(res['USD']), 4)) + + +def com_cap(name): + res = get_info_w_name(api_url_base, name) + if res is not None: + print(res[0]['market_cap_usd']) + + +def com_rank(name): + res = get_info_w_name(api_url_base, name) + if res is not None: + print(res[0]['rank']) + + +def com_gen(argparser): + name = argparser.args.gen[0] + cat = argparser.args.gen[1] + res = get_info_w_name(api_url_base, name) + if res is not None: + print(res[0][cat]) + + +def com_worth(argparser): + net = float() + assets = json.load(open(assets_file)) + for asset in assets: + if asset == argparser.args.worth: + price = get_info_w_name(api_url_base, asset)["USD"] + net = assets[asset] * float(price) + print(int(net)) + break + + +def com_total(argparser): + net = float() + assets = json.load(open(assets_file)) + for asset in assets: + price = get_info_w_name(api_url_base, asset)["USD"] + net += assets[asset] * float(price) + print("{:,}".format(int(net))) + + +def com_xx(argparser): + value = 1.0 + name1 = argparser.args.xx[0] + name2 = argparser.args.xx[1] + res1 = get_info_w_name(api_url_base, name1)["USD"] + res2 = get_info_w_name(api_url_base, name2)["USD"] + if argparser.args.xxv: + value = argparser.args.xxv + print(value*float(res1)/float(res2)) + + +def com_ava(argparser): + currencies = changelly() + if currencies is not None: + for currency in currencies: + if currency == argparser.args.ava: + print("YES") + return + print("NO") + + +def com_avass(argparser): + currencies = get_info_w_name(api_url_base_shapeshift, "") + for currency in currencies: + if currency.lower() == argparser.args.avass: + print("YES") + return + print("NO") + + +def com_cglistall(argparser): + currencies = changelly() + if currencies is not None: + for currency in currencies: + print(currency + " ", end="") + print() + + +def com_watchlist(argparser): + ret = [] + currencies = changelly() + if currencies is not None: + for currency in currencies: + for item in argparser.args.watchlist: + if currency == item: + ret.append(item) + for item in ret: + print(item.upper() + " ", end="") + print() + + +def com_ss(argparser): + ret = [] + result = get_info_w_name(api_url_base_shapeshift, "") + if not result: + return + for currency in result: + for item in argparser.args.ss: + if currency.lower() == item and result[currency]['status'] == "available": + ret.append(item) + for item in ret: + print(item.upper() + " ", end="") + print() + + +def alive(): + print("hived") + + +def get_socket(): + # use TCP + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + server_address = ("", 10111) + sock.bind(server_address) + return sock + + +def premain(argparser): + try: + sock = get_socket() + sock.listen(15) + vocalize("./mila/hiveup.ogg") + + while True: + connection, client_address = sock.accept() + command = connection.recv(4096) + new_argv = command.decode("utf-8").split(" ") + print(new_argv) + argparser.parse(new_argv) + old_stdout = sys.stdout + sys.stdout = TextIOWrapper(BytesIO(), sys.stdout.encoding) + + if argparser.args.name: + com_name(argparser.args.name) + if argparser.args.cap: + com_cap(argparser.args.cap) + if argparser.args.rank: + com_rank(argparser.args.rank) + if argparser.args.gen: + com_gen(argparser) + if argparser.args.worth: + com_worth(argparser) + if argparser.args.total: + com_total(argparser) + if argparser.args.xx: + com_xx(argparser) + if argparser.args.ava: + com_ava(argparser) + if argparser.args.al1: + alert_1() + if argparser.args.al2: + alert_2() + if argparser.args.al3: + alert_3() + if argparser.args.al4: + alert_4() + if argparser.args.al5: + alert_5() + if argparser.args.avass: + com_avass(argparser) + if argparser.args.cglistall: + com_cglistall(argparser) + if argparser.args.watchlist: + com_watchlist(argparser) + if argparser.args.ss: + com_ss(argparser) + if argparser.args.dy: + highpercentdump(argparser.args.dy) + if argparser.args.alive: + alive() + + sys.stdout.seek(0) + mushi_out = sys.stdout.read() + sys.stdout.close() + connection.sendall(bytes(mushi_out, "utf-8")) + sys.stdout = old_stdout + print(mushi_out) + except Exception as e: + vocalize("./mila/hiveexcept.ogg") + if hasattr(e, "message"): + print(e.messasge) + if hasattr(e, "__doc__"): + print(e.__doc__) + finally: + # vocalize("./mila/hivedown.ogg") + # sock.shutdown(socket.SHUT_RDWR) + # connection.shutdown(socket.SHUT_RDWR) + # sock.close() + # connection.close() + time.sleep(60) + + +def main(): + argparser = Argparser() + sys.argv.pop(0) + argparser.parse(sys.argv) + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + premain(argparser) + + +if __name__ == "__main__": + main() diff --git a/hived.desktop b/hived.desktop new file mode 100644 index 0000000..3ae9514 --- /dev/null +++ b/hived.desktop @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=hived +Exec=/home/bloodstalker/scripts/hived --demon +Terminal=true +Type=Application diff --git a/hivedup.sh b/hivedup.sh new file mode 100755 index 0000000..489d339 --- /dev/null +++ b/hivedup.sh @@ -0,0 +1,4 @@ +#!/usr/bin/sh + +PID=$(pgrep hived$) +if [ -z "$PID" ]; then :;else echo hived;fi diff --git a/hiveinit.py b/hiveinit.py new file mode 100755 index 0000000..63b4772 --- /dev/null +++ b/hiveinit.py @@ -0,0 +1,60 @@ +#!/usr/bin/python3 + +import argparse +import code +import readline +import signal +import sys +import imp +hived = imp.load_source("hived", "./hived") +from hived import Demon + +def SigHandler_SIGINT(signum, frame): + print() + sys.exit(0) + +class Argparser(object): + def __init__(self): + self.parser = argparse.ArgumentParser() + self.parser.add_argument("--name", type=str, help="price of the chose crypto") + self.parser.add_argument("--worth", type=str, help="single asset worth") + self.parser.add_argument("--xx", type=str, nargs=2, help="convert") + self.parser.add_argument("--xxv", type=float, help="xx multiplier") + self.parser.add_argument("--gen", type=str, nargs=2, help="general option") + self.parser.add_argument("--cap", type=str, help="market cap") + self.parser.add_argument("--rank", type=str, help="market cap rank") + self.parser.add_argument("--total", action="store_true", help="total", default=False) + self.parser.add_argument("--ava", type=str, help="is currency available on changelly") + self.parser.add_argument("--avass", type=str, help="is currency available on shapeshift") + self.parser.add_argument("--cglistall", action="store_true", help="list all currencies available on changelly", default=False) + self.parser.add_argument("--test", action="store_true", help="test switch", default=False) + self.parser.add_argument("--watchlist", type=str, nargs="+", help="watch list") + self.parser.add_argument("--ss", type=str, nargs="+", help="watchlist on shapeshift") + self.parser.add_argument("--dy", type=int, help="lazy") + self.parser.add_argument("--demon", action="store_true", help="daemon mode", default=False) + self.parser.add_argument("--al1", action="store_true", help="alert1", default=False) + self.parser.add_argument("--dbg", action="store_true", help="debug", default=False) + self.parser.add_argument("--alive", action="store_true", help="is hived up", default=False) + self.parser.add_argument("--tg", action="store_true", help="tg", default=False) + + def parse(self, argv): + self.args, self.rest = self.parser.parse_known_args(argv) + +def main(): + argparser = Argparser() + sys.argv.pop(0) + argparser.parse(sys.argv) + if argparser.args.dbg: + try: + premain(argparser) + except: + variables = globals().copy() + variables.update(locals()) + shell = code.InteractiveConsole(variables) + shell.interact(banner="DEBUG REPL") + else: + demon = Demon() + demon.run(argparser) + +if __name__ == "__main__": + main() diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..3f3d737 --- /dev/null +++ b/init.vim @@ -0,0 +1,189 @@ + +let mapleader = " " +call plug#begin('~/AppData/Local/nvim/plugged') +Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } +Plug 'vim-airline/vim-airline' +Plug 'vim-airline/vim-airline-themes' +Plug 'rhysd/vim-gfm-syntax' +Plug 'unblevable/quick-scope' +Plug 'tpope/vim-commentary' +Plug 'ctrlpvim/ctrlp.vim' +Plug 'unblevable/quick-scope' +Plug 'mbbill/undotree' +Plug 'adelarsq/vim-matchit' +Plug 'easymotion/vim-easymotion' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-repeat' +Plug 'nanotech/jellybeans.vim' +Plug 'fatih/vim-go' +Plug 'plasticboy/vim-markdown' +Plug 'scrooloose/nerdtree' +Plug 'ryanoasis/vim-devicons' +Plug 'sheerun/vim-polyglot' +call plug#end() + +set encoding=UTF-8 +set linebreak +set breakindent +let &showbreak = '↪ ' +set secure +set list +set wrap +set showmatch +set number +set relativenumber +set expandtab +set noerrorbells +set foldmethod=manual +set nofoldenable +set numberwidth=5 +set history=1000 +set tabstop=2 +set hidden +set smarttab +set autoindent +set autoread +set ttyfast +set ignorecase smartcase +set magic +set lazyredraw +set hlsearch +set scrolloff=0 +set tagbsearch +set wildmenu +set noerrorbells +set novisualbell + +let g:gfm_syntax_enable_always = 0 +let g:gfm_syntax_enable_filetypes = ['markdown.gfm'] +autocmd BufRead,BufNew,BufNewFile README.md setlocal ft=markdown.gfm + +function! OnUIEnter(event) + let l:ui = nvim_get_chan_info(a:event.chan) + if has_key(l:ui, 'client') && has_key(l:ui.client, 'name') + if l:ui.client.name ==# 'Firenvim' + set guifont=DejaVuSansMono\ NF:h12 + endif + endif +endfunction +" autocmd QueInit UIEnter * call OnUIEnter(deepcopy(v:event)) + +colo jellybeans +let g:airline_powerline_fonts = 0 +try + let g:airline#extensions#tabline#enabled = 1 + let g:airline#extensions#tabline#left_sep = ' ' + let g:airline#extensions#tabline#left_alt_sep = '|' + let g:airline#extensions#tabline#formatter = 'default' + let g:airline#extensions#ale#enabled = 1 + let g:airline#extensions#branch#enabled = 1 + " let g:airline#extensions#xkblayout#enabled = 1 +catch +endtry +let g:airline_theme = 'jellybeans' +function! Airline_Custom() + let l:spc = g:airline_symbols.space + let g:airline_section_z = airline#section#create([ + \ 'windowswap', + \ '%3p%%'.l:spc, + \ 'linenr', + \ ':%3v'.l:spc, + \ '%5o', + \ '[%b][0x%B]' + \]) +endfunction +autocmd user AirlineAfterInit call Airline_Custom() +" let g:XkbSwitchLib = '/usr/local/lib/libxkbswitch.so' +let g:airline_exclude_preview = 1 + +"camel and snake case motion +let g:camelchar = "A-Z0-9.,;:{([`'\"_" +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +nnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW') +inoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W') +vnoremap :call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%^','bW')v`>o +vnoremap `>:call search('\C\<\\%(^\[^'.g:camelchar.']\@<=\)['.g:camelchar.']\['.g:camelchar.']\ze\%([^'.g:camelchar.']\&\>\@!\)\\%$','W')v` +nmap +nmap +nmap +nmap +nmap +nmap +nmap +imap +imap +map :bp +map :bn +map :q +inoremap " "" +inoremap ' '' +inoremap ( () +inoremap [ [] +inoremap { {} +inoremap { {}O +map w :w +nnoremap :NERDTreeToggle +nnoremap :UndotreeToggle +nnoremap :vsp +nnoremap :sp +nnoremap c :call clearmatches() +nnoremap t :bel term +nnoremap r :!%:p +nnoremap cd :cd %:p:h + +let g:qs_highlight_on_keys = ["f", "F", "t", "T"] +" +"netrw +let g:netrw_sort_by = 'date' +let g:netrw_sort_direction = 'reverse' +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 1 +let g:netrw_winsize = 15 +let g:netrw_fastbrowse = 1 +let g:netrw_sort_by = 'name' +let g:netrw_sort_direction = 'normal' + +"vim-go +let g:go_auto_sameids = 1 +let g:go_highlight_functions = 1 +let g:go_highlight_function_calls = 1 +let g:go_highlight_types = 1 +let g:go_highlight_operators = 1 +let g:go_highlight_function_parameters = 1 +" let g:go_highlight_variable_declarations = 1 +" let g:go_highlight_variable_assignments = 1 +let g:go_doc_popup_window = 1 +let g:go_code_completion_enabled = 0 + +"quickscope +let g:qs_highlight_on_keys = ["f", "F", "t", "T"] + +" undotree +set undolevels=1000 +if has("persistent_undo") + set undodir=~/.undodir/ + set undofile +endif +let g:undotree_WindowLayout = 4 + +iab strign string +iab pritn print +iab retrun return +iab return return +iab fucntion function +iab funciton function +iab tehn then +iab coutn count +iab accoutn account + +au BufEnter github.com_*.txt set filetype=markdown +nnoremap :call firenvim#focus_page() +nnoremap :call firenvim#hide_frame() + +"yaml +autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab +let g:indentLine_char = '|' diff --git a/irssi/config b/irssi/config new file mode 100644 index 0000000..cfb392d --- /dev/null +++ b/irssi/config @@ -0,0 +1,449 @@ +servers = ( + { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; }, + { address = "irc.efnet.org"; chatnet = "EFNet"; port = "6667"; }, + { address = "irc.esper.net"; chatnet = "EsperNet"; port = "6667"; }, + { + address = "chat.freenode.net"; + chatnet = "Freenode"; + port = "6667"; + }, + { + address = "irc.gamesurge.net"; + chatnet = "GameSurge"; + port = "6667"; + }, + { address = "eu.irc6.net"; chatnet = "IRCnet"; port = "6667"; }, + { address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; }, + { + address = "irc.ircsource.net"; + chatnet = "IRCSource"; + port = "6667"; + }, + { address = "irc.netfuze.net"; chatnet = "NetFuze"; port = "6667"; }, + { address = "irc.oftc.net"; chatnet = "OFTC"; port = "6667"; }, + { + address = "irc.quakenet.org"; + chatnet = "QuakeNet"; + port = "6667"; + }, + { address = "irc.rizon.net"; chatnet = "Rizon"; port = "6667"; }, + { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; } +); + +chatnets = { + DALnet = { + type = "IRC"; + max_kicks = "4"; + max_msgs = "20"; + max_whois = "30"; + }; + EFNet = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "4"; + max_whois = "1"; + }; + EsperNet = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "4"; + max_whois = "1"; + }; + Freenode = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "4"; + max_whois = "1"; + }; + GameSurge = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; + IRCnet = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; + IRCSource = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "4"; + max_whois = "1"; + }; + NetFuze = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; + OFTC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; }; + QuakeNet = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; + Rizon = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; + SILC = { type = "SILC"; }; + Undernet = { + type = "IRC"; + max_kicks = "1"; + max_msgs = "1"; + max_whois = "1"; + }; +}; + +channels = ( + { name = "#lobby"; chatnet = "EsperNet"; autojoin = "No"; }, + { name = "#freenode"; chatnet = "Freenode"; autojoin = "No"; }, + { name = "#irssi"; chatnet = "Freenode"; autojoin = "No"; }, + { name = "#gamesurge"; chatnet = "GameSurge"; autojoin = "No"; }, + { name = "#irssi"; chatnet = "IRCNet"; autojoin = "No"; }, + { name = "#ircsource"; chatnet = "IRCSource"; autojoin = "No"; }, + { name = "#netfuze"; chatnet = "NetFuze"; autojoin = "No"; }, + { name = "#oftc"; chatnet = "OFTC"; autojoin = "No"; }, + { name = "silc"; chatnet = "SILC"; autojoin = "No"; }, + { name = "#go-nuts"; chatnet = "freenode"; autojoin = "yes"; }, + { name = "#docker"; chatnet = "freenode"; autojoin = "yes"; } +); + +aliases = { + ATAG = "WINDOW SERVER"; + ADDALLCHANS = "SCRIPT EXEC foreach my \\$channel (Irssi::channels()) { Irssi::command(\"CHANNEL ADD -auto \\$channel->{name} \\$channel->{server}->{tag} \\$channel->{key}\")\\;}"; + B = "BAN"; + BACK = "AWAY"; + BANS = "BAN"; + BYE = "QUIT"; + C = "CLEAR"; + CALC = "EXEC - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi"; + CHAT = "DCC CHAT"; + CUBES = "SCRIPT EXEC Irssi::active_win->print(\"%_bases\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x0\\${_}0\\$_\" } '0'..'9','A'..'F' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_cubes\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { my \\$y = \\$_*6 \\; join '', map { my \\$x = \\$_ \\; map { \"%x\\$x\\$_\\$x\\$_\" } @{['0'..'9','A'..'Z']}[\\$y .. \\$y+5] } 1..6 }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) for 0..5 \\; Irssi::active_win->print(\"%_grays\", MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print( do { join '', map { \"%x7\\${_}7\\$_\" } 'A'..'X' }, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; Irssi::active_win->print(\"%_mIRC extended colours\", MSGLEVEL_CLIENTCRAP) \\; my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 0..15 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) \\; for my \\$z (0..6) { my \\$x \\; \\$x .= sprintf \"\00399,%02d%02d\",\\$_,\\$_ for 16+(\\$z*12)..16+(\\$z*12)+11 \\; Irssi::active_win->print(\\$x, MSGLEVEL_NEVER | MSGLEVEL_CLIENTCRAP) }"; + DATE = "TIME"; + DEHIGHLIGHT = "DEHILIGHT"; + DESCRIBE = "ACTION"; + DHL = "DEHILIGHT"; + EXEMPTLIST = "MODE $C +e"; + EXIT = "QUIT"; + GOTO = "SCROLLBACK GOTO"; + HIGHLIGHT = "HILIGHT"; + HL = "HILIGHT"; + HOST = "USERHOST"; + INVITELIST = "MODE $C +I"; + J = "JOIN"; + K = "KICK"; + KB = "KICKBAN"; + KN = "KNOCKOUT"; + LAST = "LASTLOG"; + LEAVE = "PART"; + M = "MSG"; + MUB = "UNBAN *"; + N = "NAMES"; + NMSG = "^MSG"; + P = "PART"; + Q = "QUERY"; + RESET = "SET -default"; + RUN = "SCRIPT LOAD"; + SAY = "MSG *"; + SB = "SCROLLBACK"; + SBAR = "STATUSBAR"; + SIGNOFF = "QUIT"; + SV = "MSG * Irssi $J ($V) - http://www.irssi.org"; + T = "TOPIC"; + UB = "UNBAN"; + UMODE = "MODE $N"; + UNSET = "SET -clear"; + W = "WHO"; + WC = "WINDOW CLOSE"; + WG = "WINDOW GOTO"; + WJOIN = "JOIN -window"; + WI = "WHOIS"; + WII = "WHOIS $0 $0"; + WL = "WINDOW LIST"; + WN = "WINDOW NEW HIDDEN"; + WQUERY = "QUERY -window"; + WW = "WHOWAS"; + 1 = "WINDOW GOTO 1"; + 2 = "WINDOW GOTO 2"; + 3 = "WINDOW GOTO 3"; + 4 = "WINDOW GOTO 4"; + 5 = "WINDOW GOTO 5"; + 6 = "WINDOW GOTO 6"; + 7 = "WINDOW GOTO 7"; + 8 = "WINDOW GOTO 8"; + 9 = "WINDOW GOTO 9"; + 10 = "WINDOW GOTO 10"; + 11 = "WINDOW GOTO 11"; + 12 = "WINDOW GOTO 12"; + 13 = "WINDOW GOTO 13"; + 14 = "WINDOW GOTO 14"; + 15 = "WINDOW GOTO 15"; + 16 = "WINDOW GOTO 16"; + 17 = "WINDOW GOTO 17"; + 18 = "WINDOW GOTO 18"; + 19 = "WINDOW GOTO 19"; + 20 = "WINDOW GOTO 20"; + 21 = "WINDOW GOTO 21"; + 22 = "WINDOW GOTO 22"; + 23 = "WINDOW GOTO 23"; + 24 = "WINDOW GOTO 24"; + 25 = "WINDOW GOTO 25"; + 26 = "WINDOW GOTO 26"; + 27 = "WINDOW GOTO 27"; + 28 = "WINDOW GOTO 28"; + 29 = "WINDOW GOTO 29"; + 30 = "WINDOW GOTO 30"; + 31 = "WINDOW GOTO 31"; + 32 = "WINDOW GOTO 32"; + 33 = "WINDOW GOTO 33"; + 34 = "WINDOW GOTO 34"; + 35 = "WINDOW GOTO 35"; + 36 = "WINDOW GOTO 36"; + 37 = "WINDOW GOTO 37"; + 38 = "WINDOW GOTO 38"; + 39 = "WINDOW GOTO 39"; + 40 = "WINDOW GOTO 40"; + 41 = "WINDOW GOTO 41"; + 42 = "WINDOW GOTO 42"; + 43 = "WINDOW GOTO 43"; + 44 = "WINDOW GOTO 44"; + 45 = "WINDOW GOTO 45"; + 46 = "WINDOW GOTO 46"; + 47 = "WINDOW GOTO 47"; + 48 = "WINDOW GOTO 48"; + 49 = "WINDOW GOTO 49"; + 50 = "WINDOW GOTO 50"; + 51 = "WINDOW GOTO 51"; + 52 = "WINDOW GOTO 52"; + 53 = "WINDOW GOTO 53"; + 54 = "WINDOW GOTO 54"; + 55 = "WINDOW GOTO 55"; + 56 = "WINDOW GOTO 56"; + 57 = "WINDOW GOTO 57"; + 58 = "WINDOW GOTO 58"; + 59 = "WINDOW GOTO 59"; + 60 = "WINDOW GOTO 60"; + 61 = "WINDOW GOTO 61"; + 62 = "WINDOW GOTO 62"; + 63 = "WINDOW GOTO 63"; + 64 = "WINDOW GOTO 64"; + 65 = "WINDOW GOTO 65"; + 66 = "WINDOW GOTO 66"; + 67 = "WINDOW GOTO 67"; + 68 = "WINDOW GOTO 68"; + 69 = "WINDOW GOTO 69"; + 70 = "WINDOW GOTO 70"; + 71 = "WINDOW GOTO 71"; + 72 = "WINDOW GOTO 72"; + 73 = "WINDOW GOTO 73"; + 74 = "WINDOW GOTO 74"; + 75 = "WINDOW GOTO 75"; + 76 = "WINDOW GOTO 76"; + 77 = "WINDOW GOTO 77"; + 78 = "WINDOW GOTO 78"; + 79 = "WINDOW GOTO 79"; + 80 = "WINDOW GOTO 80"; + 81 = "WINDOW GOTO 81"; + 82 = "WINDOW GOTO 82"; + 83 = "WINDOW GOTO 83"; + 84 = "WINDOW GOTO 84"; + 85 = "WINDOW GOTO 85"; + 86 = "WINDOW GOTO 86"; + 87 = "WINDOW GOTO 87"; + 88 = "WINDOW GOTO 88"; + 89 = "WINDOW GOTO 89"; + 90 = "WINDOW GOTO 90"; + 91 = "WINDOW GOTO 91"; + 92 = "WINDOW GOTO 92"; + 93 = "WINDOW GOTO 93"; + 94 = "WINDOW GOTO 94"; + 95 = "WINDOW GOTO 95"; + 96 = "WINDOW GOTO 96"; + 97 = "WINDOW GOTO 97"; + 98 = "WINDOW GOTO 98"; + 99 = "WINDOW GOTO 99"; +}; + +statusbar = { + # formats: + # when using {templates}, the template is shown only if it's argument isn't + # empty unless no argument is given. for example {sb} is printed always, + # but {sb $T} is printed only if $T isn't empty. + + items = { + # start/end text in statusbars + barstart = "{sbstart}"; + barend = "{sbend}"; + + topicbarstart = "{topicsbstart}"; + topicbarend = "{topicsbend}"; + + # treated "normally", you could change the time/user name to whatever + time = "{sb $Z}"; + user = "%9%z005fff{sb {sbnickmode $[-2]cumode}%k$N %Zeeeeee {sbumode %K$usermode} %Z005fff%0%z005f00{sbaway $A}}%9%N"; + + + # treated specially .. window is printed with non-empty windows, + # window_empty is printed with empty windows + window = " %Z00af00{sb $tag/{channel $itemname} %C {sbmode $M}} %C%n "; + window_empty = "{sb {sbservertag $tag}}"; + prompt = "{prompt $[.15]itemname}"; + prompt_empty = "{prompt $winname}"; + + topic = " $topic"; + topic_empty = " Irssi v$J - http://www.irssi.org"; + + # all of these treated specially, they're only displayed when needed + # Powerline + lag = "{sb %r%k%1 ⌚ $0 %r%0%n}"; + act = "{sb %Zeeeeee%0%n%z005fff %F$0%F %n}"; + more = "%c%0%n%z00af00 more ⬇ %c%0%n"; + + + }; + + # there's two type of statusbars. root statusbars are either at the top + # of the screen or at the bottom of the screen. window statusbars are at + # the top/bottom of each split window in screen. + default = { + # the "default statusbar" to be displayed at the bottom of the window. + # contains all the normal items. + window = { + disabled = "no"; + + # window, root + type = "window"; + # top, bottom + placement = "bottom"; + # number + position = "1"; + # active, inactive, always + visible = "active"; + + # list of items in statusbar in the display order + items = { + barstart = { priority = "100"; }; + user = { }; + window = { }; + window_empty = { }; + lag = { priority = "-1"; }; + more = { priority = "-1"; alignment = "right"; }; + barend = { priority = "100"; alignment = "right"; }; + otr = { }; + usercount = { }; + }; + }; + + # statusbar to use in inactive split windows + window_inact = { + + type = "window"; + placement = "bottom"; + position = "1"; + visible = "inactive"; + + items = { + barstart = { priority = "100"; }; + window = { }; + window_empty = { }; + more = { priority = "-1"; alignment = "right"; }; + barend = { priority = "100"; alignment = "right"; }; + }; + }; + + # we treat input line as yet another statusbar :) It's possible to + # add other items before or after the input line item. + prompt = { + + type = "root"; + placement = "bottom"; + # we want to be at the bottom always + position = "100"; + visible = "always"; + + items = { + prompt = { priority = "-1"; }; + prompt_empty = { priority = "-1"; }; + # treated specially, this is the real input line. + input = { priority = "10"; }; + }; + }; + + # topicbar + topic = { + + type = "root"; + placement = "top"; + position = "1"; + visible = "always"; + + items = { + topicbarstart = { priority = "100"; }; + topicbarend = { priority = "100"; alignment = "right"; }; + topic = { }; + topicempty = { }; + }; + }; + awl_0 = { + items = { + barstart = { priority = "100"; }; + awl_0 = { }; + barend = { priority = "100"; alignment = "right"; }; + }; + }; + }; +}; +settings = { + core = { + real_name = ""; + user_name = "devi"; + nick = "bloodstalker"; + use_proxy = "yes"; + proxy_address = "192.168.1.108"; + proxy_port = "3128"; + proxy_string = "CONNECT %s:%d HTTP/1.0\012\012"; + proxy_string_after = "conn %s %d"; + proxy_password = ""; + }; + "fe-common/core" = { + theme = "solarized-powerline"; + hilight_color = "%R"; + }; + "fe-text" = { actlist_sort = "refnum"; }; + "perl/core/scripts" = { + ### For Solarized adv_windowlist.pl script + awl_block = "-20"; + awl_sbar_maxlength = "off"; + awl_hide_empty = "yes"; + awl_mouse = "yes"; + awl_viewer = "no"; + awl_maxlines = "0"; + #fancy_abbrev = "head"; + + ### For Solarized trackbar.pl script + trackbar_style = "%B"; + title_screen_window = "yes"; + awl_shared_sbar = "OFF"; + }; +}; +keyboard = ( + { key = "meta-[M"; id = "command"; data = "mouse_xterm"; } +); +ignores = ( + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#go-nuts" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#docker" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#node.js" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#vagrant" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#ansible" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#dpdk" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#fdio-vpp" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#alacritty" ); }, + { level = "JOINS PARTS QUITS NICKS"; channels = ( "#osm" ); } +); diff --git a/irssi/irssi.sh b/irssi/irssi.sh new file mode 100755 index 0000000..7881d46 --- /dev/null +++ b/irssi/irssi.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh + +mkdir -p ~/.irssi/scripts/autorun +cd ~/.irssi/scripts/autorun +wget https://scripts.irssi.org/scripts/nickcolor.pl +wget https://scripts.irssi.org/scripts/adv_windowlist.pl +wget https://scripts.irssi.org/scripts/timezones.pl +wget https://scripts.irssi.org/scripts/seen.pl +wget https://scripts.irssi.org/scripts/colorize_nicks.pl +wget https://scripts.irssi.org/scripts/cubes.pl +wget https://scripts.irssi.org/scripts/dim_nicks.pl +wget https://scripts.irssi.org/scripts/hilite_url.pl +wget https://scripts.irssi.org/scripts/messages_bottom.pl +wget https://scripts.irssi.org/scripts/nm2.pl +wget https://scripts.irssi.org/scripts/savecmdhist.pl +wget https://scripts.irssi.org/scripts/sb_position.pl +wget https://scripts.irssi.org/scripts/trackbar.pl + +cp ./config ~/.irssi/config +cp ./solarized-powerline.theme ~/.irssi/solarized-powerline.theme +cp ./startup ~/.irssi/startup diff --git a/irssi/solarized-powerline.theme b/irssi/solarized-powerline.theme new file mode 100644 index 0000000..c214262 --- /dev/null +++ b/irssi/solarized-powerline.theme @@ -0,0 +1,419 @@ +# vim: set expandtab: +# (Adapted from solarized-universal theme by Huy Z: https://github.com/huyz/irssi-colors-solarized) +# Adaped by: Paul Saunders +# later adapted by: Farzad Sadeghi https://github.com/terminaldweller +# When testing changes, the easiest way to reload the theme is with /RELOAD. +# This reloads the configuration file too, so if you did any changes remember +# to /SAVE it first. Remember also that /SAVE overwrites the theme file with +# old data so keep backups. + +# TEMPLATES: + +# The real text formats that irssi uses are the ones you can find with +# /FORMAT command. Back in the old days all the colors and texts were mixed +# up in those formats, and it was really hard to change the colors since you +# might have had to change them in tens of different places. So, then came +# this templating system. + +# Now the /FORMATs don't have any colors in them, and they also have very +# little other styling. Most of the stuff you need to change is in this +# theme file. If you can't change something here, you can always go back +# to change the /FORMATs directly, they're also saved in these .theme files. + +# So .. the templates. They're those {blahblah} parts you see all over the +# /FORMATs and here. Their usage is simply {name parameter1 parameter2}. +# When irssi sees this kind of text, it goes to find "name" from abstracts +# block below and sets "parameter1" into $0 and "parameter2" into $1 (you +# can have more parameters of course). Templates can have subtemplates. +# Here's a small example: +# /FORMAT format hello {colorify {underline world}} +# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; } +# When irssi expands the templates in "format", the final string would be: +# hello %G%Uworld%U%n +# ie. underlined bright green "world" text. +# and why "$0-", why not "$0"? $0 would only mean the first parameter, +# $0- means all the parameters. With {underline hello world} you'd really +# want to underline both of the words, not just the hello (and world would +# actually be removed entirely). + +# COLORS: + +# You can find definitions for the color format codes in docs/formats.txt. + +# There's one difference here though. %n format. Normally it means the +# default color of the terminal (white mostly), but here it means the +# "reset color back to the one it was in higher template". For example +# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would +# print yellow "foo" (as set with %Y) but "bar" would be green, which was +# set at the beginning before the {foo} template. If there wasn't the %g +# at start, the normal behaviour of %n would occur. If you _really_ want +# to use the terminal's default color, use %N. + +############################################################################# +# https://irssi.org/documentation/settings/#a_d + +# default foreground color (%N) - -1 is the "default terminal color" +default_color = "-1"; + +# print timestamp/servertag at the end of line, not at beginning +info_eol = "false"; + +# these characters are automatically replaced with specified color +# (dark grey by default) +replaces = { "[]=" = "%_$*%_"; }; + +abstracts = { + ## + ## generic + ## + + # text to insert at the beginning of each non-message line + # %N = terminal default (e.g. white on transparent) + # %G = brightgreen (Solarized: base01, i.e. darkest gray) + #line_start = "%N%W %N"; + line_start = "%N"; + + # timestamp styling, nothing by default + # %N%8 = reverse normal (to match line_start) + timestamp = "%N%k%z005f87%9$*%9%N%Z005f87%n"; + + # any kind of text that needs hilighting, default is to bold + hilight = "%_$*%_"; + + # any kind of error message + error = "%r$*%n"; + + # channel name is printed + channel = "%Z00af00$*%n"; + + # nick is printed + nick = "%Zeeeeee{nickcolor $*}"; + mynick = "%Zeeeeee{nickcolor $*}"; + inick = "%Zeeeeee{nickcolor $*}"; # Inverted + imynick = "%Zeeeeee{nickcolor $*}"; # Inverted + + # nick host is printed + # (that's the "email" address of a user) + nickhost = "%Z005f5f$*"; + + # server name is printed + server = "%Z00af00$*"; + iserver = "%9%Zeeeeee%z00af00$*%9%n"; + + # some kind of comment is printed + comment = " $*"; + + # reason for something is printed (part, quit, kick, ..) + reason = "$*"; + + # mode change is printed ([+o nick]) + mode = "%N%0%p$*%n"; + + ## + ## channel specific messages + ## + + # highlighted nick/host is printed (joins) + # %c = cyan (Solarized: cyan) + # %G = brightgreen (Solarized: base01) + # NOTE: %n doesn't work in irssi v0.8.15 for some reason. So we have to end with the same color as line_start + channick_hilight = "%Z00af00$*%G"; + chanhost_hilight = "%Z00af00{nickhost $*}%N"; + + # nick/host is printed (parts, quits, etc.) + channick = "%Z00af00$*%G"; + chanhost = "%Z00af5f{nickhost $*}%N"; + + # highlighted channel name is printed + # SOLARIZED: Channels are Green + channelhilight = "%N%0%g$*%N"; + ichannelhilight = "%z005f87$*%n%0"; + + # ban/ban exception/invite list mask is printed + # %R = brightred (Solarized: orange) + # %n = return + ban = "%R$*%n"; + + + ## + ## messages + ## + + # the basic styling of how to print message, $0 = nick mode, $1 = nick + msgnick = "%z005f87%Zeeeeee $0%Zeeeeee{nick $1-} %Zeeeeee"; + + # message from you is printed. "msgownnick" specifies the styling of the + # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the + # whole line. + + # Example1: You want the message text to be green: + # ownmsgnick = "{msgnick $0 $1-}%g"; + # Example2.1: You want < and > chars to be yellow: + # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; + # (you'll also have to remove <> from replaces list above) + # Example2.2: But you still want to keep <> grey for other messages: + # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; + # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; + # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; + # ownprivmsgnick = "%K{msgnick $*%K}%n"; + # privmsgnick = "%K{msgnick %R$*%K}%n"; + + # $0 = nick mode, $1 = nick + # %3 = yellow + ownmsgnick = "%z5f5fff%k{%z5f5fff%9 $0$1-%9}%N%0%Z5f5fff %Zeeeeee"; + ownnick = "%Zeeeeee$*"; + + # public message in channel, $0 = nick mode, $1 = nick + pubmsgnick = "%z005f87%k%Zeeeeee{%Zeeeeee%z005f87msgnick $0$1-}%N%Z005f87 %n"; + pubnick = "%Zeeeeee$*"; + + # public message in channel meant for me, $0 = nick mode, $1 = nick + # %5 = magenta + pubmsgmenick = "%5%k%Z0087ff{msgnick $0$1-}%N%m %n"; + menick = "%Zeeeeee$*"; + + # public highlighted message in channel + # $0 = highlight color, $1 = nick mode, $2 = nick + pubmsghinick = " %z005f87%k%z005f87{%Zeeeeee%z005f87msgnick $1 %Zeeeeee$2-}%N%Z005f87 %n"; + + # channel name is printed with message + # This is printed whenever the channel name is printed for disambiguation, e.g. + # while there is a query in the same window. Example: <+funnyuser:#test> hello + msgchannel = "%z005f5f%k:$*%n"; + + # private message, $0 = nick, $1 = host + # TODO: To test for Solarized + privmsg = " %m$0%G<%n$1-%G>%n "; + + # private message from you, $0 = "msg", $1 = target nick + # TODO: To test for Solarized + ownprivmsg = " %Z005f87$0%G<%Z005f87$1-%G>%n "; + + # own private message in query + ownprivmsgnick = "%z5f5fff%k{%z5f5fff%9 $*%9}%N%Z5f5fff %C"; + ownprivnick = "%k$*"; + + # private message in query + # NOTE: for some reason, we gotta handle both the nick & msg on in this line + privmsgnick = "%5%k{msgnick $*}%N%m %n"; + + ## + ## Actions (/ME stuff) + ## + + # used internally by this theme + action_core = "%N%k %n$*"; + + # generic one that's used by most actions + action = "{action_core %_$*%n} "; + + # own action, both private/public + ownaction = "%N%k {mynick $0}%N%C $1-"; + + # own action with target, both private/public + # NOTE: to test: /action NICK farted. (This will tell NICK that you farted) + # This is like a /me but only you and NICK will see + ownaction_target = "{action_core $0}%G:%y$1%n "; + + # private action sent by others + # %M = brightmagenta (Solarized: violet) + pvtaction = "%m (*) $*%n "; + pvtaction_query = "{action $*}"; + + # public action sent by others + pubaction = "%N%k {nick $0}%N $1-"; + + + ## + ## other IRC events + ## + + # whois + whois = "%k%z005f87WHOIS %N%k%#%N $[8]0  %Y$1-"; + + # notices + ownnotice = "%1%k %k$0 %k%1%8%0 {ichannelhilight $1-} %k%z00af5f%N "; + notice = "%1%k %k$0- %r%0%N "; + #notice = "%1%w %W$* %k%8%n "; + pubnotice_channel = "{ichannelhighlight $*}"; + #pubnotice_channel = "%G%n$*"; + pvtnotice_host = " %k%n {hickhost $*}"; + servernotice = "%1%k %k!$* %k%8%n "; + + # CTCPs + ownctcp = "%k%z005f87 %k$0%G %N%Z005f87 %Z005f87$1-%G  "; + ctcp = "%N%k%n %Zeeeeee$*%n"; + + # wallops + wallop = "%c$*%n: "; + wallop_nick = "%n$*"; + wallop_action = "%c * $*%n "; + + # netsplits + netsplit = "%r$*%n"; + netjoin = "%g$*%n"; + + # /names list + names_prefix = "%N%k%n"; + names_nick = " %G%_$0%_$1-%N  "; + names_nick_op = " %k%_$0$_$1-%n  "; + names_nick_halfop = " %Y$_$0$_$1-%n  "; + names_nick_voice = " %C$_$0$_$1-%n  "; + names_users = "%k%z005f87 $* %Z005f87%0%n"; + names_channel = " %k$*"; + + # DCC + dcc = "%N%k%n %g$*%n"; + dccfile = "%_$*%_"; + + # DCC chat, own msg/action + dccownmsg = "[%Z005f87$0%G($1-%G)%n] "; + dccownnick = "%Z005f87$*%n"; + dccownquerynick = "%c$*%n"; + dccownaction = "{action $*}"; + dccownaction_target = "{action_core $0}%G:%c$1%n "; + + # DCC chat, others + dccmsg = " %g$1-%G($0%G)%n "; + dccquerynick = "%g$*%n"; + dccaction = "%c (*dcc*) $*%n %|"; + + ## + ## statusbar + ## + + # default background for all statusbars. You can also give + # the default foreground color for statusbar items. + # NOTE: if all the other overriding settings below are set, this only seems to affect + # the content parts of the adv_windowlist. Default seems to be blue + # NOTE: if not set, the default background seems to be %w%4 = white on blue + sb_background = "%k%z1c1c1c"; + + # default backround for "default" statusbar group + # NOTE: this impacts the statusbar of an inactive window and the edges of adv_windowlist + # %7 = white (wich looks gray on a regular terminal with white bg) + sb_default_bg = "%Z005fff"; + + # background for topicbar at the top (defaults to sb_default_bg) + sb_topic_bg = "%W%0"; + + # background for the statusbar of active window. You can also give + # the foreground color. + # %2 = green + sb_window_bg = "%k%0"; + + # background for prompt / input line + sb_prompt_bg = "%k"; + # background for info statusbar + # %8 = reverse window + # TODO: To test for Solarized + sb_info_bg = "%z1c1c1c"; + + # text at the beginning of statusbars. sb-item already puts + # space there,so we don't use anything by default. + sbstart = "%z005f00%9"; + # text at the end of statusbars. Use space so that it's never + # used for anything. + sbend = "%9%n"; + + topicsbstart = "{sbstart $*}"; + topicsbend = "{sbend $*}"; + + prompt = "%9%k%z005f87$c $* %N%Z005f87%9%n "; + + # This controls each part of a statusbar, including the outer brackets of adv_windowlist + sb = "$*"; + # The mode is next to your NICK and the channel + sbmode = "%p$*%k"; + sbaway = "%Z00af00%k%z00af00 zZzZzZzZ %Z00af00%0"; + sbservertag = "%Z00af00 $0 %Z005f87(change with ^X)%n"; + sbnickmode = "%Zeeeeee$0"; + + # activity in statusbar + + # ',' separator between the window numbers + # %g = green (same color as the active statusbar so we dont' see it) + sb_act_sep = "%Z005fff+"; + # normal text + # This also affects the color of the window with activity in adv_windowlist + sb_act_text = "%C$*"; + # public message (ordinary messages) + sb_act_msg = "%c$*"; + # hilight (when people actually chat) + # This also affects the color of the window with direct message in adv_windowlist + sb_act_hilight = "%m$*"; + # hilight with specified color, $0 = color, $1 = text + sb_act_hilight_color = "%R$1-"; + + ### For usercount.pl script + + sb_usercount = "{sb $0 users %Z005f87(%n$1-%Z005f87)}"; + sb_uc_ircops = "%k*%n$*"; + sb_uc_ops = "%y@%n$*"; + sb_uc_halfops = "%p%%%n$*"; + sb_uc_voices = "%Z005f87+%n$*"; + sb_uc_normal = "%k %n$*"; + sb_uc_space = "%K·%n"; + + ### For adv_windowlist.pl script + + # Mentioned in adv_windowlist but not default_theme + sb_act_none = "$*"; +}; + +formats = { + "fe-common/core" = { + daychange = " %g-----%k-%W-%n Day changed to %%D %W-%k-%g-----%n"; + join = "%k%z00af5fJOIN %8 {ichannelhilight $2} %0%Z00d700%0 {inick $0}%0 %N%8%n%k%N {chanhost_hilight $1}"; + line_start_irssi = "%k%zff0000IRSSI%N%Zff0000 %N"; + new_topic = "%k%z00d700TOPIC %8 {ichannelhilight $1} by {inick $0}%8  $2"; + nick_changed = "%k%z00d700RENAME %Z00d700%0 {nick $0} %Zff8700 {nick $1} %N%8%n%k%N"; + part = "%k%z00d700PART %8 {ichannelhilight $2}%N %0%Z005f87 %N{inick $0}%0 %k%Zeeeeee {reason $3}"; + quit = "%0%Z005f00%k%z005f00QUIT %N {inick $0}%0 %Zeeeeee %N%n%k%N {reason $2}"; + your_nick_changed = "%k%z00d700RENAME %Z00d700%0 {mynick $0} %Zff8700 {mynick $1} %N%8%n%k%N"; + }; + "fe-common/irc" = { + away = "%k%z00d700AWAY %N%k%N"; + banlist = "%p%z00d700BANS %z00d700 $[-3]0 %8 {ichannelhilight $1} %N%8%n%k%N {ban $2}"; + banlist_long = "%p%z00d700BANS %z00d700 $[-3]0 %8 {ichannelhilight $1} {comment by {inick $3}%0%k, $4 secs ago} %N%8%n%k%N {ban $2}"; + chanmode_change = "%k%z008700MODE %N%Z008700%N {channelhilight $0} %Zeeeeee%n {mode $1}%n by {nick $2}"; + channel_created = "%k%N Channel {channelhilight $0} created $1"; + channel_mode = "%k%N mode/{channelhilight $0} {mode $1}"; + ctcp_default_reply = "%W%0%N $0- "; + ctcp_ping_reply = "%k%z005f87 CTCP {hilight PING} reply %n%Z005f87%N {nick $0} %y%N%n $1.$[-3.0]2 seconds "; + ctcp_reply = "%k%z005f87 CTCP {hilight $0} reply %n%Z005f87%N {nick $1} %y%N $2 "; + ctcp_reply_channel = "%k%z005f87 CTCP {hilight $0} reply %n%Z005f87%N {nick $1} %y%N {channel $3} %y%N $2"; + ctcp_requested = "%k%z005f87%8%8 CTCP {hilight $2} from {mynick $4} %n%Z005f87%N by {hilight $0} {comment $1} %y%N $3"; + default_event = "%N%k %N%n$1"; + default_event_server = "%k%z00d700$0 %N%k %N%n$1"; + ebanlist = "%p%z00d700BANS %k exception %8 {ichannelhilight $0} %N%8%n%k%N {ban $1}"; + ebanlist_long = "%p%z00d700BANS %k exception %8 {ichannelhilight $0} {comment by {inick $2}%0%k, $3 secs ago} %N%8%n%k%N {ban $1}"; + end_of_who = "%z00d700%kWHO %N%k%N END"; + end_of_whois = "%z00d700%kWHOIS %N%k%N END"; + end_of_whowas = "%z00d700%kWHOWAS %N%k%N END"; + netsplit = "%k%1%8%8 NETSPLIT %k%0%8 {iserver $0} %z00d700%8 {iserver $1}%8 %N%8%n%k%N Quits: $2"; + netsplit_join = "%k%1 NETSPLIT %k%8%N Joins: $0"; + netsplit_join_more = "%k%1 NETSPLIT %k%8%N Joins: $0 (+$1 more)"; + netsplit_more = "%k%1%8%8 NETSPLIT %k%0%8 {iserver $0} %z00d700%8 {iserver $1}%8 %N%8%n%k%N Quits: $2 (+$3 more, use /NETSPLIT to show all of them)"; + no_topic = "%k%N No topic set for {channelhilight $0}"; + own_ctcp = "%k%z005f87 CTCP {hilight $2-}  {inick $0} %n%Z005f87%N"; + server_chanmode_change = "%k%1 SERVERMODE %k%8 {channelhilight $0} {mode $1} by {nick $2}"; + topic = "%k%z00d700TOPIC %Z00d700%0%N {channel $0}%N  $1"; + topic_info = "%k%z00d700TOPIC %Z00d700%0%N {nick $0}%N {nickhost $2}  $1"; + unaway = "%k%z00d700AWAY %N%k%N END"; + usermode_change = "%z008700%ZeeeeeeMODE %N%Z008700%N {mode $0}%N for %0{mynick $1}%N"; + who = "%z00d700%kWHO %z005f87%k {inick $[!9]1} %Z005f87 %k$0 %0%g Status: $[!3]2  $[-2]3 hops %N%k%N {nickhost $4@$5} {comment $6}"; + whois = "%z00d700%kWHOIS %N%k%n {nick $0} {nickhost $1@$2}%:{whois ircname $3}"; + whowas = "%z00d700%kWHOWAS %N%k%n {nick $0} {nickhost $1@$2}%:{whois was $3}"; + }; + "Irssi::Script::adv_windowlist" = { + awl_display_header = ""; + awl_display_key = " %0$N  $H$C$S %n"; + awl_display_key_active = "%9%W%Z008700%0%8 %zeeeeee$N  $H$C$S%8 %0%8%8%9%n"; + awl_display_key_visible = "%Z005fff %m$N %k $H$C$S %8%8%n"; + awl_display_nokey = " %0$N  %U$C%U %n"; + awl_display_nokey_active = "%k%z005f87 %k$N %k %U$C%U %8%8%n"; + awl_display_nokey_visible = "%k%z5f5fff %m$N %k %U$C%U %8%8%n"; + awl_separator = ""; + }; +}; diff --git a/irssi/startup b/irssi/startup new file mode 100644 index 0000000..e18f450 --- /dev/null +++ b/irssi/startup @@ -0,0 +1,11 @@ +/load proxy +/SET use_proxy ON +/SET proxy_address 192.168.1.108 +/SET proxy_port 3128 +/SET -clear proxy_string +/SET proxy_string_after conn %s %d +/EVAL SET proxy_string CONNECT %s:%d HTTP/1.0\n\n +/SET -clear proxy_password + +/connect irc.freenode.net +/connect OFTC diff --git a/keymap.sh b/keymap.sh new file mode 100755 index 0000000..f5e6820 --- /dev/null +++ b/keymap.sh @@ -0,0 +1,7 @@ +#!/usr/bin/sh + +xcape -e 'Control_L=Escape' +xcape -e 'Shift_L=Shift_L|bracketleft' +xcape -e 'Shift_R=Shift_R|bracketright' +xcape -e 'Alt_L=parenleft' +xcape -e 'Alt_R=parenright' diff --git a/keyremap.ahk b/keyremap.ahk new file mode 100644 index 0000000..7f8389f --- /dev/null +++ b/keyremap.ahk @@ -0,0 +1,130 @@ +#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. +; #Warn ; Enable warnings to assist with detecting common errors. +SendMode Input ; Recommended for new scripts due to its superior speed and reliability. +SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. + +^Capslock::Capslock + +#InstallKeybdHook +SetCapsLockState, alwaysoff +Capslock:: +Send {LControl Down} +KeyWait, CapsLock +Send {LControl Up} +if ( A_PriorKey = "CapsLock" ) { + Send {Esc} +} +return + +~*^a:: +~*^b:: +~*^c:: +~*^d:: +~*^e:: +~*^f:: +~*^g:: +~*^h:: +~*^i:: +~*^j:: +~*^k:: +~*^l:: +~*^m:: +~*^n:: +~*^o:: +~*^p:: +~*^q:: +~*^r:: +~*^s:: +~*^t:: +~*^u:: +~*^v:: +~*^w:: +~*^x:: +~*^y:: +~*^z:: +~*^1:: +~*^2:: +~*^3:: +~*^4:: +~*^5:: +~*^6:: +~*^7:: +~*^8:: +~*^9:: +~*^0:: +~*^Space:: +~*^Backspace:: +~*^Delete:: +~*^Insert:: +~*^Home:: +~*^End:: +~*^PgUp:: +~*^PgDn:: +~*^Tab:: +~*^Return:: +~*^,:: +~*^.:: +~*^/:: +~*^;:: +~*^':: +~*^[:: +~*^]:: +~*^\:: +~*^-:: +~*^=:: +~*^`:: +~*^F1:: +~*^F2:: +~*^F3:: +~*^F4:: +~*^F5:: +~*^F6:: +~*^F7:: +~*^F8:: +~*^F9:: +~*^F10:: +~*^F11:: +~*^F12:: + g_AbortSendEsc := true + return + +LShift:: +RShift:: +Shift::Send % (A_ThisHotkey = "LShift" ? "{{}" : "{}}") + +LControl:: +RControl:: +Control::Send % (A_ThisHotkey = "LControl" ? "[" : "]") + +LAlt:: +RAlt:: +Alt::Send % (A_ThisHotkey = "LAlt" ? "(" : ")") + +; The next part is only relevant to users of Virtual Box, which interacts weirdly with AutoHotkey. The code below resets ctrl and caps lock when a Virtual Box window is unfocused. +InVB() +{ + return WinActive("ahk_exe VirtualBox.exe") +} +in_vb:=InVB() +was_in_vb:=in_vb + +Gui +LastFound +hWnd := WinExist() +DllCall( "RegisterShellHookWindow", UInt,Hwnd ) +MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" ) +OnMessage( MsgNum, "ShellMessage" ) + +ShellMessage( wParam,lParam ) +{ + global in_vb + global was_in_vb + was_in_vb:=in_vb + in_vb:=InVB() + if (was_in_vb and not in_vb) + { + Suspend On + Send {LControl Up} + SetCapsLockState Off + Suspend Off + } +} diff --git a/lemonbar.sh b/lemonbar.sh new file mode 100755 index 0000000..ebca0b3 --- /dev/null +++ b/lemonbar.sh @@ -0,0 +1,50 @@ +#!/usr/bin/bash +#./lemonbar.sh| lemonbar -f "DejaVu Sans Mono for Powerline:size=11" -g "x16" + +NORMAL="%{F-}%{B-}" +sep_left="" +sep_right="" +sep_l_left="" +sep_l_right="" + +DATETIME() { + DATETIME=$(date "+%a %b %d, %T") + echo -n " $DATETIME" +} + +MEM_RAM() { + RESULT=$(free -m | sed "1d"| gawk '{if (NR==1){print int($3/100)/10"G""/"int($2/100)/10"G"}}') + echo -n " M:$RESULT" +} + +MEM_SWAP() { + RESULT=$(free -m | sed "1d"| gawk '{if (NR==2){print int($3/100)/10"G""/"int($2/100)/10"G"}}') + echo -n " S:$RESULT" +} + +HOME_FREE() { + RESULT=$("df" | grep "/home$" | gawk '{print int($4/100000)/10"G"}') + echo -n " HOME:$RESULT" +} + +ROOT_FREE() { + RESULT=$("df" | grep "/$" | gawk '{print int($4/100000)/10"G"}') + echo -n " ROOT:$RESULT" +} + +EXTRA_FREE() { + RESULT=$("df" | grep "/extra$" | gawk '{print int($4/100000)/10"G"}') + echo -n " EXTRA:$RESULT" +} + +DATETIME_SEGMENT="%{B#ff005f5f}%{F#ffcc6666}$sep_left%{B#ffcc6666}%{F#ffeeeeee}$(DATETIME)" +MEM_RAM_SEGMENT="%{B#ff0087ff}%{F#ff005f5f}$sep_left%{B#ff005f5f}%{F#ffeeeeee}$(MEM_RAM)" +MEM_SWAP_SEGMENT="%{B#ffff5f00}%{F#ff0087ff}$sep_left%{B#ff0087ff}%{F#ffeeeeee}$(MEM_SWAP)" +EXTRA_FREE_SEGMENT="%{B#ff875fd7}%{F#ffff5f00}$sep_left%{B#ffff5f00}%{F#ffeeeeee}$(EXTRA_FREE)" +HOME_FREE_SEGMENT="%{B#ff5f00ff}%{F#ff875fd7}$sep_left%{B#ff875fd7}%{F#ffeeeeee}$(HOME_FREE)" +ROOT_FREE_SEGMENT="%{B#ff000000}%{F#ff5f00ff}$sep_left%{B#ff5f00ff}%{F#ffeeeeee}$(ROOT_FREE)" + +while true; do + echo -e "%{r} $ROOT_FREE_SEGMENT $HOME_FREE_SEGMENT $EXTRA_FREE_SEGMENT $MEM_SWAP_SEGMENT $MEM_RAM_SEGMENT $DATETIME_SEGMENT $NORMAL" + sleep 60 +done diff --git a/lesscolor.sh b/lesscolor.sh new file mode 100755 index 0000000..8ac7efc --- /dev/null +++ b/lesscolor.sh @@ -0,0 +1,20 @@ +#!/bin/sh +case "$1" in + *.h|*.c|*.cpp|*.awk|*.groff|*.java|*.js|*.m4|*.php|*.pl|*.pm|*.pod|*.sh|*.lua|*.hpp|*.sh|\ + *.ad[asb]|*.asm|*.inc|*.[ch]|*.[ch]pp|*.[ch]xx|*.cc|*.hh|*.json|makefile|Makefile|*.html|\ + *.lsp|*.l|*.pas|*.p|*.xml|*.xps|*.xsl|*.axp|*.ppd|*.pov|\ + *.diff|*.patch|*.py|*.rb|*.sql|*.ebuild|*.eclass) + pygmentize -f 256 "$1";; + .zshrc|.bash_aliases|.bash_environment) + pygmentize -f 256 -l sh "$1" + ;; + *) + grep "#\!/bin/zsh" "$1" > /dev/null + if [ "$?" -eq "0" ]; then + pygmentize -f 256 -l sh "$1" + else + exit 1 + fi +esac + +exit 0 diff --git a/llvm-build.sh b/llvm-build.sh new file mode 100755 index 0000000..83d4aef --- /dev/null +++ b/llvm-build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +"cmake" -G "Unix Makefiles" ../llvm -DLLVM_ENABLE_RTTI=1 -DCMAKE_BUILD_TYPE=Release -DLLDB_TEST_C_COMPILER=cc -DLLDB_TEST_CXX_COMPILER=g++ -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly -DLLVM_ENABLE_ASSERTIONS=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_ENABLE_PROJECTS="clang;libcxx;libcxxabi;clang-tools-extra;compiler-rt;" diff --git a/llvm-update.sh b/llvm-update.sh new file mode 100755 index 0000000..be164cc --- /dev/null +++ b/llvm-update.sh @@ -0,0 +1,11 @@ +#!/bin/sh +cd $(dirname $0) +REVISION=$(svn info http://llvm.org/svn/llvm-project/llvm/trunk | grep Revision | gawk 'BEGIN{FS=": "}{print $2}') +cd ~/extra/llvm-clang-4/llvm +svn up -r$REVISION +(cd ./projects/compiler-rt; svn up -r$REVISION) +(cd ./projects/libcxx; svn up -r$REVISION) +(cd ./projects/libcxxabi; svn up -r$REVISION) +#(cd ./tools/lldb; svn up -r$REVISION) +(cd ./tools/clang; svn up -r$REVISION) +(cd ./tools/clang/tools/extra; svn up -r$REVISION) diff --git a/lynx.cfg b/lynx.cfg new file mode 100644 index 0000000..86cac79 --- /dev/null +++ b/lynx.cfg @@ -0,0 +1,3837 @@ +# $LynxId: lynx.cfg,v 1.302 2018/07/08 15:22:44 tom Exp $ +# lynx.cfg file. +# The default placement for this file is /etc/lynx.cfg +# +# Please don't edit this file directly (it is updated with every Red Hat +# Linux update, overwriting your changes). Instead, edit /etc/lynx-site.cfg. +# +# $Format: "#PRCS LYNX_VERSION \"$ProjectVersion$\""$ +#PRCS LYNX_VERSION "2.8.9rel.1" +# +# $Format: "#PRCS LYNX_DATE \"$ProjectDate$\""$ +#PRCS LYNX_DATE "Sun, 08 Jul 2018 06:46:06 -0400" +# +# Definition pairs (configuration settings) are of the form +# VARIABLE:DEFINITION +# NO spaces are allowed around the colon ":" between the pair items. +# +# If you do not have write access to /usr/local/lib you may change +# the default location of this file in the userdefs.h file and recompile, +# or specify its location on the command line with the "-cfg" +# command line option. +# +# Items may be commented out by putting a '#' as the FIRST char of the line +# (Any line beginning with punctuation is ignored). Leading blanks on each +# line are ignored; trailing blanks may be significant depending on the option. + +# In most cases, a definition can be overridden by another later in the +# file, or in an including configuration file. You can see the effect of +# definitions (and redefinitions) in the trace file Lynx.log by using the +# "-trace" and "-trace-mask" options, e.g., +# lynx -trace -trace-mask=8 + +# As a documentation aid, the default values for each setting are shown +# commented-out. By convention, these default value comments have no space +# after the "#", e.g., +# #HTTP_PROTOCOL:1.0 + +# An HTML'ized description of all settings (based on comments in this file, +# with alphabetical table of settings and with table of settings by category) +# is available at https://lynx.invisible-island.net/release/breakout/lynx_help/cattoc.html +# +### The conversion is done via the scripts/cfg2html.pl script. +### Several directives beginning with '.' are used for this purpose. + +.h1 Auxiliary Facilities +# These settings control the auxiliary navigating facilities of lynx, e.g., +# jumpfiles, bookmarks, default URLs. + +.h2 INCLUDE +# Starting with Lynx 2.8.1, the lynx.cfg file has a crude "include" +# facility. This means that you can take advantage of the global lynx.cfg +# while also supplying your own tweaks. +# +# You can use a command-line argument (-cfg /where/is/lynx.cfg) or an +# environment variable (LYNX_CFG=/where/is/lynx.cfg). +# For instance, put in your .profile or .login: +# +# LYNX_CFG=~/lynx.cfg; export LYNX_CFG # in .profile for sh/ksh/bash/etc. +# setenv LYNX_CFG ~/lynx.cfg # in .login for [t]csh +# +# Then in ~/lynx.cfg: +# +# INCLUDE:/usr/local/lib/lynx.cfg +# ^^^^^^^^^^^^^^^^^^^^^^^ or whatever is appropriate on your system +# and now your own tweaks. If you omit the directory name, e.g., +# +# INCLUDE:lynx.cfg +# +# then lynx first checks if it is in any of the directories listed in the +# environment variable LYNX_CFG_PATH, then tries the directory of the default +# config-file. +# +# You can also suppress all but specific settings that will be read from +# included files. This allows sysadmins to provide users the ability to +# customize lynx with options that normally do not affect security, such as +# COLOR, VIEWER, KEYMAP. +# +# The syntax is +# +# INCLUDE:filename for +# +# sample: +.ex +#INCLUDE:~/lynx.cfg for COLOR VIEWER KEYMAP +# only one space character should surround the word 'for'. On Unix systems ':' +# is also accepted as separator. In that case, the example can be written as +.ex +#INCLUDE:~/lynx.cfg:COLOR VIEWER KEYMAP +# In the example, only the settings COLOR, VIEWER and KEYMAP are accepted by +# lynx. Other settings are ignored. Note: INCLUDE is also treated as a +# setting, so to allow an included file to include other files, put INCLUDE in +# the list of allowed settings. +# +# If you allow an included file to include other files, and if a list of +# allowed settings is specified for that file with the INCLUDE command, nested +# files are only allowed to include the list of settings that is the set AND of +# settings allowed for the included file and settings allowed by nested INCLUDE +# commands. In short, there is no security hole introduced by including a +# user-defined configuration file if the original list of allowed settings is +# secure. + +.h2 STARTFILE +# STARTFILE is the default starting URL if none is specified +# on the command line or via a WWW_HOME environment variable; +# Lynx will refuse to start without a starting URL of some kind. +# STARTFILE can be remote, e.g. http://www.w3.org/default.html , +# or local, e.g. file://localhost/PATH_TO/FILENAME , +# where PATH_TO is replaced with the complete path to FILENAME +# using Unix shell syntax and including the device on VMS. +# +# Normally we expect you will connect to a remote site, e.g., the Lynx starting +# site: +STARTFILE:https://duckduckgo.com +# +# As an alternative, you may want to use a local URL. A good choice for this is +# the user's home directory: +.ex +#STARTFILE:file://localhost/~/ +# +# Your choice of STARTFILE should reflect your site's needs, and be a URL that +# you can connect to reliably. Otherwise users will become confused and think +# that they cannot run Lynx. + +.h2 HELPFILE +# HELPFILE must be defined as a URL and must have a +# complete path if local: +# file://localhost/PATH_TO/lynx_help/lynx_help_main.html +# Replace PATH_TO with the path to the lynx_help subdirectory +# for this distribution (use SHELL syntax including the device +# on VMS systems). +# The default HELPFILE is: +.url https://lynx.invisible-island.net/lynx_help/lynx_help_main.html +# This should be changed to the local path. +# This definition will be overridden if the "LYNX_HELPFILE" environment +# variable has been set. +# +HELPFILE:file://localhost/usr/share/doc/lynx/lynx_help/lynx_help_main.html +.ex +#HELPFILE:file://localhost/PATH_TO/lynx_help/lynx_help_main.html + +.h2 DEFAULT_INDEX_FILE +# DEFAULT_INDEX_FILE is the default file retrieved when the +# user presses the 'I' key when viewing any document. +# An index to your CWIS can be placed here or a document containing +# pointers to lots of interesting places on the web. +# +DEFAULT_INDEX_FILE:http://www.google.com/ + +.h1 Interaction + +.h2 GOTOBUFFER +# Set GOTOBUFFER to TRUE if you want to have the previous goto URL, +# if any, offered for reuse or editing when using the 'g'oto command. +# The default is defined in userdefs.h. If left FALSE, the circular +# buffer of previously entered goto URLs can still be invoked via the +# Up-Arrow or Down-Arrow keys after entering the 'g'oto command. +# +#GOTOBUFFER:FALSE + +.h2 JUMP_PROMPT +# JUMP_PROMPT is the default statusline prompt for selecting a jumps file +# shortcut. (see below). +# You can change the prompt here from that defined in userdefs.h. Any +# trailing white space will be trimmed, and a single space is added by Lynx +# following the last non-white character. You must set the default prompt +# before setting the default jumps file (below). If a default jumps file +# was set via userdefs.h, and you change the prompt here, you must set the +# default jumps file again (below) for the change to be implemented. +# +#JUMP_PROMPT:Jump to (use '?' for list): + +.h1 Auxiliary Facilities + +.h2 JUMPFILE +# JUMPFILE is the local file checked for short-cut names for URLs when +# the user presses the 'j' (JUMP) key. The file contains an HTML +# definition list (DL). The definition titles (DT) are used as +# short-cut name; the definition data (DD) are URLs. +# +# There is an example jumps file in the samples subdirectory. +# +# After pressing 'j', the user will be prompted to enter a short-cut +# name for an URL, which Lynx will then follow in a similar manner to +# 'g'oto; alternatively, s/he can enter '?' to view the full JUMPFILE +# list of short-cuts with associated URLs. +# +# If the URL contains one or more "%s" markers, Lynx will prompt the user +# for text to fill in for each marker. If no text is given, the jump is +# cancelled. +# +# If not defined here or in userdefs.h, the JUMP command will invoke the +# NO_JUMPFILE statusline message (see LYMessages_en.h ). +# +# To allow '?' to work, include in the JUMPFILE +# a short-cut to the JUMPFILE itself, e.g. +#
?
This Shortcut List +# +# On VMS, use Unix SHELL syntax (including a lead slash) to define it. +# +# Alternate jumps files can be defined and mapped to keys here. If the +# keys have already been mapped, then those mappings will be replaced, +# but you should leave at least one key mapped to the default jumps +# file. You optionally may include a statusline prompt string for the +# mapping. You must map upper and lowercase keys separately (beware of +# mappings to keys which the user can further remap via the 'o'ptions +# menu). The format is: +# +# JUMPFILE:path:key[:prompt] +# +# where path should begin with a '/' (i.e., not include file://localhost). +# Any white space following a prompt string will be trimmed, and a single +# space will be added by Lynx. +# +# In the following line, include the actual full local path to JUMPFILE, +# but do not include 'file://localhost' in the line. +#JUMPFILE:/FULL_LOCAL_PATH/jumps.html +.ex +#JUMPFILE:/Lynx_Dir/ips.html:i:IP or Interest group (? for list): + +.h2 JUMPBUFFER +# Set JUMPBUFFER to TRUE if you want to have the previous jump target, +# if any, offered for reuse or editing when using the 'J'ump command. +# The default is defined in userdefs.h. If left FALSE, the circular +# buffer of previously entered targets (shortcuts) can still be invoked +# via the Up-Arrow or Down-Arrow keys after entering the 'J'ump command. +# If multiple jumps files are installed, the recalls of shortcuts will +# be specific to each file. If Lynx was built with PERMIT_GOTO_FROM_JUMP +# defined, any random URLs used instead of shortcuts will be stored in the +# goto URL buffer, not in the shortcuts buffer(s), and the single character +# ':' can be used as a target to invoke the goto URL buffer (as if 'g'oto +# followed by Up-Arrow had been entered). +# +#JUMPBUFFER:FALSE + +.h1 Internal Behavior + +.h2 SAVE_SPACE +# If SAVE_SPACE is defined, it will be used as a path prefix for the +# suggested filename in "Save to Disk" operations from the 'p'rint or +# 'd'ownload menus. On VMS, you can use either VMS (e.g., "SYS$LOGIN:") +# or Unix syntax (including '~' for the HOME directory). On Unix, you +# must use Unix syntax. If the symbol is not defined, or is zero-length +# (""), no prefix will be used, and only a filename for saving in the +# current default directory will be suggested. +# This definition will be overridden if a "LYNX_SAVE_SPACE" environment +# variable has been set on Unix, or logical has been defined on VMS. +# +#SAVE_SPACE:~/foo/ + +.h2 REUSE_TEMPFILES +# Lynx uses temporary files for (among other purposes) the content of +# various user interface pages. REUSE_TEMPFILES changes the behavior +# for some of these temp files, among them pages shown for HISTORY, +# VLINKS, OPTIONS, INFO, PRINT, DOWNLOAD commands. +# If set to TRUE, the same file can be used multiple times for the same +# purpose. If set to FALSE, a new filename is generated each time before +# rewriting such a page. With TRUE, repeated invocation of these commands +# is less likely to push previous documents out of the cache of rendered +# texts (see also DEFAULT_CACHE_SIZE). This is especially useful with +# intermittent (dialup) network connections, when it is desirable to +# continue browsing through the cached documents after disconnecting. +# With the default setting of FALSE, there can be more than one incarnation +# of e.g. the VLINKS page cached in memory (but still only the most recently +# generated one is kept as a file), resulting in sometimes less surprising +# behaviour when returning to such a page via HISTORY or PREV_DOC functions +# (most users will not encounter and notice this difference). +# +#REUSE_TEMPFILES:FALSE + +.h2 LYNX_HOST_NAME +# If LYNX_HOST_NAME is defined here or in userdefs.h, it will be +# treated as an alias for the local host name in checks for URLs on +# the local host (e.g., when the -localhost switch is set), and this +# host name, "localhost", and HTHostName (the fully qualified domain +# name of the system on which Lynx is running) will all be passed as +# local. A different definition here will override that in userdefs.h. +# +#LYNX_HOST_NAME:www.cc.ukans.edu + +.h2 LOCALHOST_ALIAS +# localhost aliases +# Any LOCALHOST_ALIAS definitions also will be accepted as local when +# the -localhost switch is set. These need not actually be local, i.e., +# in contrast to LYNX_HOST_NAME, you can define them to trusted hosts at +# other Internet sites. +# +.ex 2 +#LOCALHOST_ALIAS:gopher.server.domain +#LOCALHOST_ALIAS:news.server.domain + +.h2 LOCAL_DOMAIN +# LOCAL_DOMAIN is used for a tail match with the ut_host element of +# the utmp or utmpx structure on systems with utmp capabilities, to +# determine if a user is local to your campus or organization when +# handling -restrictions=inside_foo or outside_foo settings for ftp, +# news, telnet/tn3270 and rlogin URLs. An "inside" user is assumed +# if your system does not have utmp capabilities. CHANGE THIS here +# if it was not changed in userdefs.h at compilation time. +# +#LOCAL_DOMAIN:ukans.edu + +.h1 Session support + +.h2 AUTO_SESSION +# If AUTO_SESSION is TRUE lynx will save/restore useful information about +# your browsing history when closing/starting current lynx session if +# no command-line session switches override this setting. +# This setting is useful only if SESSION_FILE is defined here or in the user's +# .lynxrc file. +# +#AUTO_SESSION:FALSE + +.h2 SESSION_FILE +# SESSION_FILE defines the file name where lynx will store user sessions. +# This setting is used only when AUTO_SESSION is true. +# Note: the default setting will store/resume each session in a different +# folder under same file name (if that is allowed by operating system) +# when lynx is invoked from different directories. +# (The current working directory may be changed inside lynx) +# +# If you want to use the same session file wherever you invoke Lynx, +# enter the full path below, eg '/home//.lynx_session'. +# +# If you do not want this feature, leave the setting commented. +# Users can still customize SESSION_FILE and AUTO_SESSION via +# their .lynxrc file. +# +#SESSION_FILE:lynx_session + +.h2 SESSION_LIMIT +# SESSION_LIMIT defines maximum number of: searched strings, goto URLs, +# visited links and history entries which will be saved in session file. The +# minimum allowed is 1, the maximum is 10000. +# +# For instance, if SESSION_LIMIT is 250, a per-session limit of 250 entries of +# searched strings, goto URLs, visited links and history entries will be saved +# in the session file. +# +# There is no fixed limit on the number of entries which can be restored; +# It is limited only by available memory. +# +#SESSION_LIMIT:250 + +.h1 Character Sets + +.h2 CHARACTER_SET +# CHARACTER_SET defines the display character set, i.e., assumed to be +# installed on the user's terminal. It determines which characters or strings +# will be used to represent 8-bit character entities within HTML. New +# character sets may be defined as explained in the README files of the +# src/chrtrans directory in the Lynx source code distribution. For Asian (CJK) +# character sets, it also determines how Kanji code will be handled. The +# default is defined in userdefs.h and can be changed here or via the +# 'o'ptions menu. The 'o'ptions menu setting will be stored in the user's RC +# file whenever those settings are saved, and thereafter will be used as the +# default. For Lynx a "character set" has two names: a MIME name (for +# recognizing properly labeled charset parameters in HTTP headers etc.), and a +# human-readable string for the 'O'ptions Menu (so you may find info about +# language or group of languages besides MIME name). Not all 'human-readable' +# names correspond to exactly one valid MIME charset (example is "Chinese"); +# in that case an appropriate valid (and more specific) MIME name should be +# used where required. Well-known synonyms are also processed in the code. +# +# Raw (CJK) mode +# +# Lynx normally translates characters from a document's charset to display +# charset, using ASSUME_CHARSET value (see below) if the document's charset +# is not specified explicitly. Raw (CJK) mode is OFF for this case. +# When the document charset is specified explicitly, that charset +# overrides any assumption like ASSUME_CHARSET or raw (CJK) mode. +# +# For the Asian (CJK) display character sets, the corresponding charset is +# assumed in documents, i.e., raw (CJK) mode is ON by default. In raw CJK +# mode, 8-bit characters are not reverse translated in relation to the entity +# conversion arrays, i.e., they are assumed to be appropriate for the display +# character set. The mode should be toggled OFF when an Asian (CJK) display +# character set is selected but the document is not CJK and its charset not +# specified explicitly. +# +# Raw (CJK) mode may be toggled by user via '@' (LYK_RAW_TOGGLE) key, +# the -raw command line switch or from the 'o'ptions menu. +# +# Raw (CJK) mode effectively changes the charset assumption about unlabeled +# documents. You can toggle raw mode ON if you believe the document has a +# charset which does correspond to your Display Character Set. On the other +# hand, if you set ASSUME_CHARSET the same as Display Character Set you get raw +# mode ON by default (but you get assume_charset=iso-8859-1 if you try raw mode +# OFF after it). +# +# Note that "raw" does not mean that every byte will be passed to the screen. +# HTML character entities may get expanded and translated, inappropriate +# control characters filtered out, etc. There is a "Transparent" pseudo +# character set for more "rawness". +# +# Since Lynx now supports a wide range of platforms it may be useful to note +# the cpXXX codepages used by IBM PC compatible computers, and windows-xxxx +# used by native MS-Windows apps. We also note that cpXXX pages rarely are +# found on Internet, but are mostly for local needs on DOS. +# +# Recognized character sets include: +# +.nf +# string for 'O'ptions Menu MIME name +# =========================== ========= +# 7 bit approximations (US-ASCII) us-ascii +# Western (ISO-8859-1) iso-8859-1 +# Western (ISO-8859-15) iso-8859-15 +# Western (cp850) cp850 +# Western (windows-1252) windows-1252 +# IBM PC US codepage (cp437) cp437 +# DEC Multinational dec-mcs +# Macintosh (8 bit) macintosh +# NeXT character set next +# HP Roman8 hp-roman8 +# Chinese euc-cn +# Japanese (EUC-JP) euc-jp +# Japanese (Shift_JIS) shift_jis +# Korean euc-kr +# Taipei (Big5) big5 +# Vietnamese (VISCII) viscii +# Eastern European (ISO-8859-2) iso-8859-2 +# Eastern European (cp852) cp852 +# Eastern European (windows-1250) windows-1250 +# Latin 3 (ISO-8859-3) iso-8859-3 +# Latin 4 (ISO-8859-4) iso-8859-4 +# Baltic Rim (ISO-8859-13) iso-8859-13 +# Baltic Rim (cp775) cp775 +# Baltic Rim (windows-1257) windows-1257 +# Celtic (ISO-8859-14) iso-8859-14 +# Cyrillic (ISO-8859-5) iso-8859-5 +# Cyrillic (cp866) cp866 +# Cyrillic (windows-1251) windows-1251 +# Cyrillic (KOI8-R) koi8-r +# Arabic (ISO-8859-6) iso-8859-6 +# Arabic (cp864) cp864 +# Arabic (windows-1256) windows-1256 +# Greek (ISO-8859-7) iso-8859-7 +# Greek (cp737) cp737 +# Greek2 (cp869) cp869 +# Greek (windows-1253) windows-1253 +# Hebrew (ISO-8859-8) iso-8859-8 +# Hebrew (cp862) cp862 +# Hebrew (windows-1255) windows-1255 +# Turkish (ISO-8859-9) iso-8859-9 +# North European (ISO-8859-10) iso-8859-10 +# Ukrainian Cyrillic (cp866u) cp866u +# Ukrainian Cyrillic (KOI8-U) koi8-u +# UNICODE (UTF-8) utf-8 +# RFC 1345 w/o Intro mnemonic+ascii+0 +# RFC 1345 Mnemonic mnemonic +# Transparent x-transparent +.fi +# +# The value should be the MIME name of a character set recognized by +# Lynx (case insensitive). +# Find RFC 1345 at +.url http://tools.ietf.org/html/rfc1345 +# +CHARACTER_SET:iso-8859-1 + +.h2 LOCALE_CHARSET +# LOCALE_CHARSET overrides CHARACTER_SET if true, using the current locale to +# lookup a MIME name that corresponds, and use that as the display charset. +# +# It also modifies the default value for ASSUME_CHARSET; it does not override +# that setting. +# +# Note that while nl_langinfo(CODESET) itself is standardized, the return +# values and their relationship to the locale value is not. GNU libiconv +# happens to give useful values, but other implementations are not guaranteed +# to do this. +LOCALE_CHARSET:TRUE + +.h2 HTML5_CHARSETS +# HTML5_CHARSETS is an alternative to ASSUME_CHARSET and ASSUME_LOCAL_CHARSET. +# Those assume by default that the character set of an HTML document is (as is +# standard in HTML4) ISO-8859-1, in the absence of locale information. +# +# HTML5 introduces a "compatibility" (sic) feature which assumes that the +# default is Windows 1252. In the same way, it equates ISO-8859-4 and Windows +# 1254. Finally, it also makes recommendations which selectively reinterpret +# the locale encoding. +# +# This option currently implements only the equating of ISO-8859-1 and Windows +# 1252. +# +#HTML5_CHARSETS:FALSE + +.h2 ASSUME_CHARSET +# ASSUME_CHARSET changes the handling of documents which do not +# explicitly specify a charset. Normally Lynx assumes that 8-bit +# characters in those documents are encoded according to iso-8859-1 +# (the official default for the HTTP protocol). When ASSUME_CHARSET +# is defined here or by an -assume_charset command line flag is in effect, +# Lynx will treat documents as if they were encoded accordingly. +# See above on how this interacts with "raw mode" and the Display +# Character Set. +# ASSUME_CHARSET can also be changed via the 'o'ptions menu but will +# not be saved as permanent value in user's .lynxrc file to avoid more chaos. +# +#ASSUME_CHARSET:iso-8859-1 + +.h2 ASSUMED_DOC_CHARSET_CHOICE +.h2 DISPLAY_CHARSET_CHOICE +# It is possible to reduce the number of charset choices in the 'O'ptions menu +# for "display charset" and "assumed document charset" fields via +# DISPLAY_CHARSET_CHOICE and ASSUMED_DOC_CHARSET_CHOICE settings correspondingly. +# Each of these settings can be used several times to define the set of possible +# choices for corresponding field. The syntax for the values is +# +# string | prefix* | * +# +# where +# +# 'string' is either the MIME name of charset or it's full name (listed +# either in the left or in the right column of table of +# recognized charsets), case-insensitive - e.g. 'Koi8-R' or +# 'Cyrillic (KOI8-R)' (both without quotes), +# +# 'prefix' is any string, and such value will select all charsets having +# the name with prefix matching given (case insensitive), i.e., +# for the charsets listed in the table of recognized charsets, +# +.ex +# ASSUMED_DOC_CHARSET_CHOICE:cyrillic* +# will be equal to specifying +.ex 4 +# ASSUMED_DOC_CHARSET_CHOICE:cp866 +# ASSUMED_DOC_CHARSET_CHOICE:windows-1251 +# ASSUMED_DOC_CHARSET_CHOICE:koi8-r +# ASSUMED_DOC_CHARSET_CHOICE:iso-8859-5 +# or lines with full names of charsets. +# +# literal string '*' (without quotes) will enable all charset choices +# in corresponding field. This is useful for overriding site +# defaults in private pieces of lynx.cfg included via INCLUDE +# directive. +# +# Default values for both settings are '*', but any occurrence of settings +# with values that denote any charsets will make only listed choices available +# for corresponding field. +#ASSUMED_DOC_CHARSET_CHOICE:* +#DISPLAY_CHARSET_CHOICE:* + +.h2 ASSUME_LOCAL_CHARSET +# ASSUME_LOCAL_CHARSET is like ASSUME_CHARSET but only applies to local +# files. If no setting is given here or by an -assume_local_charset +# command line option, the value for ASSUME_CHARSET or -assume_charset +# is used. It works for both text/plain and text/html files. +# This option will ignore "raw mode" toggling when local files are viewed +# (it is "stronger" than "assume_charset" or the effective change +# of the charset assumption caused by changing "raw mode"), +# so only use when necessary. +# +#ASSUME_LOCAL_CHARSET:iso-8859-1 + +.h2 PREPEND_CHARSET_TO_SOURCE +# PREPEND_CHARSET_TO_SOURCE:TRUE tells Lynx to prepend a META CHARSET line +# to text/html source files when they are retrieved for 'd'ownloading +# or passed to 'p'rint functions, so HTTP headers will not be lost. +# This is necessary for resolving charset for local html files, +# while the assume_local_charset is just an assumption. +# For the 'd'ownload option, a META CHARSET will be added only if the HTTP +# charset is present. The compilation default is TRUE. +# It is generally desirable to have charset information for every local +# html file, but META CHARSET string potentially could cause +# compatibility problems with other browsers, see also PREPEND_BASE_TO_SOURCE. +# Note that the prepending is not done for -source dumps. +# +#PREPEND_CHARSET_TO_SOURCE:TRUE + +.h2 NCR_IN_BOOKMARKS +# NCR_IN_BOOKMARKS:TRUE allows you to save 8-bit characters in bookmark titles +# in the unicode format (NCR). This may be useful if you need to switch +# display charsets frequently. This is the case when you use Lynx on different +# platforms, e.g., on UNIX and from a remote PC, and want to keep the bookmarks +# file persistent. +# Another aspect is compatibility: NCR is part of I18N and HTML4.0 +# specifications supported starting with Lynx 2.7.2, Netscape 4.0 and MSIE 4.0. +# Older browser versions will fail so keep NCR_IN_BOOKMARKS:FALSE if you +# plan to use them. +# +#NCR_IN_BOOKMARKS:FALSE + +.h2 FORCE_8BIT_TOUPPER +# FORCE_8BIT_TOUPPER overrides locale settings and uses internal 8-bit +# case-conversion mechanism for case-insensitive searches in non-ASCII display +# character sets. It is FALSE by default and should not be changed unless +# you encounter problems with case-insensitive searches. +# +#FORCE_8BIT_TOUPPER:FALSE + +.h2 OUTGOING_MAIL_CHARSET +# While Lynx supports different platforms and display character sets +# we need to limit the charset in outgoing mail to reduce +# trouble for remote recipients who may not recognize our charset. +# You may try US-ASCII as the safest value (7 bit), any other MIME name, +# or leave this field blank (default) to use the display character set. +# Charset translations currently are implemented for mail "subjects= " only. +# +#OUTGOING_MAIL_CHARSET: + +.h2 ASSUME_UNREC_CHARSET +# If Lynx encounters a charset parameter it doesn't recognize, it will +# replace the value given by ASSUME_UNREC_CHARSET (or a corresponding +# -assume_unrec_charset command line option) for it. This can be used +# to deal with charsets unknown to Lynx, if they are "sufficiently +# similar" to one that Lynx does know about, by forcing the same +# treatment. There is no default, and you probably should leave this +# undefined unless necessary. +# +#ASSUME_UNREC_CHARSET:iso-8859-1 + +.h2 PREFERRED_LANGUAGE +# PREFERRED_LANGUAGE is the language in MIME notation (e.g., "en", +# "fr") which will be indicated by Lynx in its Accept-Language headers +# as the preferred language. If available, the document will be +# transmitted in that language. Users can override this setting via +# the 'o'ptions menu and save that preference in their RC file. +# This may be a comma-separated list of languages in decreasing preference. +# +#PREFERRED_LANGUAGE:en + +.h2 PREFERRED_CHARSET +# PREFERRED_CHARSET specifies the character set in MIME notation (e.g., +# "ISO-8859-2", "ISO-8859-5") which Lynx will indicate you prefer in +# requests to http servers using an Accept-Charsets header. Users can +# change it via the 'o'ptions menu and save that preference in their RC file. +# The value should NOT include "ISO-8859-1" or "US-ASCII", +# since those values are always assumed by default. +# If a file in that character set is available, the server will send it. +# If no Accept-Charset header is present, the default is that any +# character set is acceptable. If an Accept-Charset header is present, +# and if the server cannot send a response which is acceptable +# according to the Accept-Charset header, then the server SHOULD send +# an error response with the 406 (not acceptable) status code, though +# the sending of an unacceptable response is also allowed. See RFC 2068 +.url http://tools.ietf.org/html/rfc2068 +# +#PREFERRED_CHARSET: + +.h2 CHARSETS_DIRECTORY +# CHARSETS_DIRECTORY specifies the directory with the fonts (glyph data) +# used by Lynx to switch the display-font to a font best suited for the +# given document. The font should be in a format understood by the +# platforms TTY-display-font-switching API. Currently supported on OS/2 only. +# +# Lynx expects the glyphs for the charset CHARSET with character cell +# size HHHxWWW to be stored in a file HHHxWWW/CHARSET.fnt inside the directory +# specified by CHARSETS_DIRECTORY. E.g., the font for koi8-r sized 14x9 +# should be in the file 14x9/koi8-r.fnt. +# +#CHARSETS_DIRECTORY: + +.h2 CHARSET_SWITCH_RULES +# CHARSET_SWITCH_RULES hints lynx on how to choose the best display font given +# the document encoding. This string is a sequence of chunks, each chunk +# having the following form: +# +# IN_CHARSET1 IN_CHARSET2 ... IN_CHARSET5 :OUT_CHARSET +# +# For readability, one may insert arbitrary additional punctuation (anything +# but : is ignored). E.g., if lynx is able to switch only to display charsets +# cp866, cp850, cp852, and cp862, then the following setting may be useful +# (split for readability): +# +# CHARSET_SWITCH_RULES: koi8-r ISO-8859-5 windows-1251 cp866u KOI8-U :cp866, +# iso-8859-1 windows-1252 ISO-8859-15 :cp850, +# ISO-8859-2 windows-1250 :cp852, +# ISO-8859-8 windows-1255 :cp862 +# +#CHARSET_SWITCH_RULES: + +.h1 Interaction + +.h2 URL_DOMAIN_PREFIXES +.h2 URL_DOMAIN_SUFFIXES +# URL_DOMAIN_PREFIXES and URL_DOMAIN_SUFFIXES are strings which will be +# prepended (together with a scheme://) and appended to the first element +# of command line or 'g'oto arguments which are not complete URLs and +# cannot be opened as a local file (file://localhost/string). Both +# can be comma-separated lists. Each prefix must end with a dot, each +# suffix must begin with a dot, and either may contain other dots (e.g., +# .com.jp). The default lists are defined in userdefs.h and can be +# replaced here. Each prefix will be used with each suffix, in order, +# until a valid Internet host is created, based on a successful DNS +# lookup (e.g., foo will be tested as www.foo.com and then www.foo.edu +# etc.). The first element can include a :port and/or /path which will +# be restored with the expanded host (e.g., wfbr:8002/dir/lynx will +# become http://www.wfbr.edu:8002/dir/lynx). The prefixes will not be +# used if the first element ends in a dot (or has a dot before the +# :port or /path), and similarly the suffixes will not be used if the +# the first element begins with a dot (e.g., .nyu.edu will become +# http://www.nyu.edu without testing www.nyu.com). Lynx will try to +# guess the scheme based on the first field of the expanded host name, +# and use "http://" as the default (e.g., gopher.wfbr.edu or gopher.wfbr. +# will be made gopher://gopher.wfbr.edu). +# +#URL_DOMAIN_PREFIXES:www. +#URL_DOMAIN_SUFFIXES:.com,.edu,.net,.org + +.h2 FORMS_OPTIONS +# Toggle whether the Options Menu is key-based or form-based; +# the key-based version is available only if specified at compile time. +#FORMS_OPTIONS:TRUE + +.h2 PARTIAL +# Display partial pages while downloading +#PARTIAL:TRUE + +.h2 PARTIAL_THRES +# Set the threshold # of lines Lynx must render before it +# redraws the screen in PARTIAL mode. Anything < 0 implies +# use of the screen size. +#PARTIAL_THRES:-1 + +.h2 SHOW_KB_RATE +# While getting large files, Lynx shows the approximate rate of transfer. +# Set this to change the units shown. "Kilobytes" denotes 1024 bytes: +# NONE to disable the display of transfer rate altogether. +# TRUE or KB for Kilobytes/second. +# FALSE or BYTES for bytes/second. +# KB,ETA to show Kilobytes/second with estimated completion time. +# BYTES,ETA to show BYTES/second with estimated completion time. +# KB2,ETA to show Kilobytes/second with estimated completion time using 2-digits. +# BYTES2,ETA to show BYTES/second with estimated completion time using 2-digits. +# Note that the "ETA" values are available if USE_READPROGRESS was defined. +#SHOW_KB_RATE:TRUE + +.h2 SHOW_KB_NAME +# Set the abbreviation for Kilobytes (1024). +# Quoting from +.url http://www.romulus2.com/articles/guides/misc/bitsbytes.shtml +# In December 1998, the International Electrotechnical Commission (IEC) +# approved a new IEC International Standard. Instead of using the metric +# prefixes for multiples in binary code, the new IEC standard invented specific +# prefixes for binary multiples made up of only the first two letters of the +# metric prefixes and adding the first two letters of the word "binary". Thus, +# for instance, instead of Kilobyte (KB) or Gigabyte (GB), the new terms would +# be kibibyte (KiB) or gibibyte (GiB). +# +# If you prefer using the conventional (and more common) "KB", modify this +# setting. +#SHOW_KB_NAME:KiB + +.h1 Timeouts + +.h2 INFOSECS +.h2 MESSAGESECS +.h2 ALERTSECS +.h2 NO_PAUSE +# The following definitions set the number of seconds for +# pauses following statusline messages that would otherwise be +# replaced immediately, and are more important than the unpaused +# progress messages. Those set by INFOSECS are also basically +# progress messages (e.g., that a prompted input has been canceled) +# and should have the shortest pause. Those set by MESSAGESECS are +# informational (e.g., that a function is disabled) and should have +# a pause of intermediate duration. Those set by ALERTSECS typically +# report a serious problem and should be paused long enough to read +# whenever they appear (typically unexpectedly). The default values +# are defined in userdefs.h, and can be modified here should longer +# pauses be desired for braille-based access to Lynx. +# +# SVr4-curses implementations support time delays in milliseconds, +# hence the value may be given shorter, e.g., 0.5 +# +# Use the NO_PAUSE option (like the command-line -nopause) to override +# all of the delay times. +# +#INFOSECS:1 +#MESSAGESECS:2 +#ALERTSECS:3 +NO_PAUSE:TRUE + +.h2 DEBUGSECS +# Set DEBUGSECS to a nonzero value to slow down progress messages +# (see "-delay" option). +#DEBUGSECS:0 + +.h2 REPLAYSECS +# Set REPLAYSECS to a nonzero value to allow for slow replaying of +# command scripts (see "-cmd_script" option). +#REPLAYSECS:0 + +.h1 Appearance +# These settings control the appearance of Lynx's screen and the way +# Lynx renders some tags. + +.h2 USE_SELECT_POPUPS +# If USE_SELECT_POPUPS is set FALSE, Lynx will present a vertical list of +# radio buttons for the OPTIONs in SELECT blocks which lack the MULTIPLE +# attribute, instead of using a popup menu. Note that if the MULTIPLE +# attribute is present in the SELECT start tag, Lynx always will create a +# vertical list of checkboxes for the OPTIONs. +# The default defined here or in userdefs.h can be changed via the 'o'ptions +# menu and saved in the RC file, and always can be toggled via the -popup +# command line switch. +# +#USE_SELECT_POPUPS:TRUE + +.h2 SHOW_CURSOR +# SHOW_CURSOR controls whether or not the cursor is hidden or appears +# over the current link in documents or the current option in popups. +# Showing the cursor is handy if you are a sighted user with a poor +# terminal that can't do bold and reverse video at the same time or +# at all. It also can be useful to blind users, as an alternative +# or supplement to setting LINKS_AND_FIELDS_ARE_NUMBERED or +# LINKS_ARE_NUMBERED. +# The default defined here or in userdefs.h can be changed via the +# 'o'ptions menu and saved in the RC file, and always can be toggled +# via the -show_cursor command line switch. +# +SHOW_CURSOR:TRUE + +.h2 UNDERLINE_LINKS +# UNDERLINE_LINKS controls whether links are underlined by default, or shown +# in bold. Normally this default is set from the configure script. +# +UNDERLINE_LINKS:TRUE + +.h2 BOLD_HEADERS +# If BOLD_HEADERS is set to TRUE the HT_BOLD default style will be acted +# upon for

through

headers. The compilation default is FALSE +# (only the indentation styles are acted upon, but see BOLD_H1, below). +# On Unix, compilation with -DUNDERLINE_LINKS also will apply to the +# HT_BOLD style for headers when BOLD_HEADERS is TRUE. +# +#BOLD_HEADERS:FALSE + +.h2 BOLD_H1 +# If BOLD_H1 is set to TRUE the HT_BOLD default style will be acted +# upon for

headers even if BOLD_HEADERS is FALSE. The compilation +# default is FALSE. On Unix, compilation with -DUNDERLINE_LINKS also +# will apply to the HT_BOLD style for headers when BOLD_H1 is TRUE. +# +BOLD_H1:TRUE + +.h2 BOLD_NAME_ANCHORS +# If BOLD_NAME_ANCHORS is set to TRUE the content of anchors without +# an HREF attribute, (i.e., anchors with a NAME or ID attribute) will +# have the HT_BOLD default style. The compilation default is FALSE. +# On Unix, compilation with -DUNDERLINE_LINKS also will apply to the +# HT_BOLD style for NAME (ID) anchors when BOLD_NAME_ANCHORS is TRUE. +# +#BOLD_NAME_ANCHORS:FALSE + +.h1 Internal Behavior + +.h2 DEFAULT_CACHE_SIZE +.h2 DEFAULT_VIRTUAL_MEMORY_SIZE +# The DEFAULT_CACHE_SIZE specifies the number of WWW documents to be +# cached in memory at one time. +# +# This so-called cache size (actually, number) is defined in userdefs.h and +# may be modified here and/or with the command line argument -cache=NUMBER +# The minimum allowed value is 2, for the current document and at least one +# to fetch, and there is no absolute maximum number of cached documents. +# On Unix, and VMS not compiled with VAXC, whenever the number is exceeded +# the least recently displayed document will be removed from memory. +# +# On VMS compiled with VAXC, the DEFAULT_VIRTUAL_MEMORY_SIZE specifies the +# amount (bytes) of virtual memory that can be allocated and not yet be freed +# before previous documents are removed from memory. If the values for both +# the DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE are exceeded, then +# the least recently displayed documents will be freed until one or the other +# value is no longer exceeded. The default value is defined in userdefs.h. +# +# The Unix and VMS (but not VAXC) implementations use the C library malloc's +# and calloc's for memory allocation, but procedures for taking the actual +# amount of cache into account still need to be developed. They use only +# the DEFAULT_CACHE_SIZE value, and that specifies the absolute maximum +# number of documents to cache (rather than the maximum number only if +# DEFAULT_VIRTUAL_MEMORY_SIZE has been exceeded, as with VAXC/VAX). +# +#DEFAULT_CACHE_SIZE:10 +#DEFAULT_VIRTUAL_MEMORY_SIZE:512000 + +.h2 SOURCE_CACHE +# SOURCE_CACHE sets the source caching behavior for Lynx: +# +# FILE causes Lynx to keep a temporary file for each cached document +# containing the HTML source of the document, which it uses to regenerate +# the document when certain settings are changed (for instance, +# historical vs. minimal vs. valid comment parsing) instead of reloading +# the source from the network. +# +# MEMORY is like FILE, except the document source is kept in memory. You +# may wish to adjust DEFAULT_CACHE_SIZE and DEFAULT_VIRTUAL_MEMORY_SIZE +# accordingly. +# +# NONE is the default; the document source is not cached, and is reloaded +# from the network when needed. +# +#SOURCE_CACHE:NONE + +.h2 SOURCE_CACHE_FOR_ABORTED +# This setting controls what will happen with cached source for the document +# being fetched from the net if fetching was aborted (either user pressed +# 'z' or network went down). If set to KEEP, the source fetched so far will +# be preserved (and used as cache), if set to DROP lynx will drop the +# source cache for that document (i.e. only completely downloaded documents +# will be cached in that case). +#SOURCE_CACHE_FOR_ABORTED:DROP + +.h2 ALWAYS_RESUBMIT_POSTS +# If ALWAYS_RESUBMIT_POSTS is set TRUE, Lynx always will resubmit forms +# with method POST, dumping any cache from a previous submission of the +# form, including when the document returned by that form is sought with +# the PREV_DOC command or via the history list. Lynx always resubmits +# forms with method POST when a submit button or a submitting text input +# is activated, but normally retrieves the previously returned document +# if it had links which you activated, and then go back with the PREV_DOC +# command or via the history list. +# +# The default defined here or in userdefs.h can be toggled via +# the -resubmit_forms command line switch. +# +#ALWAYS_RESUBMIT_POSTS:FALSE + +.h2 TRIM_INPUT_FIELDS +# If TRIM_INPUT_FIELDS is set TRUE, Lynx will trim trailing whitespace (e.g., +# space, tab, carriage return, line feed and form feed) from the text entered +# into form text and textarea fields. Older versions of Lynx do this trimming +# unconditionally, but other browsers do not, which would yield different +# behavior for CGI scripts. +#TRIM_INPUT_FIELDS:FALSE + +.h1 HTML Parsing + +.h2 NO_ISMAP_IF_USEMAP +# If NO_ISMAP_IF_USEMAP is set TRUE, Lynx will not include a link to the +# server-side image map if both a server-side and client-side map for the +# same image is indicated in the HTML markup. The compilation default is +# FALSE, such that a link with "[ISMAP]" as the link name, followed by a +# hyphen, will be prepended to the ALT string or "[USEMAP]" pseudo-ALT for +# accessing Lynx's text-based rendition of the client-side map (based on +# the content of the associated MAP element). If the "[ISMAP]" link is +# activated, Lynx will send a 0,0 coordinate pair to the server, which +# Lynx-friendly sites can map to a for-text-client document, homologous +# to what is intended for the content of a FIG element. +# +# The compilation default, or default defined here, can be toggled via +# the "-ismap" command line switch. +# +#NO_ISMAP_IF_USEMAP:FALSE + +.h2 SEEK_FRAG_MAP_IN_CUR +# If SEEK_FRAG_MAP_IN_CUR is set FALSE, then USEMAP attribute values +# (in IMG or OBJECT tags) consisting of only a fragment (USEMAP="#foo") +# will be resolved with respect to the current document's base, which +# might not be the same as the current document's URL. +# The compilation default is to use the current document's URL in all +# cases (i.e., assume the MAP is present below, if it wasn't present +# above the point in the HTML stream where the USEMAP attribute was +# detected). Lynx's present "single pass" rendering engine precludes +# checking below before making the decision on how to resolve a USEMAP +# reference consisting solely of a fragment. +# +#SEEK_FRAG_MAP_IN_CUR:TRUE + +.h2 SEEK_FRAG_AREA_IN_CUR +# If SEEK_FRAG_AREA_IN_CUR is set FALSE, then HREF attribute values +# in AREA tags consisting of only a fragment (HREF="#foo") will be +# resolved with respect to the current document's base, which might +# not be the same as the current document's URL. The compilation +# default is to use the current document's URL, as is done for the +# HREF attribute values of Anchors and LINKs that consist solely of +# a fragment. +# +#SEEK_FRAG_AREA_IN_CUR:TRUE + +.h1 CGI scripts +# These settings control Lynx's ability to execute various types of scripts. + +.h2 LOCAL_EXECUTION_LINKS_ALWAYS_ON +.h2 LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE +# Local execution links and scripts are by default completely disabled, +# unless a change is made to the userdefs.h file to enable them or +# the configure script is used with the corresponding options +# (-enable-exec-links and -enable-exec-scripts). +# See the Lynx source code distribution and the userdefs.h +# file for more detail on enabling execution links and scripts. +# +# If you have enabled execution links or scripts the following +# two variables control Lynx's action when an execution link +# or script is encountered. +# +# If LOCAL_EXECUTION_LINKS_ALWAYS_ON is set to TRUE any execution +# link or script will be executed no matter where it came from. +# This is EXTREMELY dangerous. Since Lynx can access files from +# anywhere in the world, you may encounter links or scripts that +# will cause damage or compromise the security of your system. +# +# If LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE is set to TRUE only +# links or scripts that reside on the local machine and are +# referenced with a URL beginning with "file://localhost/" or meet +# TRUSTED_EXEC or ALWAYS_TRUSTED_EXEC rules (see below) will be +# executed. This is much less dangerous than enabling all execution +# links, but can still be dangerous. +# +#LOCAL_EXECUTION_LINKS_ALWAYS_ON:FALSE +#LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:FALSE + +.h2 TRUSTED_EXEC +# If LOCAL_EXECUTION_LINK_ON_BUT_NOT_REMOTE is TRUE, and no TRUSTED_EXEC +# rule is defined, it defaults to "file://localhost/" and any lynxexec +# or lynxprog command will be permitted if it was referenced from within +# a document whose URL begins with that string. If you wish to restrict the +# referencing URLs further, you can extend the string to include a trusted +# path. You also can specify a trusted directory for http URLs, which will +# then be treated as if they were local rather than remote. For example: +# +# TRUSTED_EXEC:file://localhost/trusted/ +# TRUSTED_EXEC:http://www.wfbr.edu/trusted/ +# +# If you also wish to restrict the commands which can be executed, create +# a series of rules with the path (Unix) or command name (VMS) following +# the string, separated by a tab. For example: +# +# Unix: +# ==== +# TRUSTED_EXEC:file://localhost//bin/cp +# TRUSTED_EXEC:file://localhost//bin/rm +# VMS: +# === +# TRUSTED_EXEC:file://localhost/copy +# TRUSTED_EXEC:file://localhost/delete +# +# Once you specify a TRUSTED_EXEC referencing string, the default is +# replaced, and all the referencing strings you desire must be specified +# as a series. Similarly, if you associate a command with the referencing +# string, you must specify all of the allowable commands as a series of +# TRUSTED_EXEC rules for that string. If you specify ALWAYS_TRUSTED_EXEC +# rules below, you need not repeat them as TRUSTED_EXEC rules. +# +# If EXEC_LINKS and JUMPFILE have been defined, any lynxexec or lynxprog +# URLs in that file will be permitted, regardless of other settings. If +# you also set LOCAL_EXECUTION_LINKS_ON_BUT_NOT_REMOTE:TRUE and a single +# TRUSTED_EXEC rule that will always fail (e.g., "none"), then *ONLY* the +# lynxexec or lynxprog URLs in JUMPFILE (and any ALWAYS_TRUSTED_EXEC rules, +# see below) will be allowed. Note, however, that if Lynx was compiled with +# CAN_ANONYMOUS_JUMP set to FALSE (default is TRUE), or -restrictions=jump +# is included with the -anonymous switch at run time, then users of an +# anonymous account will not be able to access the jumps file or enter +# 'j'ump shortcuts, and this selective execution feature will be overridden +# as well (i.e., they will only be able to access lynxexec or lynxprog +# URLs which meet any ALWAYS_TRUSTED_EXEC rules). +# +#TRUSTED_EXEC:none + +.h2 ALWAYS_TRUSTED_EXEC +# If EXEC_LINKS was defined, any lynxexec or lynxprog URL can be made +# always enabled by an ALWAYS_TRUSTED_EXEC rule for it. This is useful for +# anonymous accounts in which you have disabled execution links generally, +# and may also have disabled jumps file links, but still want to allow +# execution of particular utility scripts or programs. The format is +# like that for TRUSTED_EXEC. For example: +# +# Unix: +# ==== +# ALWAYS_TRUSTED_EXEC:file://localhost//usr/local/kinetic/bin/usertime +# ALWAYS_TRUSTED_EXEC:http://www.more.net//usr/local/kinetic/bin/who.sh +# VMS: +# === +# ALWAYS_TRUSTED_EXEC:file://localhost/usertime +# ALWAYS_TRUSTED_EXEC:http://www.more.net/show users +# +# The default ALWAYS_TRUSTED_EXEC rule is "none". +# +#ALWAYS_TRUSTED_EXEC:none + +.h2 TRUSTED_LYNXCGI +# Unix: +# ===== +# TRUSTED_LYNXCGI rules define the permitted sources and/or paths for +# lynxcgi links (if LYNXCGI_LINKS is defined in userdefs.h). The format +# is the same as for TRUSTED_EXEC rules (see above). Example rules: +# +# TRUSTED_LYNXCGI:file://localhost/ +# TRUSTED_LYNXCGI:/usr/local/etc/httpd/cgi-bin/ +# TRUSTED_LYNXCGI:file://localhost//usr/local/www/cgi-bin/ +# +# VMS: +# ==== +# Do not define this. +# +# The default TRUSTED_LYNXCGI rule is "none". +# +TRUSTED_LYNXCGI:none + +.h2 LYNXCGI_ENVIRONMENT +# Unix: +# ===== +# LYNXCGI_ENVIRONMENT adds the current value of the specified +# environment variable to the list of environment variables passed on to the +# lynxcgi script. Useful variables are HOME, USER, etc... If proxies +# are in use, and the script invokes another copy of lynx (or a program like +# wget) in a subsidiary role, it can be useful to add http_proxy and other +# *_proxy variables. +# +# VMS: +# ==== +# Do not define this. +# +#LYNXCGI_ENVIRONMENT: + +.h2 LYNXCGI_DOCUMENT_ROOT +# Unix: +# ===== +# LYNXCGI_DOCUMENT_ROOT is the value of DOCUMENT_ROOT that will be passed +# to lynxcgi scripts. If set and the URL has PATH_INFO data, then +# PATH_TRANSLATED will also be generated. Examples: +# LYNXCGI_DOCUMENT_ROOT:/usr/local/etc/httpd/htdocs +# LYNXCGI_DOCUMENT_ROOT:/data/htdocs/ +# +# VMS: +# ==== +# Do not define this. +# +#LYNXCGI_DOCUMENT_ROOT: + +.h1 Cookies + +.h2 FORCE_SSL_COOKIES_SECURE +# If FORCE_SSL_COOKIES_SECURE is set to TRUE, then SSL encrypted cookies +# received from https servers never will be sent unencrypted to http +# servers. The compilation default is to impose this block only if the +# https server included a secure attribute for the cookie. The normal +# default or that defined here can be toggled via the -force_secure +# command line switch. +# +#FORCE_SSL_COOKIES_SECURE:FALSE + +.h1 Internal Behavior + +.h2 MAIL_SYSTEM_ERROR_LOGGING +# MAIL_SYSTEM_ERROR_LOGGING will send a message to the owner of +# the information, or ALERTMAIL if there is no owner, every time +# that a document cannot be accessed! +# +# NOTE: This can generate A LOT of mail, be warned. +# +#MAIL_SYSTEM_ERROR_LOGGING:FALSE + +.h2 CHECKMAIL +# If CHECKMAIL is set to TRUE, the user will be informed (via a statusline +# message) about the existence of any unread mail at startup of Lynx, and +# will get statusline messages if subsequent new mail arrives. If a jumps +# file with a lynxprog URL for invoking mail is available, or your html +# pages include an mail launch file URL, the user thereby can access mail +# and read the messages. The checks and statusline reports will not be +# performed if Lynx has been invoked with the -restrictions=mail switch. +# +# VMS USERS !!! +# ============= +# New mail is normally broadcast as it arrives, via "unsolicited screen +# broadcasts", which can be "wiped" from the Lynx display via the Ctrl-W +# command. You may prefer to disable the broadcasts and use CHECKMAIL +# instead (e.g., in a public account which will be used by people who +# are ignorant about VMS). +# +#CHECKMAIL:FALSE + +.h1 News-groups + +.h2 NNTPSERVER +# To enable news reading ability via Lynx, the environment variable NNTPSERVER +# must be set so that it points to your site's NNTP server +# (see Lynx Users Guide on environment variables). +# Lynx respects RFC 1738 +.url http://tools.ietf.org/html/rfc1738 +# and does not accept a host field in news URLs (use nntp: instead of news: for +# the scheme if you wish to specify an NNTP host in a URL, as explained in the +# RFC). If you have not set the variable externally, you can set it at run +# time via this configuration file. It will not override an external setting. +# Note that on VMS it is set as a process logical rather than symbol, and will +# outlive the Lynx image. +# The news reading facility in Lynx is quite limited. Lynx does not provide a +# full featured news reader with elaborate error checking and safety features. +# +#NNTPSERVER:news.server.dom + +.h2 LIST_NEWS_NUMBERS +# If LIST_NEWS_NUMBERS is set TRUE, Lynx will use an ordered list and include +# the numbers of articles in news listings, instead of using an unordered +# list. The default is defined in userdefs.h, and can be overridden here. +# +#LIST_NEWS_NUMBERS:FALSE + +.h2 LIST_NEWS_DATES +# If LIST_NEWS_DATES is set TRUE, Lynx will include the dates of articles in +# news listings. The dates always are included in the articles, themselves. +# The default is defined in userdefs.h, and can be overridden here. +# +#LIST_NEWS_DATES:FALSE + +.h2 NEWS_CHUNK_SIZE +.h2 NEWS_MAX_CHUNK +# NEWS_CHUNK_SIZE and NEWS_MAX_CHUNK regulate the chunking of news article +# listings with inclusion of links for listing earlier and/or later articles. +# The defaults are defined in HTNews.c as 30 and 40, respectively. If the +# news group contains more than NEWS_MAX_CHUNK articles, they will be listed +# in NEWS_CHUNK_SIZE chunks. You can change the defaults here, and/or on +# the command line via -newschunksize=NUMBER and/or -newsmaxchunk=NUMBER +# switches. Note that if the chunk size is increased, here or on the command +# line, to a value greater than the current maximum, the maximum will be +# increased to that number. Conversely, if the maximum is set to a number +# less than the current chunk size, the chunk size will be reduced to that +# number. Thus, you need use only one of the two switches on the command +# line, based on the direction of intended change relative to the compilation +# or configuration defaults. The compilation defaults ensure that there will +# be at least 10 earlier articles before bothering to chunk and create a link +# for earlier articles. +# +#NEWS_CHUNK_SIZE:30 +#NEWS_MAX_CHUNK:40 + +.h2 NEWS_POSTING +# Set NEWS_POSTING to FALSE if you do not want to support posting to +# news groups via Lynx. If left TRUE, Lynx will use its news gateway to +# post new messages or followups to news groups, using the URL schemes +# described in the "Supported URLs" section of the online 'h'elp. The +# posts will be attempted via the nntp server specified in the URL, or +# if none was specified, via the NNTPSERVER configuration or environment +# variable. Links with these URLs for posting or sending followups are +# created by the news gateway when reading group listings or articles +# from nntp servers if the server indicates that it permits posting. +# The compilation default set in userdefs.h can be changed here. If +# the default is TRUE, posting can still be disallowed via the +# -restrictions command line switch. +# The posting facility in Lynx is quite limited. Lynx does not provide a +# full featured news poster with elaborate error checking and safety features. +# +#NEWS_POSTING:TRUE + +.h2 LYNX_SIG_FILE +# LYNX_SIG_FILE defines the name of a file containing a signature which +# can be appended to email messages and news postings or followups. The +# user will be prompted whether to append it. It is sought in the home +# directory. If it is in a subdirectory, begin it with a dot-slash +# (e.g., ./lynx/.lynxsig). The definition is set in userdefs.h and can +# be changed here. +# +#LYNX_SIG_FILE:.lynxsig + +.h1 Bibliographic Protocol (bibp scheme) + +.h2 BIBP_GLOBAL_SERVER +# BIBP_GLOBAL_SERVER is the default global server for bibp: links, used +# when a local bibhost or document-specified citehost is unavailable. +# Set in userdefs.h and can be changed here. +#BIBP_GLOBAL_SERVER:http://usin.org/ + +.h2 BIBP_BIBHOST +# BIBP_BIBHOST is the URL at which local bibp service may be found, if +# it exists. Defaults to http://bibhost/ for protocol conformance, but +# may be overridden here or via -bibhost parameter. +#BIBP_BIBHOST:http://bibhost/ + +.h1 Interaction +# These settings control interaction of the user with lynx. + +.h2 SCROLLBAR +# If SCROLLBAR is set TRUE, Lynx will show scrollbar on windows. With mouse +# enabled, the scrollbar strip outside the bar is clickable, and scrolls the +# window by pages. The appearance of the scrollbar can be changed from +# LYNX_LSS file: define attributes scroll.bar, scroll.back (for the bar, and +# for the strip along which the scrollbar moves). +#SCROLLBAR:FALSE + +.h2 SCROLLBAR_ARROW +# If SCROLLBAR_ARROW is set TRUE, Lynx's scrollbar will have arrows at the +# ends. With mouse enabled, the arrows are clickable, and scroll the window by +# 2 lines. The appearance of the scrollbar arrows can be changed from LYNX_LSS +# file: define attributes scroll.arrow, scroll.noarrow (for enabled-arrows, +# and disabled arrows). An arrow is "disabled" if the bar is at this end of +# the strip. +#SCROLLBAR_ARROW:TRUE + +.h2 USE_MOUSE +# If Lynx is configured with ncurses, PDcurses or slang & USE_MOUSE is TRUE, +# users can perform commands by left-clicking certain parts of the screen: +# on a link = `g'oto + ACTIVATE (i.e., move highlight & follow the link); +# on the top/bottom lines = PREV/NEXT_PAGE (i.e., go up/down 1 page); +# on the top/bottom left corners = PREV/NEXT_DOC (i.e., go to the previous +# document / undo goto previous document); +# on the top/bottom right corners = HISTORY/VLINKS (i.e., call up the history +# page or visited links page if on history page). +# NB if the mouse is defined in this way, it will not be available +# for copy/paste operations using the clipboard of a desktop manager: +# for flexibility instead, use the command-line switch -use_mouse . +# +# ncurses and slang have built-in support for the xterm mouse protocol. In +# addition, ncurses can be linked with the gpm mouse library, to automatically +# provide support for this interface in applications such as Lynx. (Please +# read the ncurses faq to work around broken gpm configurations packaged by +# some distributors). PDCurses implements mouse support for win32 console +# windows, as does slang. +#USE_MOUSE:FALSE + +.h1 HTML Parsing +# These settings control the way Lynx parses invalid HTML +# and how it may resolve such issues. + +.h2 COLLAPSE_BR_TAGS +# If COLLAPSE_BR_TAGS is set FALSE, Lynx will not collapse serial BR tags. +# If set TRUE, two or more concurrent BRs will be collapsed into a single +# line break. Note that the valid way to insert extra blank lines in HTML +# is via a PRE block with only newlines in the block. +# +#COLLAPSE_BR_TAGS:TRUE + +.h2 TRIM_BLANK_LINES +# If TRIM_BLANK_LINES is set FALSE, Lynx will not trim trailing blank lines +# from the document. Also, Lynx will not collapse BR-tags onto the previous +# line when it happens to be empty. +#TRIM_BLANK_LINES:TRUE + +.h2 TAGSOUP +# If TAGSOUP is set, Lynx uses the "Tag Soup DTD" rather than "SortaSGML". +# The two approaches differ by the style of error detection and recovery. +# Tag Soup DTD allows for improperly nested tags; SortaSGML is stricter. +#TAGSOUP:FALSE + +.h1 Cookies + +.h2 SET_COOKIES +# If SET_COOKIES is set FALSE, Lynx will ignore Set-Cookie headers +# in http server replies. Note that if a COOKIE_FILE is in use (see +# below) that contains cookies at startup, Lynx will still send those +# persistent cookies in requests as appropriate. Setting SET_COOKIES +# to FALSE just prevents accepting any new cookies from servers. To +# prevent all cookie processing (sending *and* receiving) in a session, +# make sure that PERSISTENT_COOKIES is not TRUE or that COOKIE_FILE does +# not point to a file with cookies, in addition to setting SET_COOKIES +# to FALSE. +# The default is defined in userdefs.h, and can be overridden here, +# and/or toggled via the -cookies command line switch. +# +#SET_COOKIES:TRUE + +.h2 ACCEPT_ALL_COOKIES +# If ACCEPT_ALL_COOKIES is set TRUE, Lynx will accept cookies from all +# domains with no user interaction. This is equivalent to automatically +# replying to all cookie 'Allow?' prompts with 'A'lways. Note that it +# does not preempt validity checking, which has to be controlled separately +# (see below). +# The default is defined in userdefs.h and can be overridden here, or +# in the .lynxrc file via an o(ptions) screen setting. It may also be +# toggled via the -accept_all_cookies command line switch. +# +#ACCEPT_ALL_COOKIES:FALSE + +.h2 COOKIE_ACCEPT_DOMAINS +.h2 COOKIE_REJECT_DOMAINS +# COOKIE_ACCEPT_DOMAINS and COOKIE_REJECT_DOMAINS are comma-delimited lists +# of domains from which Lynx should automatically accept or reject cookies +# without asking for confirmation. If the same domain is specified in both +# lists, rejection will take precedence. +# Note that in order to match cookies, domains have to be spelled out exactly +# in the form in which they would appear on the Cookie Jar page (case is +# insignificant). They are not wildcards. Domains that apply to more than +# one host have a leading '.', but have to match *the cookie's* domain +# exactly. +# +#COOKIE_ACCEPT_DOMAINS: +#COOKIE_REJECT_DOMAINS: + +.h2 COOKIE_LOOSE_INVALID_DOMAINS +.h2 COOKIE_STRICT_INVALID_DOMAINS +.h2 COOKIE_QUERY_INVALID_DOMAINS +# COOKIE_LOOSE_INVALID_DOMAINS, COOKIE_STRICT_INVALID_DOMAINS, and +# COOKIE_QUERY_INVALID_DOMAINS are comma-delimited lists of domains. +# They control the degree of validity checking that is applied to cookies +# for the specified domains. +# Note that in order to match cookies, domains have to be spelled out exactly +# in the form in which they would appear on the Cookie Jar page (case is +# insignificant). They are not wildcards. Domains that apply to more than +# one host have a leading '.', but have to match *the cookie's* domain +# exactly. +# If a domain is set to strict checking, strict conformance to RFC 2109 will +# be applied. A domain with loose checking will be allowed to set cookies +# with an invalid path or domain attribute. All domains will default to +# asking the user for confirmation in case of an invalid path or domain. +# Cookie validity checking takes place as a separate step before the +# final decision to accept or reject (see previous options), therefore +# a cookie that passes validity checking may still be automatically +# rejected or cause another prompt. +# +#COOKIE_LOOSE_INVALID_DOMAINS: +#COOKIE_STRICT_INVALID_DOMAINS: +#COOKIE_QUERY_INVALID_DOMAINS: + +.h2 MAX_COOKIES_DOMAIN +.h2 MAX_COOKIES_GLOBAL +.h2 MAX_COOKIES_BUFFER +# MAX_COOKIES_DOMAIN, +# MAX_COOKIES_GLOBAL and +# MAX_COOKIES_BUFFER are limits on the total number of cookies for each domain, +# globally, and the per-cookie buffer size. These limits are by default large +# enough for reasonable usage; if they are very high, some sites may present +# undue performance waste. +# +#MAX_COOKIES_DOMAIN:50 +#MAX_COOKIES_GLOBAL:500 +#MAX_COOKIES_BUFFER:4096 + +.h2 PERSISTENT_COOKIES +# PERSISTENT_COOKIES indicates that cookies should be read at startup from +# the COOKIE_FILE, and saved at exit for storage between Lynx sessions. +# It is not used if Lynx was compiled without USE_PERSISTENT_COOKIES. +# The default is FALSE, so that the feature needs to be enabled here +# explicitly if you want it. +# +#PERSISTENT_COOKIES:FALSE + +.h2 COOKIE_FILE +# COOKIE_FILE is the default file from which persistent cookies are read +# at startup (if the file exists), if Lynx was compiled with +# USE_PERSISTENT_COOKIES and the PERSISTENT_COOKIES option is enabled. +# The cookie file can also be specified in .lynxrc or on the command line. +# +#COOKIE_FILE:~/.lynx_cookies + +.h2 COOKIE_SAVE_FILE +# COOKIE_SAVE_FILE is the default file in which persistent cookies are +# stored at exit, if Lynx was compiled with USE_PERSISTENT_COOKIES and the +# PERSISTENT_COOKIES option is enabled. The cookie save file can also be +# specified on the command line. +# +# With an interactive Lynx session, COOKIE_SAVE_FILE will default to +# COOKIE_FILE if it is not set. With a non-interactive Lynx session (e.g., +# -dump), cookies will only be saved to file if COOKIE_SAVE_FILE is set. +# +#COOKIE_SAVE_FILE:~/.lynx_cookies + +.h1 Mail-related + +.h2 SYSTEM_MAIL +.h2 SYSTEM_MAIL_FLAGS +# VMS: +# === +# The mail command and qualifiers are defined in userdefs.h. Lynx +# will spawn a subprocess to send replies and error messages. The +# command, and qualifiers (if any), can be re-defined here. If +# you use PMDF then headers will we passed via a header file. +# If you use "generic" VMS MAIL, the subject will be passed on the +# command line via a /subject="SUBJECT" qualifier, and inclusion +# of other relevant headers may not be possible. +# If your mailer uses another syntax, some hacking of the mailform() +# mailmsg() and reply_by_mail() functions in LYMail.c, and send_file_to_mail() +# function in LYPrint.c, may be required. +# +.ex 2 +#SYSTEM_MAIL:PMDF SEND +#SYSTEM_MAIL_FLAGS:/headers +# +.ex 2 +#SYSTEM_MAIL:MAIL +#SYSTEM_MAIL_FLAGS: +# +# Unix: +#====== +# The mail path and flags normally are defined for sendmail (or submit +# with MMDF) in userdefs.h. You can change them here, but should first +# read the zillions of CERT advisories about security problems with Unix +# mailers. +# +.ex 2 +#SYSTEM_MAIL:/usr/mmdf/bin/submit +#SYSTEM_MAIL_FLAGS:-mlruxto,cc\* +# +.ex 2 +#SYSTEM_MAIL:/usr/sbin/sendmail +#SYSTEM_MAIL_FLAGS:-t -oi +# +.ex 2 +#SYSTEM_MAIL:/usr/lib/sendmail +#SYSTEM_MAIL_FLAGS:-t -oi +# +# Win32: +#======= +# The Win32 port assumes that the mailer cannot read via a pipe. That is, it +# must read all information from files. The "sendmail" utility in the 2.8.1 +# release is able to work with that assumption. There is no way to tell the +# Win32 port of Lynx to send its information to the sendmail utility via a +# pipe. +# +# Please read sendmail.txt in the LYNX_W32.ZIP distribution +.url http://invisible-mirror.net/archives/lynx/tarballs/lynx2.8.1_w32.zip +.url ftp://ftp.invisible-island.net/lynx/tarballs/lynx2.8.1_w32.zip +# +# As an alternative, the newer "sendmail for windows" may be useful: +.url http://glob.com.au/sendmail/ +# +# See also BLAT_MAIL and ALT_BLAT_MAIL flags. +# +#SYSTEM_MAIL:sendmail -f me@my.host -h my.host -r my.smtp.mailer -m SMTP + +.h2 MAIL_ADRS +# VMS ONLY: +# ======== +# MAIL_ADRS is defined in userdefs.h and normally is structured for PMDF's +# IN%"INTERNET_ADDRESS" scheme. The %s is replaced with the address given +# by the user. If you are using a different Internet mail transport, change +# the IN appropriately (e.g., to SMTP, MX, or WINS). +# +#MAIL_ADRS:"IN%%""%s""" + +.h2 USE_FIXED_RECORDS +# VMS ONLY: +# ======== +# If USE_FIXED_RECORDS is set to TRUE here or in userdefs.h, Lynx will +# convert 'd'ownloaded binary files to FIXED 512 record format before saving +# them to disk or acting on a DOWNLOADER option. If set to FALSE, the +# headers of such files will indicate that they are Stream_LF with Implied +# Carriage Control, which is incorrect, and can cause downloading software +# to get confused and unhappy. If you do set it FALSE, you can use the +# FIXED512.COM command file, which is included in this distribution, to do +# the conversion externally. +# +#USE_FIXED_RECORDS:TRUE + +.h1 Keyboard Input +# These settings control the way Lynx interprets user input. + +.h2 VI_KEYS_ALWAYS_ON +.h2 EMACS_KEYS_ALWAYS_ON +# Vi or Emacs movement keys, i.e. familiar hjkl or ^N^P^F^B . +# These are defaults, which can be changed in the Options Menu or .lynxrc . +VI_KEYS_ALWAYS_ON:TRUE +#EMACS_KEYS_ALWAYS_ON:FALSE + +.h2 DEFAULT_KEYPAD_MODE +# DEFAULT_KEYPAD_MODE may be set to NUMBERS_AS_ARROWS +# or LINKS_ARE_NOT_NUMBERED (the same) +# or LINKS_ARE_NUMBERED +# or LINKS_AND_FIELDS_ARE_NUMBERED +# or FIELDS_ARE_NUMBERED +# to specify whether numbers (e.g. [10]) appear next to all links, +# allowing immediate access by entering the number on the keyboard, +# or numbers on the numeric key-pad work like arrows; +# the "FIELDS" options cause form fields also to be numbered. +# This may be overridden by the keypad_mode setting in .lynxrc, +# and can also be changed via the Options Menu. +# +#DEFAULT_KEYPAD_MODE:NUMBERS_AS_ARROWS + +.h2 NUMBER_LINKS_ON_LEFT +.h2 NUMBER_FIELDS_ON_LEFT +# Denotes the position for link- and field-numbers (whether it is on the left +# or right of the anchor). These are subject to DEFAULT_KEYPAD_MODE, which +# determines whether numbers are shown. +#NUMBER_LINKS_ON_LEFT:TRUE +#NUMBER_FIELDS_ON_LEFT:TRUE + +.h2 DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS +# Obsolete form of DEFAULT_KEYPAD_MODE, +# numbers work like arrows or numbered links. +# Set to TRUE, indicates numbers act as arrows, +# and set to FALSE indicates numbers refer to numbered links on the page. +# LINKS_AND_FIELDS_ARE_NUMBERED cannot be set by this option because +# it allows only two values (true and false). +# +#DEFAULT_KEYPAD_MODE_IS_NUMBERS_AS_ARROWS:TRUE + +.h2 CASE_SENSITIVE_ALWAYS_ON +# The default search type. +# This is a default that can be overridden by the user! +# +#CASE_SENSITIVE_ALWAYS_ON:FALSE + +.h1 Auxiliary Facilities + +.h2 DEFAULT_BOOKMARK_FILE +# DEFAULT_BOOKMARK_FILE is the filename used for storing personal bookmarks. +# It will be prepended by the user's home directory. +# NOTE that a file ending in .html or other suffix mapped to text/html +# should be used to ensure its treatment as HTML. The built-in default +# is lynx_bookmarks.html. On both Unix and VMS, if a subdirectory off of +# the HOME directory is desired, the path should begin with "./" (e.g., +# ./BM/lynx_bookmarks.html), but the subdirectory must already exist. +# Lynx will create the bookmark file, if it does not already exist, on +# the first ADD_BOOKMARK attempt if the HOME directory is indicated +# (i.e., if the definition is just filename.html without any slashes), +# but requires a pre-existing subdirectory to create the file there. +# The user can re-define the default bookmark file, as well as a set +# of sub-bookmark files if multiple bookmark file support is enabled +# (see below), via the 'o'ptions menu, and can save those definitions +# in the .lynxrc file. +# +#DEFAULT_BOOKMARK_FILE:lynx_bookmarks.html + +.h2 MULTI_BOOKMARK_SUPPORT +# If MULTI_BOOKMARK_SUPPORT is set TRUE, and BLOCK_MULTI_BOOKMARKS (see +# below) is FALSE, and sub-bookmarks exist, all bookmark operations will +# first prompt the user to select an active sub-bookmark file or the +# default bookmark file. FALSE is the default so that one (the default) +# bookmark file will be available initially. The definition here will +# override that in userdefs.h. The user can turn on multiple bookmark +# support via the 'o'ptions menu, and can save that choice as the startup +# default via the .lynxrc file. When on, the setting can be STANDARD or +# ADVANCED. If SUPPORT is set to the latter, and the user mode also is +# ADVANCED, the VIEW_BOOKMARK command will invoke a statusline prompt at +# which the user can enter the letter token (A - Z) of the desired bookmark, +# or '=' to get a menu of available bookmark files. The menu always is +# presented in NOVICE or INTERMEDIATE mode, or if the SUPPORT is set to +# STANDARD. No prompting or menu display occurs if only one (the startup +# default) bookmark file has been defined (define additional ones via the +# 'o'ptions menu). The startup default, however set, can be overridden on +# the command line via the -restrictions=multibook or the -anonymous or +# -validate switches. +# +#MULTI_BOOKMARK_SUPPORT:FALSE + +.h2 BLOCK_MULTI_BOOKMARKS +# If BLOCK_MULTI_BOOKMARKS is set TRUE, multiple bookmark support will +# be forced off, and cannot to toggled on via the 'o'ptions menu. The +# compilation setting is normally FALSE, and can be overridden here. +# It can also be set via the -restrictions=multibook or the -anonymous +# or -validate command line switches. +# +#BLOCK_MULTI_BOOKMARKS:FALSE + +.h1 Interaction + +.h2 DEFAULT_USER_MODE +# DEFAULT_USER_MODE sets the default user mode for Lynx users. +# NOVICE shows a three line help message at the bottom of the screen. +# INTERMEDIATE shows normal amount of help (one line). +# ADVANCED help is replaced by the URL of the current link. +# +#DEFAULT_USER_MODE:NOVICE + +.h1 External Programs + +.h2 DEFAULT_EDITOR +# If DEFAULT_EDITOR is defined, users may edit local documents with it +# & it will also be used for sending mail messages. +# If no editor is defined here or by the user, +# the user will not be able to edit local documents +# and a primitive line-oriented mail-input mode will be used. +# +# For sysadmins: do not define a default editor +# unless you know EVERY user will know how to use it; +# users can easily define their own editor in the Options Menu. +# +#DEFAULT_EDITOR: + +.h2 SYSTEM_EDITOR +# SYSTEM_EDITOR behaves the same as DEFAULT_EDITOR, +# except that it can't be changed by users. +# +#SYSTEM_EDITOR: + +.h3 POSITIONABLE_EDITOR +# If POSITIONABLE_EDITOR is defined once or multiple times and if the same +# editor is used as editor in lynx, lynx will use its features, i.e., adding an +# option to set the initial line-position, when editing files and textarea. +# The commented editors below are already known; there is no need to uncomment +# them. +# +#POSITIONABLE_EDITOR:emacs +#POSITIONABLE_EDITOR:jed +#POSITIONABLE_EDITOR:jmacs +#POSITIONABLE_EDITOR:joe +#POSITIONABLE_EDITOR:jove +#POSITIONABLE_EDITOR:jpico +#POSITIONABLE_EDITOR:jstar +#POSITIONABLE_EDITOR:nano +#POSITIONABLE_EDITOR:pico +#POSITIONABLE_EDITOR:rjoe +#POSITIONABLE_EDITOR:vi + +.h1 Proxy + +.h2 HTTP_PROXY +.h2 HTTPS_PROXY +.h2 FTP_PROXY +.h2 GOPHER_PROXY +.h2 NEWSPOST_PROXY +.h2 NEWSREPLY_PROXY +.h2 NEWS_PROXY +.h2 NNTP_PROXY +.h2 SNEWSPOST_PROXY +.h2 SNEWSREPLY_PROXY +.h2 SNEWS_PROXY +.h2 WAIS_PROXY +.h2 FINGER_PROXY +.h2 CSO_PROXY +# Lynx version 2.2 and beyond supports the use of proxy servers that can act as +# firewall gateways and caching servers. They are preferable to the older +# gateway servers. Each protocol used by Lynx can be mapped separately using +# PROTOCOL_proxy environment variables (see Lynx Users Guide). If you have not set +# them externally, you can set them at run time via this configuration file. +# They will not override external settings. The no_proxy variable can be used +# to inhibit proxying to selected regions of the Web (see below). Note that on +# VMS these proxy variables are set as process logicals rather than symbols, to +# preserve lowercasing, and will outlive the Lynx image. +# +.ex 15 +#http_proxy:http://some.server.dom:port/ +#https_proxy:http://some.server.dom:port/ +#ftp_proxy:http://some.server.dom:port/ +#gopher_proxy:http://some.server.dom:port/ +#news_proxy:http://some.server.dom:port/ +#newspost_proxy:http://some.server.dom:port/ +#newsreply_proxy:http://some.server.dom:port/ +#snews_proxy:http://some.server.dom:port/ +#snewspost_proxy:http://some.server.dom:port/ +#snewsreply_proxy:http://some.server.dom:port/ +#nntp_proxy:http://some.server.dom:port/ +#wais_proxy:http://some.server.dom:port/ +#finger_proxy:http://some.server.dom:port/ +#cso_proxy:http://some.server.dom:port/ +#no_proxy:host.domain.dom + +.h2 NO_PROXY +# The no_proxy variable can be a comma-separated list of strings defining +# no-proxy zones in the DNS domain name space. If a tail substring of the +# domain-path for a host matches one of these strings, transactions with that +# node will not be proxied. +.ex +#no_proxy:domain.path1,path2 +# +# A single asterisk as an entry will override all proxy variables and no +# transactions will be proxied. +.ex +#no_proxy:* +# This is the only allowed use of * in no_proxy. +# +# Warning: Note that setting 'il' as an entry in this list will block proxying +# for the .mil domain as well as the .il domain. If the entry is '.il' this +# will not happen. + +.h1 External Programs + +.h2 PRINTER +.h2 DOWNLOADER +.h2 UPLOADER +# PRINTER, DOWNLOADER & UPLOADER DEFINITIONS: +# Lynx has 4 pre-defined print options & 1 pre-defined download option, +# which are called up on-screen when `p' or `d' are entered; +# any number of options can be added by the user, as explained below. +# Uploaders can be defined only for UNIX with DIRED_SUPPORT: +# see the Makefile in the top directory & the header of src/LYUpload.c . +# +# For `p' pre-defined options are: `Save to local file', `E-mail the file', +# `Print to screen' and `Print to local printer attached to vt100'. +# `Print to screen' allows file transfers in the absence of alternatives +# and is often the only option allowed here for anonymous users; +# the 3rd & 4th options are not pre-defined for DOS/WINDOWS versions of Lynx. +# For `d' the pre-defined option is: `Download to local file'. +# +# To define your own print or download option use the following formats: +# +# PRINTER:::