From 49b1623bd8f1a07d0296d87f9f29ed2e1e404704 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 13:49:20 +0200 Subject: Update i3 configs for zorg --- i3/bar.py | 4 ++-- i3/config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i3/bar.py b/i3/bar.py index 0573669..6328117 100644 --- a/i3/bar.py +++ b/i3/bar.py @@ -18,7 +18,7 @@ status.register("battery", "CHR": "↑", "FULL": "=", }, - battery_ident="BAT1",) + battery_ident="BAT0",) status.register("temp", @@ -36,7 +36,7 @@ status.register("pulseaudio", # },) status.register("network", - interface="wlp3s0", + interface="wlp4s0", format_up="{v4cidr} {quality:3.0f}%",) # Shows disk usage of / diff --git a/i3/config b/i3/config index 998bc89..b4cfad6 100644 --- a/i3/config +++ b/i3/config @@ -111,7 +111,7 @@ bindsym $mod+r mode "resize" # i3bar bar { - status_command python ~/.config/i3/bar.py + status_command ~/.local/venv/bin/python ~/.config/i3/bar.py position bottom workspace_buttons yes colors { -- cgit v1.2.3-70-g09d2 From e65e56a4ea93d399f87dd7f40bef06152984a8d5 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:04:48 +0200 Subject: increase i3/termite font size to 10. --- i3/config | 2 +- termite/config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i3/config b/i3/config index b4cfad6..6597ed0 100644 --- a/i3/config +++ b/i3/config @@ -1,7 +1,7 @@ set $mod Mod4 #font pango:visitor tt2 brk 10 -font pango:Source Code Pro 8 +font pango:Source Code Pro 9 floating_modifier $mod bindsym $mod+Return exec termite diff --git a/termite/config b/termite/config index 2d11307..fa2247e 100644 --- a/termite/config +++ b/termite/config @@ -9,7 +9,7 @@ allow_bold = true dynamic_title = true urgent_on_bell = true clickable_url = true -font = FNCP6 9.2 +font = FNCP6 10.2 scrollback_lines = 1000 search_wrap = true icon_name = terminal -- cgit v1.2.3-70-g09d2 From e63a2dbe11e1c5eab96dc769b54384f9883125cb Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:06:33 +0200 Subject: zsh: zorg: Add profile based on leeloo's --- zsh/profile-zorg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 zsh/profile-zorg diff --git a/zsh/profile-zorg b/zsh/profile-zorg new file mode 100644 index 0000000..0a19020 --- /dev/null +++ b/zsh/profile-zorg @@ -0,0 +1,21 @@ +if (( UID )); then + if [[ -x "$HOME"/.local/lib/libwcwidth.so ]]; then + export LD_PRELOAD="$HOME"/.local/lib/libwcwidth.so + fi + + function { + local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env + local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) + if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then + source "$envfile" >/dev/null + else + ssh-agent > "$envfile" + source "$envfile" >/dev/null + fi + } + + export MAILDIR="$HOME"/mail + export MANPATH="$(manpath)":"$HOME"/.local/share/man +fi + +# vim: ft=zsh -- cgit v1.2.3-70-g09d2 From 9f3cb0d0836e5279faffaca28bb6e1587e5dae81 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:24:30 +0200 Subject: gtk-3: Use regular elementary instead of elementary-xfce --- gtk-3.0/settings.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index 07a3f6e..a0f7de0 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,6 +1,6 @@ [Settings] gtk-theme-name=Numix -gtk-icon-theme-name=elementary-xfce-darkest +gtk-icon-theme-name=elementary gtk-font-name=Ubuntu 9 gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH -- cgit v1.2.3-70-g09d2 From 28e67d544358ff133e844268e0e2d58d80a7a477 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 13:49:20 +0200 Subject: Update i3 configs for zorg --- i3/bar.py | 4 ++-- i3/config | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i3/bar.py b/i3/bar.py index a7a585d..064eafc 100644 --- a/i3/bar.py +++ b/i3/bar.py @@ -18,7 +18,7 @@ status.register("battery", "CHR": "↑", "FULL": "=", }, - battery_ident="BAT1",) + battery_ident="BAT0",) status.register("temp", @@ -36,7 +36,7 @@ status.register("pulseaudio", # },) status.register("network", - interface="wlp3s0", + interface="wlp4s0", format_up="{essid:.10s}: {v4cidr} {quality:3.0f}%",) # Shows disk usage of / diff --git a/i3/config b/i3/config index 998bc89..b4cfad6 100644 --- a/i3/config +++ b/i3/config @@ -111,7 +111,7 @@ bindsym $mod+r mode "resize" # i3bar bar { - status_command python ~/.config/i3/bar.py + status_command ~/.local/venv/bin/python ~/.config/i3/bar.py position bottom workspace_buttons yes colors { -- cgit v1.2.3-70-g09d2 From f7dac82edd601faa3c31d5a1f1b908d591511a3a Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:04:48 +0200 Subject: increase i3/termite font size to 10. --- i3/config | 2 +- termite/config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/i3/config b/i3/config index b4cfad6..6597ed0 100644 --- a/i3/config +++ b/i3/config @@ -1,7 +1,7 @@ set $mod Mod4 #font pango:visitor tt2 brk 10 -font pango:Source Code Pro 8 +font pango:Source Code Pro 9 floating_modifier $mod bindsym $mod+Return exec termite diff --git a/termite/config b/termite/config index 2d11307..fa2247e 100644 --- a/termite/config +++ b/termite/config @@ -9,7 +9,7 @@ allow_bold = true dynamic_title = true urgent_on_bell = true clickable_url = true -font = FNCP6 9.2 +font = FNCP6 10.2 scrollback_lines = 1000 search_wrap = true icon_name = terminal -- cgit v1.2.3-70-g09d2 From 589638251e277bb6881c6be44639c0207565d611 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:06:33 +0200 Subject: zsh: zorg: Add profile based on leeloo's --- zsh/profile-zorg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 zsh/profile-zorg diff --git a/zsh/profile-zorg b/zsh/profile-zorg new file mode 100644 index 0000000..0a19020 --- /dev/null +++ b/zsh/profile-zorg @@ -0,0 +1,21 @@ +if (( UID )); then + if [[ -x "$HOME"/.local/lib/libwcwidth.so ]]; then + export LD_PRELOAD="$HOME"/.local/lib/libwcwidth.so + fi + + function { + local envfile="$XDG_RUNTIME_DIR"/ssh-agent.env + local pid=$(awk -F'[=;]' 'FNR == 2 {print $2}' "$envfile" 2>/dev/null) + if [[ -n "$pid" ]] && kill -0 "$pid" &>/dev/null; then + source "$envfile" >/dev/null + else + ssh-agent > "$envfile" + source "$envfile" >/dev/null + fi + } + + export MAILDIR="$HOME"/mail + export MANPATH="$(manpath)":"$HOME"/.local/share/man +fi + +# vim: ft=zsh -- cgit v1.2.3-70-g09d2 From 723f3afe9452043e9b975411acadfef92fe8deeb Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Fri, 10 Jul 2015 20:24:30 +0200 Subject: gtk-3: Use regular elementary instead of elementary-xfce --- gtk-3.0/settings.ini | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index e16e892..a0f7de0 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,6 +1,6 @@ -[# SubjectSettings] -gtk-theme-name=Adawaita -gtk-icon-theme-name=elementary-xfce-darkest +[Settings] +gtk-theme-name=Numix +gtk-icon-theme-name=elementary gtk-font-name=Ubuntu 9 gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH -- cgit v1.2.3-70-g09d2 From 1d8d2e1cce5d0f9ed3ad74ae6b92bf480e0069a2 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Sat, 11 Jul 2015 06:30:02 +0200 Subject: i3: add mic mute binding --- i3/config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/i3/config b/i3/config index 6597ed0..0152531 100644 --- a/i3/config +++ b/i3/config @@ -142,10 +142,11 @@ bindsym XF86AudioPrev exec --no-startup-id mpc prev # control PulseAudio from media keys bindsym XF86AudioMute exec volumecontrol mute -bindsym XF86Back exec volumecontrol lower +bindsym XF86AudioMicMute exec volumecontrol mute-mic bindsym XF86AudioLowerVolume exec volumecontrol lower -bindsym XF86Forward exec volumecontrol raise bindsym XF86AudioRaiseVolume exec volumecontrol raise + + bindsym XF86ScreenSaver exec screenlock.bash -- cgit v1.2.3-70-g09d2 From a348bad5bf9355514a922576c2aa8c2114a01e20 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:18:53 +0200 Subject: dunst: Use bigger font/window --- dunst/dunstrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dunst/dunstrc b/dunst/dunstrc index 07c5114..3a5132b 100644 --- a/dunst/dunstrc +++ b/dunst/dunstrc @@ -1,5 +1,5 @@ [global] - font = Terminus 10 + font = Terminus 14 allow_markup = yes format = "%a\n%s %p\n%b" sort = no @@ -8,7 +8,7 @@ show_age_threshold = 60 word_wrap = yes ignore_newline = no - geometry = "550x0-1+18" + geometry = "600x0-1+18" transparency = 15 idle_threshold = 120 monitor = 0 -- cgit v1.2.3-70-g09d2 From 04e4b8089e4d338fd22567f2307a191f106b008d Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:19:20 +0200 Subject: gtk: Bump font size --- gtk-2.0/gtkrc-2.0 | 2 +- gtk-3.0/settings.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk-2.0/gtkrc-2.0 b/gtk-2.0/gtkrc-2.0 index 42d6b91..d5156f4 100644 --- a/gtk-2.0/gtkrc-2.0 +++ b/gtk-2.0/gtkrc-2.0 @@ -3,7 +3,7 @@ gtk-theme-name="Numix" gtk-icon-theme-name="elementary-xfce-darkest" -gtk-font-name="Ubuntu 9" +gtk-font-name="Ubuntu 10" gtk-cursor-theme-name="Neutral" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH diff --git a/gtk-3.0/settings.ini b/gtk-3.0/settings.ini index a0f7de0..e63aa5a 100644 --- a/gtk-3.0/settings.ini +++ b/gtk-3.0/settings.ini @@ -1,7 +1,7 @@ [Settings] gtk-theme-name=Numix gtk-icon-theme-name=elementary -gtk-font-name=Ubuntu 9 +gtk-font-name=Ubuntu 10 gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR -- cgit v1.2.3-70-g09d2 From 276b4535dcdc508273742ad007a667493ada882f Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:19:37 +0200 Subject: i3: Add brightnes keybindings --- i3/config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i3/config b/i3/config index 0152531..0cabb5c 100644 --- a/i3/config +++ b/i3/config @@ -132,6 +132,8 @@ bindsym $mod+Shift+g exec --no-startup-id setxkbmap us #bindsym $mod+Shift+u exec --no-startup-id setxkbmap dvp bindsym $mod+Shift+u exec --no-startup-id setxkbmap dvorak +bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 +bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 # control ncmpcpp / mpd from media keys bindsym XF86AudioPlay exec --no-startup-id mpc toggle -- cgit v1.2.3-70-g09d2 From 3c14db41f74ecacbb48040e91b012236d71bbb09 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:19:53 +0200 Subject: termite: Bump font size --- termite/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/termite/config b/termite/config index fa2247e..6d5b01e 100644 --- a/termite/config +++ b/termite/config @@ -9,7 +9,7 @@ allow_bold = true dynamic_title = true urgent_on_bell = true clickable_url = true -font = FNCP6 10.2 +font = FNCP6 11.2 scrollback_lines = 1000 search_wrap = true icon_name = terminal -- cgit v1.2.3-70-g09d2 From 25f21b5f08677f162e1f06122a51e481f28ebf94 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:20:20 +0200 Subject: weechat: buffers.pl: 5.0 -> 5.1 --- weechat/perl/buffers.pl | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/weechat/perl/buffers.pl b/weechat/perl/buffers.pl index 472f6e9..c31d8fc 100644 --- a/weechat/perl/buffers.pl +++ b/weechat/perl/buffers.pl @@ -20,6 +20,8 @@ # # History: # +# 2015-03-29, Ed Santiago +# v5.1: merged buffers: always indent, except when filling is horizontal # 2014-12-12 # v5.0: fix cropping non-latin buffer names # 2014-08-29, Patrick Steinhardt : @@ -164,7 +166,7 @@ use strict; use Encode qw( decode encode ); # -----------------------------[ internal ]------------------------------------- my $SCRIPT_NAME = "buffers"; -my $SCRIPT_VERSION = "5.0"; +my $SCRIPT_VERSION = "5.1"; my $BUFFERS_CONFIG_FILE_NAME = "buffers"; my $buffers_config_file; @@ -1298,8 +1300,17 @@ sub build_buffers } else { - my $indent = ""; - $indent = ((" " x length($buffer->{"number"}))." ") if (($position eq "left") || ($position eq "right")); + # Indentation aligns channels in a visually appealing way + # when viewing list top-to-bottom... + my $indent = (" " x length($buffer->{"number"}))." "; + # ...except when list is top/bottom and channels left-to-right. + my $option_pos = weechat::config_string( weechat::config_get( "weechat.bar.buffers.position" ) ); + if (($option_pos eq 'top') || ($option_pos eq 'bottom')) { + my $option_filling = weechat::config_string( weechat::config_get( "weechat.bar.buffers.filling_top_bottom" ) ); + if ($option_filling =~ /horizontal/) { + $indent = ''; + } + } $str .= weechat::color("default") .$color_bg .$indent; -- cgit v1.2.3-70-g09d2 From f66b4df9d9ae7cb00aeb92e681be3841ad8a1740 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:20:43 +0200 Subject: weechat: iset.pl: 3.7 -> 3.9 --- weechat/perl/iset.pl | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/weechat/perl/iset.pl b/weechat/perl/iset.pl index 0a4f8b5..af74767 100644 --- a/weechat/perl/iset.pl +++ b/weechat/perl/iset.pl @@ -19,6 +19,10 @@ # # History: # +# 2015-05-16, Sebastien Helleu : +# version 3.9: fix cursor position when editing an option with WeeChat >= 1.2 +# 2015-05-02, arza : +# version 3.8: don't append "null" to /set when setting an undefined setting # 2015-05-01, nils_2 : # version 3.7: fix two perl warnings (reported by t3chguy) # 2014-09-30, arza : @@ -119,7 +123,7 @@ use strict; my $PRGNAME = "iset"; -my $VERSION = "3.7"; +my $VERSION = "3.9"; my $DESCR = "Interactive Set for configuration options"; my $AUTHOR = "Sebastien Helleu "; my $LICENSE = "GPL3"; @@ -982,22 +986,34 @@ sub iset_cmd_cb my $value = $options_values[$current_line]; if ($options_is_null[$current_line]) { - $value = "null"; + $value = ""; } else { $quote = "\"" if ($options_types[$current_line] eq "string"); } + $value = " ".$quote.$value.$quote if ($value ne "" or $quote ne ""); + my $set_command = "/set"; - $set_command = "/mute " . $set_command if (weechat::config_boolean($options_iset{"use_mute"}) == 1); - - weechat::buffer_set($iset_buffer, "input", $set_command." ".$options_names[$current_line]." ".$quote.$value.$quote); - weechat::command($iset_buffer, "/input move_beginning_of_line"); - weechat::command($iset_buffer, "/input move_next_word"); - weechat::command($iset_buffer, "/input move_next_word"); - weechat::command($iset_buffer, "/input move_next_word") if (weechat::config_boolean($options_iset{"use_mute"}) == 1); - weechat::command($iset_buffer, "/input move_next_char"); - weechat::command($iset_buffer, "/input move_next_char") if ($quote ne ""); + my $start_index = 5; + if (weechat::config_boolean($options_iset{"use_mute"}) == 1) + { + $set_command = "/mute ".$set_command; + $start_index += 11; + } + $set_command = $set_command." ".$options_names[$current_line].$value; + my $pos_space = index($set_command, " ", $start_index); + if ($pos_space < 0) + { + $pos_space = 9999; + } + else + { + $pos_space = $pos_space + 1; + $pos_space = $pos_space + 1 if ($quote ne ""); + } + weechat::buffer_set($iset_buffer, "input", $set_command); + weechat::buffer_set($iset_buffer, "input_pos", "".$pos_space); } } weechat::bar_item_update("isetbar_help") if (weechat::config_boolean($options_iset{"show_help_bar"}) == 1); -- cgit v1.2.3-70-g09d2 From 3df11f26478bde803755d1e2c84cfd2cdf97504f Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:21:13 +0200 Subject: weechat: stalker.pl: 1.4 -> 1.5 --- weechat/perl/stalker.pl | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/weechat/perl/stalker.pl b/weechat/perl/stalker.pl index b418fad..ce2bb65 100644 --- a/weechat/perl/stalker.pl +++ b/weechat/perl/stalker.pl @@ -20,6 +20,9 @@ # along with this program. If not, see . # # History: +# version 1.5:nils_2@freenode.#weechat +# 2015-06-15: add: new option del_date +# # version 1.4:nils_2@freenode.#weechat # 2014-05-14: fix: perl error under some circumstances (thanks Piotrek) # @@ -98,7 +101,7 @@ use File::Spec; use DBI; my $SCRIPT_NAME = "stalker"; -my $SCRIPT_VERSION = "1.4"; +my $SCRIPT_VERSION = "1.5"; my $SCRIPT_AUTHOR = "Nils Görs "; my $SCRIPT_LICENCE = "GPL3"; my $SCRIPT_DESC = "Records and correlates nick!user\@host information"; @@ -777,6 +780,15 @@ sub _deassociate_nick_from_host return $sth->rows; } +sub delete_older_entries +{ + # $day = yyyy-mm-dd + my ( $day1, $day2 ) = @_; + # from date ? to date ? + $sth = $DBH->prepare( "DELETE FROM records WHERE added >= '" . $day1 . "' AND added < '" . $day2 . "'" ); + $sth->execute(); +} + # ------------------------[ OUTPUT with tags ]------------------------------ sub OUTPUT { @@ -934,6 +946,10 @@ sub stalker_command_cb my $DEBUG_prefix = weechat::config_string(weechat::config_get('weechat.look.prefix_error')); weechat::print($buffer, _color_str($color, $DEBUG_prefix) . "\t$SCRIPT_NAME: $affected_rows deleted"); } + elsif (lc($args_array[0]) eq 'del_date') + { + delete_older_entries($args_array[1],$args_array[2]) if ($args_array[1] and $args_array[2]); + } return weechat::WEECHAT_RC_OK; } @@ -1370,6 +1386,7 @@ weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION, " scan : scan a channel (be careful; scanning large channels takes a while!)\n". " you should manually /WHO #channel first or use /quote PROTOCTL UHNAMES\n". " count: display the number of rows in database\n". + " del_date: delete all entries from date1 to date2\n". "remove_nick_from_host: remove a nick from a given host\n". "\n\n". "Stalker will add nick!user\@host to database monitoring JOIN/WHOIS/NICK messages.\n\n". @@ -1411,8 +1428,11 @@ weechat::register($SCRIPT_NAME, $SCRIPT_AUTHOR, $SCRIPT_VERSION, " /".$SCRIPT_NAME." host .*\\.de -regex\n". " remove nick from an association host'\n". " /".$SCRIPT_NAME." remove_nick_from_host TheNick ~the\@bad.users.host\n". + " remove entries from database in range of given date:'\n". + " /".$SCRIPT_NAME." del_date 2014-01-01 2014-12-31\n". "", "count %-||". + "del_date %-||". "host %% %(irc_servers)|-regex %-||". "nick %(nick) %(irc_servers)|-regex -regex %-||". "remove_nick_from_host %(nick) |-regex -regex %-||". -- cgit v1.2.3-70-g09d2 From 0765d636a0bdbd65c8c46925cd9bada131eba25e Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 16 Jul 2015 22:21:54 +0200 Subject: zsh: update 5 aliases/functions --- zsh/aliases.zsh | 54 +++++++++++++++++++++++++++++++++++++----------------- zsh/completion/_5c | 2 +- zsh/completion/_5v | 2 +- 3 files changed, 39 insertions(+), 19 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 0546ce4..2f8a205 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -75,33 +75,51 @@ if have systemctl && [[ -d /run/systemd/system ]]; then fi function 5v { - if [[ -d "$HOME"/5/venvs/"$1" ]]; then - source "$HOME"/5/venvs/"$1"/bin/activate + if [[ -d "$HOME"/venvs/"$1" ]]; then + source "$HOME"/venvs/"$1"/bin/activate printf "\x1b[38;5;2m==> 5venv ‘%s’ activated successfully.\x1b[0m\n" "$1" + else printf "==> 5venv ‘%s’ not found\n" "$1" printf "==> Create? [yN]: " read yn + if [[ "$yn" == 'y' || "$yn" == 'yes' ]]; then - virtualenv-2.7 "$HOME"/5/venvs/"$1" - if (( $? == 0 )); then - print "\x1b[38;5;2m==> 5venv created successfully, installing basic requirements.\x1b[0m" + printf "==> Python version? [23]: " + read venvver + + if [[ "$venvver" == '2' ]]; then + virtualenv2 "$HOME"/venvs/"$1" + if (( $? == 0 )); then + print "\x1b[38;5;2m==> 5venv created successfully, installing basic requirements.\x1b[0m" + else + print "\x1b[38;5;1m==> Error: 5env creation failed. Exiting.\x1b[0m" + return 1 + fi + source "$HOME"/venvs/"$1"/bin/activate + pip install -r "$HOME"/venvs/5_requirements.txt + + elif [[ "$venvver" == '3' ]]; then + virtualenv3 "$HOME"/venvs/"$1" + if (( $? == 0 )); then + print "\x1b[38;5;2m==> 5venv created successfully, activating environment.\x1b[0m" + print "==> Note that no requirements were installed due to version 3 was selected." + else + print "\x1b[38;5;1m==> Error: 5env creation failed. Exiting.\x1b[0m" + return 1 + fi + source "$HOME"/venvs/"$1"/bin/activate + else - print "\x1b[38;5;1m==> Error: 5env creation failed. Exiting.\x1b[0m" - return 1 + printf "==> virtualenv for version ‘%s’ not found.\n" "$venvver" + exit 1 fi - source "$HOME"/5/venvs/"$1"/bin/activate - pip install -r "$HOME"/5/venvs/5_requirements.txt fi fi } function 5c { - if [[ -n "$1" ]]; then - cd "$HOME"/5/code/"$1" - else - cd "$HOME"/5/code - fi + cd "$HOME"/projects/"$1" } function 5clone { @@ -109,11 +127,13 @@ function 5clone { print "No repo name" fi - (cd "$HOME"/5/code + (cd "$HOME"/projects git clone git@github.com:5m/"$1" - cd "$1" + shift + cd -) + + pushd "$HOME"/projects/"$1" git config --local user.email johannes@5monkeys.se - ) } alias 5ssh='TERM=xterm ssh' diff --git a/zsh/completion/_5c b/zsh/completion/_5c index ca7eeac..5f309c7 100644 --- a/zsh/completion/_5c +++ b/zsh/completion/_5c @@ -1,4 +1,4 @@ #compdef 5c _arguments \ - "1: :($(print $HOME/5/code/*(/) | xargs -n1 basename))" + "1: :($(print $HOME/projects/*(/) | xargs -n1 basename))" diff --git a/zsh/completion/_5v b/zsh/completion/_5v index 3958269..659bb1a 100644 --- a/zsh/completion/_5v +++ b/zsh/completion/_5v @@ -1,4 +1,4 @@ #compdef 5v _arguments \ - "1: :($(print $HOME/5/venvs/*(/) | xargs -n1 basename))" + "1: :($(print $HOME/venvs/*(/) | xargs -n1 basename))" -- cgit v1.2.3-70-g09d2 From 729d60834a7fe56d5d70698f34cd231555d0be81 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 20 Jul 2015 19:20:22 +0200 Subject: weechat: Add new setting --- weechat/weechat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/weechat/weechat.conf b/weechat/weechat.conf index 8c01b0a..ea3e779 100644 --- a/weechat/weechat.conf +++ b/weechat/weechat.conf @@ -40,6 +40,7 @@ color_real_white = off command_chars = "" command_incomplete = off confirm_quit = on +confirm_upgrade = off day_change = on day_change_message_1date = "-- %a, %d %b %Y --" day_change_message_2dates = "-- %%a, %%d %%b %%Y (%a, %d %b %Y) --" -- cgit v1.2.3-70-g09d2 From d3845d2b7cc169b21b9e2684cb60e80e672900de Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Mon, 20 Jul 2015 19:22:00 +0200 Subject: htop: Add new settings --- htop/htoprc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htop/htoprc b/htop/htoprc index 8684a08..7d23a6f 100644 --- a/htop/htoprc +++ b/htop/htoprc @@ -7,16 +7,16 @@ hide_threads=0 hide_kernel_threads=0 hide_userland_threads=0 shadow_other_users=1 -show_thread_names=0 -highlight_base_name=0 +show_thread_names=1 +highlight_base_name=1 highlight_megabytes=1 highlight_threads=1 tree_view=1 header_margin=1 -detailed_cpu_time=0 +detailed_cpu_time=1 cpu_count_from_zero=0 update_process_names=0 -account_guest_in_cpu_meter=0 +account_guest_in_cpu_meter=1 color_scheme=0 delay=15 left_meters=AllCPUs Memory Swap -- cgit v1.2.3-70-g09d2 From b1ecaab5a7ef71307ef51a7c99f5e9a9b7025985 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 6 Aug 2015 13:06:16 +0200 Subject: XCompose: Remove lines only meant for testing. --- X11/XCompose | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/X11/XCompose b/X11/XCompose index 0097034..6e1646d 100644 --- a/X11/XCompose +++ b/X11/XCompose @@ -74,14 +74,4 @@ include "%L" : "☣" U2623 # BIOHAZARD SIGN : "☢" U2622 # RADIOACTIVE SIGN - : "卐" U262D : "ಠ_ಠ" - - : U00A0 - : U2007 - : U2008 - : U2009 - : U200A - : U202F - : U205F - : U3000 -- cgit v1.2.3-70-g09d2 From 13258672a0eef9492cc8978a0b0a74a0987fa700 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 6 Aug 2015 13:07:38 +0200 Subject: Clean up ssh config --- ssh/config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ssh/config b/ssh/config index 9f45882..c073ed0 100644 --- a/ssh/config +++ b/ssh/config @@ -10,6 +10,7 @@ Host * GSSAPIAuthentication yes PubkeyAuthentication yes + Host *.kyriasis.com GSSAPIDelegateCredentials yes ForwardAgent yes @@ -23,11 +24,9 @@ Host git.kyriasis.com Host theos hostname theos.kyriasis.com PubkeyAuthentication no - ForwardAgent yes Host lucifer hostname lucifer.kyriasis.com - ForwardAgent yes Host *.archlinux.org -- cgit v1.2.3-70-g09d2 From 11a34f5122b9b4207c95e66e18621722bae76a31 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 6 Aug 2015 13:08:36 +0200 Subject: git: Add --signoff to ci alias MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- git/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/config b/git/config index b3d486a..bd33940 100644 --- a/git/config +++ b/git/config @@ -6,7 +6,7 @@ [alias] amend = commit --amend --verbose br = branch - ci = commit --verbose + ci = commit --verbose --signoff co = checkout di = diff dc = diff --cached -- cgit v1.2.3-70-g09d2