From bbabb8ebb84fcdf3859adc5c707fc10e488186be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 22 May 2017 07:30:08 +0200 Subject: vim plugins update --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/tlib_vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index acf9ede..263bd88 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit acf9edeb1cdc54b4880b9428fb105be91f055a85 +Subproject commit 263bd88bd54278dba94c4d6c43ad5fcde2fcd3bb diff --git a/vim/bundle/tlib_vim b/vim/bundle/tlib_vim index 0c634fd..6f9d75b 160000 --- a/vim/bundle/tlib_vim +++ b/vim/bundle/tlib_vim @@ -1 +1 @@ -Subproject commit 0c634fdd79f2e5bd2b689a77b549d2a8a8c04a54 +Subproject commit 6f9d75b54478bcaab722d33cbec69d8a1fe49f32 -- cgit v1.2.3 From e6da85de72313c672d89d37f923bd2fa02f67a3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 22 May 2017 07:31:42 +0200 Subject: Fix path to arch utility script in install script --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 67d8d9e..01c6924 100755 --- a/install +++ b/install @@ -14,7 +14,7 @@ git submodule update --init --recursive || (echo "Submodule update failed!"; exi source private/install # private files, sorry but some privacy is required. if [ -e /etc/arch-release ] && ask "Archlinux software"; then - source private/arch + source utils/arch archlinux_inst fi -- cgit v1.2.3 From 37966501332084bad8f77bfdebbd7aca24341521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 23 May 2017 10:07:15 +0200 Subject: Drop archlinux packages that are no longer required Those machines are now on Gentoo. --- archlinux.pkgs.d/bumblebee | 8 ------- archlinux.pkgs.d/cynerd-laptop | 31 --------------------------- archlinux.pkgs.d/cynerd-pc | 48 ------------------------------------------ 3 files changed, 87 deletions(-) delete mode 100644 archlinux.pkgs.d/bumblebee delete mode 100644 archlinux.pkgs.d/cynerd-laptop delete mode 100644 archlinux.pkgs.d/cynerd-pc diff --git a/archlinux.pkgs.d/bumblebee b/archlinux.pkgs.d/bumblebee deleted file mode 100644 index 44de4bd..0000000 --- a/archlinux.pkgs.d/bumblebee +++ /dev/null @@ -1,8 +0,0 @@ -dnl vim:ft=m4 -nvidia -primus -bumblebee-openrc -bbswitch - -dnl ?? -mesa-vdpau-nosystemd diff --git a/archlinux.pkgs.d/cynerd-laptop b/archlinux.pkgs.d/cynerd-laptop deleted file mode 100644 index 017cc47..0000000 --- a/archlinux.pkgs.d/cynerd-laptop +++ /dev/null @@ -1,31 +0,0 @@ -dnl vim:ft=m4 -define(NETFLIX) -include(openrc) -include(laptop) -include(devel) -include(steam) -include(wine) -include(avr) -include(kicad) - -intel-ucode - -openvpn-openrc -easy-rsa -freecad -transmission-gtk -qemu-arch-extra -ovmf -octave -devtools -dhcp-openrc -ifplugd - -id3 -mumble -mtpfs -lighttpd-openrc -gucharmap - -dnl for testing -stress diff --git a/archlinux.pkgs.d/cynerd-pc b/archlinux.pkgs.d/cynerd-pc deleted file mode 100644 index e9c88c3..0000000 --- a/archlinux.pkgs.d/cynerd-pc +++ /dev/null @@ -1,48 +0,0 @@ -dnl vim:ft=m4 -dnl My asus laptop specific stuff -define(NETFLIX) -include(openrc) -include(laptop) -include(devel) -include(steam) -include(wine) -include(bumblebee) -include(latex) -include(avr) - -screen -rdiff-backup -openvpn-openrc -easy-rsa -octave -chromium -openssh-openrc -qemu-arch-extr - -asus-kbd-backlight -intel-ucode -virtualgl-openrc -lib32-nvidia-utils -xf86-input-synaptics -xf86-video-intel - -joyutils - -dnl steam controller user driver -sc-controller - -ipython2 -python-numpy -python-scipy -python-pip -swig - -dnl games -wesnoth -simutrans -simutrans-pak128 -openttd -openttd-opengfx -openttd-opensfx - -stress -- cgit v1.2.3 From d37ca99f25cc745db3bed37a81952235613fa731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 25 May 2017 13:17:02 +0200 Subject: Add iptables syntax to vim --- vim/syntax/iptables.vim | 380 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 380 insertions(+) create mode 100644 vim/syntax/iptables.vim diff --git a/vim/syntax/iptables.vim b/vim/syntax/iptables.vim new file mode 100644 index 0000000..0f65a61 --- /dev/null +++ b/vim/syntax/iptables.vim @@ -0,0 +1,380 @@ +"============================================================================ +" +" Source: https://raw.githubusercontent.com/vim-scripts/iptables/master/syntax/iptables.vim +" iptables-save/restore syntax highlighter +" +" Language: iptables-save/restore file +" Version: Not Specified +" Date: 07-Jun-2014 +" Maintainer: Eric Haarbauer +" License: This file is placed in the public domain. +" +"============================================================================ +" Section: Notes {{{1 +"============================================================================ +" +" This vim syntax script highlights files used by Harald Welte's iptables-save +" and iptables-restore utilities. Both utilities are part of the iptables +" application (http://www.netfilter.org/projects/iptables). +" +" Features: +" +" * Distinguishes commands, options, modules, targets and chains. +" * Distinguishes numeric IP addresses from net masks. +" * Highlights tokens that occur only in hand-edited files; for example, +" "--append" and "destination-unreachable". +" * Special handling for module names; for example, the tcp module is +" colored differently from the tcp protocol. +" +" Options: +" +" Customize the behavior of this script by setting values for the following +" options in your .vimrc file. (Type ":h vimrc" in vim for more information +" on the .vimrc file.) +" +" g:Iptables_SpecialDelimiters +" This variable, if set to a non-zero value, distinguishes numeric +" delimiters, including the dots in IP addresses, the slash that separates +" an IP address from a netmask, and the colon that separates the ends of a +" port range. If not set, this option defaults to off. +" +" Known Issues: +" +" * Some special argument tokens are highlighted whether or not they are +" used with the correct option. For example, "destination-unreachable" +" gets special highlighting whether or not is used as an argument to the +" --icmp-type option. In practice, this is rarely a problem. +" +" Reporting Issues: +" +" If you discover an iptables file that this script highlights incorrectly, +" please email the author (address at the top of the script) with the +" following information: +" +" * Problem iptables file WITH ANY SENSITIVE INFORMATION REMOVED +" * The release version of this script (see top of the script) +" * If possible, a patch to fix the problem +" +" Design Notes: +" +" Part of this script is autogenerated from the output of the iptables man +" page. The source code for generating the script is available from the +" author on request (see email address at the top of the script). The +" script should build from source on most Linux systems with iptables +" installed. +" +" The build system that generates this script strips special CVS tokens +" (like "Id:") so that CVS no longer recognizes them. This allows users to +" place the script in their own version control system without losing +" information. The author encourages other vim script developers to adopt a +" similar approach in their own scripts. +" +" Installation: +" +" Put this file in your user runtime syntax directory, usually ~/.vim/syntax +" in *NIX or C:\Program Files\vim\vimfiles\syntax in Windows. Type ":h +" syn-files" from within vim for more information. +" +" The iptables-save and iptables-restore applications do not specify a +" naming standard for the files they use. However, iptables-save places a +" comment in the first line of its output. Other applications, such as +" Fedora's system-config-securitylevel uses the iptables-save/restore +" format, but with a different leading comment. We can use these leading +" comments to identify the filetype by placing the following code in the +" scripts.vim file in your user runtime directory: +" +" if getline(1) =~ "^# Generated by iptables-save" || +" \ getline(1) =~ "^# Firewall configuration written by" +" setfiletype iptables +" set commentstring=#%s +" finish +" endif +" +" Setting the commentstring on line 4 allows Meikel Brandmeyer's +" EnhancedCommentify script (vimscript #23) to work with iptables files. +" (Advanced users may want to set the commentstring option in an ftplugin +" file or in autocommands defined in .vimrc.) +" +"============================================================================ +" Source File: Id: iptables.src.vim 43 2014-06-08 03:21:32Z ehaar +"============================================================================ +" Section: Initialization {{{1 +"============================================================================ + +" For version 5.x: Clear all syntax items +" For version 6.x: Quit when a syntax file was already loaded +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'iptables' +endif + +" Don't use standard HiLink, it will not work with included syntax files +if version < 508 + command! -nargs=+ IptablesHiLink highlight link +else + command! -nargs=+ IptablesHiLink highlight default link +endif + +syntax case match + +if version < 600 + set iskeyword+=- +else + setlocal iskeyword+=- +endif + +" Initialize global public variables: {{{2 + +" Support deprecated variable name used prior to release 1.07. +if exists("g:iptablesSpecialDelimiters") && +\ !exists("g:Iptables_SpecialDelimiters") + + let g:Iptables_SpecialDelimiters = g:iptablesSpecialDelimiters + unlet g:iptablesSpecialDelimiters + " echohl WarningMsg | echo "Warning:" | echohl None + " echo "The g:iptablesSpecialDelimiters variable is deprecated." + " echo "Please use g:Iptables_SpecialDelimiters in your .vimrc instead" + +endif + +if exists("g:Iptables_SpecialDelimiters") + let s:Iptables_SpecialDelimiters = g:Iptables_SpecialDelimiters +else + let s:Iptables_SpecialDelimiters = 0 +endif + +"============================================================================ +" Section: Group Definitions {{{1 +"============================================================================ + +syntax keyword iptablesSaveDirective COMMIT +syntax match iptablesSaveOperation "^[:*]" + +syntax keyword iptablesTable filter nat mangle raw + +syntax keyword iptablesTarget + \ ACCEPT DROP QUEUE RETURN BALANCE CLASSIFY CLUSTERIP CONNMARK + \ CONNSECMARK CONNTRACK DNAT DSCP ECN IPMARK IPV4OPSSTRIP LOG + \ MARK MASQUERADE MIRROR NETMAP NFQUEUE NOTRACK REDIRECT REJECT + \ ROUTE SAME SECMARK SET SNAT TARPIT TCPMSS TOS TRACE TTL ULOG XOR + +syntax keyword iptablesBuiltinChain + \ INPUT OUTPUT FORWARD PREROUTING POSTROUTING + +syntax keyword iptablesCommand -A -D -I -R -L -F -Z -N -X -P -E + \ --append --delete --insert --replace --list --flush --zero + \ --new-chain --delete-chain --policy --rename-chain + +syntax keyword iptablesParam -p -s -d -j -i -o -f -c -t + +syntax match iptablesOperator "\s\zs!\ze\s" + +syntax keyword iptablesModuleName contained + \ account addrtype ah childlevel comment condition connbytes connlimit + \ connmark connrate conntrack dccp dscp dstlimit ecn esp fuzzy hashlimit + \ helper icmp iprange ipv4options length limit mac mark mport multiport + \ nth osf owner physdev pkttype policy psd quota random realm recent + \ sctp set state string tcp tcpmss time tos ttl u32 udp unclean + +syntax keyword iptablesModuleType + \ UNSPEC UNICAST LOCAL BROADCAST ANYCAST MULTICAST BLACKHOLE UNREACHABLE + \ PROHIBIT THROW NAT XRESOLVE INVALID ESTABLISHED NEW RELATED SYN ACK FIN + \ RST URG PSH ALL NONE + +" From --reject-with option +syntax keyword iptablesModuleType + \ icmp-net-unreachable + \ icmp-host-unreachable + \ icmp-port-unreachable + \ icmp-proto-unreachable + \ icmp-net-prohibited + \ icmp-host-prohibited + \ icmp-admin-prohibited + +" From --icmp-type option +syntax keyword iptablesModuleType + \ any + \ echo-reply + \ destination-unreachable + \ network-unreachable + \ host-unreachable + \ protocol-unreachable + \ port-unreachable + \ fragmentation-needed + \ source-route-failed + \ network-unknown + \ host-unknown + \ network-prohibited + \ host-prohibited + \ TOS-network-unreachable + \ TOS-host-unreachable + \ communication-prohibited + \ host-precedence-violation + \ precedence-cutoff + \ source-quench + \ redirect + \ network-redirect + \ host-redirect + \ TOS-network-redirect + \ TOS-host-redirect + \ echo-request + \ router-advertisement + \ router-solicitation + \ time-exceeded + \ ttl-zero-during-transit + \ ttl-zero-during-reassembly + \ parameter-problem + \ ip-header-bad + \ required-option-missing + \ timestamp-request + \ timestamp-reply + \ address-mask-request + \ address-mask-reply + +" If we used a keyword for this, port names would be colored the same +" as modules with the same name (e.g. tcp, udp, icmp). +syntax keyword iptablesParam -m --match skipwhite nextgroup=iptablesModuleName + +syntax region iptablesString start=+"+ skip=+\\"+ end=+"+ oneline + +syntax match iptablesComment "^#.*" contains=iptablesTodo +syntax match iptablesBadComment "^\s\+\zs#.*" " Pound must be in first column + +syntax keyword iptablesTodo contained TODO FIXME XXX NOT NOTE + +" Special Delimiters: {{{2 + +if s:Iptables_SpecialDelimiters != 0 + syntax match iptablesNumber "\<[0-9./:]\+\>" + \ contains=iptablesMask,iptablesDelimiter + syntax match iptablesDelimiter "[./:]" contained + syntax match iptablesMask "/[0-9.]\+" contained + \ contains=iptablesDelimiter +else " s:Iptables_SpecialDelimiters == 0 + syntax match iptablesNumber "\<[0-9./]\+\>" + \ contains=iptablesMask,iptablesDelimiter + syntax match iptablesDelimiter "/" contained + syntax match iptablesMask "/[0-9.]\+" contained + \ contains=iptablesDelimiter +endif + +"============================================================================ +" Section: Autogenerated Groups {{{2 +"============================================================================ + +" Begin autogenerated section. +" iptables2vim: "iptables2vim 43 2014-06-08 03:21:32Z ehaar" +" iptables: "iptables v1.4.19.1" + +syntax keyword iptablesLongParam + \ --zone --xor-tos --xor-mark --weekdays --vproto --vportctl --vport + \ --vmethod --verbose --vdir --validmark --vaddr --update + \ --ulog-qthreshold --ulog-prefix --ulog-nlgroup --ulog-cprange + \ --uid-owner --u --type --tunnel-src --tunnel-dst --ttl-set --ttl-lt + \ --ttl-inc --ttl-gt --ttl-eq --ttl-dec --ttl --transparent --tproxy-mark + \ --total-nodes --tos --to-source --to-ports --to-port --to-destination + \ --to --timestop --timestart --timeout --tcp-option --tcp-flags --table + \ --syn --strip-options --string --strict --state --src-type --src-range + \ --src-pfx --src-group --src --sports --sport --spi --source-ports + \ --source-port --source --soft --socket-exists --set-xmark --set-tos + \ --set-mss --set-mark --set-dscp-class --set-dscp --set-counters + \ --set-class --set --selctx --seconds --save-mark --save --rttl --rt-type + \ --rt-segsleft --rt-len --rt- --rsource --return--nomatch --restore-mark + \ --restore --reqid --remove --reject-with --reap --realm --rdest --rcheck + \ --rateest-pps --rateest-name --rateest-lt --rateest-interval + \ --rateest-gt --rateest-ewmalog --rateest-eq --rateest-delta + \ --rateest-bps --rateest --random --quota --queue-num --queue-bypass + \ --queue-balance --protocol --proto --probability --ports --pol + \ --pkt-type --physdev-out --physdev-is-out --physdev-is-in + \ --physdev-is-bridged --physdev-in --persistent --packet --out-interface + \ --or-tos --or-mark --on-port --on-ip --numeric --notrack --nodst + \ --nflog-threshold --nflog-range --nflog-prefix --nflog-group + \ --nfacct-name --next --new --name --mss --monthdays --modprobe --mode + \ --mh-type --mask --mark --mangle-mac-d --mac-source --loose --log-uid + \ --log-tcp-sequence --log-tcp-options --log-prefix --log-level + \ --log-ip-options --log --local-node --line-numbers --limit-iface-out + \ --limit-iface-in --limit-burst --limit --length --led-trigger-id + \ --led-delay --led-always-blink --label --kerneltz --jump --ipvs --ipv + \ --invert --in-interface --icmpv --icmp-type --hmark-tuple + \ --hmark-src-prefix --hmark-sport-mask --hmark-spi-mask --hmark-rnd + \ --hmark-proto-mask --hmark-offset --hmark-mod --hmark-dst-prefix + \ --hmark-dport-mask --hl-set --hl-lt --hl-inc --hl-gt --hl-eq --hl-dec + \ --hitcount --hex-string --helper --help --header --hbh-opts --hbh-len + \ --hashmode --hashlimit-upto --hashlimit-srcmask --hashlimit-src + \ --hashlimit-name --hashlimit-mode --hashlimit-mask + \ --hashlimit-htable-size --hashlimit-htable-max + \ --hashlimit-htable-gcinterval --hashlimit-htable-expire + \ --hashlimit-dstmask --hashlimit-burst --hashlimit-above --hashlimit + \ --hash-init --h-length --goto --gid-owner --genre --gateway --from + \ --fragres --fragmore --fragment --fraglen --fraglast --fragid + \ --fragfirst --expevents --exist --exact --every --espspi + \ --ecn-tcp-remove --ecn-tcp-ece --ecn-tcp-cwr --ecn-ip-ect --dst-type + \ --dst-range --dst-pfx --dst-opts --dst-len --dst-group --dst + \ --dscp-class --dscp --dports --dport --dir --destination-ports + \ --destination-port --destination --del-set --dccp-types --dccp-option + \ --datestop --datestart --ctstatus --ctstate --ctreplsrcport --ctreplsrc + \ --ctrepldstport --ctrepldst --ctproto --ctorigsrcport --ctorigsrc + \ --ctorigdstport --ctorigdst --ctexpire --ctevents --ctdir --cpu + \ --contiguous --connlimit-upto --connlimit-saddr --connlimit-mask + \ --connlimit-daddr --connlimit-above --connbytes-mode --connbytes-dir + \ --connbytes --comment --clustermac --cluster-total-nodes + \ --cluster-local-nodemask --cluster-local-node --cluster-hash-seed --clus + \ --clamp-mss-to-pmtu --chunk-types --checksum-fill --check --bytecode + \ --and-tos --and-mark --algo --ahspi --ahres --ahlen --add-set + \ --accept-local +" End autogenerated section. + +"============================================================================ +" Section: Group Linking {{{1 +"============================================================================ + +IptablesHiLink iptablesSaveDirective PreProc +IptablesHiLink iptablesSaveOperation PreProc + +IptablesHiLink iptablesTable Statement +IptablesHiLink iptablesTarget Statement +IptablesHiLink iptablesBuiltinChain Type + +IptablesHiLink iptablesCommand Operator + +IptablesHiLink iptablesModuleName Type +IptablesHiLink iptablesModuleType Type + +IptablesHiLink iptablesOperator Operator +IptablesHiLink iptablesParam Identifier +IptablesHiLink iptablesLongParam Identifier + +IptablesHiLink iptablesNumber Constant + +if s:Iptables_SpecialDelimiters != 0 + IptablesHiLink iptablesMask PreProc + IptablesHiLink iptablesDelimiter Delimiter +else " s:Iptables_SpecialDelimiters == 0 + IptablesHiLink iptablesMask Special + IptablesHiLink iptablesDelimiter None +endif + +IptablesHiLink iptablesString Constant + +IptablesHiLink iptablesComment Comment +IptablesHiLink iptablesBadComment Error +IptablesHiLink iptablesTodo Todo + +"============================================================================ +" Section: Clean Up {{{1 +"============================================================================ + +delcommand IptablesHiLink + +let b:current_syntax = "iptables" + +if main_syntax == 'iptables' + unlet main_syntax +endif + +" Autoconfigure vim indentation settings +" vim:ts=4:sw=4:sts=4:fdm=marker:iskeyword+=- -- cgit v1.2.3 From 704dfec4a151169187fb24108413fe7dc43a33eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 5 Jun 2017 07:22:17 +0200 Subject: Conditionally integrate annoyme --- profile | 8 +++++++- shellrc | 2 +- zshrc | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/profile b/profile index 445f471..76a201c 100644 --- a/profile +++ b/profile @@ -13,4 +13,10 @@ export EDITOR=vim ~/.service/syncthing -q status || ~/.service/syncthing start # And if we are on first terminal also automatically start x server -[ "$(tty)" = "/dev/tty1" ] && exec startx -- vt1 +if [ "$(tty)" = "/dev/tty1" ]; then + if which annoyme >/dev/null 2>&1; then # Check if we are using annoyme + sleep 1 # just little bit of time to give systemd to start tasks + ls ~/.annoyme/*.pid 2>/dev/null >&2 && annoyme + fi + exec startx -- vt1 +fi diff --git a/shellrc b/shellrc index 2465d96..be99e18 100644 --- a/shellrc +++ b/shellrc @@ -18,7 +18,7 @@ alias gdb='gdb -q' alias cgdb='cgdb -q' alias octave='octave-cli -q' alias ssh='TERM="xterm-256color" ssh' -alias feh='feh --magick-timeout 1 -.' +alias feh='feh --magick-timeout 10 -.' export LESS=-R export LESS_TERMCAP_mb=$'\E[1;31m' diff --git a/zshrc b/zshrc index 6f4944e..150d286 100644 --- a/zshrc +++ b/zshrc @@ -36,9 +36,15 @@ bindkey "^[[3~" delete-char bindkey "^[3;5~" delete-char # PROMPT ####################################################### -if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi +annoyme_check() { + which annoyme >/dev/null 2>&1 && ls ~/.annoyme/*.pid 2>/dev/null >&2 && \ + echo "%{$fg_bold[red]%}!" +} + +[ $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%} " +)\$(annoyme_check)%{$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 -- cgit v1.2.3 From 72ece58969dde490546d9cd1a8431e9a3fef1c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 23 Jun 2017 15:20:20 +0200 Subject: Update archlinux packages --- archlinux.pkgs | 9 +++++---- archlinux.pkgs.d/desktop | 3 +++ archlinux.pkgs.d/devel | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/archlinux.pkgs b/archlinux.pkgs index 6065600..206aadc 100644 --- a/archlinux.pkgs +++ b/archlinux.pkgs @@ -13,6 +13,7 @@ dnl Various essential console programs ifdef(`DESKTOP',gvim,vim) vim-spell-cs vim-spell-en +screen htop openssh ncdu @@ -26,10 +27,6 @@ bc pv sysstat -dnl I want ranger everywhere -include(ranger) -mpv - dnl System stuff ifdef(`OPENRC',dhcpcd-openrc,dhcpcd) ifdef(`OPENRC',fuse-openrc,fuse2) @@ -49,6 +46,10 @@ parted dnl network bind-tools nmap +net-tools +nethogs +tcpdump +tcping dnl archive unzip diff --git a/archlinux.pkgs.d/desktop b/archlinux.pkgs.d/desktop index a508418..5521678 100644 --- a/archlinux.pkgs.d/desktop +++ b/archlinux.pkgs.d/desktop @@ -26,10 +26,12 @@ inkscape audacity pitivi vlc +mpv conkeror surf-webkit2gtk-git feh okular +llpp graphviz mesa-demos @@ -80,6 +82,7 @@ inotify-tools pulsemixer qt5-styleplugins numix-frost-themes +faenza-icon-theme xorg-setxkbmap xorg-xprop dnl For app .desktop management diff --git a/archlinux.pkgs.d/devel b/archlinux.pkgs.d/devel index b6c8095..86ca5cd 100644 --- a/archlinux.pkgs.d/devel +++ b/archlinux.pkgs.d/devel @@ -52,3 +52,4 @@ clang-tools-extra dnl work devel lua51 +lcov -- cgit v1.2.3 From 1d25fbde2c6ab4363578e363ddb77c0f2a892356 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 27 Jun 2017 17:17:31 +0200 Subject: Add pulse system profile --- system/etc/pulse/system.pa | 103 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 system/etc/pulse/system.pa diff --git a/system/etc/pulse/system.pa b/system/etc/pulse/system.pa new file mode 100644 index 0000000..38d1245 --- /dev/null +++ b/system/etc/pulse/system.pa @@ -0,0 +1,103 @@ +#!/usr/bin/pulseaudio -nF +# +# 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 . + +# This startup script is used only if PulseAudio is started in system +# mode. + +.fail + +### Automatically restore the volume of streams and devices +load-module module-device-restore +load-module module-stream-restore +load-module module-card-restore + +### Automatically augment property information from .desktop files +### stored in /usr/share/application +load-module module-augment-properties + +### Should be after module-*-restore but before module-*-detect +load-module module-switch-on-port-available + +### Load audio drivers statically +### (it's probably better to not load these drivers manually, but instead +### use module-udev-detect -- see below -- for doing this automatically) +#load-module module-alsa-sink +#load-module module-alsa-source device=hw:1,0 +#load-module module-null-sink +#load-module module-pipe-sink + +### Automatically load driver modules depending on the hardware available +.ifexists module-udev-detect.so +load-module module-udev-detect +.else +### Use the static hardware detection module (for systems that lack udev/hal support) +load-module module-detect +.endif + +### Automatically connect sink and source if JACK server is present +.ifexists module-jackdbus-detect.so +.nofail +load-module module-jackdbus-detect channels=2 +.fail +.endif + +### Automatically load driver modules for Bluetooth hardware +load-module module-bluetooth-policy +load-module module-bluetooth-discover + +### Load several protocols +.ifexists module-esound-protocol-unix.so +load-module module-esound-protocol-unix +.endif +load-module module-native-protocol-unix + + +### Automatically restore the default sink/source when changed by the user +### during runtime +### NOTE: This should be loaded as early as possible so that subsequent modules +### that look up the default sink/source get the right value +load-module module-default-device-restore + +### Automatically move streams to the default sink if the sink they are +### connected to dies, similar for sources +load-module module-rescue-streams + +### Make sure we always have a sink around, even if it is a null sink. +load-module module-always-sink + +### Honour intended role device property +load-module module-intended-roles + +### Automatically suspend sinks/sources that become idle for too long +load-module module-suspend-on-idle + +### Enable positioned event sounds +load-module module-position-event-sounds + +### Cork music/video streams when a phone stream is active +load-module module-role-cork + +### Modules to allow autoloading of filters (such as echo cancellation) +### on demand. module-filter-heuristics tries to determine what filters +### make sense, and module-filter-apply does the heavy-lifting of +### loading modules and rerouting streams. +load-module module-filter-heuristics +load-module module-filter-apply + +### Make some devices default +#set-default-sink output +#set-default-source input -- cgit v1.2.3 From 943bb7eb6103ca53b680670ca0753263f8998a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 18 Jul 2017 13:19:09 +0200 Subject: Verbose git commits --- gitconfig | 2 ++ private | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gitconfig b/gitconfig index de6c05c..442f202 100644 --- a/gitconfig +++ b/gitconfig @@ -18,3 +18,5 @@ hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short type = cat-file -t dump = cat-file -p +[commit] + verbose = true diff --git a/private b/private index 41a2001..487d3bd 160000 --- a/private +++ b/private @@ -1 +1 @@ -Subproject commit 41a20014db834c9a9090c7c2a9242ac742ac549d +Subproject commit 487d3bdb532360a5259df27ccdc339b66b26e97a -- cgit v1.2.3 From 5c2984a2f2c9cd19d92a5e083e692ba2a5aa37fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 21 Jul 2017 10:45:36 +0200 Subject: Change color for accessible gateway to orange --- config/i3blocks/scripts/iface | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/i3blocks/scripts/iface b/config/i3blocks/scripts/iface index a9a558b..dc82438 100755 --- a/config/i3blocks/scripts/iface +++ b/config/i3blocks/scripts/iface @@ -73,7 +73,7 @@ else # Ping default gateway of this interface if ping $PINGV $(ip route show dev $IF | awk '/^default via/ {print $3}') >/dev/null 2>&1; then # No internet connection but gateway accessible - echo \#FF0F00 # color + echo \#FF9000 # color else # No internet connection echo \#FF0000 # color -- cgit v1.2.3 From 02a47abaf694261b3ed6f4f137a33a9afa141388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 21 Jul 2017 10:46:03 +0200 Subject: Update vim plugins --- vim/bundle/YouCompleteMe | 2 +- vim/bundle/lightline.vim | 2 +- vim/bundle/syntastic | 2 +- vim/bundle/tagbar | 2 +- vim/bundle/ultisnips | 2 +- vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-indent-guides | 2 +- vim/bundle/vim-snippets | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 263bd88..3e31880 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 263bd88bd54278dba94c4d6c43ad5fcde2fcd3bb +Subproject commit 3e318800b4b63c31a6c75d1e8b34543fadcb388f diff --git a/vim/bundle/lightline.vim b/vim/bundle/lightline.vim index 6034e63..ff74d65 160000 --- a/vim/bundle/lightline.vim +++ b/vim/bundle/lightline.vim @@ -1 +1 @@ -Subproject commit 6034e639e871cb33a436508a6c6ccbe3e236de4c +Subproject commit ff74d6561487d220ed9d878172d8b55a79a4c17e diff --git a/vim/bundle/syntastic b/vim/bundle/syntastic index 5efeece..e1161a7 160000 --- a/vim/bundle/syntastic +++ b/vim/bundle/syntastic @@ -1 +1 @@ -Subproject commit 5efeecece3f512076513e8ee1e7444157a16a77b +Subproject commit e1161a723a353db99780f9a9351340df7abbb106 diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index 959f487..f579273 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit 959f48798136bfd4ce60075d3c86c580fcf5e5c5 +Subproject commit f5792732de16b8a2cc202f920e363eb413d7241d diff --git a/vim/bundle/ultisnips b/vim/bundle/ultisnips index 5352d98..423f264 160000 --- a/vim/bundle/ultisnips +++ b/vim/bundle/ultisnips @@ -1 +1 @@ -Subproject commit 5352d98f212e273b3e8b1d84efdbe2d6a6d557e9 +Subproject commit 423f264e753cec260b4f14455126e6db7ba429af diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index b803a28..dcac1f7 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit b803a28f47b26d16f5fe9e747850992c9985c667 +Subproject commit dcac1f74ee5c26125363dca164463bde6657c838 diff --git a/vim/bundle/vim-indent-guides b/vim/bundle/vim-indent-guides index 018298e..b406871 160000 --- a/vim/bundle/vim-indent-guides +++ b/vim/bundle/vim-indent-guides @@ -1 +1 @@ -Subproject commit 018298ead9d3aa9cd3b4ae222f81022a33978b09 +Subproject commit b40687195c01caf40f62d20093296590b48e3a75 diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 3cb0d29..0817950 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 3cb0d29cf55d3d93e0a330819770b4f60e66e39f +Subproject commit 0817950a4fb8ccd48ec38a2b65cf046b597eecb3 -- cgit v1.2.3 From 33ce0ce32ab70df1830205be2ee4e1dd53a1ae74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 21 Jul 2017 16:07:12 +0200 Subject: Add ifrestart to user service --- local/sbin/user-service.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/local/sbin/user-service.sh b/local/sbin/user-service.sh index e48bb9d..632272c 100755 --- a/local/sbin/user-service.sh +++ b/local/sbin/user-service.sh @@ -27,6 +27,7 @@ while [ -n "$1" ]; do echo " start - start service" echo " stop - stop service" echo " restart - restart service" + echo " ifrestart - restart service if it's running" ;; -q) Q=false @@ -83,6 +84,21 @@ case "$OP" in exit 1 fi ;; + ifrestart) + $Q && echo "Restarting service $NAME..." + if status; then + if ! stop; then + $Q && echo " stop failed" + exit 1 + fi + if start; then + $Q && echo " ok" + else + $Q && echo " start failed" + exit 1 + fi + fi + ;; *) echo "Invalid operation!" exit 3 -- cgit v1.2.3 From 74a8b0e36255b7ce19319f96fd67978f6b7e0674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Fri, 21 Jul 2017 16:08:20 +0200 Subject: Update changes in vimrc --- vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vimrc b/vimrc index 75a75ce..fd23bfa 100644 --- a/vimrc +++ b/vimrc @@ -20,6 +20,7 @@ set foldmethod=syntax set wildmode=longest:full,full set wildmenu set modeline +set encoding=utf-8 set number set colorcolumn=82 @@ -47,6 +48,12 @@ function TabToogle() endfunction command TabToogle call TabToogle() +" Indent guides +let g:indent_guides_start_level=2 +let g:indent_guides_guide_size=1 +hi IndentGuidesOdd ctermbg=black +hi IndentGuidesEven ctermbg=102 + " Write as root cmap w!! w !sudo tee >/dev/null % -- cgit v1.2.3 From da70bfe2b9d4c6f95276c0a0a68f1a0d8b42e5fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 24 Jul 2017 22:38:18 +0200 Subject: On bandwidth accept unknown state --- config/i3blocks/scripts/bandwidth | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/config/i3blocks/scripts/bandwidth b/config/i3blocks/scripts/bandwidth index ba15a27..93023c7 100755 --- a/config/i3blocks/scripts/bandwidth +++ b/config/i3blocks/scripts/bandwidth @@ -19,12 +19,15 @@ INTERFACE=$(ip route | awk '/^default .* (wlp|enp)/ { print $5 ; exit }') # Issue #36 compliant. -if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ] -then - echo down # full text - echo down # short text - echo \#FF0000 # color - exit 0 +if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ]; then + ST="`cat /sys/class/net/${INTERFACE}/operstate`" + # Note: usb telephone network is reported as unknown state + if [ "$ST" = "up" -o "$ST" = "unknown" ]; then + echo down # full text + echo down # short text + echo \#FF0000 # color + exit 0 + fi fi # path to store the old results in -- cgit v1.2.3 From 4be02cae35ee07dfb957916c46a707fc7196f07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 2 Aug 2017 17:57:31 +0200 Subject: Add some xresources --- Xresources | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Xresources b/Xresources index 4ad1435..a18aea3 100644 --- a/Xresources +++ b/Xresources @@ -1,4 +1,11 @@ Xcursor.size: 8 +Xft.dpi: 96 +Xft.antialias: true +Xft.rgba: rgb +Xft.hinting: true +Xft.hintstyle: hintslight +Xft.autohint: false +Xft.lcdfilter: lcddefault ! XTerm ## XTerm*metaSendsEscape: true XTerm*locale: true -- cgit v1.2.3 From 24659f9f7efa5479563dea8d2bb1b02134674dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 2 Aug 2017 17:59:48 +0200 Subject: Update pathogen --- vim/3rdparty/vim-pathogen | 2 +- vim/autoload/pathogen.vim | 141 +++++++++------------------------------------- 2 files changed, 28 insertions(+), 115 deletions(-) diff --git a/vim/3rdparty/vim-pathogen b/vim/3rdparty/vim-pathogen index 8c91196..ddfb1f1 160000 --- a/vim/3rdparty/vim-pathogen +++ b/vim/3rdparty/vim-pathogen @@ -1 +1 @@ -Subproject commit 8c91196cfd9c8fe619f35fac6f2ac81be10677f8 +Subproject commit ddfb1f14d7597e6aedc749be06b559a673c437ab diff --git a/vim/autoload/pathogen.vim b/vim/autoload/pathogen.vim index 59a75c1..2ec30e1 100644 --- a/vim/autoload/pathogen.vim +++ b/vim/autoload/pathogen.vim @@ -16,22 +16,29 @@ endif let g:loaded_pathogen = 1 " Point of entry for basic default usage. Give a relative path to invoke -" pathogen#interpose() (defaults to "bundle/{}"), or an absolute path to invoke -" pathogen#surround(). Curly braces are expanded with pathogen#expand(): -" "bundle/{}" finds all subdirectories inside "bundle" inside all directories -" in the runtime path. +" pathogen#interpose() or an absolute path to invoke pathogen#surround(). +" Curly braces are expanded with pathogen#expand(): "bundle/{}" finds all +" subdirectories inside "bundle" inside all directories in the runtime path. +" If no arguments are given, defaults "bundle/{}", and also "pack/{}/start/{}" +" on versions of Vim without native package support. function! pathogen#infect(...) abort - for path in a:0 ? filter(reverse(copy(a:000)), 'type(v:val) == type("")') : ['bundle/{}'] - if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*[{}*]' + if a:0 + let paths = filter(reverse(copy(a:000)), 'type(v:val) == type("")') + else + let paths = ['bundle/{}', 'pack/{}/start/{}'] + endif + if has('packages') + call filter(paths, 'v:val !~# "^pack/[^/]*/start/[^/]*$"') + endif + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') + if path =~# '^\%([$~\\/]\|\w:[\\/]\)' call pathogen#surround(path) - elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)' - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#surround(path . '/{}') - elseif path =~# '[{}*]' - call pathogen#interpose(path) else - call s:warn('Change pathogen#infect('.string(path).') to pathogen#infect('.string(path.'/{}').')') - call pathogen#interpose(path . '/{}') + call pathogen#interpose(path) endif endfor call pathogen#cycle_filetype() @@ -176,19 +183,20 @@ endfunction " and globbed. Actual globs are preserved. function! pathogen#expand(pattern, ...) abort let after = a:0 ? a:1 : '' - if a:pattern =~# '{[^{}]\+}' - let [pre, pat, post] = split(substitute(a:pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1) + let pattern = substitute(a:pattern, '^[~$][^\/]*', '\=expand(submatch(0))', '') + if pattern =~# '{[^{}]\+}' + let [pre, pat, post] = split(substitute(pattern, '\(.\{-\}\){\([^{}]\+\)}\(.*\)', "\\1\001\\2\001\\3", ''), "\001", 1) let found = map(split(pat, ',', 1), 'pre.v:val.post') let results = [] for pattern in found call extend(results, pathogen#expand(pattern)) endfor - elseif a:pattern =~# '{}' - let pat = matchstr(a:pattern, '^.*{}[^*]*\%($\|[\\/]\)') - let post = a:pattern[strlen(pat) : -1] + elseif pattern =~# '{}' + let pat = matchstr(pattern, '^.*{}[^*]*\%($\|[\\/]\)') + let post = pattern[strlen(pat) : -1] let results = map(split(glob(substitute(pat, '{}', '*', 'g')), "\n"), 'v:val.post') else - let results = [a:pattern] + let results = [pattern] endif let vf = pathogen#slash() . 'vimfiles' call map(results, 'v:val =~# "\\*" ? v:val.after : isdirectory(v:val.vf.after) ? v:val.vf.after : isdirectory(v:val.after) ? v:val.after : ""') @@ -255,99 +263,4 @@ function! pathogen#runtime_findfile(file,count) abort endif endfunction -" Section: Deprecated - -function! s:warn(msg) abort - echohl WarningMsg - echomsg a:msg - echohl NONE -endfunction - -" Prepend all subdirectories of path to the rtp, and append all 'after' -" directories in those subdirectories. Deprecated. -function! pathogen#runtime_prepend_subdirectories(path) abort - call s:warn('Change pathogen#runtime_prepend_subdirectories('.string(a:path).') to pathogen#infect('.string(a:path.'/{}').')') - return pathogen#surround(a:path . pathogen#slash() . '{}') -endfunction - -function! pathogen#incubate(...) abort - let name = a:0 ? a:1 : 'bundle/{}' - call s:warn('Change pathogen#incubate('.(a:0 ? string(a:1) : '').') to pathogen#infect('.string(name).')') - return pathogen#interpose(name) -endfunction - -" Deprecated alias for pathogen#interpose(). -function! pathogen#runtime_append_all_bundles(...) abort - if a:0 - call s:warn('Change pathogen#runtime_append_all_bundles('.string(a:1).') to pathogen#infect('.string(a:1.'/{}').')') - else - call s:warn('Change pathogen#runtime_append_all_bundles() to pathogen#infect()') - endif - return pathogen#interpose(a:0 ? a:1 . '/{}' : 'bundle/{}') -endfunction - -if exists(':Vedit') - finish -endif - -let s:vopen_warning = 0 - -function! s:find(count,cmd,file,lcd) - let rtp = pathogen#join(1,pathogen#split(&runtimepath)) - let file = pathogen#runtime_findfile(a:file,a:count) - if file ==# '' - return "echoerr 'E345: Can''t find file \"".a:file."\" in runtimepath'" - endif - if !s:vopen_warning - let s:vopen_warning = 1 - let warning = '|echohl WarningMsg|echo "Install scriptease.vim to continue using :V'.a:cmd.'"|echohl NONE' - else - let warning = '' - endif - if a:lcd - let path = file[0:-strlen(a:file)-2] - execute 'lcd `=path`' - return a:cmd.' '.pathogen#fnameescape(a:file) . warning - else - return a:cmd.' '.pathogen#fnameescape(file) . warning - endif -endfunction - -function! s:Findcomplete(A,L,P) - let sep = pathogen#slash() - let cheats = { - \'a': 'autoload', - \'d': 'doc', - \'f': 'ftplugin', - \'i': 'indent', - \'p': 'plugin', - \'s': 'syntax'} - if a:A =~# '^\w[\\/]' && has_key(cheats,a:A[0]) - let request = cheats[a:A[0]].a:A[1:-1] - else - let request = a:A - endif - let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' - let found = {} - for path in pathogen#split(&runtimepath) - let path = expand(path, ':p') - let matches = split(glob(path.sep.pattern),"\n") - call map(matches,'isdirectory(v:val) ? v:val.sep : v:val') - call map(matches,'expand(v:val, ":p")[strlen(path)+1:-1]') - for match in matches - let found[match] = 1 - endfor - endfor - return sort(keys(found)) -endfunction - -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Ve :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vedit :execute s:find(,'edit',,0) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vopen :execute s:find(,'edit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vsplit :execute s:find(,'split',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vvsplit :execute s:find(,'vsplit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabedit :execute s:find(,'tabedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) -command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) - " vim:set et sw=2 foldmethod=expr foldexpr=getline(v\:lnum)=~'^\"\ Section\:'?'>1'\:getline(v\:lnum)=~#'^fu'?'a1'\:getline(v\:lnum)=~#'^endf'?'s1'\:'=': -- cgit v1.2.3 From cf52d4ecaef0ea3b7283bf2f38d19422cb84e917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 2 Aug 2017 20:22:20 +0200 Subject: Updates for vim --- .gitmodules | 6 ++++++ install | 2 +- vim/bundle/YouCompleteMe | 2 +- vim/bundle/tagbar | 2 +- vim/bundle/vim-gitgutter | 2 +- vim/bundle/vim-repeat | 1 + vim/bundle/vim-snippets | 2 +- vim/bundle/vim-surround | 1 + vim/bundle/vim-table-mode | 2 +- vim/ftplugin/python.vim | 2 ++ vimrc | 14 ++++---------- 11 files changed, 20 insertions(+), 16 deletions(-) create mode 160000 vim/bundle/vim-repeat create mode 160000 vim/bundle/vim-surround create mode 100644 vim/ftplugin/python.vim diff --git a/.gitmodules b/.gitmodules index b169170..c6c3c77 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,9 @@ [submodule "vim/bundle/vim-indent-guides"] path = vim/bundle/vim-indent-guides url = git://github.com/nathanaelkane/vim-indent-guides.git +[submodule "vim/bundle/vim-surround"] + path = vim/bundle/vim-surround + url = git://github.com/tpope/vim-surround.git +[submodule "vim/bundle/vim-repeat"] + path = vim/bundle/vim-repeat + url = https://github.com/tpope/vim-repeat.git diff --git a/install b/install index 01c6924..30de1bb 100755 --- a/install +++ b/install @@ -55,7 +55,7 @@ if ask "Install VIM scripts"; then mkdir -p ~/.cache/vim-undo # directory for undo files if [ "$YCM_REV" != "y" ]; then ( cd $YCM_PATH - ./install.py --clang-completer --system-libclang --racer-completer + ./install.py --clang-completer --system-libclang ); else echo "YouCompleteMe is not required to be recompiled" fi diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe index 3e31880..369fdad 160000 --- a/vim/bundle/YouCompleteMe +++ b/vim/bundle/YouCompleteMe @@ -1 +1 @@ -Subproject commit 3e318800b4b63c31a6c75d1e8b34543fadcb388f +Subproject commit 369fdade93adf23ef3da3b5f8e9fcd14a2b3f093 diff --git a/vim/bundle/tagbar b/vim/bundle/tagbar index f579273..d880bcc 160000 --- a/vim/bundle/tagbar +++ b/vim/bundle/tagbar @@ -1 +1 @@ -Subproject commit f5792732de16b8a2cc202f920e363eb413d7241d +Subproject commit d880bcc333938ee1ed4a99fd89480eff9b6502a6 diff --git a/vim/bundle/vim-gitgutter b/vim/bundle/vim-gitgutter index dcac1f7..dc73a81 160000 --- a/vim/bundle/vim-gitgutter +++ b/vim/bundle/vim-gitgutter @@ -1 +1 @@ -Subproject commit dcac1f74ee5c26125363dca164463bde6657c838 +Subproject commit dc73a81bfe59a9de090b89a1312ded3c6f6a6f89 diff --git a/vim/bundle/vim-repeat b/vim/bundle/vim-repeat new file mode 160000 index 0000000..070ee90 --- /dev/null +++ b/vim/bundle/vim-repeat @@ -0,0 +1 @@ +Subproject commit 070ee903245999b2b79f7386631ffd29ce9b8e9f diff --git a/vim/bundle/vim-snippets b/vim/bundle/vim-snippets index 0817950..2657c86 160000 --- a/vim/bundle/vim-snippets +++ b/vim/bundle/vim-snippets @@ -1 +1 @@ -Subproject commit 0817950a4fb8ccd48ec38a2b65cf046b597eecb3 +Subproject commit 2657c86d942e09b753dd63f200ddd05eb5b36f34 diff --git a/vim/bundle/vim-surround b/vim/bundle/vim-surround new file mode 160000 index 0000000..e49d6c2 --- /dev/null +++ b/vim/bundle/vim-surround @@ -0,0 +1 @@ +Subproject commit e49d6c2459e0f5569ff2d533b4df995dd7f98313 diff --git a/vim/bundle/vim-table-mode b/vim/bundle/vim-table-mode index 4e41af8..a646b40 160000 --- a/vim/bundle/vim-table-mode +++ b/vim/bundle/vim-table-mode @@ -1 +1 @@ -Subproject commit 4e41af8e5f0bf53326d1b83c2feb1eff89fe90d4 +Subproject commit a646b4033ba86496ee0fff442ce8540551040275 diff --git a/vim/ftplugin/python.vim b/vim/ftplugin/python.vim new file mode 100644 index 0000000..03b655f --- /dev/null +++ b/vim/ftplugin/python.vim @@ -0,0 +1,2 @@ +setlocal colorcolumn=79 +setlocal textwidth=79 diff --git a/vimrc b/vimrc index fd23bfa..3d48e8d 100644 --- a/vimrc +++ b/vimrc @@ -49,10 +49,12 @@ endfunction command TabToogle call TabToogle() " Indent guides +let g:indent_guides_enable_on_vim_startup = 1 let g:indent_guides_start_level=2 let g:indent_guides_guide_size=1 -hi IndentGuidesOdd ctermbg=black -hi IndentGuidesEven ctermbg=102 +let g:indent_guides_auto_colors = 0 +autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd ctermbg=232 +autocmd VimEnter,Colorscheme * :hi IndentGuidesEven ctermbg=233 " Write as root cmap w!! w !sudo tee >/dev/null % @@ -103,14 +105,6 @@ endfunction setlocal spelllang=en_us map :call LangToggle() -" TODO for python file type set: -" set colorcolumn=79 -" set textwidth=79 - -" TODO for C file type set: -" TODO bind F2 to execute gnu ident on whole file and ensure that if it fails, no change is done. -" TODO check if .tags exists and alternativelly warn that it missing - " UltiSnips triggers let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" -- cgit v1.2.3 From 0439d2707714e1b6879818dc76e15256617a335d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 2 Aug 2017 20:30:18 +0200 Subject: Update system install script --- system/etc/init.d/killi3 | 13 ------------- system_install | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 17 deletions(-) delete mode 100755 system/etc/init.d/killi3 diff --git a/system/etc/init.d/killi3 b/system/etc/init.d/killi3 deleted file mode 100755 index 1fa83aa..0000000 --- a/system/etc/init.d/killi3 +++ /dev/null @@ -1,13 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -depend() { - before killprocs -} - -start() { - for socket in `find /run/user/*/i3 -name ipc-socket*`; do - i3-msg -s $socket exit - done -} diff --git a/system_install b/system_install index 1caf757..bf93b15 100755 --- a/system_install +++ b/system_install @@ -22,15 +22,26 @@ if [ -e /etc/arch-release ]; then fi fi -read -p "Laptop ACPI and pm? (Y/n) " -if [[ $REPLY =~ ^[Yy]?$ ]]; then +if ask "Laptop ACPI and pm"; then inst system/etc/acpi/handler.sh /etc/acpi/handler.sh inst system/etc/pm/sleep.d/10lock /etc/pm/sleep.d/10lock fi -read -p "Wpa supplicant? (Y/n) " -if [[ $REPLY =~ ^[Yy]?$ ]]; then +if ask "System PATH profile"; then + inst system/etc/profile.d/path.sh /etc/profile.d/path.sh +fi + +if ask "X11 configuration"; then + inst system/etc/X11/ /etc/X11/ +fi + +if ask "System-wide PulseAudio configuration"; then + inst system/etc/pulse/ /etc/pulse/ +fi + +if ask "Wpa supplicant"; then # TODO + true fi # As final step just ensure that correct user is owning system files -- cgit v1.2.3