From d2b4a4cbfb36481dd8fc13e29ef88db9e10f5d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 23 Oct 2017 12:28:21 +0200 Subject: Update ssh config --- private | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private b/private index 8b7d38e..f7b73bf 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 8b7d38ed9ff13ff2303262024f4c204cd1eb0cc8 +Subproject commit f7b73bf3e4dc34407ff62d1c842c370d28de8925 -- cgit v1.2.3 From 63fd828e65b1773350cfb402d604d814c72e30cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 30 Oct 2017 09:33:26 +0100 Subject: Update mutt config --- mutt/muttrc | 2 +- private | 2 +- shellrc | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 8ab4125..7ebfa2a 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -15,7 +15,7 @@ set ispell="aspell" auto_view text/html alternative_order text/enriched text/plain text/html -macro attach 'V' "cat >~/.cache/mutt/mail.html && ( surf ~/.cache/mutt/mail.html & )" +macro attach 'V' "cat >~/.cache/mutt/mail.html && ( surf ~/.cache/mutt/mail.html >/dev/null & )" source ~/.mutt/gpg.rc set pgp_use_gpg_agent = yes diff --git a/private b/private index f7b73bf..e0e87bd 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit f7b73bf3e4dc34407ff62d1c842c370d28de8925 +Subproject commit e0e87bda325c1873036c2b4248e47dd427b56315 diff --git a/shellrc b/shellrc index a01b3e5..4eec35e 100644 --- a/shellrc +++ b/shellrc @@ -19,6 +19,7 @@ alias cgdb='cgdb -q' alias octave='octave-cli -q' alias ssh='TERM="xterm-256color" ssh' alias feh='feh --magick-timeout 10 -.' +alias mutt='neomutt' export LESS=-R export LESS_TERMCAP_mb=$'\E[1;31m' -- cgit v1.2.3 From a5ee9874212edae3a273e6b575584201962f03cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 6 Nov 2017 07:16:37 +0100 Subject: Add neomutt syntax --- .gitmodules | 3 +++ vim/bundle/neomutt.vim | 1 + 2 files changed, 4 insertions(+) create mode 160000 vim/bundle/neomutt.vim diff --git a/.gitmodules b/.gitmodules index 86c4728..b99fcb5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,3 +49,6 @@ [submodule "vim/bundle/ale"] path = vim/bundle/ale url = https://github.com/w0rp/ale.git +[submodule "vim/bundle/neomutt.vim"] + path = vim/bundle/neomutt.vim + url = https://github.com/neomutt/neomutt.vim.git diff --git a/vim/bundle/neomutt.vim b/vim/bundle/neomutt.vim new file mode 160000 index 0000000..b224ff5 --- /dev/null +++ b/vim/bundle/neomutt.vim @@ -0,0 +1 @@ +Subproject commit b224ff5f5bf65199abc2ea787cdbc632ef037883 -- cgit v1.2.3 From 63c0c990e8044c822636c9e56e6cf2c2b280ca76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Nov 2017 21:32:22 +0100 Subject: Drop htop configuration It makes little to no sense to have this. --- config/htop/htoprc | 26 -------------------------- install | 1 - 2 files changed, 27 deletions(-) delete mode 100644 config/htop/htoprc diff --git a/config/htop/htoprc b/config/htop/htoprc deleted file mode 100644 index 0492e91..0000000 --- a/config/htop/htoprc +++ /dev/null @@ -1,26 +0,0 @@ -# Beware! This file is rewritten by htop when settings are changed in the interface. -# The parser is also very primitive, and not human-friendly. -fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=46 -sort_direction=1 -hide_threads=1 -hide_kernel_threads=1 -hide_userland_threads=1 -shadow_other_users=0 -show_thread_names=0 -show_program_path=1 -highlight_base_name=0 -highlight_megabytes=1 -highlight_threads=1 -tree_view=1 -header_margin=1 -detailed_cpu_time=0 -cpu_count_from_zero=0 -update_process_names=0 -account_guest_in_cpu_meter=0 -color_scheme=0 -delay=15 -left_meters=LeftCPUs Memory Swap -left_meter_modes=1 1 1 -right_meters=RightCPUs Tasks LoadAverage Uptime -right_meter_modes=1 2 2 2 diff --git a/install b/install index ffbf348..e59a0f1 100755 --- a/install +++ b/install @@ -34,7 +34,6 @@ fi if ask "Install configurations for various utility tools"; then inst screenrc ~/.screenrc - inst config/htop/htoprc ~/.config/htop/htoprc fi if ask "Install user services"; then -- cgit v1.2.3 From e6a51fb649348d4ec7c25e87508e97faeb103461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 19 Nov 2017 21:36:16 +0100 Subject: VArious changes but mostly just ssh-clear function added --- gtk-3.0/settings.ini | 2 +- private | 2 +- shellrc | 6 ++++++ surf/script.js | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index a85b9ba..969f605 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -3,4 +3,4 @@ gtk-theme-name=Numix-Frost gtk-font-name=DejaVu Sans 8 gtk-cursor-theme-size=12 gtk-icon-theme-name=Faenza -gtk-key-theme-name = Emacs +gtk-key-theme-name=Emacs diff --git a/private b/private index e0e87bd..216e302 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit e0e87bda325c1873036c2b4248e47dd427b56315 +Subproject commit 216e302710ea678ed4ac604437dab0fe2224ff13 diff --git a/shellrc b/shellrc index 4eec35e..fcaa67f 100644 --- a/shellrc +++ b/shellrc @@ -108,3 +108,9 @@ dorepeat() { echo done } + +# Clear all ssh control masters +ssh-clear() { + rm -f ~/.cache/ssh + mkdir -p ~/.cache/ssh +} diff --git a/surf/script.js b/surf/script.js index 07bbbe6..01f7bcb 100644 --- a/surf/script.js +++ b/surf/script.js @@ -1,4 +1,5 @@ +/* // Easylinks (inspired but my own implementation) var elink_modkey = 18; //ctrl=17, alt=18 var elink_copykey = 67; // c @@ -185,3 +186,4 @@ run=function() { } } } +*/ -- cgit v1.2.3 From 9180b46532a7081a64a35b3625d655b548eec6c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 28 Nov 2017 15:59:48 +0100 Subject: Just fix ssh-clear --- shellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shellrc b/shellrc index fcaa67f..0ede298 100644 --- a/shellrc +++ b/shellrc @@ -111,6 +111,6 @@ dorepeat() { # Clear all ssh control masters ssh-clear() { - rm -f ~/.cache/ssh + rm -rf ~/.cache/ssh mkdir -p ~/.cache/ssh } -- cgit v1.2.3 From 97c29e9d7710c02c761b3fe00c87bd513ab5287d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 28 Nov 2017 16:00:42 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/neomutt.vim | 2 +- vim/bundle/nerdcommenter | 2 +- vim/bundle/vim-autotag | 2 +- vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index cd41727..e8e144d 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit cd4172746279fbe177e18e7731a92ede8054e598 +Subproject commit e8e144d446603fbaebf23c54491f43ccd79b65f4 diff --git a/vim/bundle/ale b/vim/bundle/ale index 658ec4b..a43ada9 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit 658ec4b10e5cb290d5c689893c01f9afa817afc6 +Subproject commit a43ada93e40b8286dde3cd62f10369876787ddc1 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index 89b32d1..c2c7efe 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit 89b32d170405b9085bed9cfb6bc4bab8cd8bd81c +Subproject commit c2c7efe89c5c1a09243afd90676b2e45ae8c78bd diff --git a/vim/bundle/neomutt.vim b/vim/bundle/neomutt.vim index b224ff5..766dbf3 160000 --- a/vim/bundle/neomutt.vim +++ b/vim/bundle/neomutt.vim @@ -1 +1 @@ -Subproject commit b224ff5f5bf65199abc2ea787cdbc632ef037883 +Subproject commit 766dbf3d5db5114eb62f4a29c791edbff6565324 diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter index 2859027..fd61bc7 160000 --- a/vim/bundle/nerdcommenter +++ b/vim/bundle/nerdcommenter @@ -1 +1 @@ -Subproject commit 285902752f7ab2052ac700a6d29b263dd5788afb +Subproject commit fd61bc71f64c8accf86f06c633fd19b205efa85b diff --git a/vim/bundle/vim-autotag b/vim/bundle/vim-autotag index 39f3790..5ddd656 160000 --- a/vim/bundle/vim-autotag +++ b/vim/bundle/vim-autotag @@ -1 +1 @@ -Subproject commit 39f3790a307b663e228328513cb7a708be30466c +Subproject commit 5ddd656bdb424138f6a5de2b13ceb6ee275a4e66 diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index 54209a0..1e60667 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 54209a0199bcb9f6b7c452deb0ffbc3aa60b857d +Subproject commit 1e60667322b7cd1bfcba98762fbba746a888d21a diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index bd3762c..01780cb 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit bd3762c916fbd229fec28fec42024c483e4cd201 +Subproject commit 01780cbf49a875c16306306654452b3aca609c13 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index 9f383b9..40fe641 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit 9f383b92beb73b75f8920d9cdebe11cc42c90d93 +Subproject commit 40fe641708c58476c3a1b9aeafb68dd888d4920b -- cgit v1.2.3 From 0e7c85e85e1ae6eaabec8cf45703313ad7692fbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 3 Dec 2017 13:12:13 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/tagbar | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index e8e144d..2dd27db 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit e8e144d446603fbaebf23c54491f43ccd79b65f4 +Subproject commit 2dd27db85966d3c0c3ecef7384ce66357b3790b9 diff --git a/vim/bundle/ale b/vim/bundle/ale index a43ada9..2f9869d 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit a43ada93e40b8286dde3cd62f10369876787ddc1 +Subproject commit 2f9869de44cf4b9542fc79a4c4566aa268910b23 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index c2c7efe..c63eb55 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit c2c7efe89c5c1a09243afd90676b2e45ae8c78bd +Subproject commit c63eb5514b3cd829f1d8f30d2736b24ae4ba217a diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index dc155af..c004652 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit dc155af2fdd20e081680d777bde558c56f8d55c3 +Subproject commit c004652797185121bbf264138d57eb2a0199b6db -- cgit v1.2.3 From efc78eeb586cb159f50cff4f88d245328a331bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 4 Dec 2017 07:19:40 +0100 Subject: Drop conkeror configuration --- conkeror/theme/content-buffer-input.css | 13 -- conkeror/theme/eye-guide.css | 22 ---- conkeror/theme/minibuffer.css | 94 --------------- conkeror/theme/mode-line.css | 14 --- conkeror/theme/new-tabs.css | 41 ------- conkeror/theme/theme.json | 10 -- conkeror/theme/window--panel.css | 5 - conkerorrc | 207 -------------------------------- install | 5 - 9 files changed, 411 deletions(-) delete mode 100644 conkeror/theme/content-buffer-input.css delete mode 100644 conkeror/theme/eye-guide.css delete mode 100644 conkeror/theme/minibuffer.css delete mode 100644 conkeror/theme/mode-line.css delete mode 100644 conkeror/theme/new-tabs.css delete mode 100644 conkeror/theme/theme.json delete mode 100644 conkeror/theme/window--panel.css delete mode 100644 conkerorrc diff --git a/conkeror/theme/content-buffer-input.css b/conkeror/theme/content-buffer-input.css deleted file mode 100644 index 82acb9e..0000000 --- a/conkeror/theme/content-buffer-input.css +++ /dev/null @@ -1,13 +0,0 @@ -/** - * (C) Copyright 2007-2008 Jeremy Maitin-Shepard - * - * Use, modification, and distribution are subject to the terms specified in the - * COPYING file. -**/ - -@namespace url("http://www.w3.org/1999/xhtml"); - -.__conkeror_textbox_edited_externally { - background-color: #bbbbbb; - -moz-appearance: none; -} diff --git a/conkeror/theme/eye-guide.css b/conkeror/theme/eye-guide.css deleted file mode 100644 index 502049b..0000000 --- a/conkeror/theme/eye-guide.css +++ /dev/null @@ -1,22 +0,0 @@ - -@namespace url("http://www.w3.org/1999/xhtml"); - -#__conkeror_eye_guide { - position: fixed; - left: 0px; - top: 0px; - width: 100%; - background: black; - opacity: 0.1; - z-index: 100000; -} - -/* - * Note, the following selectors can be styled with a - * border-top and border-bottom respectively to achieve - * the effect of a single line scroll-guide: - * - * #__conkeror_eye_guide.__conkeror_eye_guide_scroll_down - * #__conkeror_eye_guide.__conkeror_eye_guide_scroll_up - * - */ diff --git a/conkeror/theme/minibuffer.css b/conkeror/theme/minibuffer.css deleted file mode 100644 index a184564..0000000 --- a/conkeror/theme/minibuffer.css +++ /dev/null @@ -1,94 +0,0 @@ - -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -#minibuffer { - color: white; - background: #333333; - border-top: 1px solid #285577; - -moz-box-align: baseline; -} - -#minibuffer-input { - background-color: -moz-field !important; -} - -#minibuffer-input .textbox-input-box { - width: 5em; -} - -#minibuffer-input [anonid="annotation"] { - font-style: oblique; -} - -#minibuffer-input [anonid="strut"] { - padding-right: 1em !important; -} - -/* mode text widgets */ - -#minibuffer .mode-text-widget { - display: none; -} - -#minibuffer[minibuffermode="message"] .mode-text-widget { - display: block; - border-left: 1px solid threedshadow; - padding-left: 4px !important; - padding-right: 4px !important; - margin-left: 0px !important; - margin-right: 0px !important; -} - -#minibuffer[minibuffermode="message"] .mode-text-widget[value=""] { - display: none; -} - - -/* minibuffer highlighting */ - -#minibuffer.highlight { - background-color: Highlight; - color: HighlightText; -} - -#minibuffer.highlight[minibuffermode="message"] .mode-text-widget { - border-left: 1px solid highlighttext; -} - - -/* Completions display */ - -tree.completions { margin: 0px !important; } - -tree.completions treechildren { border: none !important; } - -tree.completions treecol { -moz-binding: none !important; } -tree.completions { - -moz-appearance: none !important; - border: 0px none !important; - border-top: 1px solid -moz-Dialog !important; - -moz-border-top-colors: -moz-initial !important; -} - -tree.completions treechildren::-moz-tree-row { - border: none; -} - -tree.completions treechildren::-moz-tree-row(current) { - background-color: Highlight !important; - color: HighlightText !important; -} - -tree.completions treechildren::-moz-tree-cell-text(completion-description) { - font-weight: bold !important; -} - -tree.completions treechildren::-moz-tree-cell-text(current) { - color: HighlightText !important; -} - -tree.completions[hasicons="true"] treechildren::-moz-tree-image { - width: 16px; - height: 16px; - margin-right: 6px; -} diff --git a/conkeror/theme/mode-line.css b/conkeror/theme/mode-line.css deleted file mode 100644 index cec5771..0000000 --- a/conkeror/theme/mode-line.css +++ /dev/null @@ -1,14 +0,0 @@ -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -.mode-line { - color: white; - padding: 2px; - background: #595959; - border-top: 3px solid #285577; - -moz-box-align: center; - overflow: hidden; -} - -.mode-line label[value=""] { - display: none; -} diff --git a/conkeror/theme/new-tabs.css b/conkeror/theme/new-tabs.css deleted file mode 100644 index 0dac555..0000000 --- a/conkeror/theme/new-tabs.css +++ /dev/null @@ -1,41 +0,0 @@ -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -#tab2-bar { - color: white; - background: #595959; - border-bottom: 3px solid #285577; -} - -.tab2 { - -moz-box-align: center; - border-right: 3px solid #285577; - min-width: 10em; - max-width: 15em; -} - -.tab2[selected=true] { - background: #333333; -} - -.tab2:hover { - background: #999; -} - -.tab2-label { - -moz-box-flex: 100; - margin-left: 4pt; - padding-top: 1pt; -} - -.tab2-index { - padding: 0pt 2pt 0pt 3pt; - font-weight: 900; - text-align: center; -} - -.tab2-icon { - width: 16px; - height: 16px; - -moz-margin-start: 4pt; - -moz-margin-end: 3pt; -} diff --git a/conkeror/theme/theme.json b/conkeror/theme/theme.json deleted file mode 100644 index 905b804..0000000 --- a/conkeror/theme/theme.json +++ /dev/null @@ -1,10 +0,0 @@ -{ "sheets": [ - "content-buffer-input.css", - "minibuffer.css", - "mode-line.css", - "tab-bar.css", - "new-tabs.css", - "window--panel.css", - "eye-guide.css" - ] -} diff --git a/conkeror/theme/window--panel.css b/conkeror/theme/window--panel.css deleted file mode 100644 index 6009000..0000000 --- a/conkeror/theme/window--panel.css +++ /dev/null @@ -1,5 +0,0 @@ -@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); - -.panel .panel-row-label { - font-weight: bold; -} diff --git a/conkerorrc b/conkerorrc deleted file mode 100644 index 5e85572..0000000 --- a/conkerorrc +++ /dev/null @@ -1,207 +0,0 @@ -// vim:ft=javascript -require("theme.js"); -theme_load_paths.unshift("~/.conkeror/"); -theme_unload("default"); -theme_load("theme"); - -require("session.js"); -session_auto_save_auto_load = true; - -require("favicon.js"); -require("new-tabs.js"); -tab_bar_show_icon = true; -tab_bar_show_index = false; - -require("clicks-in-new-buffer.js"); - -require("opensearch.js"); -define_opensearch_webjump("?", "duckduckgo.xml"); -define_opensearch_webjump("?g", "google.xml"); -define_opensearch_webjump("?w", "wikipedia.xml"); -define_opensearch_webjump("?e", "eBay.xml"); - -external_content_handlers.set("application/pdf", "llpp"); -external_content_handlers.set("video/*", "vlc"); -editor_shell_command = "urxvt -e vim"; - -url_completion_use_history = true; -url_remoting_fn = load_url_in_new_buffer; -download_buffer_automatic_open_target = OPEN_NEW_BUFFER_BACKGROUND; - -require("adblockplus.js"); - -// Set zoom to 90% -session_pref("layout.css.devPixelsPerPx", "0.9"); - -// Just key-kill all websites. I can use quote mode (ctrl+q) -require("key-kill"); -key_kill_mode.test.push(/\/\/.*\//); //regexp matches all sites - -view_source_use_external_editor = true; - -// Set cwd to ~/downloads so that downloads are saved there -cwd = get_home_directory(); -cwd.append("downloads"); - -///////////////////////////////////////////////////////////////////////////////// -// reopening closed buffers -define_key(default_global_keymap, "A-W", "revive-buffer"); - -// Save origin kill_buffer command -var kill_buffer_original = kill_buffer_original || kill_buffer; - -var killed_buffer_urls = []; -var killed_buffer_histories = []; - -// remember_killed_buffer -kill_buffer = function (buffer, force) { - var hist = buffer.web_navigation.sessionHistory; - - if (buffer.display_uri_string && hist) { - killed_buffer_histories.push(hist); - killed_buffer_urls.push(buffer.display_uri_string); - } - - kill_buffer_original(buffer,force); -}; - -interactive("revive-buffer", - "Loads url from a previously killed buffer", - function restore_killed_buffer (I) { - if (killed_buffer_urls.length !== 0) { - var url = yield I.minibuffer.read( - $prompt = "Restore killed url:", - $completer = new all_word_completer($completions = killed_buffer_urls), - $default_completion = killed_buffer_urls[killed_buffer_urls.length - 1], - $auto_complete = "url", - $auto_complete_initial = true, - $auto_complete_delay = 0, - $require_match = true); - - var window = I.window; - var creator = buffer_creator(content_buffer); - var idx = killed_buffer_urls.indexOf(url); - - // Create the buffer - var buf = creator(window, null); - - // Recover the history - buf.web_navigation.sessionHistory = killed_buffer_histories[idx]; - - // This line may seem redundant, but it's necessary. - var original_index = buf.web_navigation.sessionHistory.index; - buf.web_navigation.gotoIndex(original_index); - - // Focus the new tab - window.buffers.current = buf; - - // Remove revived from cemitery - killed_buffer_urls.splice(idx,1); - killed_buffer_histories.splice(idx,1); - } else { - I.window.minibuffer.message("No killed buffer urls"); - } - }); -///////////////////////////////////////////////////////////////////////////////// -// pass password management -define_key(default_global_keymap, "C-j", "pass-get-name"); -define_key(default_global_keymap, "C-J", "pass-get-password"); - -// Extract first and second domain by this hack -function get_domain(I) { - var domain = I.buffer.document.location.href; - var tmp_a = I.buffer.document.createElement('a'); - tmp_a.href = domain; - domain = tmp_a.hostname.match(/[^.]+\.[^.]+$/); - yield co_return(domain); -} - -function shell(cmd, input) { - var res = { - stdout: "", - stderr: "", - result: 0 - }; - res.result = yield shell_command(cmd, - $fds = [{ output: async_binary_string_writer(input) }, - { input: async_binary_reader(function (s) res.stdout+=s||"") }, - { input: async_binary_reader(function (s) res.stderr+=s||"") } - ] - ); - yield co_return(res); -}; - -var pass_domain = ""; -var pass_account = ""; - -function pass_chose_account(I) { - pass_domain = yield get_domain(I); - var res = yield shell("cd ~/.password-store && find -path '*" + pass_domain + "*' -type f", ""); - var accs = res.stdout.split('\n'); - if (accs.length == 0 || accs.length == 1) { - I.window.minibuffer.message("pass: No accounts detected for domain: " + pass_domain); - pass_account = ""; - return; - // Note that accs has empty line at end so all this is bumped by one - } else if (accs.length == 2) { - pass_account = accs[0].replace(/\.\//, '').replace(/\.gpg$/, ''); - } else { - var accs_list = []; - for (i = 0; i < accs.length - 1; i++) { - accs_list.push(accs[i].replace(/\.\//, '').replace(/\.gpg$/, '')); - } - pass_account = yield I.minibuffer.read( - $prompt = "Chose account for " + pass_domain + ":", - $completer = new all_word_completer($completions = accs_list), - $default_completion = accs_list[accs_list.length - 1], - $auto_complete = "url", - $auto_complete_initial = true, - $auto_complete_delay = 0, - $require_match = true); - } -} - -function pass_get_password(I) { - var domain = yield get_domain(I); - if (pass_account == "" || String(pass_domain) != String(domain)) { - yield pass_chose_account(I); - } - if (pass_account != "" && I.buffer.focused_element) { - var res = yield shell("pass " + pass_account, ""); - dumpln(res.stdout); - I.buffer.focused_element.value = res.stdout; - I.window.minibuffer.message("pass: Inserted password for account: " + pass_account); - pass_account = ""; // remove selected account so we can select new one - } -}; - -function pass_get_name(I) { - yield pass_chose_account(I); - I.window.minibuffer.message("pass: Chosen account: " + pass_account); - if (I.buffer.focused_element){ - var regexp = /[^\/]*$/; - I.buffer.focused_element.value = regexp.exec(pass_account)[0]; - } -}; - -interactive("pass-get-name", "Choses account for to be loged as. As result name of account is outputed.", pass_get_name); -interactive("pass-get-password", "Receives password from pass for currently selected account.", pass_get_password); -///////////////////////////////////////////////////////////////////////////////// -// Local SOCKS5 proxy -var proxy_session_enabled = false; -interactive("proxy-session-toggle", - "Toggle the SOCKS proxy server", - function (I) { - if (proxy_session_enabled) { - session_pref('network.proxy.type', 0); //direct connection - I.window.minibuffer.message("SOCKS5 proxy is now disabled."); - proxy_session_enabled = false; - } else { - session_pref('network.proxy.socks', '127.0.0.1'); - session_pref('network.proxy.socks_port', 8123); - session_pref('network.proxy.type', 1); - I.window.minibuffer.message("SOCKS5 proxy 127.0.0.1:8123 is now enabled."); - proxy_session_enabled = true; - } - }); -///////////////////////////////////////////////////////////////////////////////// diff --git a/install b/install index e59a0f1..1a23184 100755 --- a/install +++ b/install @@ -99,11 +99,6 @@ if ask "Install desktop (i3..)"; then inst config/user-dirs.dirs ~/.config/user-dirs.dirs fi -if ask "Install Conkeror configuration"; then - inst conkerorrc ~/.conkerorrc - inst conkeror/ ~/.conkeror -fi - if ask "Install Surf configuration"; then inst surf/script.js ~/.surf/script.js inst surf/styles/default.css ~/.surf/styles/default.css -- cgit v1.2.3 From 6cc31a2b88476fe42b7bca369d0b782bf9b0c7cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 4 Dec 2017 07:21:04 +0100 Subject: Drop surf-menu as it's now part of mysurf --- install | 1 - local/bin/surf-menu | 60 ----------------------------------------------------- 2 files changed, 61 deletions(-) delete mode 100755 local/bin/surf-menu diff --git a/install b/install index 1a23184..8f96cc6 100755 --- a/install +++ b/install @@ -102,7 +102,6 @@ fi if ask "Install Surf configuration"; then inst surf/script.js ~/.surf/script.js inst surf/styles/default.css ~/.surf/styles/default.css - inst local/bin/surf-menu ~/.local/bin/surf-menu fi if ask "Install MPD configuration"; then diff --git a/local/bin/surf-menu b/local/bin/surf-menu deleted file mode 100755 index b2e0111..0000000 --- a/local/bin/surf-menu +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh -set -e - -BOOKMARDS=~/notes/bookmarks.md - -run() { - echo "Run $1" - echo "$1" | grep -qE '^~?/' || true - echo $? - if echo "$1" | grep -qE '^\?'; then # We do search on duckduckgo - - surf "https://duckduckgo.com/?q=${L#?}&t=surf&kk=-1&ia=web" & - - elif echo "$1" | grep -qE '^~?/'; then # This is local path - - surf "${1/#\~/$HOME}" & - - elif echo "$1" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'; then # This ipv4 address - - surf "$1" & - - else # We follow address - - LPROTOCOL="$(echo "$1" | sed -n 's#^\([^:]*\)://.*#\1#p')" - LHOST="$(echo "$1" | sed -n 's#^[^:]*://##;s#^\([^/]\+\)/\?.*#\1#p')" - LPATH="$(echo "$1" | sed 's#^[^:]*://##;s#^[^/]\+/\?##')" - - if ! getent hosts "$LHOST" >/dev/null; then - if getent hosts "$LHOST.cz" >/dev/null; then - LHOST="$LHOST.cz" - elif getent hosts "$LHOST.org" >/dev/null; then - LHOST="$LHOST.org" - elif getent hosts "$LHOST.com" >/dev/null; then - LHOST="$LHOST.com" - fi - # TODO what to do when we can't expand it? - fi - # Decide on protocol (if connection to 443 is not possible then use http otherwise https) - if [ -z "$LPROTOCOL" ]; then # We already have protocol (given explicitly) - if nc -z -w1 "$LHOST" 443 2>/dev/null; then - LPROTOCOL="https" - else - LPROTOCOL="http" - fi - fi - - surf "$LPROTOCOL://$LHOST/$LPATH" & - - fi -} - -if [ -n "$1" ]; then - run "$1" - exit -else - # Note: Bookmarks starts with '* ' - sed -n 's/\* //p' "$BOOKMARDS" | dmenu -p 'surf' | while read L; do - run "$L" - done -fi -- cgit v1.2.3 From a12db5d06ead397c3a4232e1bbac68748f02704b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 4 Dec 2017 07:22:23 +0100 Subject: Drop lxc-net script as it was replaced by bridge service --- install | 4 ---- local/bin/lxc-net | 41 ----------------------------------------- 2 files changed, 45 deletions(-) delete mode 100755 local/bin/lxc-net diff --git a/install b/install index 8f96cc6..39f0869 100755 --- a/install +++ b/install @@ -112,10 +112,6 @@ if ask "Install backup script"; then inst local/bin/system-backup ~/.local/bin/system-backup fi -if ask "Install lxc-net script"; then - inst local/bin/lxc-net ~/.local/bin/lxc-net -fi - if ask "Install usbkey script"; then inst local/bin/usbkey ~/.local/bin/usbkey inst zsh_completions/usbkey ~/.zsh_completions/_usbkey diff --git a/local/bin/lxc-net b/local/bin/lxc-net deleted file mode 100755 index 53ccb50..0000000 --- a/local/bin/lxc-net +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -if [ "$(id -u)" -ne 0 ]; then - echo "Root required for execution" >&2 - exit 1 -fi - -# What if we want to clean -if [ "$1" = "clean" ]; then - kill $(cat /tmp/lxc-dhcpd.pid) - rm -f /tmp/lxc-dhcpd.pid /tmp/lxc-dhcpd.conf - ip link del dev vbr0 - exit -fi - -# Setup bridge -ip link add name vbr0 type bridge -ip link set vbr0 up -ip addr add 192.168.30.1/24 dev vbr0 - -# Start dhcp server - -# This just takes first dns nameserver configured. Maybe we might want to be -# little bit more clever. -DNS_SERVER=$(cat /etc/resolv.conf |grep -i nameserver|head -n1|cut -d ' ' -f2) -echo "# DHCPD configuration generated by lxc-net script -authoritative; -default-lease-time 600; -max-lease-time 7200; -option subnet-mask 255.255.255.0; -option broadcast-address 192.168.30.255; -option routers 192.168.30.1; -option domain-name-servers $DNS_SERVER; -subnet 192.168.30.0 netmask 255.255.255.0 { - range 192.168.30.10 192.168.30.100; -}" > /tmp/lxc-dhcpd.conf -dhcpd -4 -pf /tmp/lxc-dhcpd.pid -cf /tmp/lxc-dhcpd.conf vbr0 - -# Setup network forwarding (TODO add -o ethX to iptable command) -sysctl -w net.ipv4.ip_forward=1 -iptables -t nat -A POSTROUTING -j MASQUERADE -- cgit v1.2.3 From f847b4ebb1554f74808b155d9f16f703415d6821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 6 Jan 2018 10:58:16 +0100 Subject: Revert "Fix suspend lock" This reverts commit 86872dab2bfbb6aad93d566e66ddbb7bce5fd1f1. --- system/etc/pm/sleep.d/10lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/etc/pm/sleep.d/10lock b/system/etc/pm/sleep.d/10lock index baddcb4..da7c018 100755 --- a/system/etc/pm/sleep.d/10lock +++ b/system/etc/pm/sleep.d/10lock @@ -4,7 +4,7 @@ case "$1" in hibernate|suspend) - for socket in `find /tmp/i3-* -name ipc-socket.*`; do + for socket in `find /run/user/*/i3 -name ipc-socket*`; do i3-msg -s $socket "exec i3lock -d -c 000000" done ;; -- cgit v1.2.3 From af3da4822e24a10ba9a2fba99888835ca8470eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 6 Jan 2018 11:02:15 +0100 Subject: Update ssh config --- private | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private b/private index 216e302..572439b 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 216e302710ea678ed4ac604437dab0fe2224ff13 +Subproject commit 572439be1f36e6d83b410d08228b950699c242f8 -- cgit v1.2.3 From 2198a4dcb68c6712daab18d5a3ec76893d9d2765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 6 Jan 2018 11:28:20 +0100 Subject: Use consolekit and fix qt5 style --- xinitrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xinitrc b/xinitrc index 877c542..45f2974 100644 --- a/xinitrc +++ b/xinitrc @@ -4,6 +4,7 @@ setxkbmap -option compose:menu numlockx xset -b # disable beeping +export QT_QPA_PLATFORMTHEME=gtk2 export QT_STYLE_OVERRIDE='gtk2' export GTK_IM_MODULE=xim # Fix fullscreen game offscreen @@ -12,4 +13,4 @@ export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 mxrandr start-pulseaudio-x11 -exec i3 +exec ck-launch-session dbus-launch --sh-syntax --exit-with-session i3 -- cgit v1.2.3 From d031eedeee1c4b8257ba27769e69877e618ca1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Jan 2018 17:48:14 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/neomutt.vim | 2 +- vim/bundle/nerdcommenter | 2 +- vim/bundle/tagbar | 2 +- vim/bundle/vim-autotag | 2 +- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 2dd27db..ad41dfb 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 2dd27db85966d3c0c3ecef7384ce66357b3790b9 +Subproject commit ad41dfb8af5a70dfca349077c8b04911c601568f diff --git a/vim/bundle/ale b/vim/bundle/ale index 2f9869d..f174790 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit 2f9869de44cf4b9542fc79a4c4566aa268910b23 +Subproject commit f1747901cc00abb7becb64c02bfccad46b66ed21 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index c63eb55..6f84195 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit c63eb5514b3cd829f1d8f30d2736b24ae4ba217a +Subproject commit 6f84195f109d3e7f7ecb5e4a9ae8c5d3009259ac diff --git a/vim/bundle/neomutt.vim b/vim/bundle/neomutt.vim index 766dbf3..af59518 160000 --- a/vim/bundle/neomutt.vim +++ b/vim/bundle/neomutt.vim @@ -1 +1 @@ -Subproject commit 766dbf3d5db5114eb62f4a29c791edbff6565324 +Subproject commit af59518f6355b59a6279bc70648d23f7b7bdfe5c diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter index fd61bc7..af8bb42 160000 --- a/vim/bundle/nerdcommenter +++ b/vim/bundle/nerdcommenter @@ -1 +1 @@ -Subproject commit fd61bc71f64c8accf86f06c633fd19b205efa85b +Subproject commit af8bb4258d6767e35b42dc3071abd6574a3f665c diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index c004652..387bbad 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit c004652797185121bbf264138d57eb2a0199b6db +Subproject commit 387bbadda98e1376ff3871aa461b1f0abd4ece70 diff --git a/vim/bundle/vim-autotag b/vim/bundle/vim-autotag index 5ddd656..8114195 160000 --- a/vim/bundle/vim-autotag +++ b/vim/bundle/vim-autotag @@ -1 +1 @@ -Subproject commit 5ddd656bdb424138f6a5de2b13ceb6ee275a4e66 +Subproject commit 811419529c3c60c222d64275badc7b836fae982d diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 01780cb..264052b 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 01780cbf49a875c16306306654452b3aca609c13 +Subproject commit 264052b2593f536e5e72adde2c50a0e067da7b8c diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index 40fe641..b25fe6f 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit 40fe641708c58476c3a1b9aeafb68dd888d4920b +Subproject commit b25fe6f9f0f0b704d05ebd05edbbf0be3038cef9 -- cgit v1.2.3 From 7a7c48ffb6e13461ca783c2d01c4643b1b07abc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 9 Jan 2018 23:31:02 +0100 Subject: Add tobg shell shortcut function --- shellrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shellrc b/shellrc index 0ede298..14fb0b9 100644 --- a/shellrc +++ b/shellrc @@ -114,3 +114,8 @@ ssh-clear() { rm -rf ~/.cache/ssh mkdir -p ~/.cache/ssh } + +# Run process in background +tobg() { + "$@" >/dev/null 2>&1 & +} -- cgit v1.2.3 From b865cca0da64a113d5f52e65b8ea972efb569c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 18 Jan 2018 10:04:46 +0100 Subject: Set no flat volume in pulse audio Flat volume is mess. --- system/etc/pulse/daemon.conf | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 system/etc/pulse/daemon.conf diff --git a/system/etc/pulse/daemon.conf b/system/etc/pulse/daemon.conf new file mode 100644 index 0000000..2741f4b --- /dev/null +++ b/system/etc/pulse/daemon.conf @@ -0,0 +1,89 @@ +# This file is part of PulseAudio. +# +# PulseAudio is free software; you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# PulseAudio 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 Lesser General Public License +# along with PulseAudio; if not, see . + +## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for +## more information. Default values are commented out. Use either ; or # for +## commenting. + +; daemonize = no +; fail = yes +; allow-module-loading = yes +; allow-exit = yes +; use-pid-file = yes +; system-instance = no +; local-server-type = user +; enable-shm = yes +; enable-memfd = yes +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB +; lock-memory = no +; cpu-limit = no + +; high-priority = yes +; nice-level = -11 + +; realtime-scheduling = yes +; realtime-priority = 5 + +; exit-idle-time = 20 +; scache-idle-time = 20 + +; dl-search-path = (depends on architecture) + +; load-default-script-file = yes +; default-script-file = /etc/pulse/default.pa + +; log-target = auto +; log-level = notice +; log-meta = no +; log-time = no +; log-backtrace = 0 + +; resample-method = speex-float-1 +; avoid-resampling = false +; enable-remixing = yes +; remixing-use-all-sink-channels = yes +; enable-lfe-remixing = no +; lfe-crossover-freq = 0 + +flat-volumes = no + +; rlimit-fsize = -1 +; rlimit-data = -1 +; rlimit-stack = -1 +; rlimit-core = -1 +; rlimit-as = -1 +; rlimit-rss = -1 +; rlimit-nproc = -1 +; rlimit-nofile = 256 +; rlimit-memlock = -1 +; rlimit-locks = -1 +; rlimit-sigpending = -1 +; rlimit-msgqueue = -1 +; rlimit-nice = 31 +; rlimit-rtprio = 9 +; rlimit-rttime = 200000 + +; default-sample-format = s16le +; default-sample-rate = 44100 +; alternate-sample-rate = 48000 +; default-sample-channels = 2 +; default-channel-map = front-left,front-right + +; default-fragments = 4 +; default-fragment-size-msec = 25 + +; enable-deferred-volume = yes +; deferred-volume-safety-margin-usec = 8000 +; deferred-volume-extra-delay-usec = 0 -- cgit v1.2.3 From b8a1d9e1d255f34bfc54cf217cfbeb7ef5833931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 18 Jan 2018 11:43:36 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/nerdcommenter | 2 +- vim/bundle/vim-snippets | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index ad41dfb..28292f0 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit ad41dfb8af5a70dfca349077c8b04911c601568f +Subproject commit 28292f0f62e6352111b694ce8753bf739b50fb40 diff --git a/vim/bundle/ale b/vim/bundle/ale index f174790..eddda2f 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit f1747901cc00abb7becb64c02bfccad46b66ed21 +Subproject commit eddda2f8b599a52e92c99795f42c0c4ba8e15f7c diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter index af8bb42..ff3d8d7 160000 --- a/vim/bundle/nerdcommenter +++ b/vim/bundle/nerdcommenter @@ -1 +1 @@ -Subproject commit af8bb4258d6767e35b42dc3071abd6574a3f665c +Subproject commit ff3d8d7d7cae2b64ad9c83c07f461f5115b2b7d6 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 264052b..405ea72 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 264052b2593f536e5e72adde2c50a0e067da7b8c +Subproject commit 405ea72b571b5f0a4be470c7d36d2db6621f5ff0 -- cgit v1.2.3 From 7e5fd86cf259a0d5ab98d3ae0081931832f8f760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 20 Jan 2018 22:25:42 +0100 Subject: Add openscad syntax --- .gitmodules | 3 +++ vim/bundle/vim-openscad | 1 + 2 files changed, 4 insertions(+) create mode 160000 vim/bundle/vim-openscad diff --git a/.gitmodules b/.gitmodules index b99fcb5..68355d3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -52,3 +52,6 @@ [submodule "vim/bundle/neomutt.vim"] path = vim/bundle/neomutt.vim url = https://github.com/neomutt/neomutt.vim.git +[submodule "vim/bundle/vim-openscad"] + path = vim/bundle/vim-openscad + url = https://github.com/sirtaj/vim-openscad.git diff --git a/vim/bundle/vim-openscad b/vim/bundle/vim-openscad new file mode 160000 index 0000000..2ac407d --- /dev/null +++ b/vim/bundle/vim-openscad @@ -0,0 +1 @@ +Subproject commit 2ac407dcc73176862524e0cf18c00d85146fac57 -- cgit v1.2.3 From 9e424dae63ff66f889b8618c4fa4a6b3bf1b2012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 20 Jan 2018 22:28:59 +0100 Subject: Move usbkey to separate repo --- bash_completions/usbkey | 44 --------- install | 6 -- local/bin/usbkey | 245 ------------------------------------------------ zsh_completions/usbkey | 57 ----------- 4 files changed, 352 deletions(-) delete mode 100644 bash_completions/usbkey delete mode 100755 local/bin/usbkey delete mode 100644 zsh_completions/usbkey diff --git a/bash_completions/usbkey b/bash_completions/usbkey deleted file mode 100644 index acd6877..0000000 --- a/bash_completions/usbkey +++ /dev/null @@ -1,44 +0,0 @@ -# Bash completion file for usbkey -# vim: ft=sh - -_usbkey_mounted() { - mount | grep "/media/usbkey" | grep -q "/dev/mapper/usbkey" -} - -_usbkey() { - local cur prev - _init_completion || return - COMPREPLY=() - cur="${COMP_WORDS[COMP_CWORD]}" - if [[ $COMP_CWORD -gt 1 ]]; then - _usbkey_mounted || return - case "${COMP_WORDS[1]}" in - ssh-import) - [ -d "/media/usbkey/ssh" ] || return - local keys - for F in $(find "/media/usbkey/ssh" -name '*.pub'); do - F="${F#/media/usbkey/ssh/}" - keys="$keys ${F%.pub}" - done - COMPREPLY+=($(compgen -W "${keys}" -- ${cur})) - ;; - openvpn-get) - [ -d "/media/usbkey/openvpn" ] || return - local certs - for F in $(find "/media/usbkey/openvpn" -name 'ca.crt' -o -name '*.crt' -print); do - F="${F#/media/usbkey/openvpn/}" - certs="$certs ${F%.crt}" - done - COMPREPLY+=($(compgen -W "${certs}" -- ${cur})) - ;; - esac - else - local ops="-h --help mount sync" - if _usbkey_mounted; then - ops="$ops unmount gpg-import ssh-list ssh-generate ssh-import openvpn-list openvpn-get openvpn-generate" - fi - COMPREPLY+=($(compgen -W "${ops}" -- ${cur})) - fi -} - -complete -F _usbkey usbkey diff --git a/install b/install index 39f0869..bfcab02 100755 --- a/install +++ b/install @@ -111,9 +111,3 @@ fi if ask "Install backup script"; then inst local/bin/system-backup ~/.local/bin/system-backup fi - -if ask "Install usbkey script"; then - inst local/bin/usbkey ~/.local/bin/usbkey - inst zsh_completions/usbkey ~/.zsh_completions/_usbkey - inst bash_completions/usbkey ~/.bash_completions/usbkey -fi diff --git a/local/bin/usbkey b/local/bin/usbkey deleted file mode 100755 index e6cc42e..0000000 --- a/local/bin/usbkey +++ /dev/null @@ -1,245 +0,0 @@ -#!/bin/sh -set -e - -UUID_KKEY="7930cd94-b56e-4395-8859-f34da77f29be" -UUID_WKEY="9fcaf42a-86d5-4e70-828d-fd90aad2d964" - -CRYPT_NAME="usbkey" -MOUNT_PATH="/media/usbkey" - -op_mount() { - # First check if we have key drive - if [ ! -e "/dev/disk/by-uuid/$UUID_KKEY" ]; then - echo "Can't locate appropriate usb drive." >&2 - exit 1 - fi - # Decrypt drive - if [ -e "/dev/mapper/$CRYPT_NAME" ]; then - echo "USB key seems to be already decrypted" >&2 - else - echo "Decrypting usb key" >&2 - sudo -- cryptsetup open /dev/disk/by-uuid/"$UUID_KKEY" "$CRYPT_NAME" - fi - # Mount drive - if mount | grep -q "$MOUNT_PATH"; then - echo "USB key is already mounted" >&2 - else - echo "Mounting usb key" - sudo -- mkdir -p "$MOUNT_PATH" - sudo -- mount -o uid="$(id -u)",gid="$(id -g)" "/dev/mapper/$CRYPT_NAME" "$MOUNT_PATH" - fi - - echo "USB key drive mounted" >&2 -} - -op_unmount() { - # Unmount - if mount | grep -q "$MOUNT_PATH"; then - echo "Unmounting usb key" >&2 - sync "$MOUNT_PATH" - sudo -- umount "$MOUNT_PATH" - fi - # Remove mount path - [ ! -d "$MOUNT_PATH" ] || sudo -- rmdir "$MOUNT_PATH" - # Close encryption - if [ -e "/dev/mapper/$CRYPT_NAME" ]; then - echo "Closing encryption on usb key" >&2 - sudo -- cryptsetup close "$CRYPT_NAME" - fi - - echo "USB key unmounted" >&2 -} - -check_mount() { - mount | grep "$MOUNT_PATH" | grep -q "/dev/mapper/$CRYPT_NAME" -} - -op_sync() { - local DOUNMOUNT=false - if [ ! -e "/dev/disk/by-uuid/$UUID_WKEY" ]; then - echo "USB backup key seems to not be inserted. Please do so." >&2 - exit 1 - fi - if ! check_mount; then - DOUNMOUNT=true - op_mount - fi - - # Mount backup usb - sudo -- cryptsetup open "/dev/disk/by-uuid/$UUID_WKEY" "$CRYPT_NAME-backup" - sudo -- mkdir -p "$MOUNT_PATH-backup" - sudo -- mount -o uid="$(id -u)",gid="$(id -g)" "/dev/mapper/$CRYPT_NAME-backup" "$MOUNT_PATH-backup" - # Sync them - rsync -ax --delete --progress "$MOUNT_PATH/" "$MOUNT_PATH-backup/" - # Unmount it - sudo -- umount "$MOUNT_PATH-backup" - sudo -- rmdir "$MOUNT_PATH-backup" - sudo -- cryptsetup close "$CRYPT_NAME-backup" - - if $DOUNMOUNT; then - op_unmount - fi - - echo "Sync process finished." >&2 -} - -op_gpg_import() { - # TODO - true -} - -op_ssh_list() { - check_mount || op_mount - for KEY in $(find "$MOUNT_PATH/ssh" -name '*.pub'); do - local N="${KEY#$MOUNT_PATH/ssh/}" - echo -n "${N%.pub}: " - sed -n 's/ssh-rsa [^ ]* \(.*\)/\1/p' "$KEY" - done -} - -check_name() { - if [ -z "$NAME" ]; then - echo "You have to specify key name!" >&2 - exit 1 - fi -} - -op_ssh_generate() { - check_name - check_mount || op_mount - if [ -f "$MOUNT_PATH/ssh/$NAME" ]; then - echo "Key $NAME seems to already exists." >&2 - exit 1 - fi - echo -n "Please enter comment: " - read COMMENT - ssh-keygen -f "$MOUNT_PATH/ssh/$NAME" -C "$COMMENT" - - echo "SSH key $NAME was generated." >&2 -} - -op_ssh_import() { - check_name - check_mount || op_mount - if [ ! -f "$MOUNT_PATH/ssh/$NAME" ] || [ ! -f "$MOUNT_PATH/ssh/$NAME.pub" ]; then - echo "There is no key named $NAME" >&2 - exit 1 - fi - cp "$MOUNT_PATH/ssh/$NAME" ~/.ssh/ - cp "$MOUNT_PATH/ssh/$NAME.pub" ~/.ssh/ - chmod 600 ~/.ssh/"$NAME" - chmod 640 ~/.ssh/"$NAME.pub" - - echo "SSH key $NAME copied to local .ssh directory." >&2 -} - -# Note OpenVPN: CA generated using following command -# openssl req -nodes -new -x509 -days 3650 -keyout ca.key -out ca.crt -config openssl.cnf - -op_openvpn_list() { - check_mount || op_mount - for KEY in $(find "$MOUNT_PATH/openvpn" -name 'ca.crt' -o -name '*.crt' -print); do - local N="${KEY#$MOUNT_PATH/openvpn/}" - echo "${N%.crt}" - done -} - -op_openvpn_get() { - check_name - check_mount || op_mount - if [ ! -f "$MOUNT_PATH/openvpn/$NAME.key" ] || [ ! -f "$MOUNT_PATH/openvpn/$NAME.crt" ]; then - echo "There is no OpenVPN key $NAME" >&2 - exit 1 - fi - mkdir "openvpn-$NAME" - cp "$MOUNT_PATH/openvpn/$NAME.key" "openvpn-$NAME/" - cp "$MOUNT_PATH/openvpn/$NAME.crt" "openvpn-$NAME/" - cp "$MOUNT_PATH/openvpn/ca.crt" "openvpn-$NAME/" - cp "$MOUNT_PATH/openvpn/ta.key" "openvpn-$NAME/" - - echo "OpenVPN key $NAME copied to openvpn-$NAME directory." >&2 -} - -op_openvpn_generate() { - check_name - check_mount || op_mount - if [ -f "$MOUNT_PATH/openvpn/$NAME.key" ] && [ -f "$MOUNT_PATH/openvpn/$NAME.crt" ]; then - echo "OpenVPN key $NAME seems to already exists" >&2 - exit 1 - fi - ( - cd "$MOUNT_PATH/openvpn" - # Build request - openssl req -days 3650 -nodes -new -config "openssl.cnf" \ - -keyout "$NAME.key" -out "$NAME.csr" - # Sign request - openssl ca -days 3650 -config "openssl.cnf" \ - -out "$NAME.crt" -in "$NAME.csr" - ) - - echo "OpenVPN key $NAME was generated." >&2 -} - - -unknown_argument() { - echo "Unknown argument: $1" - exit 1 -} -# Parse operation (operation have to be first) -case "$1" in - -h|--help) - echo "Usb key manager" - echo "Usage: usbkey OPERATION ..." - echo - echo "Operations:" - echo " mount: Mount key of usb driver" - echo " unmount: Unmount usb driver" - echo " sync: Synchronize drive to bakup drive" - echo " gpg-import: Import gpg key" - echo " ssh-import: Import ssh key" - echo " ssh-generate: Generate new ssh key" - echo " ssh-list: List all ssh keys in store" - echo " openvpn-list: List all openvpn keys" - echo " openvpn-get: Get openvpn keys for some host" - echo " openvpn-generate: Generate openvpn key for new host" - exit 0 - ;; - mount|unmount|sync|gpg-import|ssh-import|ssh-generate|ssh-list|openvpn-list|openvpn-get|openvpn-generate) - OPERATION="$1" - ;; - *) - unknown_argument "$1" - ;; -esac -shift -# Parse rest of the arguments -while [ $# -gt 0 ]; do - case "$1" in - -h|--help) - echo "Usb key manager" - case "$OPERATION" in - mount|unmount|sync|ssh-list|openvn-list) - echo "Usage: usbkey $OPERATION [-h]" - ;; - ssh-*|openvpn-*) - echo "Usage: usbkey $OPERATION NAME [-h]" - ;; - # TODO - esac - exit 0 - ;; - *) - if [ -z "$NAME" ] && \ - [ "$OPERATION" = "ssh-import" -o "$OPERATION" = "ssh-generate" -o \ - "$OPERATION" = "openvpn-get" -o "$OPERATION" = "openvpn-generate" ] \ - ; then - NAME="$1" - else - unknown_argument "$1" - fi - ;; - esac - shift -done -# Go to operation handler -eval "op_$(echo "$OPERATION" | tr '-' '_')" diff --git a/zsh_completions/usbkey b/zsh_completions/usbkey deleted file mode 100644 index eada8f6..0000000 --- a/zsh_completions/usbkey +++ /dev/null @@ -1,57 +0,0 @@ -#compdef usbkey -#autoload - -_usbkey_mounted() { - mount | grep "/media/usbkey" | grep -q "/dev/mapper/usbkey" -} - -_usbkey () { - local cmd - if (( CURRENT > 2)); then - _usbkey_mounted || return - operation=${words[2]} - # Run the completion for the subcommand - case "${operation}" in - ssh-import) - [ -d "/media/usbkey/ssh" ] || return - local keys=() - for F in $(find "/media/usbkey/ssh" -name '*.pub'); do - F="${F#/media/usbkey/ssh/}" - keys+=("${F%.pub}") - done - _describe -t keys 'usbkey' keys - ;; - openvpn-get) - [ -d "/media/usbkey/openvpn" ] || return - local certs=() - for F in $(find "/media/usbkey/openvpn" -name 'ca.crt' -o -name '*.crt' -print); do - F="${F#/media/usbkey/openvpn/}" - certs+=("${F%.crt}") - done - _describe -t certificates 'usbkey' certs - ;; - # TODO - esac - else - local operations=( - "mount:Mount key of usb driver" - "unmount:Unmount usb driver" - "sync:Synchronize drive to bakup drive" - ) - if _usbkey_mounted; then - operations+=( - "gpg-import:Import gpg key" - "ssh-import:Import ssh key" - "ssh-generate:Generate new ssh key" - "ssh-list:List all SSH keys in store" - "openvpn-list:List all OpenVPN keys" - "openvpn-get:Get OpenVPN keys for some host" - "openvpn-generate:Generate OpenVPN key for new host" - ) - fi - _describe -t operations 'usbkey' operations - _arguments : "--help[Output help message]" - fi -} - -_usbkey -- cgit v1.2.3 From 7f73093a321474168fb072c06ec962a486c2eee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 20 Jan 2018 22:29:20 +0100 Subject: Small updates in mpd and pulseaudio --- config/mpd/mpd.conf | 1 + xinitrc | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf index 28d387c..efaa1a6 100644 --- a/config/mpd/mpd.conf +++ b/config/mpd/mpd.conf @@ -284,6 +284,7 @@ input { audio_output { type "pulse" name "pulse audio" + mixer_type "hardware" ## server "remote_server" # optional ## sink "remote_server_sink" # optional } diff --git a/xinitrc b/xinitrc index 45f2974..b0997ae 100644 --- a/xinitrc +++ b/xinitrc @@ -11,6 +11,5 @@ export GTK_IM_MODULE=xim export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 mxrandr -start-pulseaudio-x11 exec ck-launch-session dbus-launch --sh-syntax --exit-with-session i3 -- cgit v1.2.3 From 77fc1ce82a681f362ca162a0351a3924ae9d1fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 24 Jan 2018 23:54:03 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/vim-repeat | 2 +- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 28292f0..d183f11 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 28292f0f62e6352111b694ce8753bf739b50fb40 +Subproject commit d183f11fa72471ed6c4df595b4047dfff98abf75 diff --git a/vim/bundle/ale b/vim/bundle/ale index eddda2f..9849c79 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit eddda2f8b599a52e92c99795f42c0c4ba8e15f7c +Subproject commit 9849c79ff767b9f2e3498230bb29071eeb5a77ef diff --git a/vim/bundle/vim-repeat b/vim/bundle/vim-repeat index 070ee90..1b82cad 160000 --- a/vim/bundle/vim-repeat +++ b/vim/bundle/vim-repeat @@ -1 +1 @@ -Subproject commit 070ee903245999b2b79f7386631ffd29ce9b8e9f +Subproject commit 1b82cad74cd5d5caf3c4092365cda54dc1fb853e diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 405ea72..71d91ae 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 405ea72b571b5f0a4be470c7d36d2db6621f5ff0 +Subproject commit 71d91aec383ad3b72d8830db5d50d9bf4a8563f6 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index b25fe6f..bdd96b0 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit b25fe6f9f0f0b704d05ebd05edbbf0be3038cef9 +Subproject commit bdd96b05cbaef55baf52bf79f765aad94f64941c -- cgit v1.2.3 From dcd0e9d68dc490bb6404a897a90a9a51fbcffac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 25 Jan 2018 03:55:33 +0100 Subject: Drop intel configuration for xorg This configuration breaks xorg with i965 driver. --- system/etc/X11/xorg.conf.d/20-intel.conf | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 system/etc/X11/xorg.conf.d/20-intel.conf diff --git a/system/etc/X11/xorg.conf.d/20-intel.conf b/system/etc/X11/xorg.conf.d/20-intel.conf deleted file mode 100644 index c448076..0000000 --- a/system/etc/X11/xorg.conf.d/20-intel.conf +++ /dev/null @@ -1,5 +0,0 @@ -Section "Device" - Identifier "Intel Graphics" - Driver "intel" - Option "DRI" "3" -EndSection -- cgit v1.2.3 From feddfdd6cab28f55ab2b5597f89f3805bac2349a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 26 Jan 2018 15:51:03 +0100 Subject: Drop bashrc and zshrc They are replaced by shellrc package --- bashrc | 67 ------------------------------------ install | 12 ++----- zshrc | 120 ---------------------------------------------------------------- 3 files changed, 2 insertions(+), 197 deletions(-) delete mode 100644 bashrc delete mode 100644 zshrc diff --git a/bashrc b/bashrc deleted file mode 100644 index 0b7cf08..0000000 --- a/bashrc +++ /dev/null @@ -1,67 +0,0 @@ -# .bashrc - -source ~/.shellrc - -# If not running interactively, don't do anything -[[ $- != *i* ]] && return - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# Source all completions -if [ -d ~/.bash_completions ]; then - for F in $(find ~/.bash_completions -type f); do - . "$F" - done -fi - -# PROMPT ####################################################### -PS1='$( -if [ `id -u` -eq "0" ]; then - echo -n "\[\e[1;31m\]\u@\h:\[\e[1;34m\]\W\[\e[1;31m\]\$\[\e[0m\] " -else - echo -n "\[\e[1;32m\]\u@\h:\[\e[1;34m\]\W\[\e[1;32m\]\$\[\e[0m\] " -fi)' - -PROMPT_COMMAND=' -EC=$? -if [[ $EC < 0 ]]; then - echo -e "\e[1;31m"EXIT: $EC"\e[0m" -elif [[ $EC > 0 ]]; then - echo -e "\e[1;33m"EXIT: $EC"\e[0m" -fi' - -function settitle { - echo -ne "\033]0;`whoami`@`hostname`:`pwd`\007" -} -case "$TERM" in - xterm*|*rxvt*|*st*) - trap 'settitle' DEBUG - ;; -esac - -# Completions ################################################## - -_gitbmerge() { - local cur prev - _init_completion || return - [ $COMP_CWORD -gt 1 ] && return # Complete only single dependency - COMPREPLY=() - local GDIR="$(pwd)" - while [ ! -d "$GDIR/.git" ]; do - [ -z "$GDIR" ] && return - GDIR="${GDIR%/*}" - done - GDIR="$GDIR/.git" - [ -f "$GDIR" ] && GDIR="$(cat "$GDIR")" # This just points to some other directory - [ -d "$GDIR/refs/heads" ] || return # No completion if there is no local branch - local ops="" - for B in "$GDIR"/refs/heads/*; do - # TODO skip branch on HEAD - ops="$ops ${B#$GDIR/refs/heads/}" - done - COMPREPLY+=($(compgen -W "${ops}" -- ${cur})) -} -complete -F _gitbmerge gitbmerge diff --git a/install b/install index bfcab02..40bf40e 100755 --- a/install +++ b/install @@ -13,18 +13,10 @@ git submodule update --init --recursive || (echo "Submodule update failed!"; exi ################################################################################# source private/install # private files, sorry but some privacy is required. -if ask "Install Bashrc"; then - inst bashrc ~/.bashrc - inst shellrc ~/.shellrc +# TODO on hosts without shellrc we might want some thin shellrc to be installed +if ask "Install shell profile"; then inst profile ~/.profile - mkdir -p ~/.bash_completions -fi - -if ask "Install zshrc"; then - inst zshrc ~/.zshrc - inst shellrc ~/.shellrc inst zprofile ~/.zprofile - mkdir -p ~/.zsh_completions fi if ask "Install GIT configuration"; then diff --git a/zshrc b/zshrc deleted file mode 100644 index ec502b6..0000000 --- a/zshrc +++ /dev/null @@ -1,120 +0,0 @@ -source ~/.shellrc - -[[ -o interactive ]] || return # skip on initialization if not interactive - -zstyle ':completion:*' completer _expand _complete _ignored _approximate -zstyle ':completion:*' insert-unambiguous true -zstyle ':completion:*' max-errors 3 -zstyle ':completion:*' use-cache on -zstyle ':completion:*' cache-path ~/.cache/zsh -zstyle :compinstall filename '/home/kkoci/.zshrc' -zstyle -e ':completion:*:default' list-colors 'reply=("${PREFIX:+=(#bi)($PREFIX:t)(?)*==32=33}:${(s.:.)LS_COLORS}")' -zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} -fpath=(~/.zsh_completions $fpath) - -autoload -Uz compinit && compinit -autoload -Uz colors && colors - -HISTFILE=~/.histfile -HISTSIZE=10000 -SAVEHIST=10000 -setopt appendhistory -setopt extendedglob -setopt hist_ignore_dups -setopt hist_expire_dups_first -setopt extended_history -setopt inc_append_history -setopt promptsubst -setopt hist_ignore_dups -unsetopt nomatch -bindkey -e - -autoload -U select-word-style -select-word-style bash - -# Delete key workaround -bindkey "^[[3~" delete-char -bindkey "^[3;5~" delete-char - -# PROMPT ####################################################### -[ $UID -eq 0 ] && NCOLOR="red" || NCOLOR="green" -PROMPT="%(?..%{$fg_bold[yellow]%}EXIT: %? -)%{$fg_bold[$NCOLOR]%}%n@%m:%{$fg_bold[blue]%}%1~%{$fg_bold[$NCOLOR]%}%(!.#.$)%{$reset_color%} " -unset NCOLOR - -if [ -e ~/.local/git-prompt.sh ]; then - source ~/.local/git-prompt.sh - export GIT_PS1_SHOWDIRTYSTATE=y - export GIT_PS1_SHOWUNTRACKEDFILES=y - export GIT_PS1_SHOWUPSTREAM="auto" - export GIT_PS1_STATESEPARATOR="" - export GIT_PS1_SHOWUPSTREAM=y - export GIT_PS1_DESCRIBE_STYLE="branch" - RPROMPT='$(__git_ps1 "%s")' -fi -# Long running bell ############################################ -# Inspired by: https://gist.github.com/jpouellet/5278239 -zmodload zsh/datetime # load $EPOCHSECONDS builtin -autoload -Uz add-zsh-hook -lrbell_duration=15 -lrbell_timestamp=$EPOCHSECONDS -lrbell_window_id=0x0 - -lrbell_active_window_id() { - xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2 -} - -lrbell_begin() { - lrbell_timestamp=$EPOCHSECONDS - if [ -n "$DISPLAY" ]; then - lrbell_message="`pwd`: $1" - lrbell_window_id="$(lrbell_active_window_id)" - fi -} -lrbell_end() { - if (( $EPOCHSECONDS - $lrbell_timestamp < $lrbell_duration )); then - return - fi - - print -n '\a' - if [ -n "$DISPLAY" ] && [ -n "$lrbell_window_id" ]; then # notify only if running in X - if [ "$(lrbell_active_window_id)" != "$lrbell_window_id" ]; then # And active window isn't current one - notify-send "Command finished" "$lrbell_message" - fi - fi -} - -add-zsh-hook preexec lrbell_begin -add-zsh-hook precmd lrbell_end -# Completions ################################################## - -_gitbmerge() { - (( CURRENT > 2)) && return # Complete only single dependency - local GDIR="$(pwd)" - while [ ! -d "$GDIR/.git" ]; do - [ -z "$GDIR" ] && return - GDIR="${GDIR%/*}" - done - GDIR="$GDIR/.git" - [ -f "$GDIR" ] && GDIR="$(cat "$GDIR")" # This just points to some other directory - [ -d "$GDIR/refs/heads" ] || return # No completion if there is no local branch - local branches=() - for B in "$GDIR"/refs/heads/*; do - # TODO skip branch on HEAD - branches+=("${B#$GDIR/refs/heads/}") - done - _describe -t branches 'gitbmerge' branches -} -compdef _gitbmerge gitbmerge - -################################################################ -case "$TERM" in - xterm*|*rxvt*|*st*) - precmd() { - print -Pn "\e]0;%n@%m:%~ %(1j,%j job%(2j|s|) ,)\a" - } - preexec() { - print -Pn "\e]0;%n@%m:%~ !$1\a" - } - ;; -esac -- cgit v1.2.3 From 6f504fb861d7c6bc0c17471cab6acccb0317cfdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 26 Jan 2018 23:58:39 +0100 Subject: Add khal and khard --- config/khal/config | 32 ++++++++++++++++++++++++++++++++ config/khard/khard.conf | 25 +++++++++++++++++++++++++ install | 5 +++++ 3 files changed, 62 insertions(+) create mode 100644 config/khal/config create mode 100644 config/khard/khard.conf diff --git a/config/khal/config b/config/khal/config new file mode 100644 index 0000000..0addef1 --- /dev/null +++ b/config/khal/config @@ -0,0 +1,32 @@ +[default] +default_calendar = personal +highlight_event_days = True +timedelta = 10d + +[calendars] + +[[personal]] +path = /home/cynerd/.khal/private +type = calendar +color = dark blue + +[[school]] +path = /home/cynerd/.khal/school +type = calendar +color = dark red + +[[work]] +path = /home/cynerd/.khal/work +type = calendar +color = yellow + +[highlight_days] +default_color = dark gray +method = background + +[locale] +timeformat = %H:%M +dateformat = %d.%m.%Y +longdateformat = %d.%m.%Y +datetimeformat = %d.%m.%Y %H:%M +longdatetimeformat = %d.%m.%Y %H:%M diff --git a/config/khard/khard.conf b/config/khard/khard.conf new file mode 100644 index 0000000..63bc685 --- /dev/null +++ b/config/khard/khard.conf @@ -0,0 +1,25 @@ +[addressbooks] + +[[family]] +path = ~/.contacts/family/ +[[friends]] +path = ~/.contacts/friends/ +[[work]] +path = ~/.contacts/work + + +[general] +debug = no +default_action = list +editor = vim +merge_editor = vimdiff + + +[contact table] +display = first_name +group_by_addressbook = yes +reverse = no +show_nicknames = yes +show_uids = yes +sort = last_name +localize_dates = yes diff --git a/install b/install index 40bf40e..ce82066 100755 --- a/install +++ b/install @@ -91,6 +91,11 @@ if ask "Install desktop (i3..)"; then inst config/user-dirs.dirs ~/.config/user-dirs.dirs fi +if ask "Install khal khard"; then + inst config/khal/config ~/.config/khal/config + inst config/khard/khard.conf ~/.config/khard/khard.conf +fi + if ask "Install Surf configuration"; then inst surf/script.js ~/.surf/script.js inst surf/styles/default.css ~/.surf/styles/default.css -- cgit v1.2.3 From a214815179291a173faea8af894d602c865726c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 28 Jan 2018 16:18:53 +0100 Subject: Update khal and khard and add vdirsyncer --- config/khal/config | 14 +++++++------- config/khard/khard.conf | 12 ++++++++---- install | 3 ++- mutt/muttrc | 4 ++-- private | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/config/khal/config b/config/khal/config index 0addef1..bfbb9c7 100644 --- a/config/khal/config +++ b/config/khal/config @@ -6,20 +6,20 @@ timedelta = 10d [calendars] [[personal]] -path = /home/cynerd/.khal/private +path = /home/cynerd/.calendar/personal type = calendar color = dark blue -[[school]] -path = /home/cynerd/.khal/school -type = calendar -color = dark red - [[work]] -path = /home/cynerd/.khal/work +path = /home/cynerd/.calendar/work type = calendar color = yellow +[[misc]] +path = /home/cynerd/.calendar/misc +type = calendar +color = dark red + [highlight_days] default_color = dark gray method = background diff --git a/config/khard/khard.conf b/config/khard/khard.conf index 63bc685..1b4d7a2 100644 --- a/config/khard/khard.conf +++ b/config/khard/khard.conf @@ -1,11 +1,15 @@ [addressbooks] [[family]] -path = ~/.contacts/family/ +path = ~/.contacts/family [[friends]] -path = ~/.contacts/friends/ -[[work]] -path = ~/.contacts/work +path = ~/.contacts/friends +[[cz.nic]] +path = ~/.contacts/cz.nic +[[school]] +path = ~/.contacts/school +[[misc]] +path = ~/.contacts/misc [general] diff --git a/install b/install index ce82066..cc7e8c3 100755 --- a/install +++ b/install @@ -91,9 +91,10 @@ if ask "Install desktop (i3..)"; then inst config/user-dirs.dirs ~/.config/user-dirs.dirs fi -if ask "Install khal khard"; then +if ask "Install calendar and contacts"; then inst config/khal/config ~/.config/khal/config inst config/khard/khard.conf ~/.config/khard/khard.conf + inst private/vdirsyncer/ ~/.vdirsyncer fi if ask "Install Surf configuration"; then diff --git a/mutt/muttrc b/mutt/muttrc index 7ebfa2a..9e4d2d5 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -25,8 +25,8 @@ set crypt_autosign = yes set crypt_replyencrypt = yes set sendmail="/usr/bin/msmtp --read-envelope-from" -set query_command= "abook --mutt-query '%s'" -bind editor complete-query +set query_command= "khard email --parsable '%s'" +bind editor complete-query macro index S 's=archive' diff --git a/private b/private index 572439b..3659803 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 572439be1f36e6d83b410d08228b950699c242f8 +Subproject commit 365980335dc88f7782161d7f88fcbd4921c077c5 -- cgit v1.2.3 From a2e6f542488b975d1891c3ce4bcaf5c5e23f941f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 28 Jan 2018 16:23:47 +0100 Subject: Update xinitrc --- xinitrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xinitrc b/xinitrc index b0997ae..9ae157e 100644 --- a/xinitrc +++ b/xinitrc @@ -9,6 +9,8 @@ export QT_STYLE_OVERRIDE='gtk2' export GTK_IM_MODULE=xim # Fix fullscreen game offscreen export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 +# To fix missing textures on intel +export force_s3tc_enable=true mxrandr -- cgit v1.2.3 From 1456056c5aca79f326655ac067b44df003490c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 28 Jan 2018 16:44:29 +0100 Subject: Drop abook --- abook/abookrc | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 abook/abookrc diff --git a/abook/abookrc b/abook/abookrc deleted file mode 100644 index 5c19eae..0000000 --- a/abook/abookrc +++ /dev/null @@ -1,11 +0,0 @@ -#view Groups = Groups - -set index_format = " {name:22} {email:40} {phone:18|workphone|mobile} {groups:20}" -set autosave = true -set www_command = xdg-open -set address_style = eu -set add_email_prevent_duplicates = true - -set use_colors = true -set color_header_fg = white -set color_header_bg = black -- cgit v1.2.3 From d39b992ba5196cc6c45746d22dc663c99a018614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 28 Jan 2018 17:01:08 +0100 Subject: update private --- private | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private b/private index 3659803..3803ccb 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 365980335dc88f7782161d7f88fcbd4921c077c5 +Subproject commit 3803ccb4e5cad8c71733eea1a0d5eec6b5001ad0 -- cgit v1.2.3 From 8b39babe538b6e7de9422cb65b32027e26d2e80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 30 Jan 2018 18:58:09 +0100 Subject: Update vim plugins --- vim/bundle/ale | 2 +- vim/bundle/vim-gitgutter | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/bundle/ale b/vim/bundle/ale index 9849c79..52fe924 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit 9849c79ff767b9f2e3498230bb29071eeb5a77ef +Subproject commit 52fe924a139b8ae3d087cba0d9a5199054ae0595 diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index 1e60667..932ffac 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 1e60667322b7cd1bfcba98762fbba746a888d21a +Subproject commit 932ffaca092cca246b82c33e23d2d3a05e192e08 -- cgit v1.2.3 From 7f412205d50c2fc4c38abdf90682ac1bfcf2894e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 1 Feb 2018 22:24:44 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/vim-repeat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index d183f11..d0c6b61 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit d183f11fa72471ed6c4df595b4047dfff98abf75 +Subproject commit d0c6b6186e7a9ab7d5e770add3079200a518d908 diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index 6f84195..78c43c1 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit 6f84195f109d3e7f7ecb5e4a9ae8c5d3009259ac +Subproject commit 78c43c144643e49c529a93b9eaa4eda12614f923 diff --git a/vim/bundle/vim-repeat b/vim/bundle/vim-repeat index 1b82cad..8106e14 160000 --- a/vim/bundle/vim-repeat +++ b/vim/bundle/vim-repeat @@ -1 +1 @@ -Subproject commit 1b82cad74cd5d5caf3c4092365cda54dc1fb853e +Subproject commit 8106e142dfdc278ff3eaaadd7b362ad7949d4357 -- cgit v1.2.3 From bd3ebf8a0e43257e1a7ba25efa0bdddf3c7ec9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 1 Feb 2018 22:25:30 +0100 Subject: Once again dashes in mxrandr I am back on consolekit. --- local/bin/mxrandr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local/bin/mxrandr b/local/bin/mxrandr index 7c51128..81ae511 100755 --- a/local/bin/mxrandr +++ b/local/bin/mxrandr @@ -8,9 +8,9 @@ disconnectedOutputs=$(xrandr | grep -E " disconnected (primary )?[1-9]+" | awk ' cmd="xrandr " cmd_def=$cmd -INTERNAL=eDP1 -HDMI=HDMI1 -VGA=VGA1 +INTERNAL=eDP-1 +HDMI=HDMI-1 +VGA=VGA-1 for device in "$disconnectedOutputs"; do if [ -n "$defice" ]; then -- cgit v1.2.3 From 3a36d2d96302f8403311718c0a675750bcd35bc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 5 Feb 2018 11:00:08 +0100 Subject: Fix gtk theme configs --- gtk-2.0/gtkrc | 2 +- gtk-3.0/settings.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk-2.0/gtkrc b/gtk-2.0/gtkrc index bc3c212..9ac262b 100644 --- a/gtk-2.0/gtkrc +++ b/gtk-2.0/gtkrc @@ -1,4 +1,4 @@ -include "/usr/share/themes/Numix-Frost/gtk-2.0/gtkrc" +include "/usr/share/themes/numix-frost/gtk-2.0/gtkrc" gtk-font-name = "DejaVu Sans 8" gtk-icon-theme-name = "Faenza" gtk-key-theme-name = "Emacs" diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index 969f605..3f2a088 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,5 +1,5 @@ [Settings] -gtk-theme-name=Numix-Frost +gtk-theme-name=numix-frost gtk-font-name=DejaVu Sans 8 gtk-cursor-theme-size=12 gtk-icon-theme-name=Faenza -- cgit v1.2.3 From ee2906f73d758f559af21065acefab6baae76367 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 13 Feb 2018 00:05:38 +0100 Subject: Update vim modules --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 2 +- vim/bundle/nerdcommenter | 2 +- vim/bundle/vim-gitgutter | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index d0c6b61..02f1170 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit d0c6b6186e7a9ab7d5e770add3079200a518d908 +Subproject commit 02f117035e93a1f7a8e1a38cee8187a54a970ef4 diff --git a/vim/bundle/ale b/vim/bundle/ale index 52fe924..a3329ef 160000 --- a/vim/bundle/ale +++ b/vim/bundle/ale @@ -1 +1 @@ -Subproject commit 52fe924a139b8ae3d087cba0d9a5199054ae0595 +Subproject commit a3329ef3fc44a04a2617941eb46deef6c184f4af diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter index ff3d8d7..670dba1 160000 --- a/vim/bundle/nerdcommenter +++ b/vim/bundle/nerdcommenter @@ -1 +1 @@ -Subproject commit ff3d8d7d7cae2b64ad9c83c07f461f5115b2b7d6 +Subproject commit 670dba1bb53bc025173920b8066595074208fbe0 diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index 932ffac..8a7d005 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 932ffaca092cca246b82c33e23d2d3a05e192e08 +Subproject commit 8a7d00590b63e8479e57e0dd472a4ff4fbf01748 -- cgit v1.2.3 From e3c80ebf61efc6c14c848c675a384d6e865ee283 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 17 Feb 2018 11:37:13 +0100 Subject: Update vim plugins --- .gitmodules | 2 +- vim/bundle/YouCompleteMe | 2 +- vim/bundle/ale | 1 - vim/bundle/neomutt.vim | 2 +- vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- vim/pack/git-plugins/start/ale | 1 + 8 files changed, 7 insertions(+), 7 deletions(-) delete mode 160000 vim/bundle/ale create mode 160000 vim/pack/git-plugins/start/ale diff --git a/.gitmodules b/.gitmodules index 68355d3..ecb354b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -47,7 +47,7 @@ path = vim/bundle/vim-repeat url = https://github.com/tpope/vim-repeat.git [submodule "vim/bundle/ale"] - path = vim/bundle/ale + path = vim/pack/git-plugins/start/ale url = https://github.com/w0rp/ale.git [submodule "vim/bundle/neomutt.vim"] path = vim/bundle/neomutt.vim diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 02f1170..6a0f016 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 02f117035e93a1f7a8e1a38cee8187a54a970ef4 +Subproject commit 6a0f016955d8b1aec77655e94dc2dbe86bfb407c diff --git a/vim/bundle/ale b/vim/bundle/ale deleted file mode 160000 index a3329ef..0000000 --- a/vim/bundle/ale +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a3329ef3fc44a04a2617941eb46deef6c184f4af diff --git a/vim/bundle/neomutt.vim b/vim/bundle/neomutt.vim index af59518..363b40a 160000 --- a/vim/bundle/neomutt.vim +++ b/vim/bundle/neomutt.vim @@ -1 +1 @@ -Subproject commit af59518f6355b59a6279bc70648d23f7b7bdfe5c +Subproject commit 363b40ae6545423ec1710ba42b01a0ee6676b0ff diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index 8a7d005..790ffa4 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 8a7d00590b63e8479e57e0dd472a4ff4fbf01748 +Subproject commit 790ffa476a0ec7ee9f5b84038e824bc4bc303db7 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 71d91ae..0708929 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 71d91aec383ad3b72d8830db5d50d9bf4a8563f6 +Subproject commit 070892973ee66f2f4ea432252c8bedce57348a7b diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index bdd96b0..c35fd9b 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit bdd96b05cbaef55baf52bf79f765aad94f64941c +Subproject commit c35fd9b104fb75017f3866a28a77cf38f61b7801 diff --git a/vim/pack/git-plugins/start/ale b/vim/pack/git-plugins/start/ale new file mode 160000 index 0000000..fcb7932 --- /dev/null +++ b/vim/pack/git-plugins/start/ale @@ -0,0 +1 @@ +Subproject commit fcb7932d7d61cda142da7597c9df4da4847f0ca8 -- cgit v1.2.3 From e117f023373b8dc24a6ff994f53f1f183e08eb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 21 Feb 2018 23:15:15 +0100 Subject: vim: run linters only on save --- vimrc | 1 + 1 file changed, 1 insertion(+) diff --git a/vimrc b/vimrc index 361013d..6580a9f 100644 --- a/vimrc +++ b/vimrc @@ -111,6 +111,7 @@ let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" " Ale +let g:ale_lint_on_text_changed = 'never' let g:ale_linters = {'c': ['cppcheck', 'gcc', 'clang']} let g:ycm_path_to_python_interpreter="/usr/bin/python3" -- cgit v1.2.3 From 761683de5943f2d74ea6417f099aa6dd4eb6a06f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 21 Feb 2018 23:20:14 +0100 Subject: vim: add ale fixers and change c linters --- vimrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vimrc b/vimrc index 6580a9f..4c600ca 100644 --- a/vimrc +++ b/vimrc @@ -112,7 +112,11 @@ let g:UltiSnipsJumpBackwardTrigger="" " Ale let g:ale_lint_on_text_changed = 'never' -let g:ale_linters = {'c': ['cppcheck', 'gcc', 'clang']} +let g:ale_linters = {'c': ['cppcheck', 'clangcheck']} +let g:ale_fixers = { +\ 'c': ['remove_trailing_lines', 'trim_whitespace'], +\ 'python': ['autopep8', 'isort', 'add_blank_lines_for_python_control_statements', 'remove_trailing_lines', 'trim_whitespace'], +\} let g:ycm_path_to_python_interpreter="/usr/bin/python3" let g:ycm_global_ycm_extra_conf = ".ycm_conf.py" -- cgit v1.2.3 From d9dec9476f18aa44a215a5752266c2389e4c515c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 20 Mar 2018 18:19:01 +0100 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/neomutt.vim | 2 +- vim/bundle/nerdcommenter | 2 +- vim/bundle/vim-addon-mw-utils | 2 +- vim/bundle/vim-autotag | 2 +- vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 6a0f016..788c293 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 6a0f016955d8b1aec77655e94dc2dbe86bfb407c +Subproject commit 788c293aee78c6ab60cbc06bbc3339e7b2bff98f diff --git a/vim/bundle/neomutt.vim b/vim/bundle/neomutt.vim index 363b40a..d72a21e 160000 --- a/vim/bundle/neomutt.vim +++ b/vim/bundle/neomutt.vim @@ -1 +1 @@ -Subproject commit 363b40ae6545423ec1710ba42b01a0ee6676b0ff +Subproject commit d72a21eebbe30c88565a2f8defe158c213fa45b4 diff --git a/vim/bundle/nerdcommenter b/vim/bundle/nerdcommenter index 670dba1..e679d8a 160000 --- a/vim/bundle/nerdcommenter +++ b/vim/bundle/nerdcommenter @@ -1 +1 @@ -Subproject commit 670dba1bb53bc025173920b8066595074208fbe0 +Subproject commit e679d8a34193d1ac93b98ed792cdde7c9b1104a1 diff --git a/vim/bundle/vim-addon-mw-utils b/vim/bundle/vim-addon-mw-utils index 0c5612f..295862b 160000 --- a/vim/bundle/vim-addon-mw-utils +++ b/vim/bundle/vim-addon-mw-utils @@ -1 +1 @@ -Subproject commit 0c5612fa31ee434ba055e21c76f456244b3b5109 +Subproject commit 295862ba6be47ec3b11b6c85c10d982ffd9bc0b2 diff --git a/vim/bundle/vim-autotag b/vim/bundle/vim-autotag index 8114195..b2847e1 160000 --- a/vim/bundle/vim-autotag +++ b/vim/bundle/vim-autotag @@ -1 +1 @@ -Subproject commit 811419529c3c60c222d64275badc7b836fae982d +Subproject commit b2847e15cb448e7e3194c500527fdfe042a4378a diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index 790ffa4..37bdd03 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit 790ffa476a0ec7ee9f5b84038e824bc4bc303db7 +Subproject commit 37bdd03d176c5e182c7e8dbdc79c3f71d2a04898 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 0708929..f02955d 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 070892973ee66f2f4ea432252c8bedce57348a7b +Subproject commit f02955d40b64c9db6f6bdeee40d0f44a00c58865 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index c35fd9b..d0a6405 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit c35fd9b104fb75017f3866a28a77cf38f61b7801 +Subproject commit d0a640518957417ce689411d807dff3bf9eca194 -- cgit v1.2.3 From 13804463d5afb81e4dd35d829faa88b7a9446cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 24 Mar 2018 13:50:27 +0100 Subject: Update vim plugins --- vim/bundle/vim-snippets | 2 +- vim/bundle/vim-table-mode | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index f02955d..3be398c 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit f02955d40b64c9db6f6bdeee40d0f44a00c58865 +Subproject commit 3be398cd0414932ecd743c5a2bfeba0c9eaa1d66 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index d0a6405..e646bee 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit d0a640518957417ce689411d807dff3bf9eca194 +Subproject commit e646bee5c45201b52f8f879eddf84b5c2e360e98 -- cgit v1.2.3 From dec7e3afd00117c5b0831bff2d0780fd63349ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 24 Mar 2018 13:52:04 +0100 Subject: when ssh to 192.168.* ignore knownhostsfile --- private | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private b/private index 3803ccb..ae59caa 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 3803ccb4e5cad8c71733eea1a0d5eec6b5001ad0 +Subproject commit ae59caa348627579a8d8fa913716ffc59141d7d9 -- cgit v1.2.3 From e6e04d7c587b17c23a90f3aa37ab5bdeec8415bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 4 Apr 2018 09:50:34 +0200 Subject: Drop eaglerc and shellrc --- eaglerc | 164 ---------------------------------------------------------------- shellrc | 121 ----------------------------------------------- 2 files changed, 285 deletions(-) delete mode 100644 eaglerc delete mode 100644 shellrc diff --git a/eaglerc b/eaglerc deleted file mode 100644 index 4804ffa..0000000 --- a/eaglerc +++ /dev/null @@ -1,164 +0,0 @@ -# EAGLE Parameter File (generated by EAGLE Version 7.5.0 - DO NOT EDIT!) - -Brd.LargeCursor = "0" -Brd.Palette = "0" -Brd.WhiteBackground = "0" -CheckForUpdate.AdvPanelNumber = "7" -CheckForUpdate.AdvSplashNumber = "7" -CheckForUpdate.Auto = "1" -CheckForUpdate.Beta = "0" -CheckForUpdate.LastTimeChecked = "1456155178" -Cmd.Copy.ClassicEagleMode = "0" -Cmd.Delete.WireJointsWithoutCtrl = "0" -Cmd.Name.RenameEntireNetByDefault = "0" -Cmd.Name.RenameEntireSignalByDefault = "0" -Cmd.Wire.IgnoreCtrlForRadiusMode = "0" -ControlPanel.Header1 = "1 0:185 1:20 2:100" -ControlPanel.View.AutoOpenProjectFolder = "1" -ControlPanel.View.Extended = "1" -ControlPanel.View.Sort = "0" -Dialog.Add.Sch.Header1 = "1 0:100 1:297" -Dialog.Add.Sch.Size = "835 644" -Dialog.Add.Sch.Splitter1.Sizes = "413 396" -Dialog.Add.Sch.Splitter2.Sizes = "199 381" -Dialog.Add.Sch.Splitter3.Sizes = "196 196" -Dialog.Add.Sch.Splitter4.Sizes = "189 188" -Dialog.Assign.Size = "446 252" -Dialog.CheckForUpdate.Size = "278 252" -Directories.Cam = "$EAGLEDIR/cam" -Directories.Doc = "$EAGLEDIR/doc" -Directories.Dru = "$EAGLEDIR/dru" -Directories.Epf = "$HOME/Documents/eagle:$EAGLEDIR/projects/examples" -Directories.IgnoreNonExisting = "0" -Directories.Lbr = "$EAGLEDIR/lbr:$HOME/Documents/eagle/lbr/" -Directories.Scr = "$EAGLEDIR/scr" -Directories.Ulp = "$EAGLEDIR/ulp" -EAGLE.Version = "7.5" -Erc.AllowUserOverrideConsistencyCheck = "0" -Interface.ActionToolbar = "1" -Interface.BubbleHelp = "1" -Interface.ClassicIcons = "0" -Interface.CommandButtons = "1" -Interface.CommandTexts = "1" -Interface.ExternalTextEditor = "" -Interface.IconSize = "16" -Interface.LimitZoomFactor = "1" -Interface.MouseButtonReleaseTimeout = "500" -Interface.MouseWheelZoom = "1.2" -Interface.ParameterToolbar = "1" -Interface.PreferredUnit = "0" -Interface.PulldownMenu = "1" -Interface.SheetThumbnails = "1" -Interface.UseCtrlForPanning = "0" -Interface.UserGuidance = "1" -Interface.VectorFont = "0" -Interface.VerticalText = "0" -Lbr.CommandPopup.Add.1 = "ATMEGA328P-AU;" -Lbr.CommandPopup.EditDev.1 = "ATMEGA328P-AU;" -Lbr.CommandPopup.EditPac.1 = "QFP80P900X900X120-32N;" -Lbr.CommandPopup.EditSym.1 = "ATMEGA328P-AU;" -Lbr.DeviceEditor.SplitterH.Sizes = "#0 0 839 838 839 0 #1 0 839 838 839 0 #2 1238 0 0 0 1258" -Lbr.DeviceEditor.SplitterVL.Sizes = "#0 0 1271 #1 0 1271 #2 331 936" -Lbr.DeviceEditor.SplitterVR.Sizes = "605 580" -Lbr.MenuText.01 = "[designlink.png] Search and order : Run designlink-order.ulp -general;" -Lbr.ToolBar.Action = "2 0 1 0 2" -Lbr.ToolBar.CommandButtons = "5 0 1 0 5" -Lbr.ToolBar.CommandTexts = "2 1 0 0 2" -Lbr.ToolBar.Parameters = "2 2 1 0 2" -Option.ActivateItemOnSingleClick = "0" -Option.AlphaBlendingOnBlackBackground = "1" -Option.AutoBackupInterval = "5" -Option.AutoJunction = "1" -Option.AutoLoadMatchingDrawingFile = "0" -Option.Beep = "1" -Option.BusWireWidth = "7620" -Option.CatchFactor = "0.05" -Option.Codec = "System" -Option.DisplayMode = "1" -Option.DrawUnprocessedPolygonEdgesContinuous = "0" -Option.DrcFillStyle = "3" -Option.Drill.Symbol.Diameter = "20320" -Option.Drill.Symbol.Nr.0 = "5000" -Option.Drill.Symbol.Nr.1 = "6000" -Option.Drill.Symbol.Nr.2 = "7000" -Option.Drill.Symbol.Nr.3 = "8000" -Option.Drill.Symbol.Nr.4 = "9000" -Option.Drill.Symbol.Nr.5 = "10000" -Option.Drill.Symbol.Nr.6 = "11000" -Option.Drill.Symbol.Nr.7 = "12000" -Option.Drill.Symbol.Nr.8 = "13000" -Option.Drill.Symbol.Nr.9 = "14000" -Option.Drill.Symbol.Nr.10 = "15000" -Option.Drill.Symbol.Nr.11 = "16000" -Option.Drill.Symbol.Nr.12 = "20000" -Option.Drill.Symbol.Nr.13 = "22000" -Option.Drill.Symbol.Nr.14 = "28000" -Option.Drill.Symbol.Nr.15 = "32000" -Option.Drill.Symbol.Nr.16 = "0" -Option.Drill.Symbol.Nr.17 = "0" -Option.Drill.Symbol.Width = "254" -Option.FileLocking = "1" -Option.GridColorBlackBgDots = "7" -Option.GridColorBlackBgLines = "8" -Option.GridColorColoredBgDots = "7" -Option.GridColorColoredBgLines = "8" -Option.GridColorWhiteBgDots = "7" -Option.GridColorWhiteBgLines = "8" -Option.LayerSequence = "" -Option.MaxBackupLevel = "9" -Option.MinGridSize = "5" -Option.MinTextSize = "3" -Option.NetWireWidth = "1524" -Option.Optimizing = "1" -Option.PadNames = "0" -Option.RatsnestLimit = "0" -Option.RepositionMouseCursorAfterContextMenu = "0" -Option.SelectFactor = "0.02" -Option.ShowPartOrigins = "1" -Option.ShowTextOrigins = "1" -Option.SnapLength = "5080" -Option.ToggleCtrlForGroupSelectionAndContextMenu = "0" -Option.XrefLabelFormat = "%F%N/%S.%C%R" -Option.XrefPartFormat = "/%S.%C%R" -Project.Dir = "/home/cynerd/Documents/eagle/oh-avr" -Recent.Epf.1 = "/home/cynerd/Documents/eagle/oh-avr" -Recent.Lbr.1 = "/home/cynerd/Documents/eagle/lbr/AVR.lbr" -Recent.Sch.1 = "/home/cynerd/Documents/eagle/oh-avr/avrunit.sch" -Recent.Scr.1 = "/home/cynerd/Downloads/Atmel-ATMEGA328P-AU@E/Atmel-ATMEGA328P-AU.scr" -Sch.Cmd.Add.AlwaysUseDeviceNameAsValue = "0" -Sch.CommandPopup.Add.1 = "+5V (supply1.lbr);'+5V@/home/cynerd/.eagle/lbr/supply1.lbr'" -Sch.CommandPopup.Add.2 = "GND (supply1.lbr);'GND@/home/cynerd/.eagle/lbr/supply1.lbr'" -Sch.CommandPopup.Add.3 = "MA04-2 (con-lstb.lbr);'MA04-2@/home/cynerd/.eagle/lbr/con-lstb.lbr'" -Sch.CommandPopup.Add.4 = "MA05-2 (con-lstb.lbr);'MA05-2@/home/cynerd/.eagle/lbr/con-lstb.lbr'" -Sch.CommandPopup.Add.5 = "MA03-2 (con-lstb.lbr);'MA03-2@/home/cynerd/.eagle/lbr/con-lstb.lbr'" -Sch.CommandPopup.Add.6 = "MA03-1 (con-lstb.lbr);'MA03-1@/home/cynerd/.eagle/lbr/con-lstb.lbr'" -Sch.CommandPopup.Add.7 = "ATMEGA328P-AU (AVR.lbr);'ATMEGA328P-AU@/home/cynerd/Documents/eagle/lbr/AVR.lbr'" -Sch.DockWidget.Thumbnails = "1 -1 -1 -1 70 -1 0" -Sch.Key.A+A = "Add" -Sch.Key.A+C = "Copy" -Sch.Key.A+D = "Delete" -Sch.Key.A+F = "Mirror" -Sch.Key.A+F2 = "Window fit" -Sch.Key.A+G = "Group" -Sch.Key.A+L = "Label" -Sch.Key.A+M = "Move" -Sch.Key.A+N = "Name" -Sch.Key.A+R = "Rotate" -Sch.Key.A+S = "Smash" -Sch.Key.A+V = "Value" -Sch.Key.A+W = "Wire" -Sch.Key.F2 = "Window;" -Sch.Key.F3 = "Window 2" -Sch.Key.F4 = "Window 0.5" -Sch.Key.F5 = "Window (@);" -Sch.Key.F6 = "Grid;" -Sch.LargeCursor = "0" -Sch.MenuText.01 = "[designlink.png] Search and order { General : Run designlink-order.ulp -general; | Schematic : Run designlink-order.ulp; }" -Sch.Palette = "1" -Sch.ToolBar.Action = "2 0 1 0 2" -Sch.ToolBar.CommandButtons = "5 0 1 0 5" -Sch.ToolBar.CommandTexts = "2 1 0 0 2" -Sch.ToolBar.Parameters = "2 2 1 0 2" -Sch.WhiteBackground = "1" -Warning.PartHasNoUserDefinableValue = "1" -Warning.SupplyPinAutoOverwriteGeneratedNetName = "0" diff --git a/shellrc b/shellrc deleted file mode 100644 index 14fb0b9..0000000 --- a/shellrc +++ /dev/null @@ -1,121 +0,0 @@ -# vim: ft=sh: -# This is file with aliases and variables shared between bash and zsh - -# Continue only if this is interactive shell -[[ $- != *i* ]] && return - -################################################################################# -# Aliases - -alias ls='ls --color=auto' -eval $(dircolors -b) -alias ll='ls -lh' -alias df='df -h' -alias du='du -h' -alias grep='grep --color=auto' -alias git='LANG=en_GB git' -alias gdb='gdb -q' -alias cgdb='cgdb -q' -alias octave='octave-cli -q' -alias ssh='TERM="xterm-256color" ssh' -alias feh='feh --magick-timeout 10 -.' -alias mutt='neomutt' - -export LESS=-R -export LESS_TERMCAP_mb=$'\E[1;31m' -export LESS_TERMCAP_md=$'\E[1;36m' -export LESS_TERMCAP_me=$'\E[0m' -export LESS_TERMCAP_se=$'\E[0m' -export LESS_TERMCAP_so=$'\E[01;44;33m' -export LESS_TERMCAP_ue=$'\E[0m' -export LESS_TERMCAP_us=$'\E[1;32m' -[ -x /usr/bin/src-hilite-lesspipe.sh ] && export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s" - -alias gst='git status' -alias v='vim' -alias i='i3-msg' - -# Systemd aliases if we are running systemd -if pidof systemd >/dev/null 2>/dev/null; then - alias sctl='sudo systemctl' - alias usctl='systemctl --user' - alias jrn='journalctl' - alias ujrn='jrn --user' -fi - -################################################################################# -# Utility functions - -# Generate random password (optionally takes length of password as first argument) -genpasswd() { - local l=$1 - [ -n "$l" ] || l=16 - tr -dc A-Za-z0-9_ < /dev/urandom | head -c "$l" | xargs -} - -# Clip stdin to clipboard -clip() { - # Note: printf as magic to remove trailing new lines - printf %s "$(cat)" | xclip -selection clipboard -} - -# Clip current HEAD hash to clipboard -# Optionally you can pass commit as argument -gitclip() { - [ -n "$1" ] && local CMT="$1" || local CMT=HEAD - git rev-parse "$CMT"| clip -} -# Clip current head message to clipboard -# Optionally you can pass commit as argument -gitmclip() { - [ -n "$1" ] && local CMT="$1" || local CMT=HEAD - git log --format=%B -n 1 "$CMT" | clip -} - -# Automatic branch merger (merge branch, push it to server and remove branch) -# Expects name of the branch as argument -gitbmerge() { - ( - set -e - local WT="$(git worktree list | sed -nE "/\[$1\]/{s/([^ ]+) .*/\1/p}")" - if [ -n "$WT" ]; then - rm -r "$WT" - git worktree prune - fi - git merge --ff-only "$1" && git push && git branch -d "$1" && git push origin :"$1" - ) -} - -# Create new branch from master -gitbnew() { - git branch "$1" master - local NW="$(git rev-parse --show-toplevel)-$1" - git worktree add "$NW" $1 - cd "$NW" - git submodule update --init --recursive -} - -# Make screenshot -xshot() { - import -window "$(xdotool selectwindow)" ~/xshot_$(date +%F_%H%M%S_%N).png -} - -# Run given command every second -dorepeat() { - while true; do - "$@" - sleep 1 - echo - done -} - -# Clear all ssh control masters -ssh-clear() { - rm -rf ~/.cache/ssh - mkdir -p ~/.cache/ssh -} - -# Run process in background -tobg() { - "$@" >/dev/null 2>&1 & -} -- cgit v1.2.3