From 7a0fb14d5e0d8ca6192ae9ab07819eaa5928cf06 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Tue, 20 Oct 2009 19:33:57 +0200 Subject: Cleanup --- awesome_bar.sh | 33 ---- awesomerc | 100 ------------ dzen2.sh | 41 ----- gtkrc-2.0 | 1 - mark-yank-urls | 300 ----------------------------------- neo2 | 442 ---------------------------------------------------- perl/mark-yank-urls | 300 +++++++++++++++++++++++++++++++++++ viod | 17 -- xorg/gtkrc-2.0 | 1 + xorg/neo2 | 442 ++++++++++++++++++++++++++++++++++++++++++++++++++++ xorg/xdefaults | 2 +- zsh/zshrc | 100 ++++++++++++ zshrc | 100 ------------ 13 files changed, 844 insertions(+), 1035 deletions(-) delete mode 100755 awesome_bar.sh delete mode 100644 awesomerc delete mode 100755 dzen2.sh delete mode 100644 gtkrc-2.0 delete mode 100644 mark-yank-urls delete mode 100644 neo2 create mode 100644 perl/mark-yank-urls delete mode 100755 viod create mode 100644 xorg/gtkrc-2.0 create mode 100644 xorg/neo2 create mode 100644 zsh/zshrc delete mode 100644 zshrc diff --git a/awesome_bar.sh b/awesome_bar.sh deleted file mode 100755 index edcd148..0000000 --- a/awesome_bar.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/zsh - -SCREEN=0 - -func_power() { - if [ -e /proc/acpi/battery/BAT0/info ]; then - CAP=$(grep full /proc/acpi/battery/BAT0/info | awk '{print $4}') - REM=$(grep remaining /proc/acpi/battery/BAT0/state | awk '{print $3}') - STATE=$(($REM * 100 / $CAP))"%" - - echo $STATE - else - echo "No Battery" - fi -} - -func_mem() { - TOT=$(free -m | grep Mem | awk '{print $2}') - USE=$(free -m | grep buffers/cache | awk '{print $3}') - MEM=$(($USE * 100 / $TOT)) - echo $MEM -} - -while true; do - echo $SCREEN widget_tell topbar power text " `func_power` " | awesome-client - echo $SCREEN widget_tell topbar wlan text " $(ip r | awk '{print $9}' | head -n 1) " | awesome-client - echo $SCREEN widget_tell topbar clock text " `date +"%x %T"` " | awesome-client - echo $SCREEN widget_tell topbar hostname text " `hostname` " | awesome-client - - sleep 1 -done - -# vim: set tw=0 ts=4: diff --git a/awesomerc b/awesomerc deleted file mode 100644 index 8bb1d09..0000000 --- a/awesomerc +++ /dev/null @@ -1,100 +0,0 @@ -screen 0 { - general { - resize_hints = false - border = 1 - new_become_master = false - new_get_focus = true - } - styles { - normal { font = "Terminus 8" fg = "#d3c16c" bg = "#000000" border = "#111111" } - focus { fg = "#000000" bg = "#aaff77" border = "#aaff77" } - urgent { fg = "#111111" bg = "#ff4500" } - } - tags { - tag 1 { layout = "tile" mwfact = 0.50 } - tag 2 { layout = "tile" mwfact = 0.50 } - tag 3 { layout = "tile" mwfact = 0.50 } - tag 4 { layout = "tile" mwfact = 0.50 } - tag 5 { layout = "tile" mwfact = 0.50 } - tag 6 { layout = "tile" mwfact = 0.50 } - tag 7 { layout = "tile" mwfact = 0.50 } - tag 8 { layout = "tile" mwfact = 0.50 } - tag 9 { layout = "tile" mwfact = 0.50 } - } - layouts { - layout tile {} - layout tileleft {} - layout tilebottom {} - layout max {} - layout floating {} - } - statusbar topbar { - position = "top" - height = "16" - taglist tags { - mouse { - button = "1" - command = "tag_view" - } - } - textbox power { align = "right" } - textbox wlan { align = "right" style { fg = "#999999" } mouse { button = "1" command = "spawn" arg = "wicd-client -n" } } - textbox clock { align = "right" } - textbox hostname { align = "right" style { fg = "#ff0000" } } - } -} - -rules { - rule { name = "Gimp" float = true } - rule { name = "MPlayer" float = true } - rule { name = "PacketTracer5" float = true } - rule { name = "Twinkle" float = true } - rule { name = "SDL_App" float = true } - rule { name = "No_Crypt_Client_2d.exe" float = true } - rule { name = "linux_64_client" float = true } - rule { name = "Skype" float = true } - rule { name = "Pidgin" float = true } - rule { name = "Wireshark" float = true } -} - -mouse { - client { modkey = {"Mod1"} button = "1" command = "client_movemouse" } - client { modkey = {"Mod1"} button = "3" command = "client_resizemouse" } -} - -keys { - key { modkey = {"Mod1"} key = "q" command = "spawn" arg = "`dmenu_path | dmenu` && eval \"exec $exe\"" } - key { modkey = {"Mod1"} key = "c" command = "spawn" arg = "`transset`" } - key { modkey = {"Mod1"} key = "Return" command = "spawn" arg = "exec x-terminal-emulator" } - key { modkey = {"Mod1"} key = "l" command = "spawn" arg = "exec slock" } - key { modkey = {"Mod1"} key = "space" command = "tag_setlayout" arg = "+1" } - key { modkey = {"Mod1", "Shift"} key = "space" command = "tag_setlayout" arg = "-1" } - key { modkey = {"Mod1"} key = "b" command = "statusbar_toggle" } - key { modkey = {"Mod1"} key = "r" command = "client_focusnext" } - key { modkey = {"Mod1"} key = "g" command = "client_focusprev" } - key { modkey = {"Mod1", "Shift"} key = "r" command = "client_swapnext" } - key { modkey = {"Mod1", "Shift"} key = "g" command = "client_swapprev" } - key { modkey = {"Mod1"} key = "Tab" command = "screen_focus" arg = "+1" } - key { modkey = {"Mod1"} key = "s" command = "screen_focus" arg = "-1" } - key { modkey = {"Mod1"} key = "y" command = "screen_focus" arg = "+1" } - key { modkey = {"Mod1"} key = "n" command = "tag_setmwfact" arg = "-0.01" } - key { modkey = {"Mod1"} key = "t" command = "tag_setmwfact" arg = "+0.01" } - key { modkey = {"Mod1", "Shift"} key = "n" command = "tag_setnmaster" arg = "+1" } - key { modkey = {"Mod1", "Shift"} key = "t" command = "tag_setnmaster" arg = "-1" } - key { modkey = {"Mod1"} key = "h" command = "tag_viewprev" } - key { modkey = {"Mod1"} key = "f" command = "tag_viewnext" } - key { modkey = {"Mod1"} key = "m" command = "client_togglemax" } - key { modkey = {"Mod1", "Shift"} key = "c" command = "client_kill" } - key { modkey = {"Mod1", "Shift"} key = "q" command = "quit" } - key { modkey = {"Mod1", "Control"} key = "r" command = "restart" } - key { modkey = {"Mod1"} key = "0" command = "tag_view" } - keylist - { - modkey = {"Mod1"} - command = "tag_view" - keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } - arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 } - } -} - -# vim: set tw=0 ts=4: diff --git a/dzen2.sh b/dzen2.sh deleted file mode 100755 index fa46549..0000000 --- a/dzen2.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/zsh -# dzen2 script by Stefan Ritter - -COUNT=0 - -func_date() { - date +%x" "%T -} - -func_cputemp() { - if [ -e /proc/acpi/thermal_zone/THRM/temperature ]; then - echo $(cat /proc/acpi/thermal_zone/THRM/temperature | awk '{print $2 "°"}') - fi -} - -func_battery() { - if [ -e /proc/acpi/battery/BAT0/info ]; then - CAP=$(grep full /proc/acpi/battery/BAT0/info | awk '{print $4}') - REM=$(grep remaining /proc/acpi/battery/BAT0/state | awk '{print $3}') - echo $(($REM * 100 / $CAP))"%" - fi -} - -func_load() { - echo $(cat /proc/loadavg | awk '{print $1 " " $2 " " $3}') -} - -func_volume() { - amixer | grep -A 6 \'PCM\' | tail -n 1 | awk '{print $5}' | sed 's/\[//g' | sed 's/\]//g' -} - -func_wlanip() { - /sbin/ifconfig | grep -A 1 wlan0 | tail -n 1 | awk '{print $2}' | sed 's/Adresse://g' -} - -while true; do - print "^i(etc/pixelicons/spkr_01.xbm) $(func_volume) ^i(etc/pixelicons/info_01.xbm) $(func_load) ^i(etc/pixelicons/bat_full_02.xbm) $(func_battery) ^i(etc/pixelicons/temp.xbm) $(func_cputemp) ^ca(1,wicd-client -n)^i(etc/pixelicons/wifi_02.xbm)^ca() $(func_wlanip) ^i(etc/pixelicons/clock.xbm) $(func_date) ^fg(red)$(hostname) " - sleep 1 -done - -# vim: set tw=0: diff --git a/gtkrc-2.0 b/gtkrc-2.0 deleted file mode 100644 index 7e04893..0000000 --- a/gtkrc-2.0 +++ /dev/null @@ -1 +0,0 @@ -gtk-font-name="Sans Serif 7" diff --git a/mark-yank-urls b/mark-yank-urls deleted file mode 100644 index ca379cb..0000000 --- a/mark-yank-urls +++ /dev/null @@ -1,300 +0,0 @@ -#!/usr/bin/perl -# Author: Bart Trojanowski -# Website: http://www.jukie.net/~bart/blog/urxvt-url-yank -# License: GPLv2 - -use strict; -use warnings; - -my $url_matcher = qr{( - (?:https?://|ftp://|news://|mailto:|file://|www\.)[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~#]+ - [ab-zA-Z0-9\-\@;\/?&=%\$_+!*\x27()~] # exclude some trailing characters (heuristic) -)}x; - - -sub on_start { - my ($term) = @_; - - $term->{have_Clipboard} = eval { require Clipboard; }; - if ($term->{have_Clipboard}) { - import Clipboard; - } - - eval { require Regexp::Common::URI }; - if(!$@) { - require Regexp::Common; - Regexp::Common->import('URI'); - - $url_matcher = $Regexp::Common::RE{URI}{HTTP}; - } - - $term->{browser} = $term->x_resource ("urlLauncher") || "x-www-browser"; - - () -} - -sub on_line_update { - my ($term, $row) = @_; - - # Fetch the line that has changed. - my $line = $term->line($row); - my $text = $line->t; - - # Find and underline URLs. - while ($text =~ /($url_matcher)/g) { - my $rend = $line->r; - - # Mark all characters as underlined. we _must_ not toggle underline, as - # we might get called on an already-marked URL. - if($term->x_resource ('underlineURLs') eq 'true') { - my $url = $1; - my ($first, $last) = ($-[1], $+[1] - 1); - - --$last if $url =~ s/["']$//; - - $_ |= urxvt::RS_Uline for @{$rend}[$first .. $last]; - - $line->r($rend); - } - } - - () -} - -sub on_button_release { - my ($term, $event) = @_; - - my $mask = $term->ModLevel3Mask | $term->ModMetaMask - | urxvt::ShiftMask | urxvt::ControlMask; - - if ($event->{button} == 2 && ($event->{state} & $mask) == 0) { - my $row = $event->{row}; - my $col = $event->{col}; - - my $line = $term->line ($row); - my $text = $line->t; - - while ($text =~ /($url_matcher)/g) { - my ($url, $first, $last) = ($1, $-[1], $+[1]); - - if($first <= $col && $last >= $col) { - $url =~ s/["']$//; - $term->exec_async($term->{browser}, $url); - return 1; - } - } - } - - () -} - - -my $mark_mode_active = 0; -my %mod = ( 'control' => 0, 'shift' => 0 ); -my $url_selected = -1; -my @url_db = (); - - -sub do_scan_for_urls { - my ($term) = @_; - - @url_db = (); - - my $row_start = $term->top_row; - my $row_end = $term->nrow; - - for my $row ($row_start .. $row_end) { - - # Fetch the line that has changed. - my $line = $term->line ($row); - my $text = $line->t; - - # Find all urls (if any). - while ($text =~ /($url_matcher)/g) { - my $rend = $line->r; - - my ($url, $first, $last) = ($1, $-[1], $+[1] - 1); - - --$last if $url =~ s/["']$//; - - my %h = ( - row => $row, - col_from => $first, - col_to => $last, - url => $url, - ); - - push @url_db, \%h; - } - } - - # 0 for none, positive count otherwise - return $#url_db + 1; -} - - -sub on_user_command { - my ($term, $cmd) = @_; - - activate_mark_mode($term) if $cmd eq 'mark-yank-urls:activate_mark_mode'; - - () -} - -sub on_key_press { - my ($term, $event, $keysym, $octets) = @_; - - if ($keysym == 65507) { # - $mod{control} = 1; - - } elsif ($keysym == 65505) { # - $mod{shift} = 1; - - } - - # Ignore all input when we are active. - $mark_mode_active && return 1; - - () -} - -sub on_key_release { - my ($term, $event, $keysym, $octets) = @_; - - if ($mark_mode_active) { - my $ch = chr($keysym); - - if ($keysym == 65307) { # - deactivate_mark_mode ($term); - return 1; - - } elsif ($keysym == 65293) { # - my $url = get_active_url($term); - $term->exec_async($term->{browser}, $url); - deactivate_mark_mode ($term); - return 1; - - } elsif ($keysym == 65507) { # - $mod{control} = 0; - return 1; - - } elsif ($keysym == 65505) { # - $mod{shift} = 0; - return 1; - - } elsif ($mod{control} && (($ch eq 'n') || ($ch eq 'p'))) { - # ^n and ^p to cycle list - my $dir = ($ch eq 'n') ? 1 : -1; - move_highlight ($term, $dir); - - } elsif ($ch eq 'y') { # y - do_copy ($term); - deactivate_mark_mode ($term); - return 1; - - } - - return 1; - } - - () -} - -sub get_active_url { - my ($term) = @_; - my $max = $#url_db + 1; - - return if $url_selected < 0 || $url_selected >= $max; - return if not defined $url_db[$url_selected]; - my $o = $url_db[$url_selected]; - my %h = %$o; - - return $h{url}; -} - -sub do_copy { - my ($term) = @_; - - my $text = get_active_url ($term); - - if ($term->{have_Clipboard}) { - Clipboard->copy($text); - } else { - $text =~ s/\(["|><&()]\)/\\$1/; - system ("echo -n \"$text\" | xclip -i"); - } -} - -sub move_highlight { - my ($term, $dir) = @_; - my $max = $#url_db + 1; - - do_highlight ($term, 0); - - $url_selected = ($max + $url_selected + $dir) % $max; - - do_highlight ($term, 1); - - $term->want_refresh; -} - -sub do_highlight { - my ($term, $enable) = @_; - my $max = $#url_db + 1; - - return if $url_selected < 0 || $url_selected >= $max; - return if not defined $url_db[$url_selected]; - - my $o = $url_db[$url_selected]; - my %h = %$o; - - my $row = $h{row}; - my $line = $term->line ($row); - my $text = $line->t; - my $rend = $line->r; - - if ($enable) { - $_ |= urxvt::RS_RVid - for @{$rend}[ $h{col_from} .. $h{col_to}]; - - # make it visible - $term->view_start ( $row < 0 ? $row : 0 ); - - } else { - $_ &= ~urxvt::RS_RVid - for @{$rend}[ $h{col_from} .. $h{col_to}]; - } - - $line->r ($rend); -} - -sub activate_mark_mode { - my ($term) = @_; - - if ($mark_mode_active) { - - move_highlight ($term, -1); - - } elsif ( do_scan_for_urls ($term) ) { - - $term->{save_view_start} = $term->view_start; - - move_highlight ($term, 0); - - $mark_mode_active=1 if ($url_selected > -1); - } -} - -sub deactivate_mark_mode { - my ($term) = @_; - - do_highlight ($term, 0); - - $mark_mode_active = 0; - $url_selected = -1; - - $term->view_start ($term->{save_view_start}); - $term->want_refresh; -} - -# vim: set et ts=4 sw=4: diff --git a/neo2 b/neo2 deleted file mode 100644 index 00a6034..0000000 --- a/neo2 +++ /dev/null @@ -1,442 +0,0 @@ -// based on a keyboard map from an 'xkb/symbols/de' file -// -// $XKeyboardConfig: xkeyboard-config/symbols/de,v 1.17 2007/07/15 22:12:12 svu Exp $ -// $XFree86: xc/programs/xkbcomp/symbols/de,v 1.6 2003/09/08 13:12:51 pascal Exp $ - -default -xkb_symbols "basic" { - - include "latin(type4)" - - name[Group1]="Germany"; - - key { [ 2, quotedbl, twosuperior, oneeighth ] }; - key { [ 3, section, threesuperior, sterling ] }; - key { [ 4, dollar, onequarter, currency ] }; - - key {type[Group1]="FOUR_LEVEL_PLUS_LOCK", symbols[Group1]= - [ssharp, question, backslash, questiondown, 0x1001E9E ]}; -// The unicode capital letter sharp s U+1E9E is transformed to "SS" -// to match the rules for capitalizing sharp s in german. -// If the capital sharp s is needed, delete the line -// starting with from /usr/share/X11/locale/iso8859-15/Compose. -// If both doubled S and capital sharp s are needed, use 0x1001E9E -// for capital sharp s and some free unicode codepoint like 0x1001E9C -// for doubled S. Don`t forget to change this in the Compose file, too. - - key { [dead_acute, dead_grave, dead_cedilla, dead_ogonek ] }; - - key { [ e, E, EuroSign, EuroSign ] }; - key { [ z, Z, leftarrow, yen ] }; - key { [udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] }; - key { [ plus, asterisk, dead_tilde, dead_macron ] }; - - key { [odiaeresis, Odiaeresis, dead_doubleacute, dead_doubleacute ] }; - key { [adiaeresis, Adiaeresis, dead_circumflex, dead_caron] }; - key { [dead_circumflex, degree, notsign, notsign ] }; - - key { [numbersign, apostrophe, dead_grave, dead_breve ] }; - key { [ y, Y, guillemotleft, less ] }; - - include "kpdl(comma)" - - include "level3(ralt_switch)" -}; - -partial alphanumeric_keys -xkb_symbols "nodeadkeys" { - - // modify the basic German layout to not have any dead keys - - include "de(basic)" - name[Group1]="Germany - Eliminate dead keys"; - - key { [asciicircum, degree, notsign, notsign ] }; - key { [apostrophe, grave, cedilla, cedilla ] }; - key { [udiaeresis, Udiaeresis, diaeresis, diaeresis ] }; - key { [ plus, asterisk, asciitilde, macron ] }; - key { [odiaeresis, Odiaeresis, doubleacute, doubleacute ] }; - key { [adiaeresis, Adiaeresis, asciicircum, asciicircum ] }; - key { [numbersign, apostrophe, grave, grave ] }; - key { [ minus, underscore, dead_belowdot, abovedot ] }; -}; - -partial alphanumeric_keys -xkb_symbols "deadgraveacute" { - // modify the basic German layout to have only acute and grave - // as dead keys (tilde and circumflex are needed as spacing characters - // in many programming languages) - - include "de(basic)" - name[Group1]="Germany - Dead grave acute"; - - key { [asciicircum, degree, notsign, notsign ] }; - key { [ plus, asterisk, asciitilde, dead_macron ] }; - key { [numbersign, apostrophe, grave, grave ] }; -}; - -partial alphanumeric_keys -xkb_symbols "deadacute" { - // modify the basic German layout to have only acute as - // dead keys (ASCII grave, tilde and circumflex are needed as - // spacing characters in many programming languages and text formatters) - - include "de(deadgraveacute)" - - name[Group1]="Germany - Dead acute"; - - key { [dead_acute, grave, dead_cedilla, dead_ogonek ] }; - key { [numbersign, apostrophe, dead_grave, dead_grave ] }; -}; - -partial alphanumeric_keys -xkb_symbols "ro" { - // add romanian-specific letters to the basic German layout. - // Romanian symbols are accessible with combination of and - // 'a', 's', 't', 'i', 'ä (ä)' (+ for capital letters). - // To view romanian-specific symbols, add "export LC_CTYPE=ro_RO" - // or "export LC_CTYPE=de_DE.utf8" to your .profile. - - include "de(basic)" - - name[Group1]="Germany - Romanian keyboard with German letters"; - - key { [ t, T, tcedilla, Tcedilla ] }; - key { [ i, I, icircumflex, Icircumflex ] }; - key { [ a, A, acircumflex, Acircumflex ] }; - key { [ s, S, scedilla, Scedilla ] }; - key { [ adiaeresis, Adiaeresis, abreve, Abreve ] }; -}; - -partial alphanumeric_keys -xkb_symbols "ro_nodeadkeys" { - // add romanian-specific letters to the German nodeadkeys layout. - // Read the comment for de_ro ! - - include "de(nodeadkeys)" - name[Group1]="Germany - Romanian keyboard with German letters, eliminate dead keys"; - - key { [ t, T, tcedilla, Tcedilla ] }; - key { [ i, I, icircumflex, Icircumflex ] }; - key { [ a, A, acircumflex, Acircumflex ] }; - key { [ s, S, scedilla, Scedilla ] }; - key { [ adiaeresis, Adiaeresis, abreve, Abreve ] }; -}; - -// German Dvorak keymap by Thorsten Staerk (www.staerk.de/thorsten) -// Have acute and grave as dead keys, tilde and circumflex alive as they are needed -// in many programming languages. -// to use this keymap, use a 105-key-keyboard and the command setxkbmap -model pc105 -layout dvorak -variant de -// source: http://www-lehre.informatik.uni-osnabrueck.de/~rfreund/dvorak.php -partial alphanumeric_keys -xkb_symbols "dvorak" { - include "us(dvorak)" - - name[Group1]="Germany - Dvorak"; - - key { [ asciicircum, degree ] }; - - key { [ 1, exclam, onesuperior ] }; - key { [ 2, quotedbl, twosuperior ] }; - key { [ 3, section, threesuperior ] }; - key { [ 4, dollar, bar ] }; - key { [ 5, percent, bar ] }; - key { [ 6, ampersand, brokenbar ] }; - key { [ 7, slash, braceleft ] }; - key { [ 8, parenleft, bracketleft ] }; - key { [ 9, parenright, bracketright ] }; - key { [ 0, equal, braceright ] }; - key { [ plus, asterisk, asciitilde ] }; - key { [ less, greater, dead_grave ] }; - - key { [ udiaeresis, Udiaeresis, at ] }; - key { [ comma, semicolon, dead_diaeresis ] }; - key { [ period, colon ] }; - key { [ c, C, copyright, Cacute ] }; - key { [ t, T, trademark ] }; - key { [ z, Z, zabovedot, Zabovedot ] }; - key { [ question, ssharp ] }; - key { [ slash, backslash, dead_acute ] }; - - key { [ a, A, at, aogonek ] }; - key { [ o, O, oacute, Oacute ] }; - key { [ e, E, EuroSign, eogonek ] }; - key { [ i, I ] }; - key { [ u, U ] }; - key { [ h, H ] }; - key { [ d, D ] }; - key { [ r, R, registered ] }; - key { [ n, N, nacute, Nacute ] }; - key { [ s, S, sacute, Sacute] }; - key { [ l, L, lstroke, Lstroke ] }; - - key { [ odiaeresis, Odiaeresis ] }; - key { [ q, Q, at ] }; - key { [ m, M, mu ] }; - key { [ numbersign, apostrophe ] }; - - key { [ minus, underscore, hyphen, diaeresis] }; - - key { [ adiaeresis, Adiaeresis, bar ] }; - - include "level3(ralt_switch)" -}; - -partial alphanumeric_keys -xkb_symbols "Sundeadkeys" { - - // For naming consistency - - include "de(basic)" - -}; - -partial alphanumeric_keys -xkb_symbols "sundeadkeys" { - - // For naming consistency - - include "de(Sundeadkeys)" - - name[Group1]="Germany - Sun dead keys"; -}; - - -// German NEO-Layout -// adopted 2004 by Hanno Behrens -// inspired by Dvorak/de-ergo http://www.goebel-consult.de/de-ergo/ -// -// Authors: -// -// Benjamin Kellermann -// -// Other Questions: -// -// -// $Revision$, $Date$ -// http://pebbles.schattenlauf.de/layout.php - - -partial alphanumeric_keys modifier_keys keypad_keys -xkb_symbols "neo" { - - name[Group1]= "German Neostyle"; - - // Modifier definition - // ----------------------- - - // Mod3 (FIXME Nur CAPS+BKSL ist Caps_Lock – Nicht andersherum, siehe Ticket #30) - key.type[Group1]="THREE_LEVEL"; - key { [ ISO_Level3_Shift, ISO_Level3_Shift, Caps_Lock ] }; - key { [ ISO_Level3_Shift, ISO_Level3_Shift, Caps_Lock ] }; - - // Definition des Neo-Mod4 - key.type[Group1]="ONE_LEVEL"; - key { [ 0xfe11 ]}; - key { [ 0xfe11 ]}; - modifier_map Mod3 { , }; - // Achtung: ^^^ Dies ist eine X-Server-Variable, nicht unser Mod3. - - // Ebenen im Neo-Jargon, hier im Treiber andere Reihenfolge - // ------------------------------------------------------------- - // Ebene 1: normal - // Ebene 2: Shift - // Ebene 3: Mod3 - // Ebene 4: Mod4 (zum Markieren Shift+Mod4) - // Ebene 5: Shift+Mod3 - // Ebene 6: Mod3+Mod4 (in dieser Reihenfolge) - // Compose (keine eigene Ebene): Mod3+Tab - // Feststelltaste (Capslock): Shift+Shift - // - // Ebenen im Xkeymap-Jargon, hier in der Treiberdatei - // ------------------------------------------------------- - // Die von uns genannte Ebene 6 ist auf den X-Level 7 - // verschoben, da der X-Level 6 mit Shift+Mod4 zu erreichen ist. - // Die Navigationstasten von Ebene 4 (mit X-Mod4 bzw. X-Level 5) - // werden teilweise, um auch mit Shift+Mod4 zu funktionieren, - // nochmal im X-Level 6 wiederholt. Also so: - // Ebene1 Ebene2 Ebene3 Ebene5 Ebene4 Eb4+Shift Ebene6 - // X-Level1 X-Level2 X-Level3 X-Level4 X-Level5 X-Level6 X-Level7 - - key.type[Group1]="EIGHT_LEVEL_ALPHABETIC" ; - - // general Lock - // ----------------- - // Einrasten über linke Win-Taste+Modifier, Lösen über nochmaliges Betätigen des Modifiers - // ShiftLock und Mod5Lock funktionieren, aber Achtung: - // FIXME Mod3Lock lässt sich aber nicht mehr lösen!!!! - - - // Tab as Multi_key (Compose) - // ------------------------------- - key { [ Tab, ISO_Left_Tab, Multi_key ] }; - - // number row - // --------------- - - // These are the levels used, and Xorg's translations with type="EIGHT_LEVEL": - // Base Shift Mod3 Shift+Mod3 Mod4 Shift+Mod4 Mod3+Mod4 - // Mod5 Mod6 - // Level1 Level2 Level3 Level4 Level5 Level6 Level7 - // Ebene1 Ebene2 Ebene3 Ebene5 Ebene4 Ebene4+Shift Ebene6 - - key { [ dead_circumflex, dead_caron, dead_breve, dead_stroke, dead_belowdot, NoSymbol, dead_belowdot ] }; - - key { [ 1, degree, onesuperior, U2081, enfilledcircbullet, NoSymbol, notsign ] }; - key { [ 2, numerosign, twosuperior, U2082, U2023, NoSymbol, logicalor ] }; - key { [ 3, section, threesuperior, U2083, NoSymbol, NoSymbol, logicaland ] }; - key { [ 4, guillemotright, U203A, U2113, Prior, Prior, uptack ] }; - key { [ 5, guillemotleft, U2039, femalesymbol, NoSymbol, NoSymbol, U2221 ] }; - key { [ 6, EuroSign, cent, malesymbol, sterling, NoSymbol, U2225 ] }; - - key { [ 7, dollar, yen, Greek_kappa, currency, NoSymbol, U21C8 ] }; - key { [ 8, doublelowquotemark, singlelowquotemark, U27E8, KP_Divide, NoSymbol, U21C5 ] }; - key { [ 9, leftdoublequotemark, leftsinglequotemark, U27E9, KP_Multiply, NoSymbol, U220B ] }; - key { [ 0, rightdoublequotemark, rightsinglequotemark, U2080, minus, NoSymbol, emptyset ] }; - - key { [ minus, endash, emdash, U2011, NoSymbol, NoSymbol, hyphen ] }; - key { [ dead_acute, dead_grave, dead_cedilla, dead_ogonek, dead_abovedot, NoSymbol, dead_abovering ] }; - - // top row - // ------------ - // xvlcwkhgfqß - key { [ x, X, ellipsis, Greek_xi, U22EE, NoSymbol, Greek_XI ] }; - key { [ v, V, underscore, NoSymbol, BackSpace, BackSpace, U2259 ] }; - key { [ l, L, bracketleft, Greek_lambda, Up, Up, Greek_LAMBDA ] }; - key { [ c, C, bracketright, Greek_chi, Delete, Delete, U2102 ] }; - key { [ w, W, asciicircum, Greek_omega, Insert, Insert, Greek_OMEGA ] }; - - key { [ k, K, exclam, U03F0, exclamdown, NoSymbol, radical ] }; - key { [ h, H, less, Greek_psi, 7, NoSymbol, Greek_PSI ] }; - key { [ g, G, greater, Greek_gamma, 8, NoSymbol, Greek_GAMMA ] }; - key { [ f, F, equal, Greek_phi, 9, NoSymbol, Greek_PHI ] }; - key { [ q, Q, ampersand, U03D5, plus, NoSymbol, U211A ] }; - key { [ ssharp, U1E9E, U017F, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot ] }; - - key { [ dead_tilde, dead_macron, dead_diaeresis, dead_doubleacute, dead_stroke, NoSymbol, NoSymmol ] }; - - // middle row - // --------------- - // uiaeosnrtdy - key { [ u, U, backslash, NoSymbol, Home, Home, U222E ] }; - key { [ i, I, slash, Greek_iota, Left, Left, integral ] }; - key { [ a, A, braceleft, Greek_alpha, Down, Down, U2200 ] }; - key { [ e, E, braceright, Greek_epsilon, Right, Right, U2203 ] }; - key { [ o, O, asterisk, Greek_omicron, End, End, elementof ] }; - - key { [ s, S, question, Greek_sigma, questiondown, NoSymbol, Greek_SIGMA ] }; - key { [ n, N, parenleft, Greek_nu, 4, NoSymbol, U2115 ] }; - key { [ r, R, parenright, U03F1, 5, NoSymbol, U211D ] }; - key { [ t, T, minus, Greek_tau, 6, NoSymbol, partialderivative ] }; - key { [ d, D, colon, Greek_delta, comma, NoSymbol, Greek_DELTA ] }; - key { [ y, Y, at, Greek_upsilon, period, NoSymbol, nabla ] }; - - // bottom row - // --------------- - // üöäpzbm,.j - key { [ udiaeresis, Udiaeresis, numbersign, NoSymbol, Escape, Escape, variation ] }; - key { [ odiaeresis, Odiaeresis, dollar, NoSymbol, Tab, Tab, U2111 ] }; - key { [ adiaeresis, Adiaeresis, bar, Greek_eta, Next, Next, U211C ] }; - key { [ p, P, asciitilde, Greek_pi, Return, Return, Greek_PI ] }; - key { [ z, Z, grave, Greek_zeta, NoSymbol, NoSymbol, U2124 ] }; - - key { [ b, B, plus, Greek_beta, colon, NoSymbol, U21D0 ] }; - key { [ m, M, percent, Greek_mu, 1, NoSymbol, ifonlyif ] }; - key { [ comma, NoSymbol, quotedbl, Greek_rho, 2, NoSymbol, U21D2 ] }; - key { [ period, NoSymbol, apostrophe, U03D1, 3, NoSymbol, Greek_THETA ] }; - key { [ j, J, semicolon, Greek_theta, semicolon, NoSymbol, U221D ] }; - - // Space key - // -------------- - key { [ space, space, space, nobreakspace, 0, NoSymbol, U202F ] }; - - // Keypad - // =========== - - // Num-Lock gibt es bei Neo nicht mehr: - //key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; - - // Die ehemalige Num-Lock-Taste erzeugt nun diverse Zeichen: - key { [ Tab, ISO_Left_Tab, equal, U2248, notequal, NoSymbol, U2261 ] }; - - // topmost row - // ---------------- - key { [ KP_Divide, KP_Divide, division, U2223, U2300, NoSymbol, U2044 ] }; - key { [ KP_Multiply, KP_Multiply, U22C5, multiply, U2299, NoSymbol, U2297 ] }; - key { [ KP_Subtract, KP_Subtract, U2212, U2216, U2296, NoSymbol, U2238 ] }; - - // top row - // ------------ - key { [ KP_7, U2714, U2195, U230A, KP_Home, KP_Home, U2308 ] }; - key { [ KP_8, U2718, U2191, U2229, KP_Up, KP_Up, U22C2 ] }; - key { [ KP_9, dagger, U20D7, U230B, KP_Prior, KP_Prior, U2309 ] }; - key { [ KP_Add, KP_Add, plusminus, U2213, U2295, NoSymbol, U2214 ] }; - - // middle row - // ---------------- - key { [ KP_4, U2663, leftarrow, includedin, KP_Left, KP_Left, U2286 ] }; - key { [ KP_5, EuroSign, infinity, U22B6, KP_Begin, KP_Begin, U22B7 ] }; - key { [ KP_6, brokenbar, rightarrow, includes, KP_Right, KP_Right, U2287 ] }; - - // bottom row - // --------------- - key { [ KP_1, U2666, U2194, U226A, KP_End, KP_End, U2264 ] }; - key { [ KP_2, U2665, downarrow, union, KP_Down, KP_Down, U22C3 ] }; - key { [ KP_3, U2660, U21CC, U226B, KP_Next, KP_Next, U2265 ] }; - key { [ KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter ] }; - key { [ KP_Equal ] }; - - // bottommost row - // ------------------- - key { [ KP_0, U2423, percent, U2030, KP_Insert, KP_Insert, U25A1 ] }; - key { [ KP_Decimal, comma, period, apostrophe, KP_Delete, KP_Delete, quotedbl ] }; - -}; - -// Copied from macintosh_vndr/de -// olh@suse.de very close to MacOS map - -partial alphanumeric_keys -xkb_symbols "mac" { - - include "de" - name[Group1]= "Germany - Macintosh"; - - // Alphanumeric section - key { [ 1, exclam, exclamdown, at ] }; - key { [ 5, percent, bracketleft ] }; - key { [ 6, ampersand, bracketright ] }; - key { [ 7, slash, bar, backslash ] }; - key { [ 8, parenleft, braceleft, asciitilde ] }; - key { [ 9, parenright, braceright ] }; - key { [ q, Q, guillemotleft, guillemotright ] }; - key { [ r, R, registered ] }; - key { [ u, U, diaeresis, Aacute ] }; - key { [ i, I, slash, Ucircumflex ] }; - key { [ udiaeresis, Udiaeresis, periodcentered, degree ] }; - key { [ plus, asterisk, asciitilde ] }; - key { [ a, A, aring, Aring ] }; - key { [ g, G, copyright ] }; - key { [ h, H, ordfeminine ] }; - key { [ l, L, at ] }; - key { [ odiaeresis, Odiaeresis, dead_acute ] }; - key { [ n, N, asciitilde ] }; - -}; - -partial alphanumeric_keys -xkb_symbols "mac_nodeadkeys" { - // modify the standard German mac layout to not have any dead keys - include "de(mac)" - name[Group1]= "Germany - Macintosh, eliminate dead keys"; - key { [ 4, dollar, onequarter, currency ] }; - - key { [ asciicircum, degree, notsign ] }; - key { [ acute, grave, cedilla ] }; - key { [ udiaeresis, Udiaeresis, diaeresis ] }; - key { [ plus, asterisk, asciitilde, macron ] }; - key { [ odiaeresis, Odiaeresis, acute ] }; - key { [ adiaeresis, Adiaeresis, asciicircum ] }; - - key { [ numbersign, apostrophe, grave ] }; -}; diff --git a/perl/mark-yank-urls b/perl/mark-yank-urls new file mode 100644 index 0000000..ca379cb --- /dev/null +++ b/perl/mark-yank-urls @@ -0,0 +1,300 @@ +#!/usr/bin/perl +# Author: Bart Trojanowski +# Website: http://www.jukie.net/~bart/blog/urxvt-url-yank +# License: GPLv2 + +use strict; +use warnings; + +my $url_matcher = qr{( + (?:https?://|ftp://|news://|mailto:|file://|www\.)[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~#]+ + [ab-zA-Z0-9\-\@;\/?&=%\$_+!*\x27()~] # exclude some trailing characters (heuristic) +)}x; + + +sub on_start { + my ($term) = @_; + + $term->{have_Clipboard} = eval { require Clipboard; }; + if ($term->{have_Clipboard}) { + import Clipboard; + } + + eval { require Regexp::Common::URI }; + if(!$@) { + require Regexp::Common; + Regexp::Common->import('URI'); + + $url_matcher = $Regexp::Common::RE{URI}{HTTP}; + } + + $term->{browser} = $term->x_resource ("urlLauncher") || "x-www-browser"; + + () +} + +sub on_line_update { + my ($term, $row) = @_; + + # Fetch the line that has changed. + my $line = $term->line($row); + my $text = $line->t; + + # Find and underline URLs. + while ($text =~ /($url_matcher)/g) { + my $rend = $line->r; + + # Mark all characters as underlined. we _must_ not toggle underline, as + # we might get called on an already-marked URL. + if($term->x_resource ('underlineURLs') eq 'true') { + my $url = $1; + my ($first, $last) = ($-[1], $+[1] - 1); + + --$last if $url =~ s/["']$//; + + $_ |= urxvt::RS_Uline for @{$rend}[$first .. $last]; + + $line->r($rend); + } + } + + () +} + +sub on_button_release { + my ($term, $event) = @_; + + my $mask = $term->ModLevel3Mask | $term->ModMetaMask + | urxvt::ShiftMask | urxvt::ControlMask; + + if ($event->{button} == 2 && ($event->{state} & $mask) == 0) { + my $row = $event->{row}; + my $col = $event->{col}; + + my $line = $term->line ($row); + my $text = $line->t; + + while ($text =~ /($url_matcher)/g) { + my ($url, $first, $last) = ($1, $-[1], $+[1]); + + if($first <= $col && $last >= $col) { + $url =~ s/["']$//; + $term->exec_async($term->{browser}, $url); + return 1; + } + } + } + + () +} + + +my $mark_mode_active = 0; +my %mod = ( 'control' => 0, 'shift' => 0 ); +my $url_selected = -1; +my @url_db = (); + + +sub do_scan_for_urls { + my ($term) = @_; + + @url_db = (); + + my $row_start = $term->top_row; + my $row_end = $term->nrow; + + for my $row ($row_start .. $row_end) { + + # Fetch the line that has changed. + my $line = $term->line ($row); + my $text = $line->t; + + # Find all urls (if any). + while ($text =~ /($url_matcher)/g) { + my $rend = $line->r; + + my ($url, $first, $last) = ($1, $-[1], $+[1] - 1); + + --$last if $url =~ s/["']$//; + + my %h = ( + row => $row, + col_from => $first, + col_to => $last, + url => $url, + ); + + push @url_db, \%h; + } + } + + # 0 for none, positive count otherwise + return $#url_db + 1; +} + + +sub on_user_command { + my ($term, $cmd) = @_; + + activate_mark_mode($term) if $cmd eq 'mark-yank-urls:activate_mark_mode'; + + () +} + +sub on_key_press { + my ($term, $event, $keysym, $octets) = @_; + + if ($keysym == 65507) { # + $mod{control} = 1; + + } elsif ($keysym == 65505) { # + $mod{shift} = 1; + + } + + # Ignore all input when we are active. + $mark_mode_active && return 1; + + () +} + +sub on_key_release { + my ($term, $event, $keysym, $octets) = @_; + + if ($mark_mode_active) { + my $ch = chr($keysym); + + if ($keysym == 65307) { # + deactivate_mark_mode ($term); + return 1; + + } elsif ($keysym == 65293) { # + my $url = get_active_url($term); + $term->exec_async($term->{browser}, $url); + deactivate_mark_mode ($term); + return 1; + + } elsif ($keysym == 65507) { # + $mod{control} = 0; + return 1; + + } elsif ($keysym == 65505) { # + $mod{shift} = 0; + return 1; + + } elsif ($mod{control} && (($ch eq 'n') || ($ch eq 'p'))) { + # ^n and ^p to cycle list + my $dir = ($ch eq 'n') ? 1 : -1; + move_highlight ($term, $dir); + + } elsif ($ch eq 'y') { # y + do_copy ($term); + deactivate_mark_mode ($term); + return 1; + + } + + return 1; + } + + () +} + +sub get_active_url { + my ($term) = @_; + my $max = $#url_db + 1; + + return if $url_selected < 0 || $url_selected >= $max; + return if not defined $url_db[$url_selected]; + my $o = $url_db[$url_selected]; + my %h = %$o; + + return $h{url}; +} + +sub do_copy { + my ($term) = @_; + + my $text = get_active_url ($term); + + if ($term->{have_Clipboard}) { + Clipboard->copy($text); + } else { + $text =~ s/\(["|><&()]\)/\\$1/; + system ("echo -n \"$text\" | xclip -i"); + } +} + +sub move_highlight { + my ($term, $dir) = @_; + my $max = $#url_db + 1; + + do_highlight ($term, 0); + + $url_selected = ($max + $url_selected + $dir) % $max; + + do_highlight ($term, 1); + + $term->want_refresh; +} + +sub do_highlight { + my ($term, $enable) = @_; + my $max = $#url_db + 1; + + return if $url_selected < 0 || $url_selected >= $max; + return if not defined $url_db[$url_selected]; + + my $o = $url_db[$url_selected]; + my %h = %$o; + + my $row = $h{row}; + my $line = $term->line ($row); + my $text = $line->t; + my $rend = $line->r; + + if ($enable) { + $_ |= urxvt::RS_RVid + for @{$rend}[ $h{col_from} .. $h{col_to}]; + + # make it visible + $term->view_start ( $row < 0 ? $row : 0 ); + + } else { + $_ &= ~urxvt::RS_RVid + for @{$rend}[ $h{col_from} .. $h{col_to}]; + } + + $line->r ($rend); +} + +sub activate_mark_mode { + my ($term) = @_; + + if ($mark_mode_active) { + + move_highlight ($term, -1); + + } elsif ( do_scan_for_urls ($term) ) { + + $term->{save_view_start} = $term->view_start; + + move_highlight ($term, 0); + + $mark_mode_active=1 if ($url_selected > -1); + } +} + +sub deactivate_mark_mode { + my ($term) = @_; + + do_highlight ($term, 0); + + $mark_mode_active = 0; + $url_selected = -1; + + $term->view_start ($term->{save_view_start}); + $term->want_refresh; +} + +# vim: set et ts=4 sw=4: diff --git a/viod b/viod deleted file mode 100755 index 8bb4c21..0000000 --- a/viod +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -editor=vi - -if [ $# -eq 0 ] -then - echo "usage: `basename $0` file" - exit 1 -fi - -file=$1 - -timestamp=`stat -c %y "$file" | cut -d. -f1 | cut -d" " -f1 | awk -F- '{print $1 $2 $3}'``stat -c %y "$file" | cut -d. -f1 | cut -d" " -f2 | awk -F: '{print $1 $2 "." $3}'` - -"$editor" "$file" - -touch -t $timestamp "$file" diff --git a/xorg/gtkrc-2.0 b/xorg/gtkrc-2.0 new file mode 100644 index 0000000..7e04893 --- /dev/null +++ b/xorg/gtkrc-2.0 @@ -0,0 +1 @@ +gtk-font-name="Sans Serif 7" diff --git a/xorg/neo2 b/xorg/neo2 new file mode 100644 index 0000000..00a6034 --- /dev/null +++ b/xorg/neo2 @@ -0,0 +1,442 @@ +// based on a keyboard map from an 'xkb/symbols/de' file +// +// $XKeyboardConfig: xkeyboard-config/symbols/de,v 1.17 2007/07/15 22:12:12 svu Exp $ +// $XFree86: xc/programs/xkbcomp/symbols/de,v 1.6 2003/09/08 13:12:51 pascal Exp $ + +default +xkb_symbols "basic" { + + include "latin(type4)" + + name[Group1]="Germany"; + + key { [ 2, quotedbl, twosuperior, oneeighth ] }; + key { [ 3, section, threesuperior, sterling ] }; + key { [ 4, dollar, onequarter, currency ] }; + + key {type[Group1]="FOUR_LEVEL_PLUS_LOCK", symbols[Group1]= + [ssharp, question, backslash, questiondown, 0x1001E9E ]}; +// The unicode capital letter sharp s U+1E9E is transformed to "SS" +// to match the rules for capitalizing sharp s in german. +// If the capital sharp s is needed, delete the line +// starting with from /usr/share/X11/locale/iso8859-15/Compose. +// If both doubled S and capital sharp s are needed, use 0x1001E9E +// for capital sharp s and some free unicode codepoint like 0x1001E9C +// for doubled S. Don`t forget to change this in the Compose file, too. + + key { [dead_acute, dead_grave, dead_cedilla, dead_ogonek ] }; + + key { [ e, E, EuroSign, EuroSign ] }; + key { [ z, Z, leftarrow, yen ] }; + key { [udiaeresis, Udiaeresis, dead_diaeresis, dead_abovering ] }; + key { [ plus, asterisk, dead_tilde, dead_macron ] }; + + key { [odiaeresis, Odiaeresis, dead_doubleacute, dead_doubleacute ] }; + key { [adiaeresis, Adiaeresis, dead_circumflex, dead_caron] }; + key { [dead_circumflex, degree, notsign, notsign ] }; + + key { [numbersign, apostrophe, dead_grave, dead_breve ] }; + key { [ y, Y, guillemotleft, less ] }; + + include "kpdl(comma)" + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "nodeadkeys" { + + // modify the basic German layout to not have any dead keys + + include "de(basic)" + name[Group1]="Germany - Eliminate dead keys"; + + key { [asciicircum, degree, notsign, notsign ] }; + key { [apostrophe, grave, cedilla, cedilla ] }; + key { [udiaeresis, Udiaeresis, diaeresis, diaeresis ] }; + key { [ plus, asterisk, asciitilde, macron ] }; + key { [odiaeresis, Odiaeresis, doubleacute, doubleacute ] }; + key { [adiaeresis, Adiaeresis, asciicircum, asciicircum ] }; + key { [numbersign, apostrophe, grave, grave ] }; + key { [ minus, underscore, dead_belowdot, abovedot ] }; +}; + +partial alphanumeric_keys +xkb_symbols "deadgraveacute" { + // modify the basic German layout to have only acute and grave + // as dead keys (tilde and circumflex are needed as spacing characters + // in many programming languages) + + include "de(basic)" + name[Group1]="Germany - Dead grave acute"; + + key { [asciicircum, degree, notsign, notsign ] }; + key { [ plus, asterisk, asciitilde, dead_macron ] }; + key { [numbersign, apostrophe, grave, grave ] }; +}; + +partial alphanumeric_keys +xkb_symbols "deadacute" { + // modify the basic German layout to have only acute as + // dead keys (ASCII grave, tilde and circumflex are needed as + // spacing characters in many programming languages and text formatters) + + include "de(deadgraveacute)" + + name[Group1]="Germany - Dead acute"; + + key { [dead_acute, grave, dead_cedilla, dead_ogonek ] }; + key { [numbersign, apostrophe, dead_grave, dead_grave ] }; +}; + +partial alphanumeric_keys +xkb_symbols "ro" { + // add romanian-specific letters to the basic German layout. + // Romanian symbols are accessible with combination of and + // 'a', 's', 't', 'i', 'ä (ä)' (+ for capital letters). + // To view romanian-specific symbols, add "export LC_CTYPE=ro_RO" + // or "export LC_CTYPE=de_DE.utf8" to your .profile. + + include "de(basic)" + + name[Group1]="Germany - Romanian keyboard with German letters"; + + key { [ t, T, tcedilla, Tcedilla ] }; + key { [ i, I, icircumflex, Icircumflex ] }; + key { [ a, A, acircumflex, Acircumflex ] }; + key { [ s, S, scedilla, Scedilla ] }; + key { [ adiaeresis, Adiaeresis, abreve, Abreve ] }; +}; + +partial alphanumeric_keys +xkb_symbols "ro_nodeadkeys" { + // add romanian-specific letters to the German nodeadkeys layout. + // Read the comment for de_ro ! + + include "de(nodeadkeys)" + name[Group1]="Germany - Romanian keyboard with German letters, eliminate dead keys"; + + key { [ t, T, tcedilla, Tcedilla ] }; + key { [ i, I, icircumflex, Icircumflex ] }; + key { [ a, A, acircumflex, Acircumflex ] }; + key { [ s, S, scedilla, Scedilla ] }; + key { [ adiaeresis, Adiaeresis, abreve, Abreve ] }; +}; + +// German Dvorak keymap by Thorsten Staerk (www.staerk.de/thorsten) +// Have acute and grave as dead keys, tilde and circumflex alive as they are needed +// in many programming languages. +// to use this keymap, use a 105-key-keyboard and the command setxkbmap -model pc105 -layout dvorak -variant de +// source: http://www-lehre.informatik.uni-osnabrueck.de/~rfreund/dvorak.php +partial alphanumeric_keys +xkb_symbols "dvorak" { + include "us(dvorak)" + + name[Group1]="Germany - Dvorak"; + + key { [ asciicircum, degree ] }; + + key { [ 1, exclam, onesuperior ] }; + key { [ 2, quotedbl, twosuperior ] }; + key { [ 3, section, threesuperior ] }; + key { [ 4, dollar, bar ] }; + key { [ 5, percent, bar ] }; + key { [ 6, ampersand, brokenbar ] }; + key { [ 7, slash, braceleft ] }; + key { [ 8, parenleft, bracketleft ] }; + key { [ 9, parenright, bracketright ] }; + key { [ 0, equal, braceright ] }; + key { [ plus, asterisk, asciitilde ] }; + key { [ less, greater, dead_grave ] }; + + key { [ udiaeresis, Udiaeresis, at ] }; + key { [ comma, semicolon, dead_diaeresis ] }; + key { [ period, colon ] }; + key { [ c, C, copyright, Cacute ] }; + key { [ t, T, trademark ] }; + key { [ z, Z, zabovedot, Zabovedot ] }; + key { [ question, ssharp ] }; + key { [ slash, backslash, dead_acute ] }; + + key { [ a, A, at, aogonek ] }; + key { [ o, O, oacute, Oacute ] }; + key { [ e, E, EuroSign, eogonek ] }; + key { [ i, I ] }; + key { [ u, U ] }; + key { [ h, H ] }; + key { [ d, D ] }; + key { [ r, R, registered ] }; + key { [ n, N, nacute, Nacute ] }; + key { [ s, S, sacute, Sacute] }; + key { [ l, L, lstroke, Lstroke ] }; + + key { [ odiaeresis, Odiaeresis ] }; + key { [ q, Q, at ] }; + key { [ m, M, mu ] }; + key { [ numbersign, apostrophe ] }; + + key { [ minus, underscore, hyphen, diaeresis] }; + + key { [ adiaeresis, Adiaeresis, bar ] }; + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "Sundeadkeys" { + + // For naming consistency + + include "de(basic)" + +}; + +partial alphanumeric_keys +xkb_symbols "sundeadkeys" { + + // For naming consistency + + include "de(Sundeadkeys)" + + name[Group1]="Germany - Sun dead keys"; +}; + + +// German NEO-Layout +// adopted 2004 by Hanno Behrens +// inspired by Dvorak/de-ergo http://www.goebel-consult.de/de-ergo/ +// +// Authors: +// +// Benjamin Kellermann +// +// Other Questions: +// +// +// $Revision$, $Date$ +// http://pebbles.schattenlauf.de/layout.php + + +partial alphanumeric_keys modifier_keys keypad_keys +xkb_symbols "neo" { + + name[Group1]= "German Neostyle"; + + // Modifier definition + // ----------------------- + + // Mod3 (FIXME Nur CAPS+BKSL ist Caps_Lock – Nicht andersherum, siehe Ticket #30) + key.type[Group1]="THREE_LEVEL"; + key { [ ISO_Level3_Shift, ISO_Level3_Shift, Caps_Lock ] }; + key { [ ISO_Level3_Shift, ISO_Level3_Shift, Caps_Lock ] }; + + // Definition des Neo-Mod4 + key.type[Group1]="ONE_LEVEL"; + key { [ 0xfe11 ]}; + key { [ 0xfe11 ]}; + modifier_map Mod3 { , }; + // Achtung: ^^^ Dies ist eine X-Server-Variable, nicht unser Mod3. + + // Ebenen im Neo-Jargon, hier im Treiber andere Reihenfolge + // ------------------------------------------------------------- + // Ebene 1: normal + // Ebene 2: Shift + // Ebene 3: Mod3 + // Ebene 4: Mod4 (zum Markieren Shift+Mod4) + // Ebene 5: Shift+Mod3 + // Ebene 6: Mod3+Mod4 (in dieser Reihenfolge) + // Compose (keine eigene Ebene): Mod3+Tab + // Feststelltaste (Capslock): Shift+Shift + // + // Ebenen im Xkeymap-Jargon, hier in der Treiberdatei + // ------------------------------------------------------- + // Die von uns genannte Ebene 6 ist auf den X-Level 7 + // verschoben, da der X-Level 6 mit Shift+Mod4 zu erreichen ist. + // Die Navigationstasten von Ebene 4 (mit X-Mod4 bzw. X-Level 5) + // werden teilweise, um auch mit Shift+Mod4 zu funktionieren, + // nochmal im X-Level 6 wiederholt. Also so: + // Ebene1 Ebene2 Ebene3 Ebene5 Ebene4 Eb4+Shift Ebene6 + // X-Level1 X-Level2 X-Level3 X-Level4 X-Level5 X-Level6 X-Level7 + + key.type[Group1]="EIGHT_LEVEL_ALPHABETIC" ; + + // general Lock + // ----------------- + // Einrasten über linke Win-Taste+Modifier, Lösen über nochmaliges Betätigen des Modifiers + // ShiftLock und Mod5Lock funktionieren, aber Achtung: + // FIXME Mod3Lock lässt sich aber nicht mehr lösen!!!! + + + // Tab as Multi_key (Compose) + // ------------------------------- + key { [ Tab, ISO_Left_Tab, Multi_key ] }; + + // number row + // --------------- + + // These are the levels used, and Xorg's translations with type="EIGHT_LEVEL": + // Base Shift Mod3 Shift+Mod3 Mod4 Shift+Mod4 Mod3+Mod4 + // Mod5 Mod6 + // Level1 Level2 Level3 Level4 Level5 Level6 Level7 + // Ebene1 Ebene2 Ebene3 Ebene5 Ebene4 Ebene4+Shift Ebene6 + + key { [ dead_circumflex, dead_caron, dead_breve, dead_stroke, dead_belowdot, NoSymbol, dead_belowdot ] }; + + key { [ 1, degree, onesuperior, U2081, enfilledcircbullet, NoSymbol, notsign ] }; + key { [ 2, numerosign, twosuperior, U2082, U2023, NoSymbol, logicalor ] }; + key { [ 3, section, threesuperior, U2083, NoSymbol, NoSymbol, logicaland ] }; + key { [ 4, guillemotright, U203A, U2113, Prior, Prior, uptack ] }; + key { [ 5, guillemotleft, U2039, femalesymbol, NoSymbol, NoSymbol, U2221 ] }; + key { [ 6, EuroSign, cent, malesymbol, sterling, NoSymbol, U2225 ] }; + + key { [ 7, dollar, yen, Greek_kappa, currency, NoSymbol, U21C8 ] }; + key { [ 8, doublelowquotemark, singlelowquotemark, U27E8, KP_Divide, NoSymbol, U21C5 ] }; + key { [ 9, leftdoublequotemark, leftsinglequotemark, U27E9, KP_Multiply, NoSymbol, U220B ] }; + key { [ 0, rightdoublequotemark, rightsinglequotemark, U2080, minus, NoSymbol, emptyset ] }; + + key { [ minus, endash, emdash, U2011, NoSymbol, NoSymbol, hyphen ] }; + key { [ dead_acute, dead_grave, dead_cedilla, dead_ogonek, dead_abovedot, NoSymbol, dead_abovering ] }; + + // top row + // ------------ + // xvlcwkhgfqß + key { [ x, X, ellipsis, Greek_xi, U22EE, NoSymbol, Greek_XI ] }; + key { [ v, V, underscore, NoSymbol, BackSpace, BackSpace, U2259 ] }; + key { [ l, L, bracketleft, Greek_lambda, Up, Up, Greek_LAMBDA ] }; + key { [ c, C, bracketright, Greek_chi, Delete, Delete, U2102 ] }; + key { [ w, W, asciicircum, Greek_omega, Insert, Insert, Greek_OMEGA ] }; + + key { [ k, K, exclam, U03F0, exclamdown, NoSymbol, radical ] }; + key { [ h, H, less, Greek_psi, 7, NoSymbol, Greek_PSI ] }; + key { [ g, G, greater, Greek_gamma, 8, NoSymbol, Greek_GAMMA ] }; + key { [ f, F, equal, Greek_phi, 9, NoSymbol, Greek_PHI ] }; + key { [ q, Q, ampersand, U03D5, plus, NoSymbol, U211A ] }; + key { [ ssharp, U1E9E, U017F, Greek_finalsmallsigma, NoSymbol, NoSymbol, jot ] }; + + key { [ dead_tilde, dead_macron, dead_diaeresis, dead_doubleacute, dead_stroke, NoSymbol, NoSymmol ] }; + + // middle row + // --------------- + // uiaeosnrtdy + key { [ u, U, backslash, NoSymbol, Home, Home, U222E ] }; + key { [ i, I, slash, Greek_iota, Left, Left, integral ] }; + key { [ a, A, braceleft, Greek_alpha, Down, Down, U2200 ] }; + key { [ e, E, braceright, Greek_epsilon, Right, Right, U2203 ] }; + key { [ o, O, asterisk, Greek_omicron, End, End, elementof ] }; + + key { [ s, S, question, Greek_sigma, questiondown, NoSymbol, Greek_SIGMA ] }; + key { [ n, N, parenleft, Greek_nu, 4, NoSymbol, U2115 ] }; + key { [ r, R, parenright, U03F1, 5, NoSymbol, U211D ] }; + key { [ t, T, minus, Greek_tau, 6, NoSymbol, partialderivative ] }; + key { [ d, D, colon, Greek_delta, comma, NoSymbol, Greek_DELTA ] }; + key { [ y, Y, at, Greek_upsilon, period, NoSymbol, nabla ] }; + + // bottom row + // --------------- + // üöäpzbm,.j + key { [ udiaeresis, Udiaeresis, numbersign, NoSymbol, Escape, Escape, variation ] }; + key { [ odiaeresis, Odiaeresis, dollar, NoSymbol, Tab, Tab, U2111 ] }; + key { [ adiaeresis, Adiaeresis, bar, Greek_eta, Next, Next, U211C ] }; + key { [ p, P, asciitilde, Greek_pi, Return, Return, Greek_PI ] }; + key { [ z, Z, grave, Greek_zeta, NoSymbol, NoSymbol, U2124 ] }; + + key { [ b, B, plus, Greek_beta, colon, NoSymbol, U21D0 ] }; + key { [ m, M, percent, Greek_mu, 1, NoSymbol, ifonlyif ] }; + key { [ comma, NoSymbol, quotedbl, Greek_rho, 2, NoSymbol, U21D2 ] }; + key { [ period, NoSymbol, apostrophe, U03D1, 3, NoSymbol, Greek_THETA ] }; + key { [ j, J, semicolon, Greek_theta, semicolon, NoSymbol, U221D ] }; + + // Space key + // -------------- + key { [ space, space, space, nobreakspace, 0, NoSymbol, U202F ] }; + + // Keypad + // =========== + + // Num-Lock gibt es bei Neo nicht mehr: + //key.type[Group1]="FOUR_LEVEL_MIXED_KEYPAD" ; + + // Die ehemalige Num-Lock-Taste erzeugt nun diverse Zeichen: + key { [ Tab, ISO_Left_Tab, equal, U2248, notequal, NoSymbol, U2261 ] }; + + // topmost row + // ---------------- + key { [ KP_Divide, KP_Divide, division, U2223, U2300, NoSymbol, U2044 ] }; + key { [ KP_Multiply, KP_Multiply, U22C5, multiply, U2299, NoSymbol, U2297 ] }; + key { [ KP_Subtract, KP_Subtract, U2212, U2216, U2296, NoSymbol, U2238 ] }; + + // top row + // ------------ + key { [ KP_7, U2714, U2195, U230A, KP_Home, KP_Home, U2308 ] }; + key { [ KP_8, U2718, U2191, U2229, KP_Up, KP_Up, U22C2 ] }; + key { [ KP_9, dagger, U20D7, U230B, KP_Prior, KP_Prior, U2309 ] }; + key { [ KP_Add, KP_Add, plusminus, U2213, U2295, NoSymbol, U2214 ] }; + + // middle row + // ---------------- + key { [ KP_4, U2663, leftarrow, includedin, KP_Left, KP_Left, U2286 ] }; + key { [ KP_5, EuroSign, infinity, U22B6, KP_Begin, KP_Begin, U22B7 ] }; + key { [ KP_6, brokenbar, rightarrow, includes, KP_Right, KP_Right, U2287 ] }; + + // bottom row + // --------------- + key { [ KP_1, U2666, U2194, U226A, KP_End, KP_End, U2264 ] }; + key { [ KP_2, U2665, downarrow, union, KP_Down, KP_Down, U22C3 ] }; + key { [ KP_3, U2660, U21CC, U226B, KP_Next, KP_Next, U2265 ] }; + key { [ KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter, KP_Enter ] }; + key { [ KP_Equal ] }; + + // bottommost row + // ------------------- + key { [ KP_0, U2423, percent, U2030, KP_Insert, KP_Insert, U25A1 ] }; + key { [ KP_Decimal, comma, period, apostrophe, KP_Delete, KP_Delete, quotedbl ] }; + +}; + +// Copied from macintosh_vndr/de +// olh@suse.de very close to MacOS map + +partial alphanumeric_keys +xkb_symbols "mac" { + + include "de" + name[Group1]= "Germany - Macintosh"; + + // Alphanumeric section + key { [ 1, exclam, exclamdown, at ] }; + key { [ 5, percent, bracketleft ] }; + key { [ 6, ampersand, bracketright ] }; + key { [ 7, slash, bar, backslash ] }; + key { [ 8, parenleft, braceleft, asciitilde ] }; + key { [ 9, parenright, braceright ] }; + key { [ q, Q, guillemotleft, guillemotright ] }; + key { [ r, R, registered ] }; + key { [ u, U, diaeresis, Aacute ] }; + key { [ i, I, slash, Ucircumflex ] }; + key { [ udiaeresis, Udiaeresis, periodcentered, degree ] }; + key { [ plus, asterisk, asciitilde ] }; + key { [ a, A, aring, Aring ] }; + key { [ g, G, copyright ] }; + key { [ h, H, ordfeminine ] }; + key { [ l, L, at ] }; + key { [ odiaeresis, Odiaeresis, dead_acute ] }; + key { [ n, N, asciitilde ] }; + +}; + +partial alphanumeric_keys +xkb_symbols "mac_nodeadkeys" { + // modify the standard German mac layout to not have any dead keys + include "de(mac)" + name[Group1]= "Germany - Macintosh, eliminate dead keys"; + key { [ 4, dollar, onequarter, currency ] }; + + key { [ asciicircum, degree, notsign ] }; + key { [ acute, grave, cedilla ] }; + key { [ udiaeresis, Udiaeresis, diaeresis ] }; + key { [ plus, asterisk, asciitilde, macron ] }; + key { [ odiaeresis, Odiaeresis, acute ] }; + key { [ adiaeresis, Adiaeresis, asciicircum ] }; + + key { [ numbersign, apostrophe, grave ] }; +}; diff --git a/xorg/xdefaults b/xorg/xdefaults index 16a0f8a..014e59f 100644 --- a/xorg/xdefaults +++ b/xorg/xdefaults @@ -19,7 +19,7 @@ URxvt*inheritPixmap: false URxvt*keysym.M-u: perl:mark-yank-urls:activate_mark_mode URxvt*underlineURLs: true -URxvt*perl-lib: /home/gideonstar/etc/ +URxvt*perl-lib: /home/gideonstar/etc/perl/ URxvt*perl-ext: selection,mark-yank-urls URxvt*perl-ext-common: default,matcher URxvt*urlLauncher: firefox diff --git a/zsh/zshrc b/zsh/zshrc new file mode 100644 index 0000000..88d7c34 --- /dev/null +++ b/zsh/zshrc @@ -0,0 +1,100 @@ +PUSER=%{$(echo -n '\e[0;37m')%}%n +PATKI=%{$(echo -n '\e[0;37m')%}@ +PHOST=%{$(echo -n '\e[1;33m')%}%m +PDOPP=%{$(echo -n '\e[1;37m')%}: +PPATH=%{$(echo -n '\e[1;30m')%}%~ +PCOMM=%{$(echo -n '\e[0;37m')%} + +PROMPT="$PUSER$PATKI$PHOST$PDOPP$PPATH$PCOMM " + +zstyle ':completion:*' special-dirs true + +setopt nobeep +setopt autocd +setopt listpacked +setopt listtypes + +export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/games +export DEBEMAIL=xeno@thehappy.de +export DEBFULLNAME="Stefan Ritter" +export QUILT_PATCHES=debian/patches + +HISTSIZE=1000 +SAVEHIST=1000 +HISTFILE=~/.zsh_history + +autoload -U compinit; compinit +autoload zmv + +alias c="clear && fortune" + +if [ "$HOST" = "galahad" ] || [ "$HOST" = "goliath" ]; then + alias ls="ls --color=auto" +fi + +alias l="ls -la" +alias mkdir="mkdir -p" +alias rmrf="rm -rf" +alias v="vim" + +mail() { mutt -F ~/.secgit/muttrc.$1 } + +alias a='acpi' +alias g='git' +alias gitserv="git daemon --verbose --reuseaddr --base-path=. --export-all ./.git" +alias iso="genisoimage -l -J -R -o cd.iso" +alias m="mocp" +alias mp="mplayer" +alias n='newsbeuter' +alias q='quilt' +alias r="rdesktop-vrdp -k de -K localhost" +alias s="screen -r -d" +alias saft="sendfile" +alias t="tmux a" +alias tmux='tmux -u' +alias vbm="VBoxManage" +alias w="wicd-client -n" + +alias agu="sudo aptitude update" +alias agdu="sudo aptitude dist-upgrade" +alias acs="apt-cache search" +alias agi="sudo aptitude install" +alias purge="sudo apt-get --purge autoremove" + +alias svn-uscan='uscan --verbose --force-download --rename --repack --destdir=../tarballs' +alias svn-bp='svn-buildpackage --svn-builder=pdebuild --svn-ignore-new' +alias gendebpool='dpkg-scanpackages -m . /dev/null | gzip -9c > Packages.gz' +alias git-bp='git-buildpackage --git-ignore-new --git-upstream-branch=master --git-debian-branch=debian --git-builder=pdebuild --debbuildopts "-i"' +alias sfnv='uscan --verbose --no-symlink --rename' + +alias -g C='| wc -l' +alias -g G='| grep' +alias -g H='| head' +alias -g T='| tail' +alias -g L='| less' + +alias -s mp3=mplayer +alias -s exe=wine +alias -s pdf=apvlv + +shot() { + if [ "$1" != '' ]; then + scrot -c -d 3 $1 + scp $1 xeno:www/pub/ + rm $1 + else + scrot -c -d 3 + fi +} + +md() { + mkdir $1 + cd $1 +} + + +case $TERM in + rxvt*) + precmd () {print -Pn "\e]0;%n@%m: %~\a"} + ;; +esac diff --git a/zshrc b/zshrc deleted file mode 100644 index 88d7c34..0000000 --- a/zshrc +++ /dev/null @@ -1,100 +0,0 @@ -PUSER=%{$(echo -n '\e[0;37m')%}%n -PATKI=%{$(echo -n '\e[0;37m')%}@ -PHOST=%{$(echo -n '\e[1;33m')%}%m -PDOPP=%{$(echo -n '\e[1;37m')%}: -PPATH=%{$(echo -n '\e[1;30m')%}%~ -PCOMM=%{$(echo -n '\e[0;37m')%} - -PROMPT="$PUSER$PATKI$PHOST$PDOPP$PPATH$PCOMM " - -zstyle ':completion:*' special-dirs true - -setopt nobeep -setopt autocd -setopt listpacked -setopt listtypes - -export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/games -export DEBEMAIL=xeno@thehappy.de -export DEBFULLNAME="Stefan Ritter" -export QUILT_PATCHES=debian/patches - -HISTSIZE=1000 -SAVEHIST=1000 -HISTFILE=~/.zsh_history - -autoload -U compinit; compinit -autoload zmv - -alias c="clear && fortune" - -if [ "$HOST" = "galahad" ] || [ "$HOST" = "goliath" ]; then - alias ls="ls --color=auto" -fi - -alias l="ls -la" -alias mkdir="mkdir -p" -alias rmrf="rm -rf" -alias v="vim" - -mail() { mutt -F ~/.secgit/muttrc.$1 } - -alias a='acpi' -alias g='git' -alias gitserv="git daemon --verbose --reuseaddr --base-path=. --export-all ./.git" -alias iso="genisoimage -l -J -R -o cd.iso" -alias m="mocp" -alias mp="mplayer" -alias n='newsbeuter' -alias q='quilt' -alias r="rdesktop-vrdp -k de -K localhost" -alias s="screen -r -d" -alias saft="sendfile" -alias t="tmux a" -alias tmux='tmux -u' -alias vbm="VBoxManage" -alias w="wicd-client -n" - -alias agu="sudo aptitude update" -alias agdu="sudo aptitude dist-upgrade" -alias acs="apt-cache search" -alias agi="sudo aptitude install" -alias purge="sudo apt-get --purge autoremove" - -alias svn-uscan='uscan --verbose --force-download --rename --repack --destdir=../tarballs' -alias svn-bp='svn-buildpackage --svn-builder=pdebuild --svn-ignore-new' -alias gendebpool='dpkg-scanpackages -m . /dev/null | gzip -9c > Packages.gz' -alias git-bp='git-buildpackage --git-ignore-new --git-upstream-branch=master --git-debian-branch=debian --git-builder=pdebuild --debbuildopts "-i"' -alias sfnv='uscan --verbose --no-symlink --rename' - -alias -g C='| wc -l' -alias -g G='| grep' -alias -g H='| head' -alias -g T='| tail' -alias -g L='| less' - -alias -s mp3=mplayer -alias -s exe=wine -alias -s pdf=apvlv - -shot() { - if [ "$1" != '' ]; then - scrot -c -d 3 $1 - scp $1 xeno:www/pub/ - rm $1 - else - scrot -c -d 3 - fi -} - -md() { - mkdir $1 - cd $1 -} - - -case $TERM in - rxvt*) - precmd () {print -Pn "\e]0;%n@%m: %~\a"} - ;; -esac -- cgit v1.2.3