From: Oleg Broytman Date: Sun, 1 Dec 2013 13:04:05 +0000 (+0400) Subject: Initial import X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=f46bd4d41cc7f243bc8a321effee5200aa69e709;p=dotfiles.git Initial import --- f46bd4d41cc7f243bc8a321effee5200aa69e709 diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..867f11d --- /dev/null +++ b/.bashrc @@ -0,0 +1,2 @@ +if [ "$SHLVL" -eq 1 -a -f "$HOME"/.profile ] ; then . "$HOME"/.profile ; fi +if [ "$SHLVL" -gt 1 -a -f "$HOME"/.shellrc ] ; then . "$HOME"/.shellrc ; fi diff --git a/.cache/mc b/.cache/mc new file mode 120000 index 0000000..7b655f8 --- /dev/null +++ b/.cache/mc @@ -0,0 +1 @@ +../.mc \ No newline at end of file diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..6d2a162 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,7 @@ +*.pyc +*.pyo +*.swp +*.tmp +MANIFEST +build/ +dist/ diff --git a/.cvsrc b/.cvsrc new file mode 100644 index 0000000..a21420f --- /dev/null +++ b/.cvsrc @@ -0,0 +1,4 @@ +-z9 +cvs -z9 +#diff -c +#update -dP diff --git a/.fvwm/.fvwm2rc b/.fvwm/.fvwm2rc new file mode 100644 index 0000000..9d41a51 --- /dev/null +++ b/.fvwm/.fvwm2rc @@ -0,0 +1,113 @@ + +Read decorations + +Read globalfeel + +Read startup + +Read styles + +Read iconstyles + +Read functions + +Read bindings + +Read menus + +Read modules + +# +# * What are the default bindings? +# +# Mouse bindings: +# -------------- +# +# Mouse 1 on the root window: main menu +# Mouse 2 on the root window: window operations menu +# Mouse 3 on the root window: Window List of all normal applications +# Ctrl-Mouse 3 on the root window: Window List of all skipped applications +# +# Alt-Mouse x inside a window: as Mouse x on the root window +# Shift-Alt-Mouse 3 inside a window: Raise or Lower + +# Mouse 1 on the title: Raise, Move for a drag, shade for a double click +# Mouse 1 on the borders: Raise, Resize for a drag, shade for a double click +# Mouse 1 on an icon: Move, Raise on one click, deiconify for a double +# Alt-Mouse 1 on an icon; Raise all the icons +# Ctrl-Mouse 1 on the borders: As mouse 1 on the title +# Mouse 2 on the title or the borders: window operations menu +# Mouse 2 on an icon: deiconify +# Mouse 3 on the title/borders: Raise or Lower +# Mouse 3 on an icon: The "modules/icons" window operations menu +# +# Window Buttons: +# -------------- +# +# - Left button: +# Mouse 1: Window operation menu, double click: close +# Mouse 2: Group operations menu +# Mouse 3: Quick Move window menu +# - Close button (right button) +# Mouse 1: Close +# Mouse 2: Close all the windows with the same class +# Mouse 3: Destroy +# - Maximize button (2nd right button) +# Mouse 1: Full Maximize +# Mouse 2: Maximize Horizontally +# Mouse 3: Maximize Vertically +# - Iconify button (3rd right button) +# Mouse 1: Iconify +# Mouse 2: Iconify all the windows with the same class +# Mouse 3: Shade all the windows with the same class +# +# Key bindings (anywhere): +# ------------ +# +# Shift-Left/Right/Up/Down: scroll Left/Right/Up/Down by 1 page +# Alt-Left/Right/Up/Down: scroll Left/Right/Up/Down by 1/10 page +# +# Shift-Ctrl-Left/Right/Up/Down: move the pointer by 1O% of a page +# Alt-Ctrl-Left/Right/Up/Down: move the pointer by 1% of a page +# +# Alt-Ctrl-PageUp/PageDown: scroll by one desktop page +# +# Shift-Alt-F1: Main menu +# Shift-Alt-F2: Window operations menu +# Shift-Alt-F3: WindowList +# Shift-Alt-F4: Close +# Shift-Alt-F5: RaiseLower +# Shift-Alt-F6: Raise all Icons +# Shift-Alt-F7: Move +# Shift-Alt-F8: Resize +# Shift-Alt-F9: Iconify +# Shift-Alt-F10: Maximize +# Shift-Alt-F11: Identify +# Shift-Alt-F12: Console +# +# Alt-Tab released at once: previous (normal) window +# Alt-Tab: WindowList of all normal windows and warp to the selected window +# when released +# +# Ctrl-Alt-Tab: WindowList of all skipped windows +# +# Stroke bindings: +# --------------- +# +# You need to have FVWM compiled with stroke support (these bindings +# are defined only in this case) and libstroke installed. +# Mouse button 3 is used (this button must be pressed during the stroke), +# no modifiers are needed when you start your mouse motion on the root +# window and you must use the Alt modifier if you start your mouse motion +# on a window (you cannot start your motion on a window title bar or frame). +# The mouses motion: +# +# A | from the top to the bottom: your preferred terminal +# A | from the bottom to the top: your prefered editor +# A / from the bottom to the top: your prefered file manager +# A C from the top: xcalc +# A N (from the bottom): netscape +# A clockwise box from the top left: FvwmForm-QuitVerify +# + +ModuleSynchronous FvwmM4 -lock phd.m4 diff --git a/.fvwm/bindings b/.fvwm/bindings new file mode 100644 index 0000000..8e8d063 --- /dev/null +++ b/.fvwm/bindings @@ -0,0 +1,233 @@ +#-----------------------------------------------------------------------------# +# +# 9. Mouse, frame buttons and keyboard bindings +# +#-----------------------------------------------------------------------------# + + +#------------------------------------------------------------------------------ +# First, for the mouse in the root window (Context=R) +# Button 1 gives the Utilities menu +# Button 2 gives the Window Ops menu +# Button 3 gives the WindowList (like TwmWindows) +# I use the AnyModifier (A) option for the modifier field, so you can hold down +# any Shift-Ctrl-whatever combination you want! +# Moreover on a window the same bindings are defined with the Alt modifier +#------------------------------------------------------------------------------ + + +# Button Context Modifi Function + +Mouse 1 R A Menu Utilities mouse -1p -1p +Mouse 2 R A Menu Window mouse -1p -1p +Mouse 3 R A WindowList mouse -1p -1p +Mouse 3 R C WindowList mouse -1p -1p OnlyListSkip + +#Mouse 1 W M Menu Utilities mouse -1p -1p +#Mouse 2 W M Menu Window mouse -1p -1p +#Mouse 3 W M WindowList mouse -1p -1p +#Mouse 3 W CM WindowList mouse -1p -1p OnlyListSkip + + +#G_SESSION 3 bind Shift Mouse * to gnomebutton +#Mouse 1 R S GnomeButton +#Mouse 2 R S GnomeButton +#Mouse 3 R S GnomeButton + +#------------------------------------------------------------------------------ +# Now the rest of the frame +# Here I invoke my complex functions for Move-or-lower, Move-or-Raise-Shade, +# and Resize-or-Raise. +#------------------------------------------------------------------------------ + +# Button 1 in the corners or sides, with any modifiers, gives resize or raise +Mouse 1 FS A Function "Resize-or-Raise-or-Shade" + +# Button 1 in the title, sides, w/ any modifiers, gives move or raise or shade +Mouse 1 T A Function "Move-or-Raise-or-Shade" +Mouse 1 FS C Function "Move-or-Raise-or-Shade" + +# Button 1 in an icons gives move for a drag, de-iconify for a double-click, +# raiselower for a single click +Mouse 1 I A Function "Move-or-Iconify-or-Raise" +# Alt Button 1 on an icons raise all icons +Mouse 1 I M All (CurrentPage Iconic) Raise + +# Button 2 in an icon, w/ any modifiers, gives de-iconify +Mouse 2 I A Iconify + +# Button 2 in the corners, sides, or title-bar gives the window ops menu +Mouse 2 FST A Menu Window-Ops2 + +# Button 3 anywhere in the decoration (except the title-bar buttons) +# does a raise-lower +Mouse 3 TSF A RaiseLower + +# Button 3 on a icon: +Mouse 3 I A Menu Window-Ops3 c+0 -101m + +# Button 3 in the window, with the Modifier-1 key (usually alt or diamond) +# gives Raise-Lower. Used to use control here, but that interferes with xterm +Mouse 3 W SM RaiseLower + + +#----------------------------------------------------------------------------- +# Mouse windows buttons binding +# buttons: 1 3 5 7 9 8 6 4 2 +#------------------------------------------------------------------------------ + + +# Button Context Modif Function +Mouse 1 1 A Function "window_ops_func" +Mouse 2 1 A Menu WindowGroupOps +Mouse 3 1 A Menu Move-Window +Mouse 1 2 A Close +Mouse 2 2 A All ($c) Close +Mouse 3 2 A Destroy +Mouse 1 4 A Maximize 100 100 +Mouse 2 4 A Maximize 0 100 +Mouse 3 4 A Maximize 100 0 +Mouse 1 6 A Iconify +Mouse 2 6 A All ($c) Iconify On +Mouse 3 6 A All ($c) WindowShade On + +#------------------------------------------------------------------------------ +# Now some keyboard shortcuts. +#------------------------------------------------------------------------------ + +#------------------------------------------------------------------------------ +# press arrow + Shift anywhere, and scroll by 1 page +#------------------------------------------------------------------------------ + +#Key Left A S Scroll -100 0 +#Key Right A S Scroll +100 +0 +#Key Up A S Scroll +0 -100 +#Key Down A S Scroll +0 +100 + +#------------------------------------------------------------------------------ +# press arrow + Alt key, and scroll by 1/10 of a page +#------------------------------------------------------------------------------ + +#Key Left A M Scroll -10 +0 +#Key Right A M Scroll +10 +0 +#Key Up A M Scroll +0 -10 +#Key Down A M Scroll +0 +10 + +#------------------------------------------------------------------------------ +# press arrow + control-meta anywhere, and move the pointer by 1% of a page +#------------------------------------------------------------------------------ + +#Key Left A MC CursorMove -1 0 +#Key Right A MC CursorMove +1 +0 +#Key Up A MC CursorMove +0 -1 +#Key Down A MC CursorMove +0 +1 + +#------------------------------------------------------------------------------ +# press arrow + Shift-Alt key, and move the pointer by 1/10 of a page +#------------------------------------------------------------------------------ + +#Key Left A SM CursorMove -10 +0 +#Key Right A SM CursorMove +10 +0 +#Key Up A SM CursorMove +0 -10 +#Key Down A SM CursorMove +0 +10 + +#------------------------------------------------------------------------------ +# Page Up/Page Down keys are used to scroll by one desktop page +# in any context, press page up/down + control + alt +# in root context, just pressing page up/down is OK +#------------------------------------------------------------------------------ + +#Key Next A CM Desk -1 0 0 3 +#Key Next R M Desk -1 0 0 3 +#Key Prior A CM Desk +1 0 0 3 +#Key Prior R M Desk +1 0 0 3 + +#------------------------------------------------------------------------------ +# Alt-Shift-Fx window operations +#------------------------------------------------------------------------------ +#Key F4 A MS Close +#Key F5 A MS RaiseLower +#Key F6 A MS All (Iconic) Raise # originally Restore +#Key F7 A MS Move +#Key F8 A MS Resize +#Key F9 A MS Iconify +#Key F10 A MS Maximize 100 100 +#Key F11 A MS FvwmIdent +#Key F12 A MS FvwmConsole + +#------------------------------------------------------------------------------ +# The menus via Alt-Shift-Fx +#------------------------------------------------------------------------------ +#Key F1 A MS Menu Utilities mouse -1p -1p +#Key F2 A MS Menu Window mouse -1p -1p +#Key F3 A MS WindowList mouse -1p -1p + + +#------------------------------------------------------------------------------ +# The famous Alt-tab binding +#------------------------------------------------------------------------------ + +DestroyFunc my_dbltab2 +AddToFunc my_dbltab2 ++ I WindowListFunc $w +DestroyFunc my_dbltab_prev +AddToFunc my_dbltab_prev ++ I Prev my_dbltab2 + +#Key Tab A M WindowList Root c c NoGeometry, NoDeskSort, SelectOnRelease Alt_L my_dbltab_prev +#Key Tab A CM WindowList Root c c NoGeometry, OnlyListSkip, SelectOnRelease + + +#------------------------------------------------------------------------------ +# Stroke Bindings +#------------------------------------------------------------------------------ +# +# You need fvwm compiled with stroke support and libstroke installed +# See the Stroke and StrokeFunc entries in fvwm2 man page +# We use mostly simple stroke motion. For complex stroke motions we need +# to consider many sloppy stroke motions for each action. + +#STROKE 2 +Mouse 3 R N StrokeFunc FeedBack DrawMotion +Mouse 3 W M StrokeFunc FeedBack DrawMotion + +#STROKE 2 We need to redefine the default bindings +Stroke 0 0 R N WindowList mouse -1p -1p +Stroke 0 0 W M WindowList mouse -1p -1p + +#PREF 11 +#STROKE 2 A | from the top to the bottom +Stroke N852 0 R N Exec exec aterm +Stroke N852 0 W M Exec exec aterm + +#STROKE 2 A | from the bottom to the top +Stroke N258 0 R N Exec exec gvim +Stroke N258 0 W M Exec exec gvim + +#STROKE 2 A / from the bottom to the top +Stroke N159 0 R N Exec exec aterm -g 80x35 -e mc +Stroke N159 0 W M Exec exec aterm -g 80x35 -e mc + +#STROKE 2 A C from the top +Stroke N9874123 0 R N Exec exec xcalc +Stroke N9874123 0 W M Exec exec xcalc + +#STROKE 11 A N (from the bottom) +Stroke 7415963 0 R N Exec exec netscape +Stroke 74148963 0 R N Exec exec netscape +Stroke 74158963 0 R N Exec exec netscape +Stroke 7418963 0 R N Exec exec netscape +Stroke 415963 0 R N Exec exec netscape + +Stroke 7415963 0 W M Exec exec netscape +Stroke 74148963 0 W M Exec exec netscape +Stroke 74158963 0 W M Exec exec netscape +Stroke 7418963 0 W M Exec exec netscape +Stroke 415963 0 W M Exec exec netscape + +#STROKE 4 A clockwise box from the top left +Stroke N78963214 0 R N FvwmForm FvwmForm-QuitVerify +Stroke N789632147 0 R N FvwmForm FvwmForm-QuitVerify +Stroke N78963214 0 W M FvwmForm FvwmForm-QuitVerify +Stroke N789632147 0 W M FvwmForm FvwmForm-QuitVerify + diff --git a/.fvwm/config b/.fvwm/config new file mode 120000 index 0000000..29da2cf --- /dev/null +++ b/.fvwm/config @@ -0,0 +1 @@ +.fvwm2rc \ No newline at end of file diff --git a/.fvwm/decorations b/.fvwm/decorations new file mode 100644 index 0000000..f75b0d2 --- /dev/null +++ b/.fvwm/decorations @@ -0,0 +1,116 @@ +#-----------------------------------------------------------------------------# +# +# 2. Root cursor, Windows Decoration and Menu Styles: +# Default fonts, colors, Border, Title, Button Styles, Menu Styles +# window button bindings. +# (this section may be the theme part of the config, but you need to use +# FvwmTheme to define and propagate the colors) +#-----------------------------------------------------------------------------# + +#------------------------------------------------------------------------------ +# Set the root cursor +#------------------------------------------------------------------------------ + +#CursorStyle ROOT left_ptr +#CursorStyle TITLE left_ptr +#CursorStyle DEFAULT left_ptr +#CursorStyle SYS left_ptr +#CursorStyle MENU left_ptr + +#------------------------------------------------------------------------------ +# Fonts - one for window titles, another for icons, and another for the menus +#------------------------------------------------------------------------------ + +#WIN 1 +#Style * Font -*-times-medium-r-*-*-16-*-*-*-*-*-*-* +#FVWM 1 +Style * Font -*-times-bold-r-*-*-14-*-*-*-*-*-*-* + +Style * IconFont fixed + +#------------------------------------------------------------------------------ +# Set the default window colors. +#------------------------------------------------------------------------------ + +# Text and background color for the title bar (overridden in the WIN case), +# and the border of the inactive window (also used by icon title, +# and "hilight" and "shadow" colors). +#WIN 1 +#Style * ForeColor #c3c3c3, BackColor #c3c3c3 +#FVWM 1 +Style * ForeColor #c3c3c3, BackColor grey51 + +# Text and background color for the title bar (overriden in the WIN case), +# and the border of the active (selected) window (also used by icon title, +# and "hilight" and "shadow" colors). +#WIN 1 +#Style * HilightFore white, HilightBack #c3c3c3 +#FVWM 1 +Style * HilightFore white, HilightBack SlateBlue + +#------------------------------------------------------------------------------ +# Border, Title and Button Styles +#------------------------------------------------------------------------------ +Style * BorderWidth 5, HandleWidth 5 + +#WIN 13 +#Style "*" FvwmBorder # MWMBorder +#Style "*" FvwmButtons +#BorderStyle Inactive -- HiddenHandles NoInset +#BorderStyle Active -- HiddenHandles NoInset +#TitleStyle ActiveUp (solid Blue4 -- Flat) +#TitleStyle ActiveDown (solid Blue4 -- Flat) +#TitleStyle Inactive (solid grey51 -- Flat) +#TitleStyle LeftJustified +#ButtonStyle 1 MiniIcon (-- flat) +#ButtonStyle all -- UseTitleStyle Flat +#AddButtonStyle 2 Pixmap mini.winXX-close.xpm +#AddButtonStyle 4 Pixmap mini.winXX-maximize.xpm +#AddButtonStyle 6 Pixmap mini.winXX-minimize.xpm + +#FVWM 11 +Style "*" FvwmBorder +Style "*" MWMButtons +TitleStyle Centered +ButtonStyle all -- UseTitleStyle +ButtonStyle 2 17 20x20@1 30x20@1 50x40@1 70x20@1 80x20@1 80x30@0 60x50@0 80x70@1 80x80@0 70x80@0 50x60@0 30x80@0 20x80@0 20x70@0 40x50@1 20x30@0 20x20@1 +ButtonStyle 4 4 50x25@1 75x75@0 25x75@0 50x25@1 +ButtonStyle 6 4 50x65@1 35x35@1 65x35@1 50x65@0 +ButtonStyle 1 - Clear MWMDecorMenu +ButtonStyle 2 - Clear +ButtonStyle 4 - Clear MWMDecorMax +ButtonStyle 6 - Clear MWMDecorShade + +#------------------------------------------------------------------------------ +# The MenuStyle command allows almost full control over menu look and feel. +# We use the preconfigured 'Win' or 'Fvwm' default. This resets most other +# options and must be set first. We also define a menu called winops for +# the windows operations menus and very long one. The menus which use this +# style are (and must) be defined in the end of the menus. +#------------------------------------------------------------------------------ + +#WIN 4 +#MenuStyle * win +#MenuStyle * font -*-times-medium-r-*-*-16-*-*-*-*-*-*-* +#MenuStyle * Foreground black, Background grey80 +#MenuStyle * ActiveFore white, HilightBack Blue4 +#FVWM 5 +MenuStyle * fvwm +MenuStyle * font -*-times-bold-r-*-*-14-*-*-*-*-*-*-* +MenuStyle * Foreground black, Background grey80 +MenuStyle * ActiveFore black, HilightBack grey85 +MenuStyle * Hilight3DThick + +MenuStyle * Greyed grey60 # default is invisible on backgroud grey80 +MenuStyle * VerticalItemSpacing 2 4, VerticalTitleSpacing 2 4 + +CopyMenuStyle * winops + +#WIN 1 +#MenuStyle winops font -*-times-medium-r-*-*-14-*-*-*-*-*-*-* +#FVWM 2 +MenuStyle winops font -*-times-bold-r-*-*-12-*-*-*-*-*-*-* +MenuStyle winops TitleWarpOff + +MenuStyle winops VerticalItemSpacing 1 2, VerticalTitleSpacing 1 2 + diff --git a/.fvwm/functions b/.fvwm/functions new file mode 100644 index 0000000..c438f27 --- /dev/null +++ b/.fvwm/functions @@ -0,0 +1,413 @@ +#----------------------------------------------------------------------------# +# +# 8. Now define some handy complex functions +# +#----------------------------------------------------------------------------# + +#------------------------------------------------------------------------------ +# This one moves and then raises the window if you drag the mouse, +# only raises the window if you click, or does a vertical maximize if +# you double click (full screen maximize would be 'Maximize 100 100') +#------------------------------------------------------------------------------ + +DestroyFunc Move-or-Raise +AddToFunc Move-or-Raise M Move ++ M Raise ++ C Raise ++ D Maximize 0 100 + + +#------------------------------------------------------------------------------ +# As above but double click shade +#------------------------------------------------------------------------------ + +DestroyFunc Move-or-Raise-or-Shade +AddToFunc Move-or-Raise-or-Shade M Move ++ M Raise ++ C Raise ++ D WindowShade + +#------------------------------------------------------------------------------ +# This one moves and then lowers the window if you drag the mouse, +# only lowers the window if you click, or does a RaiseLower if you double +# click +#------------------------------------------------------------------------------ + +DestroyFunc Move-or-Lower +AddToFunc Move-or-Lower M Move ++ M Lower ++ C Lower ++ D RaiseLower + + +#------------------------------------------------------------------------------ +# This one moves or (de)iconifies: +#------------------------------------------------------------------------------ + +DestroyFunc Move-or-Iconify-or-Raise +AddToFunc Move-or-Iconify-or-Raise M Move ++ C Raise ++ D Iconify + +#------------------------------------------------------------------------------ +# This one maximizes vertically if you click (leaving room for the taskbar +# at the bottom, or does a full maximization if you double click, or a +# true full vertical maximization if you just hold the mouse button down. +#------------------------------------------------------------------------------ + +DestroyFunc Maximize-Func +AddToFunc Maximize-Func M Maximize 0 98 ++ C Maximize 0 100 ++ D Maximize 100 98 + +#------------------------------------------------------------------------------ +# This one resizes and then raises the window if you drag the mouse, +# only raises the window if you click, or does shade if you double +# click +#------------------------------------------------------------------------------ + +DestroyFunc Resize-or-Raise-or-Shade +AddToFunc Resize-or-Raise-or-Shade M Resize ++ M Raise ++ C Raise ++ D WindowShade + + +#------------------------------------------------------------------------------ +# This one focuses and then 'warps' to the window. +#------------------------------------------------------------------------------ + + +DestroyFunc FocusAndWarp +AddToFunc FocusAndWarp I Focus ++ I WarpToWindow 1 1 + + +#------------------------------------------------------------------------------ +# Like the previous one, but de-iconifies first. +#------------------------------------------------------------------------------ + +DestroyFunc DeiconifyFocusAndWarp +AddToFunc DeiconifyFocusAndWarp I Iconify off ++ I FocusAndWarp + +#------------------------------------------------------------------------------ +# Like the previous one, but only Raise. +#------------------------------------------------------------------------------ + +DestroyFunc DeiconifyFocusAndRaise +AddToFunc DeiconifyFocusAndRaise I Iconify off ++ I Focus ++ I Raise + +#------------------------------------------------------------------------------ +# This one is used to modify some style for a window (almost obsolet) +#------------------------------------------------------------------------------ + +DestroyFunc StyleAndRecapture +AddToFunc StyleAndRecapture I Style "$0" $1 ++ I All ("$0") RecaptureWindow + + +#------------------------------------------------------------------------------ +# A really useful one: de-iconifies, warps to the window +# or creates it if it doen't exist (often used with mailtools) +#------------------------------------------------------------------------------ + +DestroyFunc WarpOrExec +AddToFunc WarpOrExec I Next (AcceptsFocus $0) Iconify -1 ++ I Next (AcceptsFocus $0) FocusAndWarp ++ I None (AcceptsFocus $0) Exec $0 $1 + +#------------------------------------------------------------------------------ +# For the left button +#------------------------------------------------------------------------------ + +DestroyMenu "window_ops_func" +AddToFunc "window_ops_func" "C" PopUp Window-Ops2 ++ "M" PopUp Window-Ops2 ++ "D" Delete + +#------------------------------------------------------------------------------ +# Functions to restart Modules and Restart/Kill FvwmButtons by aliases +#------------------------------------------------------------------------------ + +DestroyFunc RestartModule +AddToFunc RestartModule ++ I KillModule $0 ++ I Module $0 + +DestroyFunc RestartModuleByAlias +AddToFunc RestartModuleByAlias ++ I All ($2) Close ++ I Module $0 $1 + + +# This function is for WMakerFvwmButtons (start or iconify id started) +DestroyFunc MyPanelButtons +AddToFunc MyPanelButtons ++ I All ($0) Iconify ++ I None (CirculateHit $0) FvwmButtons -g +$1+$2 $0 + +#------------------------------------------------------------------------------ +# Functions for FvwmScript-BaseConfig +#------------------------------------------------------------------------------ + +DestroyFunc BaseConfigOkFunc +AddToFunc BaseConfigOkFunc I Read styles + +DestroyFunc BaseConfigApplyFunc +AddToFunc BaseConfigApplyFunc I Read styles + + +#------------------------------------------------------------------------------ +# Functions which start and save state for FvwmAnimate, FvwmEvent, etc ... +# $1 $2 is used only by FvwmAuto +#------------------------------------------------------------------------------ + +DestroyFunc ModuleOn +AddToFunc ModuleOn ++ I KillModule $0 ++ I Module $0 $1 $2 ++ I Exec echo "AddToFunc StartFunction I $0 $1 $2" > $FVWM_USERDIR/.start-$0 + +DestroyFunc ModuleOff +AddToFunc ModuleOff ++ I KillModule $0 ++ I Exec echo "# Do not start $0" > $FVWM_USERDIR/.start-$0 + +#------------------------------------------------------------------------------ +# Functions which start and save state for MiniButtons and WinMakerAppButtons +#------------------------------------------------------------------------------ + +DestroyFunc ButtonsOn +AddToFunc ButtonsOn ++ I All ($2) Close ++ I Module $0 $1 ++ I Exec echo "AddToFunc StartFunction I $0 $1" > $FVWM_USERDIR/.start-$1 + +DestroyFunc ButtonsOff +AddToFunc ButtonsOff ++ I All ($1) Close ++ I Exec echo "# Do not start $0" > $FVWM_USERDIR/.start-$0 + +#------------------------------------------------------------------------------ +# Functions for choosing the "Big" buttons Wharf or BarButtons +#------------------------------------------------------------------------------ + +DestroyFunc ChangeButtonsOn +AddToFunc ChangeButtonsOn ++ I All (BarButtons) Close ++ I KillModule FvwmWharf ++ I Exec echo "AddToFunc StartFunction I $0" > $FVWM_USERDIR/.start-FvwmButtons ++ I $0 + +DestroyFunc ChangeButtonsOff +AddToFunc ChangeButtonsOff ++ I All (BarButtons) Close ++ I KillModule FvwmWharf ++ I Exec echo "# No Buttons Bar" > $FVWM_USERDIR/.start-FvwmButtons ++ I $0 + +#------------------------------------------------------------------------------ +# Functions for Raising modules only +#------------------------------------------------------------------------------ + +DestroyFunc StartModulesAutoRaise +AddToFunc StartModulesAutoRaise ++ I Style FvwmDesker Lenience ++ I FvwmAuto 400 Silent ModulesAutoRaise ++ I Exec echo "AddToFunc StartFunction I StartModulesAutoRaise" > $FVWM_USERDIR/.start-FvwmAuto + +DestroyFunc ModulesAutoRaise +AddToFunc ModulesAutoRaise ++ I Current (FvwmButtons) Raise ++ I Current (FvwmTaskBar) Raise ++ I Current (FvwmIconBox) Raise ++ I Current (FvwmDesker) Raise ++ I Current (FvwmIconMan) Raise ++ I Current (FvwmWinList) Raise ++ I Current (FvwmWharf) Raise ++ I Current (panel) Raise + +#------------------------------------------------------------------------------ +# Functions which start and save a background +#------------------------------------------------------------------------------ + +DestroyFunc SetBackground +AddToFunc SetBackground ++ I KillModule FvwmBacker ++ I $0 ++ I Exec echo "AddToFunc StartFunction I $0" > $FVWM_USERDIR/.start-Background + +DestroyFunc SetBackgroundOff +AddToFunc SetBackgroundOff ++ I KillModule FvwmBacker ++ I Exec echo "# Background disabled" > $FVWM_USERDIR/.start-Background + +#------------------------------------------------------------------------------ +# Functions which start and defines which applications manager we use +#------------------------------------------------------------------------------ + +DestroyFunc ChangeAppsMan +AddToFunc ChangeAppsMan ++ I KillModule FvwmTaskBar ++ I KillModule FvwmWinList ++ I KillModule FvwmIconMan ++ I KillModule FvwmIconBox ++ I Exec echo "AddToFunc StartFunction I $0" > $FVWM_USERDIR/.start-apps-man ++ I $0 + +DestroyFunc AppsManNone +AddToFunc AppsManNone ++ I Style * NoIcon ++ I KillModule FvwmTaskBar ++ I KillModule FvwmWinList ++ I KillModule FvwmIconMan ++ I KillModule FvwmIconBox ++ I Exec echo "AddToFunc StartFunction I Style * NoIcon # No applications Manager" > $FVWM_USERDIR/.start-apps-man + +DestroyFunc UseIcons +AddToFunc UseIcons ++ I Style * Icon ++ I Read iconstyles +# Need to reaload menus for KDE mini-icons styles ++ I Read menus ++ I KillModule FvwmTaskBar ++ I KillModule FvwmWinList ++ I KillModule FvwmIconMan ++ I KillModule FvwmIconBox ++ I Exec echo "# Use Icons" > $FVWM_USERDIR/.start-apps-man + +DestroyFunc WinListDesk +AddToFunc WinListDesk ++ I Style * NoIcon ++ I *FvwmWinList: ShowCurrentDesk ++ I Module FvwmWinList + +DestroyFunc WinListGlobal +AddToFunc WinListGlobal ++ I Style * NoIcon ++ I DestroyModuleConfig FvwmWinList: ShowCurrent* ++ I Module FvwmWinList + +DestroyFunc TaskBarDesk +AddToFunc TaskBarDesk ++ I Style * NoIcon ++ I DestroyModuleConfig FvwmTaskBar: AutoHid* ++ I *FvwmTaskBar: DeskOnly ++ I Module FvwmTaskBar + +DestroyFunc TaskBarGlobal +AddToFunc TaskBarGlobal ++ I Style * NoIcon ++ I DestroyModuleConfig FvwmTaskBar: AutoHid* ++ I DestroyModuleConfig FvwmTaskBar: Desk* ++ I Module FvwmTaskBar + +DestroyFunc TaskBarDeskAutoHide +AddToFunc TaskBarDeskAutoHide ++ I Style * NoIcon ++ I *FvwmTaskBar: DeskOnly ++ I *FvwmTaskBar: AutoHide ++ I Module FvwmTaskBar + +DestroyFunc TaskBarGlobalAutoHide +AddToFunc TaskBarGlobalAutoHide ++ I Style * NoIcon ++ I DestroyModuleConfig FvwmTaskBar: Desk* ++ I *FvwmTaskBar: AutoHide ++ I Module FvwmTaskBar + +DestroyFunc IconManGlobal +AddToFunc IconManGlobal ++ I Style * NoIcon ++ I *FvwmIconMan: *Resolution global ++ I Module FvwmIconMan + +DestroyFunc IconManDesk +AddToFunc IconManDesk ++ I Style * NoIcon ++ I *FvwmIconMan: *Resolution desk ++ I Module FvwmIconMan + +DestroyFunc IconManPage +AddToFunc IconManPage ++ I Style * NoIcon ++ I *FvwmIconMan: *Resolution page ++ I Module FvwmIconMan + +DestroyFunc IconBoxDesk +AddToFunc IconBoxDesk ++ I Style * NoIcon ++ I *FvwmIconBox: ResolutionDesk ++ I Module FvwmIconBox + +DestroyFunc IconBoxGlobal +AddToFunc IconBoxGlobal ++ I Style * NoIcon ++ I DestroyModuleConfig FvwmIconBox: Reso* ++ I Module FvwmIconBox + +#------------------------------------------------------------------------------ +# Functions for Layers +#------------------------------------------------------------------------------ + +DestroyFunc SetLayers +AddToFunc SetLayers ++ I StyleAndRecapture $n $0 ++ I Exec F=$FVWM_USERDIR; Z=$F/.fvwm-layers; T=$F/.tmp-layers; if grep -qe "$n" $Z; then sed -e "s/\ $n\ .*/\ $n\ $0/" $Z>$T; cat $T>$Z; else echo "Style $n $0" >>$Z; fi + +DestroyFunc DestroyLayers +AddToFunc DestroyLayers ++ I StyleAndRecapture $n StaysPut ++ I Exec F=$FVWM_USERDIR; Z=$F/.fvwm-layers; T=$F/.tmp-layers; sed -e "/^Style\ $n\ .*/d" $Z>$T; cat $T>$Z + +#------------------------------------------------------------------------------ +# Function for reloading the icons styles +#------------------------------------------------------------------------------ + +DestroyFunc ReloadIconStylesAndMenus +AddToFunc ReloadIconStylesAndMenus ++ I Read iconstyles ++ I Read menus +# Need to reload the NoIcon style ++ I PipeRead 'if grep -qe AddToFunc $FVWM_USERDIR/.start-apps-man; then echo "Style * NoIcon"; fi' + +#------------------------------------------------------------------------------ +# Functions for Loading/Saving/Showing Settings +#------------------------------------------------------------------------------ + +DestroyFunc SaveAsSettings +AddToFunc SaveAsSettings ++ I Exec F=$FVWM_USERDIR;for i in ~/.xinitrc-fvwm $F/.FvwmBaseConfig $F/.FvwmAnimate $F/.FvwmForm $F/.start-Background $F/.start-apps-man $F/.start-FvwmButtons $F/.start-DeskerPanelButtons $F/.start-MiniButtons $F/.start-WinMakerAppButtons $F/.start-FvwmAnimate $F/.start-FvwmAuto $F/.start-FvwmBanner $F/.start-FvwmEvent $F/.fvwm-layers; do [ ! -f "$i" ] || /bin/cp $i $i-$0; done; + +DestroyFunc LoadSettings +AddToFunc LoadSettings ++ I Exec F=$FVWM_USERDIR; for i in ~/.xinitrc-fvwm $F/.FvwmBaseConfig $F/.FvwmAnimate $F/.FvwmForm $F/.start-Background $F/.start-apps-man $F/.start-FvwmButtons $F/.start-DeskerPanelButtons $F/.start-MiniButtons $F/.start-WinMakerAppButtons $F/.start-FvwmAnimate $F/.start-FvwmAuto $F/.start-FvwmBanner $F/.start-FvwmEvent $F/.fvwm-layers; do [ ! -f "$i-$0" ] || /bin/cp $i-$0 $i; done; ++ I Exec [ ! -f ~/.xinitrc-fvwm-$0 ] || (xscreensaver-command -exit; ~/.xinitrc-fvwm-$0) ++ I PipeRead '[ ! -f $FVWM_USERDIR/.FvwmBaseConfig ] || (echo Read .FvwmBaseConfig; echo BaseConfigOkFunc)' ++ I Style * StaysPut ++ I Read .fvwm-layers-$0 ++ I KillModule FvwmAnimate ++ I KillModule FvwmAuto ++ I KillModule FvwmEvent ++ I KillModule FvwmButtons ++ I KillModule FvwmWharf ++ I KillModule FvwmTaskBar ++ I KillModule FvwmWinList ++ I KillModule FvwmIconMan ++ I KillModule FvwmIconBox ++ I PipeRead 'F=$FVWM_USERDIR; F=$FVWM_USERDIR; for i in $F/.start-Background $F/.start-apps-man $F/.start-FvwmButtons $F/.start-DeskerPanelButtons $F/.start-MiniButtons $F/.start-WinMakerAppButtons $F/.start-FvwmAnimate $F/.start-FvwmAuto $F/.start-FvwmBanner $F/.start-FvwmEvent; do [ ! -f "$i-$0" ] || sed -e s/AddToFunc\\.StartFunction\\.I\\.// $i-$0; done; if [ -f "$F/.start-apps-man-$0" ]; then if grep -qe Icons $F/.start-apps-man-$0; then echo "Style * Icon"; echo "Read iconstyles"; echo "Read menus"; fi; fi' + +DestroyFunc ShowFvwmSettings +AddToFunc ShowFvwmSettings I Exec F=$FVWM_USERDIR;f=$F/.tmp-modules-setting; echo "" > $f; for j in 0 1 2 3 4; do if [ "$j" -eq "0" ]; then j=""; t="Current Setting:"; l="--------------"; else j="-$j"; t="Setting$j:"; l="---------"; fi; echo $t >> $f; echo $l >> $f; for i in $F/.start-Background $F/.start-apps-man $F/.start-FvwmButtons $F/.start-DeskerPanelButtons $F/.start-MiniButtons $F/.start-WinMakerAppButtons $F/.start-FvwmAnimate $F/.start-FvwmAuto $FVWM_USERDIR/.start-FvwmBanner $F/.start-FvwmEvent; do z="$i$j"; [ ! -f "$z" ] || sed -e s/^\\#\.// -e s/\.*exec/Background:/ -e s/AddToFunc\.StartFunction\.I/Start/ -e s/FvwmEvent/Sounds\ Effect/ $z >> $f; done; echo -n "Base Config: ">>$f; if [ -f $F/.FvwmBaseConfig$j ]; then echo "Used">>$f; else echo "Not Used">>$f; fi; echo "">>$f;done; xmessage -file $f + +DestroyFunc ShowXSettings +AddToFunc ShowXSettings \ +I Exec T=$FVWM_USERDIR/.tmp-x-set;u=~/.xinitrc-fvwm;echo "">$T;for j in 0 1 2 3 4;do if [ "$j" -eq "0" ];then z=$u;t="Current Setting:";else z="$u-$j";t="Setting-$j:";fi;echo $t >>$T;if grep -qe Bell $z;then grep -e "xset b" $z|sed -e s/xset\.b/Bell:/>>$T;fi;if grep -qe Screen $z;then echo -n "Background: ">>$T;if grep -qe \#xsetroot $z;then echo "disabled">>$T;elif grep -qe xpmroot $z;then grep -e xpmroot $z|sed -e s/xpmroot\.//>>$T;else grep -e xsetroot $z|sed -e s/xsetroot\.//>>$T;fi;grep -e "xset s" $z|sed -e s/xset\.s/xsaver:/>>$T;echo -n "DPMS: ">>$T;grep -e xset\.*dpms $z|sed -e s/xset\.-dpms/Off/ -e s/xset\.dpms/On/>>$T;echo -n "xscreensaver: ">>$T;if grep -qe \#xscreen $z;then echo "Off">>$T;else echo "On">>$T;fi;fi;if grep -qe Keyboard $z;then echo -n "Keyboard: ">>$T;grep -e "xset r" $z|sed -e s/xset\.r/auto\ repeat/ -e s/c/Vol/>>$T;fi;if grep -qe Pointer $z;then echo -n "Mouse: ">>$T;grep -e "xset m" $z|sed -e s/xset\.m//>>$T;fi;echo "">>$T;done;xmessage -file $T + + +DestroyFunc ShowLayers +AddToFunc ShowLayers I Exec F=$FVWM_USERDIR; T=$F/.tmp-layers; echo -e "A StaysOnTop window is a window which is above \nthe normal (i.e., StaysPut) windows, a StaysOnBottom\nwindow is below the normal windows. Here the list\nof StaysOnTop and StaysOnBottom windows:\n"> $T; u=$F/.fvwm-layers; for j in 0 1 2 3 4; do if [ "$j" -eq "0" ];then z=$u; t="Current Setting:"; l="---------------"; else z="$u-$j"; t="Setting-$j:"; l="----------"; fi; echo $t >>$T; echo $l >>$T; [ ! -f $z ] || cat $z>>$T; echo "" >> $T; done; xmessage -file $T + diff --git a/.fvwm/globalfeel b/.fvwm/globalfeel new file mode 100644 index 0000000..7f6a84a --- /dev/null +++ b/.fvwm/globalfeel @@ -0,0 +1,123 @@ +#-----------------------------------------------------------------------------# +# +# 3. Set up the major operating modes +# +#-----------------------------------------------------------------------------# + +# WARNING!!! +# +# If you use (or ever used) Settings-->Configuration-->Base Config +# to configure your major operating modes then all commands in this +# section 3 are overridden by the last line of this section (PipeRead). +# So, you can comment the last line of this section. +# Or, instead, you can remove all the lines of this section but the last one. +# +# If you use Base Config and this section has some application dependent +# styles, a suggested solution is to move them to the styles file. +# This way Base Config does not destroy your application specific +# styles when you use it. + +#WIN 1 To have more WIN-like behavior +#Emulate win +#FVWM 1 +Emulate fvwm + +HideGeometryWindow Never + +#WIN 1 +#SnapAttraction 10 SameType Screen +#FVWM 1 +Style * SnapAttraction 0 + +#FAST 3 +OpaqueMoveSize 100 +Style * ResizeOpaque +Style * WindowShadeSteps 20 +#SLOW 3 +#OpaqueMoveSize 0 +#Style * ResizeOutline +#Style * WindowShadeSteps 0 + + +EdgeScroll 0 0 +#EdgeResistance 500 0 +EdgeThickness 1 + +# +# The focus policy. Once you are used to clicking *inside* windows to +# raise them you will not want to lose this feature. +# +Style * SloppyFocus +#Style * MouseFocusClickRaises + +# +# MinOverlapPlacement places window automatically in a way that attempts to be +# place windows 'intelligent'. +# +Style * MinOverlapPlacement + +# +# NoPPosition instructs FVWM to ignore the PPosition field in window +# geometry hints. Emacs annoyingly sets PPosition to (0,0)! +# + +Style * NoPPosition + +Style * GrabFocusOff + +# If you ever used Base Config, then the next line overrides this section +# with the settings you defined! In this case you may replace the whole +# section 3 by one command "Read .FvwmBaseConfig". +PipeRead '[ ! -f $FVWM_USERDIR/.FvwmBaseConfig ] || echo Read .FvwmBaseConfig' + +#----------------------------------------------------------------------------# +# +# 4. Miscellaneous Major operating mode +# +#----------------------------------------------------------------------------# + +#------------------------------------------------------------------------------ +# Set the desk top size in units of physical screen size +#------------------------------------------------------------------------------ + +DeskTopSize 2x2 + +#------------------------------------------------------------------------------ +# Some good things (in general) +#------------------------------------------------------------------------------ +Style * MWMFunctions +Style * MWMDecor +Style * HintOverride +Style * OLDecor + +BusyCursor DynamicMenu True, Read True + +#------------------------------------------------------------------------------ +# transient windows +#------------------------------------------------------------------------------ + +# You can do a lot of things with transient windows. However, you may +# want to set transient style by application (in styles). +# Heres one example: +# +# If you want to decorate transient windows: +#Style * DecorateTransient +# In *general* it is not a good idea to be able to lower transient window +# under its main window, but why not... +#Style * DontRaiseTransient +# In my HO the defaults (which are "Motif" compliant) are good. + +#------------------------------------------------------------------------------ +# bogus hack +#------------------------------------------------------------------------------ + +# +# FVWM has a command for bogus applications. Here an example with KFM +# + +#KFM_ICONS 1 uncomment the next line if you use the KFM "icons" +#BugOpts RaiseOverUnmanaged on + +#PANEL_PUT 1 you may try this for a "stays put" gnome panel +#DefaultLayers 6 8 10 + diff --git a/.fvwm/iconstyles b/.fvwm/iconstyles new file mode 100644 index 0000000..dc57849 --- /dev/null +++ b/.fvwm/iconstyles @@ -0,0 +1,252 @@ +#-----------------------------------------------------------------------------# +# +# 7. Set applications Mini Icons and Icons +# +#-----------------------------------------------------------------------------# + +# Note: Most applications provide an icon. + +Style * IconBox 10 -80 -0 -0, IconGrid 64 64, IconFill left bottom, \ + IconBox 10 +300 -150 -80, IconGrid 64 64, IconFill bottom left +Style * SlipperyIcon, IconTitle + + +# default +Style * MiniIcon mini.doc.xpm, Icon page.xpm + +# Terminals +Style *term* MiniIcon mini.term.xpm, Icon rterm2.xpm +Style rxvt MiniIcon mini.term.xpm, Icon rterm2.xpm + +# Accessories +Style xcalc MiniIcon mini.calc.xpm, Icon rcalc2.xpm +Style xconsole MiniIcon mini.term.xpm, Icon rtrem2.xpm +Style xmag MiniIcon mini.zoom.xpm, Icon mag_glass.xpm +Style xfontsel MiniIcon mini.font.xpm, Icon toolbox.xpm +Style xgrab MiniIcon mini.camera.xpm +Style *clock* MiniIcon mini.clock.xpm +#Style ddd MiniIcon mini.bug2.xpm +#Style xgdb MiniIcon mini.bug2.xpm +Style XClipboard MiniIcon mini.clipboard.xpm, Icon toolbox.xpm +Style *color* MiniIcon mini.colors.xpm, Icon resize + +# Applications +#Style lyx MiniIcon mini.edit.xpm +#Style thot MiniIcon mini.edit.xpm +#Style ghostview MiniIcon mini.gv.xpm +Style gv MiniIcon mini.gv.xpm +#Style xdvi MiniIcon mini.zoom.xpm +#Style acroread MiniIcon mini.pdf.xpm +Style xpdf MiniIcon mini.pdf.xpm +#Style plan MiniIcon mini.calandar.xpm + +# Sciences +#Style GNUplot MiniIcon mini.graph.xpm, Icon graphs.xpm +#Style *maple MiniIcon mini.zoom.xpm +#Style Scilab MiniIcon mini.graph2.xpm +Style Xaos MiniIcon mini.fractal.xpm +#Style fractint MiniIcon mini.fractal.xpm +#Style xephem MiniIcon mini.exp.xpm +#Style XTide MiniIcon mini.exp.xpm +#Style THX-1138 MiniIcon mini.calc.xpm + +# System +Style Top MiniIcon mini.run.xpm, Icon toolbox.xpm +#Style tkps MiniIcon mini.hex.xpm, Icon toolbox.xpm +#Style xosview MiniIcon mini.run.xpm, Icon toolbox.xpm +Style xload MiniIcon mini.perf.xpm, Icon toolbox.xpm +#Style xmem MiniIcon mini.perf.xpm, Icon toolbox.xpm +#Style XSysStats MiniIcon mini.run.xpm +# File Mgr +#Style xfm MiniIcon mini.filemgr.xpm, Icon Xfm.xpm +#Style fr MiniIcon mini.filemgr.xpm, Icon Xfm.xpm +Style Midnight-Commander MiniIcon mini.filemgr.xpm, Icon Xfm.xpm + +# Editors +#Style emacs MiniIcon mini.edit.xpm, Icon lemacs.xpm +Style VIM MiniIcon mini.edit.xpm, Icon lemacs.xpm +Style *edit MiniIcon mini.edit.xpm, Icon lemacs.xpm +#Style dtpad MiniIcon mini.edit.xpm, Icon lemacs.xpm + +# Network +Style *ppp* MiniIcon mini.connect.xpm, Icon Mosaic.xpm +#Style Hifs MiniIcon mini.connect.xpm, Icon Mosaic.xpm + +# Internet +# Netscape resource +Style Netscape MiniIcon mini.nscape.xpm +Style Navigator MiniIcon mini.nscape.xpm +Style MailFolder MiniIcon mini.dirlink.xpm +Style MailThread MiniIcon mini.mail.xpm +Style Composition MiniIcon mini.letter.xpm +Style Composer MiniIcon mini.editor.xpm +Style *Download* MiniIcon mini.ftp.xpm +# +#Style amaya MiniIcon mini.nscape.xpm +Style Mozilla MiniIcon mini.nscape.xpm +Style lynx MiniIcon mini.cat.xpm, Icon Mosaic.xpm +Style xmh MiniIcon mini.mail.xpm, Icon Mail2.xpm +Style Mail MiniIcon mini.mail.xpm, Icon Mail2.xpm +Style *mail* MiniIcon mini.mail.xpm, Icon Mail2.xpm +#Style Pine MiniIcon mini.mail.xpm, Icon Mail2.xpm +Style Mutt MiniIcon mini.mail.xpm, Icon Mail2.xpm +#Style NcFtp MiniIcon mini.ftp.xpm, Icon Mosaic.xpm +Style *ftp* MiniIcon mini.ftp.xpm, Icon Mosaic.xpm +#Style "X-Chat*" MiniIcon mini.doc1.xpm, Icon page.xpm +#Style Irc MiniIcon mini.doc1.xpm +#Style tkirc MiniIcon mini.doc1.xpm +#Style Licq MiniIcon mini.doc1.xpm +Style +Style zircon MiniIcon mini.zircon.xpm +#Style xgopher MiniIcon mini.gopher.xpm + +# Graphics +#Style xv MiniIcon mini.xv.xpm +Style "The GIMP" MiniIcon mini.gimp.xpm, Icon gimp.xpm +Style "Gimp" MiniIcon mini.gimp.xpm, Icon gimp.xpm +#Style xfig MiniIcon mini.xfig.xpm +#Style xfpovary MiniIcon mini.ray.xpm +# xpaint resource names +Style xpaint MiniIcon mini.palette.xpm +Style Canvas MiniIcon mini.palette.xpm +Style fatbits MiniIcon mini.palette.xpm +Style filebrowser MiniIcon mini.ofolder.xpm +# +#Style XbmBrowser MiniIcon mini.directory.xpm +#Style ee MiniIcon mini.palette.xpm + +# Multimedia +Style *mixer MiniIcon mini.audiovol.xpm +Style *playcd* MiniIcon mini.cdlabel.xpm +Style *cdplay* MiniIcon mini.cdlabel.xpm +#Style xltwavplay MiniIcon mini.sound.xpm +#Style MiXViews MiniIcon mini.audiovol.xpm +#Style freeamp MiniIcon mini.audiovol.xpm +#Style XAnim MiniIcon mini.display.xpm +# Games and amusement +Style *maze MiniIcon mini.maze.xpm +#Style xboard MiniIcon mini.slon.xpm +#Style XGammon MiniIcon mini.go.xpm +#Style xsokoban MiniIcon mini.go.xpm +#Style xlander MiniIcon mini.xlander.xpm +#Style xmahjongg MiniIcon mini.xmahjongg.xpm +#Style xjewel MiniIcon mini.xjewel.xpm +#Style hextris MiniIcon mini.hextris.xpm +Style *tetris* MiniIcon mini.tetris.xpm +#Style kpat2 MiniIcon mini.heart.xpm +Style xeyes MiniIcon mini.eyes.xpm +#Style xcat MiniIcon mini.cat.xpm +Style Quake* MiniIcon mini.destroy.xpm, Icon doomface.xpm +Style Koules MiniIcon mini.happy.xpm +Style xroach MiniIcon mini.roach.xpm +Style xlogo MiniIcon mini.x2.xpm + +# Modules, Form and script +Style Fvwm* MiniIcon - +Style FvwmScript* MiniIcon mini.fvwm.xpm +Style FvwmForm* MiniIcon mini.fvwm.xpm +Style FvwmIdent MiniIcon mini.question.xpm, Icon question.xpm +Style FvwmConsole MiniIcon mini.xterm.xpm, Icon wterm.xpm +Style FvwmScript-BellSetup MiniIcon mini.audiovol.xpm, Icon bell.xpm +Style FvwmScript-KeyboardSetup MiniIcon mini.keyboard.xpm,Icon keyboard.xpm +Style FvwmScript-ScreenSetup MiniIcon mini.monitor.xpm, Icon screen.xpm +Style FvwmScript-PointerSetup MiniIcon mini.mouse.xpm, Icon pointer.xpm +Style FvwmScript-BaseConfig MiniIcon mini.fvwm.xpm, Icon settings.xpm +Style FvwmScript-Find MiniIcon mini.zoom.xpm, Icon find1.xpm +Style FvwmScript-Quit MiniIcon mini.question.xpm +Style FvwmScript-Colorset MiniIcon mini.colors.xpm, Icon settings.xpm +Style FvwmScript-ScreenDump MiniIcon mini.camera.xpm, Icon resize.xpm +Style FvwmScript-Setup95 MiniIcon mini.fvwm.xpm, Icon settings.xpm +Style FvwmScript-Date MiniIcon mini.clock.xpm, Icon date.xpm +Style FvwmForm-QuitVerify MiniIcon mini.question.xpm +Style FvwmForm-Rlogin MiniIcon mini.connect.xpm, Icon Mosaic.xpm +Style FvwmForm-Capture MiniIcon mini.camera.xpm, Icon resize.xpm +Style FvwmForm-Talk MiniIcon mini.telnet.xpm, Icon rterm.xpm +Style FvwmForm-RootCursor MiniIcon mini.xarchie.xpm, Icon settings.xpm +Style FvwmForm-Form MiniIcon mini.fvwm.xpm, Icon settings.xpm +Style FvwmForm-Setup MiniIcon mini.fvwm.xpm, Icon settings.xpm +Style FormFvwmAnimate MiniIcon mini.iconify.xpm, Icon settings.xpm +Style xmessage MiniIcon mini.question.xpm, Icon settings.xpm +Style WinMakerAppButtons* NoIcon + +# Help +Style man MiniIcon mini.book1.xpm, Icon help.xpm +# xman resource names +Style topBox MiniIcon mini.book1.xpm, Icon help.xpm +Style help MiniIcon mini.book2.xpm, Icon help.xpm +Style manualBrowser MiniIcon mini.book2.xpm, Icon help.xpm +Style *FAQ* MiniIcon mini.question.xpm, Icon help.xpm +# others... +Style IDL* MiniIcon mini.zoom.xpm +Style XDbx MiniIcon mini.bug2.xpm +#Style control-panel MiniIcon mini.eye.xpm +Style xvidtune MiniIcon mini.x2.xpm + +# To get the kde mini-icon styles build the system menu (i.e., uncomment +# the lines that follow K_SM) + +#G_ST 51 some icons, an alternative is to use fvwm2gnome and fvwm-menu-desktop +#Style "gcolorsel" MiniIcon mini.colors.xpm, Icon resize.xpm +#Style "gcalc" MiniIcon mini.calc.xpm, Icon rcalc2.xpm +#Style "gdiskfree" MiniIcon mini.fdisk.xpm +#Style "gEdit" MiniIcon mini.edit.xpm, Icon lemacs.xpm +#Style "gedit" MiniIcon mini.edit.xpm, Icon lemacs.xpm +#Style "gfontsel" MiniIcon mini.font.xpm +#Style "ghex" MiniIcon mini.hex.xpm, Icon page.xpm +#Style "gless" MiniIcon mini.file.xpm Icon page.xpm +#Style "gmix" MiniIcon mini.sound.xpm +#Style "gmailman" MiniIcon mini.mail.xpm, Icon mail2.xpm +#Style "gmc" MiniIcon mini.filemgr.xpm, Icon Xfm.xpm +#Style "gmenu" MiniIcon mini.doc1.xpm, Icon dialog_box.xpm +#Style "gnome-help-browser" MiniIcon mini.book3.xpm, Icon help.xpm +#Style "GnomeHelpBrowser" MiniIcon mini.book3.xpm, Icon help.xpm +#Style "gnome-ppp" MiniIcon mini.connect.xpm, Icon Mosaic.xpm +#Style "gnome-run" MiniIcon mini.hammer.xpm, Icon run.xpm +#Style "gnome-sync" MiniIcon mini.folder.xpm, Icon folder.xpm +#Style "gnomecal" MiniIcon norm.calendar.xpm, Icon mini/clock.xpm +#Style "gnomecard" MiniIcon mini.doc1.xpm, Icon page2.xpm +#Style "gnomecc" MiniIcon mini.hammer.xpm, Icon mini/home.xpm +#Style "GnomeTerminal" MiniIcon mini.term.xpm, Icon rterm2.xpm +#Style "gnp" MiniIcon mini.doc1.xpm, Icon page2.xpm +#Style "gnp+" MiniIcon mini.doc1.xpm, Icon page2.xpm +#Style "gnumeric" MiniIcon mini.calc2.xpm Icon rcalc2.xpm +#Style "GQview" MiniIcon mini.palette.xpm Icon xpaint.xpm +#Style "gsearchtool" MiniIcon mini.zoom.xpm, Icon find1.xpm +#Style "gstripchart" MiniIcon mini.graph2.xpm +#Style "gtalk" MiniIcon mini.zircon.xpm +#Style "gtcd" MiniIcon mini.cdlabel.xpm +#Style "gtk-shell" MiniIcon mini.doc1.xpm, Icon page.xpm +#Style "gtop" MiniIcon mini.run.xpm, Icon toolbox.xpm +#Style "gtt" MiniIcon mini.clock.xpm, Icon toolbox.xpm +#Style "guname" MiniIcon mini.question.xpm Icon page2.xpm +#Style "gw" MiniIcon mini.run.xpm, Icon page2.xpm +#Style "gxedit" MiniIcon mini.edit.xpm, Icon lemacs.xpm +#Style "vumeter" MiniIcon mini.sound.xpm +#Style "freecell" MiniIcon mini.heart.xpm +#Style "gnibbles" MiniIcon mini.happy.xpm +#Style "gnobots" MiniIcon mini.happy.xpm +#Style "gnobots2" MiniIcon mini.happy.xpm +#Style "gnome-stones" MiniIcon mini.happy.xpm +#Style "gnomine" MiniIcon mini.happy.xpm +#Style "gtali" MiniIcon mini.happy.xpm +#Style "gturing" MiniIcon mini.happy.xpm +#Style "iagno" MiniIcon mini.happy.xpm +#Style "mahjongg" MiniIcon mini.happy.xpm +#Style "same-gnome" MiniIcon mini.happy.xpm +#Style "sol" MiniIcon mini.heart.xpm +#Style "gtkballs" MiniIcon mini.happy.xpm +#Style "gfpoken" MiniIcon mini.happy.xpm +#Style "Imlib*" MiniIcon mini.hammer.xpm + +#CDE 10 +#Style Dtfile MiniIcon mini.filemgr.xpm +#Style Dtpad MiniIcon mini.edit.xpm +#Style Dthelp* MiniIcon mini.book1.xpm +#Style Dtcm* MiniIcon mini.calendar.xpm +#Style Dtcalc MiniIcon mini.calc.xpm +#Style Dticon* MiniIcon mini.palette.xpm +#Style Dtprint* MiniIcon mini.fax.xpm +#Style Dtstyle* MiniIcon mini.desktop.xpm +#Style "Applications Manager" MiniIcon mini.programs.xpm +#Style "Trash Can" MiniIcon mini.paper.xpm + diff --git a/.fvwm/menus b/.fvwm/menus new file mode 100644 index 0000000..6e22ae6 --- /dev/null +++ b/.fvwm/menus @@ -0,0 +1,1090 @@ +#-----------------------------------------------------------------------------# +# +# 10. Now define the menus +# +#-----------------------------------------------------------------------------# + +#------------------------------------------------------------------------------ +#--------- Taskbar's start menu +#------------------------------------------------------------------------------ + +DestroyMenu StartMenu +AddToMenu StartMenu@side.fvwm2.xpm@^black^ ++ "&Screen Saver%screen.xpm%" Popup Screen ++ "&Module%modules.xpm" Popup Module-Popup ++ "" Nop ++ "&Shells%shells.xpm%" Popup Shells ++ "&Programs%programs.xpm%" Popup Programs ++ "&Documents%documents.xpm%" Popup Documents ++ "&Settings%settings.xpm%" Popup Settings ++ "&Find%find1.xpm%" FvwmScript FvwmScript-Find ++ "&Help%help.xpm%" Exec exec xman +#PREF 1 ++ "&Run...%run.xpm%" Exec exec aterm ++ "" Nop ++ "Shut &Down%shutdown.xpm%" Module FvwmScript FvwmScript-Quit + +#------------------------------------------------------------------------------ +# Root Menu: This menu will fire up some very common utilities +#------------------------------------------------------------------------------ + +DestroyMenu Utilities +AddToMenu Utilities "FVWM Root Menu" Title +#PREF 3 ++ "&Terminal%mini.term.xpm%" Exec exec aterm ++ "&Editor%mini.edit.xpm" Exec exec gvim ++ "&File Manager%mini.filemgr.xpm%" Exec exec aterm -g 80x35 -e mc ++ "&Top%mini.run.xpm%" Exec exec xterm -geometry 80x40 -T Top -n Top -e top ++ "" Nop ++ "&Shells%mini.term.xpm" Popup Shells ++ "&Programs%mini.start.xpm%" Popup Programs ++ "" Nop ++ "&Modules%mini.modules.xpm%" Popup Module-Popup ++ "&Settings%mini.desktop.xpm%" Popup Settings ++ "&Documents%mini.books.xpm%" Popup Documents ++ "&Screen Saver%mini.display.xpm%" Popup Screen ++ "" Nop ++ "&Restart%mini.turn.xpm%" Popup Restart ++ "&Exit FVWM%mini.stop.xpm%" FvwmForm FvwmForm-QuitVerify + + +#------------------------------------------------------------------------------ +#--------- SHELLS +#------------------------------------------------------------------------------ +DestroyMenu Shells +AddToMenu Shells ++ "&Xterm default%mini.term.xpm%" Exec exec xterm ++ "Xterm/&root default%mini.term.xpm%" Exec exec xterm -fg violet -bg black -e su -l +#+ "&NXterm default%mini.term.xpm%" Exec exec nxterm ++ "&Rxvt default%mini.term.xpm%" Exec exec rxvt +#+ "&Eterm default%mini.term.xpm%" Exec exec Eterm +#+ "X&iterm default%mini.term.xpm%" Exec exec xiterm ++ "&Aterm default%mini.term.xpm%" Exec exec aterm +#+ "&GNOME Term default%mini.term.xpm%" Exec exec gnome-terminal +#+ "&Konsole default%mini.term.xpm%" Exec exec konsole +#+ "&Kvt default%mini.term.xpm%" Exec exec kvt +#+ "&Dtterm default%mini.term.xpm%" Exec exec /usr/bin/dtterm ++ "" Nop ++ "&Xterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec xterm -n $USER@$HOST -T $USER@$HOST -g 80x40 -sb +sk +si -sl 4096 -j -ls -fn 7x14 -fb 7x14bold ++ "Xterm/r&oot 80x40 (7x14 font)%mini.term.xpm%" Exec exec xterm -n root@$HOST -T root@$HOST -g 80x40 -sb +sk +si -sl 4096 -j -ls -fn 7x14 -fb 7x14bold -fg violet -bg black -e su -l +#+ "&NXterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec nxterm -n $USER@$HOST -T $USER@$HOST -g 80x40 -sb +sk +si -sl 4096 -j -ls -fn 7x14 -fb 7x14bold ++ "&Rxvt 80x40 (7x14 font)%mini.term.xpm%" Exec exec rxvt -n $USER@$HOST -T $USER@$HOST -g 80x40 --loginShell -fn 7x14 -fb 7x14bold +#+ "&Eterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec Eterm -n $USER@$HOST -T $USER@$HOST -g 80x40 --login-shell --font 7x14 --bold-font 7x14bold +#+ "X&iterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec xiterm -n $USER@$HOST -T $USER@$HOST -g 80x40 -sb +sk +si -sl 4096 -ls -fn 7x14 -fb 7x14bold ++ "&Aterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec aterm -n $USER@$HOST -T $USER@$HOST -g 80x40 -sb +sk +si -sl 4096 -ls -fn 7x14 -fb 7x14bold +#+ "&GNOME Term 80x40 (7x14 font)%mini.term.xpm%" Exec exec gnome-terminal --title=$USER@$HOST --geometry=80x40 --login --font=7x14 +#+ "&Kvt 80x40 (7x14 font)%mini.term.xpm%" Exec exec kvt -n $USER@$HOST -T $USER@$HOST -vt_geometry 80x40 -sl 4096 -ls -vt_font 7x14 +#+ "&Konsole 80x40%mini.term.xpm%" Exec exec konsole -nowelcome -sl 4096 -ls -vt_sz 80x40 +#+ "&Dtterm 80x40 (7x14 font)%mini.term.xpm%" Exec exec /usr/dt/bin/dtterm -n $USER@$HOST -T $USER@$HOST -sl 4096 -ls -g 80x40 -fn 7x14 -fb 7x14bold ++ "" Nop ++ "Remote &login ...%mini.connect.xpm%" FvwmForm FvwmForm-Rlogin + +#------------------------------------------------------------------------------ +#--------- Programs +#------------------------------------------------------------------------------ + +DestroyMenu Programs +AddToMenu Programs +#G_SM_G 2 +# AddToMenu Programs "&GNOME Menu%mini.gnome.xpm%" SendToModule FvwmGtk gnome-sys +#+ "" Nop +#G_SM_F 2 +#AddToMenu Programs "&GNOME Menu%mini.gnome.xpm%" Popup gnome-sys +#+ "" Nop +#G_UM_G 2 +#AddToMenu Programs "GNOME &User%mini.gnome.xpm%" SendToModule FvwmGtk gnome-user +#+ "" Nop +#G_UM_F 2 +#AddToMenu Programs "GNOME &User%mini.gnome.xpm%" Popup gnome-user +#+ "" Nop +#G_RHM_G 2 +#AddToMenu Programs "GNOME &RedHat%mini.gnome.xpm%" SendToModule FvwmGtk gnome-redhat +#+ "" Nop +#G_RHM_F 2 +#AddToMenu Programs "GNOME &RedHat%mini.gnome.xpm%" Popup gnome-redhat +#+ "" Nop +#K_SM 2 +#AddToMenu Programs "&KDE Menu%mini.kde.xpm" Popup kde-sys +#+ "" Nop +#K_UM 2 +#AddToMenu Programs "KDE &User%mini.kde.xpm" Popup kde-user +#+ "" Nop +#CDE 2 +#AddToMenu Programs "&CDE Menu%mini.folder.xpm" Popup cde-menu +#+ "" Nop +AddToMenu Programs ++ "&Accessories%mini.hammer.xpm%" Popup Accessories ++ "&Applications%mini.pencil.xpm%" Popup Applications ++ "&Science%mini.question.xpm" Popup Science ++ "&System%mini.filemgr.xpm" Popup System ++ "&Editors%mini.edit.xpm%" Popup Editors ++ "&Network%mini.telnet.xpm%" Popup Network ++ "&Internet%mini.connect.xpm%" Popup Internet ++ "&Graphics%mini.paint.xpm%" Popup Graphics ++ "&Multimedia%mini.cd.xpm%" Popup Multimedia ++ "&Games%mini.happy.xpm%" Popup Games + +#------------------------------------------------------------------------------ +#--------- KDE, CDE & GNOME "fvwm" menus + +# For more informtion man fvwm-menu-desktop + +#K_SM 1 +#PipeRead 'fvwm-menu-desktop --desktop kde-sys --enable-mini-icons --enable-style' +#K_UM 1 +#PipeRead 'fvwm-menu-desktop --desktop kde-user --enable-mini-icons' +#G_SM_F 1 +#PipeRead 'fvwm-menu-desktop --desktop gnome-sys --type fvwm --install-prefix No --enable-mini-icons --mini-icons-path '' --icon-toptitle :no::: --icon-title :no::: --icon-folder mini.folder.xpm:ow::: --icon-app mini.gnome.xpm:ow:::' +#G_UM_F 1 +#PipeRead 'fvwm-menu-desktop --desktop gnome-user --type fvwm --enable-mini-icons --mini-icons-path '' --icon-toptitle :no::: --icon-title :no::: --icon-folder mini.folder.xpm:ow::: --icon-app mini.doc.xpm:ow:::' +#G_RHM_F 1 +#PipeRead 'fvwm-menu-desktop --desktop gnome-redhat --type fvwm --enable-mini-icons --mini-icons-path '' --icon-toptitle :no::: --icon-title :no::: --icon-folder mini.folder.xpm:ow::: --icon-app mini.ball2.xpm:ow:::' + +#CDE 17 +#DestroyMenu cde-menu +#AddToMenu cde-menu +#+ "&Applications Manager%mini.programs.xpm%" Exec exec /usr/dt/bin/dtaction Dtappmgr +#+ "&Terminal%mini.term.xpm%" Exec exec /usr/dt/bin/dtterm +#+ "&File Manager%mini.filemgr.xpm%" Exec exec /usr/dt/bin/dtfile +#+ "&Trash Can%mini.paper.xpm%" Exec exec /usr/dt/bin/dtaction Dttrash +#+ "Text &Editor%mini.edit.xpm%" Exec exec /usr/dt/bin/dtpad +#+ "Desktop &Help%mini.book1.xpm%" Exec exec /usr/dt/bin/dthelpview -helpVolume browser +#+ "Man Pages%mini.book1.xpm%" Exec exec /usr/dt/bin/dthelpview -man +#+ "&Mailer%mini.mail.xpm%" Exec exec /usr/dt/bin/dtmail +#+ "&Calandar%mini.calandar.xpm" Exec exec /usr/dt/bin/dtcm +#+ "&Calculator%mini.calc.xpm%" Exec exec /usr/dt/bin/dtcalc +#+ "&Icon Editor%mini.palette.xpm%" Exec exec /usr/dt/bin/dticon +#+ "&Print Manager%mini.fax.xpm%" Exec exec /usr/dt/bin/dtprintinfo +#+ "&Styles Manager%mini.hammer.xpm%" Exec exec /usr/dt/bin/dtstyle +#+ "" Nop +#+ "&Exit CDE%mini.stop.xpm%" Exec exec /usr/dt/bin/dtaction ExitSession + +#------------------------------------------------------------------------------ +#--------- Accessories + +DestroyMenu Accessories +AddToMenu Accessories ++ "&Calculator%mini.calc.xpm%" Exec exec xcalc ++ "&Magnifying glass%mini.zoom.xpm%" Exec exec xmag ++ "&Font viewer%mini.font.xpm%" Exec exec xfontsel ++ "&Xdaliclock%mini.clock.xpm%" Exec exec xdaliclock ++ "X&clock%mini.clock.xpm%" Exec exec xclock ++ "&Rclock%mini.clock.xpm%" Exec exec rclock +#+ "x&apm%mini.connect.xpm%" Exec exec xapm +#+ "&View colormap%mini.colors.xpm%" Exec exec xcolormap ++ "&Color viewer%mini.colors.xpm%" Exec exec xcolorsel ++ "&Capture Form%mini.camera.xpm%" FvwmForm FvwmForm-Capture ++ "&Screen Dump Script%mini.camera.xpm%" FvwmScript FvwmScript-ScreenDump +#+ "X&grab%mini.camera.xpm%" Exec exec xgrab +#+ "&Ddd%mini.bug2.xpm%" Exec exec ddd +#+ "Xx&gdb%mini.bug2.xpm%" Exec exec xxgdb ++ "&Xclipboard%mini.clipboard.xpm%" Exec exec xclipboard + +#------------------------------------------------------------------------------ +#--------- Applications + + +DestroyMenu Applications +AddToMenu Applications +#+ "&Lyx%mini.edit.xpm%" Exec exec lyx +#+ "&Thot%mini.edit.xpm%" Exec exec thot +#+ "&Ghostview (Postscript)%mini.gv.xpm%" Exec exec ghostview ++ "&GV (Postscript)%mini.gv.xpm%" Exec exec gv +#+ "X&dvi%mini.zoom.xpm%" Exec exec xdvi +#+ "&Acroread (PDF)%mini.pdf.xpm%" Exec exec acroread ++ "&Xpdf (PDF)%mini.pdf.xpm%" Exec exec xpdf +#+ "&Plan%mini.doc1.xpm%" Exec exec plan + +#------------------------------------------------------------------------------ +#--------- Science + +DestroyMenu Science +AddToMenu Science +#+ "Thx-1138%mini.calc.xpm%" Exec exec thx-1138 +#+ "GNU &plot%mini.graph.xpm%" Exec exec xterm -T GNUplot -name GNUplot -e gnuplot +#+ "&SCILAB%mini.zoom.xpm%" Exec exec scilab +#+ "&Maple%mini.graph2.xpm%" Exec exec xmaple +#+ "&Mathematica%mini.graph2.xpm%" Exec exec mathematica ++ "&Xaos%mini.fractal.xpm%" Exec exec xaos +#+ "&Fractint%mini.fractal.xpm%" Exec exec xterm -font 7x14 -e xfractint +#+ "X&ephem%mini.exp.xpm%" Exec exec xephem +#+ "X&tide%mini.exp.xpm%" Exec exec xtide + +#------------------------------------------------------------------------------ +#--------- System + +DestroyMenu System +AddToMenu System ++ "&Running processes%mini.run.xpm%" Exec exec xterm -g 80x40 -e top +#+ "&TK processes%mini.hex.xpm%" Exec exec tkps ++ "&System load%mini.perf.xpm%" Exec exec xload +#+ "&Xosview%mini.run.xpm%" Exec exec xosview +#+ "&Memory usage%mini.perf.xpm%" Exec exec xmem +#+ "&XSysStats%mini.run.xpm%" Exec exec XSysStats ++ "&xconsole%mini.term.xpm%" Exec exec xconsole ++ "Set &Date Script%mini.clock.xpm%" FvwmScript FvwmScript-Date ++ "" Nop ++ "&Midnight-Commander%mini.filemgr.xpm%" Exec exec xterm -g 80x40 -n Midnight-Commander -T Midnight-Commander -e mc -x +#+ "X&fm%mini.filemgr.xpm%" Exec exec xfm +#+ "File &Runer%mini.filemgr.xpm%" Exec exec fr +#+ "&kfm%mini.filemgr.xpm%" Exec exec kfmclient openURL $HOME +#+ "&gmc%mini.filemgr.xpm%" Exec exec gmc + +#------------------------------------------------------------------------------ +#--------- Editors + +DestroyMenu Editors +AddToMenu Editors +#+ "&Emacs%mini.edit.xpm%" Exec exec emacs +#+ "&XEmacs%mini.edit.xpm%" Exec exec xemacs ++ "&Gvim%mini.edit.xpm%" Exec exec gvim +#+ "&Nedit%mini.edit.xpm%" Exec exec nedit ++ "&Xedit%mini.edit.xpm%" Exec exec xedit + +#------------------------------------------------------------------------------ +#--------- Network + +DestroyMenu Network +AddToMenu Network ++ "&Rlogin%mini.connect.xpm%" Module FvwmForm FvwmForm-Rlogin +#+ "&Vppp%mini.connect.xpm%" Exec exec vppp +#+ "&Ezppp%mini.connect.xpm%" Exec exec ezppp +#+ "&Hifs%mini.eyes.xpm%" Exec exec xterm -ls -bg #c0c0c0 -fg black -T Hifs -name Hifs -geometry 26x24 -e hifs + +#------------------------------------------------------------------------------ +#--------- Internet + +DestroyMenu Internet +AddToMenu Internet ++ "&Netscape%mini.nscape.xpm%" Exec exec netscape +#+ "&Amaya%mini.nscape.xpm%" Exec exec amaya ++ "&Mozilla%mini.nscape.xpm%" Exec exec mozilla ++ "&Lynx%mini.cat.xpm%" Exec exec xterm -g 80x30 -n lynx -T lynx -e lynx ++ "" Nop +#+ "Xfmail%mini.mail.xpm%" Exec exec xfmail ++ "&Xmh%mini.mail.xpm%" Exec exec xmh ++ "&Mail%mini.mail.xpm%" Exec exec xterm -g 80x30 -n Mail -T Mail -e mail +#+ "&Pine%mini.mail.xpm%" Exec exec xterm -g 80x30 -n Pine -T Pine -e pine ++ "&Mutt%mini.mail.xpm%" Exec exec xterm -g 80x30 -n Mutt -T Mutt -e mutt +#+ "&Elm%mini.mail.xpm%" Exec exec xterm -g 80x30 -n Elm -T Elm -e elm +#+ "" Nop +#+ "Nc&FTP%mini.ftp.xpm%" Exec exec xterm -g 80x30 -n NcFtp -T FTP -e ncftp +#+ "&Xftp%mini.ftp.xpm%" Exec exec xftp +#+ "X-&Chat%mini.doc1.xpm%" Exec exec xchat +#+ "Irc%mini.doc1.xpm%" Exec exec xterm -g 80x30 -n Irc -T Trc -e irc +#+ "Tkirc%mini.doc1.xpm%" Exec exec tkirc +#+ "Lirc%mini.doc1.xpm%" Exec exec licq +#+ "&Zircon%mini.zircon.xpm%" Exec exec zircon +#+ "X&Gopher%mini.gopher.xpm%" Exec exec xgopher +#+ "Minitel%mini.xterm.xpm%" Exec exec xtel -petit + +#------------------------------------------------------------------------------ +#--------- Graphics + +DestroyMenu Graphics +AddToMenu Graphics ++ "The &Gimp%mini.gimp.xpm%" Exec exec gimp +#+ "&XPaint%mini.palette.xpm%" Exec exec xpaint +#+ "X&fig%mini.xfig.xpm%" Exec exec xfig +#+ "X&Fpovray%mini.ray.xpm%" Exec exec xfpovray +#+ "" Nop +#+ "&XV%mini.xv.xpm%" Exec exec xv +#+ "Xbm&Browser%mini.directory.xpm%" Exec exec xbmbrowser +#+ "&EE%mini.palette.xpm%" Exec exec ee + +#------------------------------------------------------------------------------ +#--------- Multimedia + +DestroyMenu Multimedia +AddToMenu Multimedia +#+ "&CD player%mini.cdlabel.xpm%" Exec exec xplaycd +#+ "X&mixer%mini.audiovol.xpm%" Exec exec xmixer +#+ "X<wav%mini.sound.xpm%" Exec exec xltwavplay +#+ "FreeAmp%mini.sound.xpm%" Exec exec freeamp +#+ "MiXViews%mini.sound.xpm%" Exec exec mxv + +#------------------------------------------------------------------------------ +#--------- Games and amusements + +DestroyMenu Games +AddToMenu Games +#+ "&Maze%mini.maze.xpm%" Exec exec maze +#+ "&Spider%mini.espada.xpm%" Exec exec spider +#+ "&Chess%mini.slon.xpm%" Exec exec xboard +#+ "&XGammon%mini.go.xpm%" Exec exec xgammon +#+ "X&lander%mini.xlander.xpm%" Exec exec xlander +#+ "X&mahjongg%mini.xmahjongg.xpm%" Exec exec xmahjongg +#+ "X&Sokoban%mini.go.xpm%" Exec exec xsokoban +#+ "X&jewel%mini.xjewel.xpm%" Exec exec xjewel +#+ "&Hextris%mini.hextris.xpm%" Exec exec hextris +#+ "&Maelstrom%mini.destroy.xpm%" Exec exec Maelstrom +#+ "Koules%mini.happy.xpm%" Exec exec xkoules +#+ "Quake%mini.destroy.xpm%" Exec cd /usr/local/games/quake/ ; exec ./stquake +#+ "Quake2%mini.destroy.xpm%" Exec cd /usr/local/games/quake2/ ; exec ./quake2 +set vid_ref softx ++ "" Nop ++ "&Amusements%mini.happy.xpm%" Popup Amusements + +DestroyMenu Amusements +AddToMenu Amusements ++ "&Eyes%mini.eyes.xpm%" Exec exec xeyes ++ "&X logo%mini.bx2.xpm%" Exec exec xlogo +#+ "X&roach%mini.roach.xpm%" Exec exec xroach ++ "X&snow%mini.xsnow.xpm%" Exec exec xsnow ++ "&Stop Xsnow%mini.xsnow.xpm%" Exec exec killall xsnow +#+ "&Desktop cat%mini.cat.xpm%" Exec exec xcat + +#------------------------------------------------------------------------------ +#--------- Modules +#------------------------------------------------------------------------------ + + +DestroyMenu Module-Popup +AddToMenu Module-Popup ++ "&Autoraise%mini.raise.xpm%" RestartModule FvwmAuto 500 ++ "A&nimate%mini.iconify.xpm%" RestartModule FvwmAnimate ++ "&Backer%mini.rainbow.xpm%" RestartModule FvwmBacker ++ "B&anner%mini.ray.xpm%" RestartModule FvwmBanner ++ "B&uttons Bar%mini.pencil.xpm%" RestartModuleByAlias FvwmButtons BarButtons BarButtons ++ "&Mini button bar%mini.pencil.xpm%" RestartModuleByAlias FvwmButtons MiniButtons MiniButtons ++ "&WMaker buttons%mini.pencil.xpm%" RestartModuleByAlias FvwmButtons WinMakerAppButtons WinMakerApp* ++ "Fvwm &Console%mini.xterm.xpm%" Module FvwmConsole -sb ++ "&Debug%mini.bug2.xpm%" RestartModule FvwmDebug ++ "&IconBox%mini.icons.xpm%" RestartModule FvwmIconBox ++ "I&conMan%mini.run.xpm%" RestartModule FvwmIconMan ++ "Identif&y%mini.question.xpm%" RestartModule FvwmIdent ++ "Desker &Panel%mini.pager.xpm%" RestartModuleByAlias FvwmButtons DeskerPanelButtons DeskerPanelButtons ++ "Sound &effect%mini.sound.xpm%" RestartModule FvwmEvent ++ "&Talk to Fvwm%mini.telnet.xpm%" FvwmForm FvwmForm-Talk ++ "Task&Bar%mini.exp.xpm%" RestartModule FvwmTaskBar ++ "Window &List%mini.windows.xpm%" RestartModule FvwmWinList ++ "&Wharf%mini.pencil.xpm%" RestartModule FvwmWharf ++ "" Nop ++ "&Kill Modules%mini.bomb.xpm%" Popup Kill-Module-Popup + +DestroyMenu Kill-Module-Popup +AddToMenu Kill-Module-Popup ++ "&Autoraise%mini.raise.xpm%" KillModule FvwmAuto ++ "A&nimate%mini.iconify.xpm%" KillModule FvwmAnimate ++ "&Backer%mini.rainbow.xpm%" KillModule FvwmBacker ++ "B&anner%mini.ray.xpm%" KillModule FvwmBanner ++ "B&utton bar%mini.pencil.xpm%" All (BarButtons) Close ++ "&Mini button bar%mini.pencil.xpm%" All (MiniButtons) Close ++ "&WMaker buttons%mini.pencil.xpm%" All (WinMakerApp*) Close ++ "Fvwm &Console%mini.xterm.xpm%" KillModule FvwmConsole ++ "&Debug%mini.bug2.xpm%" KillModule FvwmDebug ++ "&IconBox%mini.icons.xpm%" KillModule FvwmIconBox ++ "I&conMan%mini.run.xpm%" KillModule FvwmIconMan ++ "Identif&y%mini.question.xpm%" KillModule FvwmIdent ++ "Desker &Panel%mini.pager.xpm%" All (DeskerPanelButtons) Close ++ "Sound &effect%mini.sound.xpm%" KillModule FvwmEvent ++ "&Talk%mini.telnet.xpm%" All (FvwmForm-Talk) Close ++ "Task&Bar%mini.exp.xpm" KillModule FvwmTaskBar ++ "Window &List%mini.windows.xpm%" KillModule FvwmWinList ++ "&Wharf%mini.pencil.xpm%" KillModule FvwmWharf + +#------------------------------------------------------------------------------ +#--------- Settings +#------------------------------------------------------------------------------ + + +DestroyMenu Settings +AddToMenu Settings ++ "&Configuration%mini.fvwm.xpm%" Popup FvwmConfig ++ "&Animation%mini.iconify.xpm%" Popup Animate-Settings ++ "Applications &Managers%mini.windows.xpm%" Popup AppsManager ++ "Auto&Raise%mini.raise.xpm%" Popup AutoRaise-Settings ++ "Back&ground%mini.display.xpm%" Popup Background-Settings ++ "&Banner%mini.ray.xpm%" Popup Banner-Settings ++ "B&uttons Bar%mini.pencil.xpm%" Popup Buttons-Settings ++ "&Mini Buttons%mini.pencil.xpm%" Popup MiniButtons-Settings ++ "Desker &Panel%mini.pager.xpm%" Popup DeskerPanel-settings ++ "S&ounds Effect%mini.audiovol.xpm%" Popup Sound-Settings ++ "&WMaker Applets%mini.pencil.xpm%" Popup WinMakerApp-Settings ++ "Set &Layers%mini.windows.xpm" Popup Layers-Settings ++ "&X Setup Scripts%mini.x.xpm%" Popup XsetupScripts ++ "&Show/Load/Save Settings%mini.turn.xpm%" Popup Load-Settings ++ "" Nop ++ "&Edit .fvwm2rc%mini.edit.xpm%" Popup Edit-Config ++ "Reload .fvwm2rc%mini.turn.xpm%" Popup Reload-Config ++ "Temporary Change:" Title ++ "&Focus/Paging%mini.zoom.xpm%" Popup Focus-Settings ++ "&Mouse Speed%mini.cat.xpm%" Popup Mouse-Settings ++ "&Keyboard%mini.keyboard.xpm%" Popup Keyboard-Settings ++ "&Bell%mini.audiovol.xpm%" Popup Bell-Settings ++ "&Screen%mini.monitor.xpm%" Popup X-settings + +#------------------------------------------------------------------------------ +#--------- Fvwm Config + +DestroyMenu FvwmConfig +AddToMenu FvwmConfig ++ "&Base Configuration%mini.fvwm.xpm%" FvwmScript FvwmScript-BaseConfig ++ "&Form Configuration%mini.fvwm.xpm" FvwmForm FvwmForm-Form ++ "" Nop ++ "&Rebuild Sample 95%mini.fvwm.xpm%" FvwmScript FvwmScript-Setup95 ++ "&Load Default Sample%mini.fvwm.xpm%" FvwmForm FvwmForm-Setup + + +#------------------------------------------------------------------------------ +#--------- Apps Manager + +DestroyMenu AppsManager +AddToMenu AppsManager ++ "TaskBar &Desk%mini.exp.xpm%" ChangeAppsMan TaskBarDesk ++ "TaskBar &Global%mini.exp.xpm%" ChangeAppsMan TaskBarGlobal ++ "TaskBar &Desk (Auto Hide)%mini.exp.xpm%" ChangeAppsMan TaskBarDeskAutoHide ++ "TaskBar &Global (Auto Hide)%mini.exp.xpm%" ChangeAppsMan TaskBarGlobalAutoHide ++ "" Nop ++ "IconBox &Desk%mini.icons.xpm%" ChangeAppsMan IconBoxDesk ++ "IconBox &Global%mini.icons.xpm%" ChangeAppsMan IconBoxGlobal ++ "" Nop ++ "IconMan &Page%mini.run.xpm%" ChangeAppsMan IconManPage ++ "IconMan &Desk%mini.run.xpm%" ChangeAppsMan IconManDesk ++ "IconMan &Global%mini.run.xpm%" ChangeAppsMan IconManGlobal ++ "" Nop ++ "WinList &Desk%mini.windows.xpm%" ChangeAppsMan WinListDesk ++ "WinList &Global%mini.windows.xpm%" ChangeAppsMan WinListGlobal ++ "" Nop ++ "Use &Icons%mini.icons.xpm%" UseIcons ++ "" Nop ++ "&None%mini.windows.xpm%" AppsManNone + +#------------------------------------------------------------------------------ +#--------- Animate settings + +DestroyMenu Animate-Settings +AddToMenu Animate-settings ++ "&Animation on%mini.iconify.xpm%" ModuleOn FvwmAnimate ++ "Animation &off%mini.cross.xpm%" ModuleOff FvwmAnimate ++ "Animate &Menu%mini.iconify.xpm%" Popup MenuFvwmAnimate + +#------------------------------------------------------------------------------ +#--------- AutoRaise settings + +DestroyMenu AutoRaise-Settings +AddToMenu AutoRaise-Settings ++ "Raise &Slow%mini.raise.xpm%" ModuleOn 'FvwmAuto' '1000' ++ "Raise &Default%mini.raise.xpm%" ModuleOn 'FvwmAuto' '500' ++ "Raise &Fast%mini.raise.xpm%" ModuleOn 'FvwmAuto' '250' ++ "Speedy &Gonzales%mini.raise.xpm%" ModuleOn 'FvwmAuto' '50' ++ "Raise &Modules Only%mini.modules.xpm%" StartModulesAutoRaise ++ "AutoRaise &off%mini.cross.xpm%" ModuleOff FvwmAuto + +#------------------------------------------------------------------------------ +#--------- Background settings + +DestroyMenu Background-Settings +AddToMenu Background-Settings ++ "&FvwmBacker%mini.rainbow.xpm%" SetBackground FvwmBacker ++ "&Disable Background%mini.cross.xpm%" SetBackgroundOff ++ "Some &Solid Colors%mini.colors.xpm%" Popup Back-Solid ++ "Some &Gradientd%mini.colors.xpm%" Popup Back-Gradient ++ "&Personal%mini.colors.xpm%" Popup Back-Personal +PipeRead '[ ! -d /usr/share/pixmaps/backgrounds ] || echo + \\"\\&Site Background%mini.colors.xpm%\\" Popup Back-Site' +PipeRead '[ ! -n "$KDEDIR" ] || echo + \\"\\&KDE Background%mini.colors.xpm%\\" Popup Back-KDE' +PipeRead '[ ! -d /usr/local/share/WindowMaker/Backgrounds ] || echo + \\"\\&WM Background%mini.colors.xpm%\\" Popup Back-Local-WM' +PipeRead '[ ! -d /usr/share/WindowMaker/Backgrounds ] || echo + \\"\\&WM Background%mini.colors.xpm%\\" Popup Back-WM' +PipeRead '[ ! -d /usr/share/afterstep/backgrounds ] || echo + \\"\\&AS Background%mini.colors.xpm%\\" Popup Back-AS' +PipeRead '[ ! -d /usr/local/share/afterstep/backgrounds ] || echo + \\"\\&AS Background%mini.colors.xpm%\\" Popup Back-Local-AS' + +DestroyFunc SetBackFromDirectory +AddToFunc SetBackFromDirectory ++ I DestroyMenu recreate $0 ++ I PipeRead 'for i in `/bin/ls $1`; \ + do echo AddToMenu $0 "`basename $i`" SetBackground \\"$2 $i\\"; done' + +DestroyFunc SetBackFromDirectories +AddToFunc SetBackFromDirectories ++ I DestroyMenu recreate $0 ++ I PipeRead 'for j in `/bin/ls -d $1`; do echo AddToMenu $0 "`basename $j`:" Title; for i in `/bin/ls $j/*`; do echo AddToMenu $0 "`basename $i`" SetBackground \\"$2 $i\\"; done; done' + + +# Replace $FVWM_USERDIR/images/backgrounds/ by your backgrounds directory +# and uncomment the next line +#AddToMenu Back-Personal DynamicPopupAction SetBackFromDirectory 'Back-Personal' '$FVWM_USERDIR/images/backgrounds/*' 'Exec exec xv -root -quit' + +AddToMenu Back-Site DynamicPopupAction SetBackFromDirectories 'Back-Site' '/usr/share/pixmaps/backgrounds/*' 'Exec exec xv -root -quit' + +AddToMenu Back-KDE DynamicPopupAction SetBackFromDirectory 'Back-KDE' '$KDEDIR/share/wallpapers/*' 'Exec exec xv -root -quit' + +AddToMenu Back-WM DynamicPopupAction SetBackFromDirectory 'Back-WM' '/usr/share/WindowMaker/Backgrounds/*' 'Exec exec xv -root -quit' + +AddToMenu Back-Local-WM DynamicPopupAction SetBackFromDirectory 'Back-Local-WM' '/usr/local/share/WindowMaker/Backgrounds/*' 'Exec exec xv -root -quit' + +AddToMenu Back-AS DynamicPopupAction SetBackFromDirectory 'Back-AS' '/usr/share/afterstep/backgrounds/*' 'Exec exec xv -root -quit' + +AddToMenu Back-Local-AS DynamicPopupAction SetBackFromDirectory 'Back-Local-AS' '/usr/local/share/afterstep/backgrounds/*' 'Exec exec xv -root -quit' + +DestroyMenu Back-Solid +AddToMenu Back-Solid ++ "&Red 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Red1' ++ "Red &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Red2' ++ "Red &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Red3' ++ "Red &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Red4' ++ "&Yellow 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Yellow1' ++ "Yellow &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Yellow2' ++ "Yellow &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Yellow3' ++ "Yellow &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Yellow4' ++ "&Orange 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Orange1' ++ "Orange &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Orange2' ++ "Orange &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Orange3' ++ "Orange &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Orange4' ++ "&Green 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Green1' ++ "Green &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Green2' ++ "Green &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Green3' ++ "Green &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Green4' ++ "&Cyan 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Cyan1' ++ "Cyan &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Cyan2' ++ "Cyan &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Cyan3' ++ "Cyan &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Cyan4' ++ "&Blue 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Blue1' ++ "Blue &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Blue2' ++ "Blue &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Blue3' ++ "Blue &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Blue4' ++ "&Magenta 1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Magenta1' ++ "Magenta &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Magenta2' ++ "Magenta &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Magenta3' ++ "Magenta &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Magenta4' ++ "&Snow1%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid snow1' ++ "Snow &2%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid snow2' ++ "Snow &3%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid snow3' ++ "Snow &4%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid snow4' ++ "&Black%mini.rball.xpm%" SetBackground 'Exec exec xsetroot -solid Black' + +DestroyMenu Back-Gradient +AddToMenu Back-Gradient +#+ "&Red decay%mini.bball.xpm%" SetBackground 'Exec exec bggen red1 red4 | xv -root -quit -' +#+ "&Yellow Orange decay%mini.bball.xpm%" SetBackground 'Exec exec bggen Yellow1 Orange4 | xv -root -quit -' +#+ "&Green decay%mini.bball.xpm%" SetBackground 'Exec exec bggen green1 DarkGreen | xv -root -quit -' +#+ "&Blue decay%mini.bball.xpm%" SetBackground 'Exec exec bggen 100 100 255 0 0 100 | xv -root -quit -' +#+ "&Magenta decayy%mini.bball.xpm%" SetBackground 'Exec exec bggen blue magenta | xv -root -quit -' +#+ "&Blue to Red%mini.bball.xpm%" SetBackground 'Exec exec bggen blue red | xv -root -quit -' +#+ "Blue to &Cyan%mini.bball.xpm%" SetBackground 'Exec exec bggen blue4 Cyan1 | xv -root -quit -' +#+ "&Cyan to Blue%mini.bball.xpm%" SetBackground 'Exec exec bggen Cyan Blue4 | xv -root -quit -' +#+ "&Black/pink/black%mini.bball.xpm%" SetBackground 'Exec exec bggen black pink black | xv -root -quit -' +#+ "Black/&red/black%mini.bball.xpm%" SetBackground 'Exec exec bggen black red black | xv -root -quit -' +#+ "&Sun Raise 1%mini.bball.xpm%" SetBackground 'Exec exec bggen black orange black pink| xv -root -quit -' +#+ "Sun Raise &2%mini.bball.xpm%" SetBackground 'Exec exec bggen black orange black Blue4| xv -root -quit -' +#+ "Sun Raise &3%mini.bball.xpm%" SetBackground 'Exec exec bggen black red black grey60| xv -root -quit -' +#+ "&Rainbowy%mini.bball.xpm%" SetBackground 'Exec exec bggen red green blue | xv -root -quit -' +#+ "&Full Rainbowy%mini.bball.xpm%" SetBackground 'Exec exec bggen black red yellow green blue purple black | xv -root -quit -' +#+ "&White to Black%mini.bball.xpm%" SetBackground 'Exec exec bggen white black | xv -root -quit -' +#+ "&Black to White%mini.bball.xpm%" SetBackground 'Exec exec bggen white black | xv -root -quit -' + +#------------------------------------------------------------------------------ +#--------- Banner settings + +DestroyMenu Banner-Settings +AddToMenu Banner-Settings ++ "&Banner on%mini.ray.xpm%" ModuleOn FvwmBanner ++ "Banner &off%mini.cross.xpm%" ModuleOff FvwmBanner + +#------------------------------------------------------------------------------ +#--------- Buttons settings + +DestroyMenu Buttons-Settings +AddToMenu Buttons-Settings ++ "&Buttons Bar%mini.pencil.xpm%" ChangeButtonsOn 'FvwmButtons BarButtons' ++ "&Wharf%mini.pencil.xpm%" ChangeButtonsOn FvwmWharf ++ "&None%mini.cross.xpm%" ChangeButtonsOff + + +#------------------------------------------------------------------------------ +#--------- MiniButtons settings + +DestroyMenu MiniButtons-Settings +AddToMenu MiniButtons-Settings ++ "&Mini Buttons on%mini.pencil.xpm%" ButtonsOn FvwmButtons MiniButtons MiniButtons ++ "Mini Buttons &off%mini.cross.xpm%" ButtonsOff MiniButtons MiniButtons + +#------------------------------------------------------------------------------ +#--------- DeskerPanel settings + +DestroyMenu DeskerPanel-Settings +AddToMenu DeskerPanel-Settings ++ "&Desker Panel on%mini.pencil.xpm%" ButtonsOn FvwmButtons DeskerPanelButtons DeskerPanelButtons ++ "Desker Panel &off%mini.cross.xpm%" ButtonsOff DeskerPanelButtons DeskerPanelButtons + +#------------------------------------------------------------------------------ +#--------- WMaker Applets settings + +DestroyMenu WinMakerApp-Settings +AddToMenu WinMakerApp-Settings ++ "&WMaker Applets on%mini.pencil.xpm%" ButtonsOn FvwmButtons WinMakerAppButtons WinMakerApp* ++ "WMaker Applets &off%mini.cross.xpm%" ButtonsOff WinMakerAppButtons WinMakerApp* + + +#------------------------------------------------------------------------------ +#--------- Sound settings + +DestroyMenu Sound-Settings +AddToMenu Sound-Settings ++ "&Sound Effect on%mini.audiovol.xpm%" ModuleOn FvwmEvent ++ "Sound Effect &off%mini.cross.xpm%" ModuleOff FvwmEvent +#+ "Sound &card%mini.sound.xpm%" Exec exec xmixer + +#------------------------------------------------------------------------------ +#--------- Layers Settings + +DestroyMenu Layers-Settings +AddToMenu Layers-Settings ++ "%mini.raise2.xpm%StaysOn&Top" Pick (CirculateHit) SetLayers StaysOnTop ++ "%mini.window.xpm%Stays&Put" Pick (CirculateHit) DestroyLayers ++ "%mini.lower2.xpm%StaysOn&Bottom" Pick (CirculateHit) SetLayers StaysOnBottom + +#------------------------------------------------------------------------------ +#--------- X setup Script + +DestroyMenu XsetupScripts +AddToMenu XsetupScripts ++ "&Bell%mini.audiovol.xpm%" FvwmScript FvwmScript-BellSetup ++ "&KeyBoard%mini.keyboard.xpm%" FvwmScript FvwmScript-KeyboardSetup ++ "&Screen%mini.monitor.xpm%" FvwmScript FvwmScript-ScreenSetup ++ "&Mouse%mini.mouse.xpm%" FvwmScript FvwmScript-PointerSetup + +#------------------------------------------------------------------------------ +#--------- Edit config + +#PREF 12 +DestroyMenu Edit-Config +AddToMenu Edit-Config ++ "Edit .fvwm2rc%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/.fvwm2rc ++ "Edit decorations%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/decorations ++ "Edit globalfeel%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/globalfeel ++ "Edit startup%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/startup ++ "Edit styles%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/styles ++ "Edit iconstyles%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/iconstyles ++ "Edit functions%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/functions ++ "Edit bindings%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/bindings ++ "Edit menus%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/menus ++ "Edit modules%mini.edit.xpm%" Exec exec gvim $FVWM_USERDIR/modules + +#------------------------------------------------------------------------------ +#--------- Reload config + +DestroyMenu Reload-Config +AddToMenu Reload-Config ++ "Reload decorations%mini.turn.xpm%" Read decorations ++ "Reload globalfeel%mini.turn.xpm%" Read globalfeel ++ "Reload styles%mini.turn.xpm%" Read styles ++ "Reload iconstyles && menus%mini.turn.xpm%" ReloadIconStylesAndMenus ++ "Reload functions%mini.turn.xpm%" Read functions ++ "Reload bindings%mini.turn.xpm%" Read bindings ++ "Reload modules%mini.turn.xpm%" Read modules + +#------------------------------------------------------------------------------ +#--------- Load / Save As settings + +DestroyMenu Load-Settings +AddToMenu Load-Settings ++ "Show &Fvwm Settings%mini.fvwm.xpm%" ShowFvwmSettings ++ "Show Layers Settings%mini.window.xpm%" ShowLayers ++ "Show &X Settings%mini.x2.xpm%" ShowXSettings ++ "" Nop ++ "&Load Setting 1%mini.turn.xpm%" LoadSettings 1 ++ "Load Setting &2%mini.turn.xpm%" LoadSettings 2 ++ "Load Setting &3%mini.turn.xpm%" LoadSettings 3 ++ "Load Setting &4%mini.turn.xpm%" LoadSettings 4 ++ "Save Current As:" Title ++ "&Setting 1%mini.diskette.xpm%" SaveAsSettings 1 ++ "Setting &2%mini.diskette.xpm%" SaveAsSettings 2 ++ "Setting &3%mini.diskette.xpm%" SaveAsSettings 3 ++ "Setting &4%mini.diskette.xpm%" SaveAsSettings 4 + +#------------------------------------------------------------------------------ +#--------- Focus/Paging settings + +DestroyMenu Focus-Settings +AddToMenu Focus-Settings ++ "&Sloppy Focus%mini.mouse.xpm%" Style * SloppyFocus ++ "&Click To Focus%mini.mouse.xpm%" Style * ClickToFocus ++ "&Focus Follows Mouse%mini.mouse.xpm%" Style * FocusFollowsMouse ++ "" Nop ++ "&Colormap Follows Mouse%mini.colors.xpm%" ColormapFocus FollowsMouse ++ "&Colormap Follows Focus%mini.colors.xpm%" ColormapFocus FollowsFocus ++ "" Nop ++ "&Full Paging ON%mini.maximize2.xpm%" EdgeScroll 100 100 ++ "&All Paging OFF%mini.cross.xpm%" EdgeScroll 0 0 ++ "&Horizontal Paging Only%mini.maximize-horiz.xpm%" EdgeScroll 100 0 ++ "&Vertical Paging Only%mini.maximize-vert.xpm%" EdgeScroll 0 100 ++ "&Partial Paging%mini.maximize2.xpm%" EdgeScroll 50 50 ++ "&Full Paging && Edge Wrap%mini.maximize2.xpm%" EdgeScroll 100000 100000 + + +#------------------------------------------------------------------------------ +#--------- Mouse settings + +DestroyMenu Mouse-Settings +AddToMenu Mouse-Settings ++ "Mouse &Slow%mini.mouse.xpm%" Exec xset m 1 1 ++ "Mouse &Default%mini.mouse.xpm%" Exec xset m default ++ "Mouse &Fast%mini.cat.xpm%" Exec xset m 4 2 ++ "Speedy &Gonzales%mini.cat.xpm%" Exec xset m 10 2 + +#------------------------------------------------------------------------------ +#--------- Keyboard settings + +DestroyMenu Keyboard-Settings +AddToMenu Keyboard-Settings ++ "&Auto-repeat on%mini.keyboard.xpm%" Exec xset r on ++ "Auto-repeat &off%mini.keyboard.xpm%" Exec xset r off + +#------------------------------------------------------------------------------ +#--------- Sound settings + +DestroyMenu Bell-Settings +AddToMenu Bell-Settings ++ "&Bell on%mini.sound.xpm%" Exec xset b on ++ "Bell &off%mini.cross.xpm%" Exec xset b off +#+ "Sound &card%mini.sound.xpm%" Exec exec xmixer + +#------------------------------------------------------------------------------ +#--------- X & screen settings + +DestroyMenu X-Settings +AddToMenu X-Settings ++ "Back &Color%mini.colors.xpm" Popup Backcolor ++ "Back &Animation%mini.fractal.xpm%" Popup Background-Animation ++ "&Root Cursor Form%mini.xarchie.xpm%" FvwmForm FvwmForm-RootCursor ++ "&Video tuning%mini.monitor.xpm%" Exec exec xterm -T Xvidtune -e xvidtune +#+ "&X configuration%mini.display.xpm%" Exec exec xterm -T Xconfig -e Xconfigurator + +#--------- Background color + +DestroyMenu Backcolor +AddToMenu Backcolor ++ "&Black%mini.bball.xpm%" Exec exec xsetroot -solid Black ++ "&Red%mini.bball.xpm%" Exec exec xsetroot -solid Red ++ "&Yellow%mini.bball.xpm%" Exec exec xsetroot -solid Yellow ++ "&Green%mini.bball.xpm%" Exec exec xsetroot -solid Green ++ "&Cyan%mini.bball.xpm%" Exec exec xsetroot -solid Cyan4 ++ "&Blue%mini.bball.xpm%" Exec exec xsetroot -solid Blue ++ "&Magenta%mini.bball.xpm%" Exec exec xsetroot -solid Magenta ++ "&White%mini.bball.xpm%" Exec exec xsetroot -solid White +#+ "&Blue decay%mini.bball.xpm%" Exec exec bggen 100 100 255 0 0 100 | xv -root -quit - +#+ "&Rainbow%mini.bball.xpm%" Exec exec bggen red green blue | xv -root -quit - +#+ "&Full Rainbow%mini.bball.xpm%" Exec exec bggen black red yellow green blue purple black | xv -root -quit - +#+ "&Magenta decay%mini.bball.xpm%" Exec exec bggen blue magenta | xv -root -quit - + +#--------- Background animation + +DestroyMenu "Background-Animation" +AddToMenu "Background-Animation" +#+ "&Braid%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode braid +#+ "&Flame%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode flame +#+ "&Grav%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode grav +#+ "&Pyro%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode pyro +#+ "&Qix%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode qix +#+ "&Rock%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode rock +#+ "&Slip%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode spiral +#+ "&Spline%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode spline +#+ "&Swarm%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode swarm +#+ "&Worm%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode worm +#+ "&Random%mini.rball.xpm%" Exec exec xlock -nice 10 -inroot -mode random + # Stop the animation in the background ++ "&Stop It%mini.cross.xpm%" Exec kill -9 \ + $(ps aux | grep xlock | grep -v grep | awk '{print $2}') + +#------------------------------------------------------------------------------ +#--------- Documents +#------------------------------------------------------------------------------ + +DestroyMenu Documents +AddToMenu Documents ++ "&Xman%mini.book1.xpm%" Exec exec xman ++ "&FVWM Home Page%mini.fvwm.xpm%" Exec exec netscape http://www.hpc.uh.edu/index.html ++ "&Sample 95 MINI-FAQ%mini.book1.xpm%" Exec exec xterm -bg white -fg black -g 80x35 -n "Sample-95 MINI-FAQ" -T "Sample-95 MINI-FAQ" -e less +?"-- Sample-95 MINI-FAQ --" $FVWM_USERDIR/.fvwm2rc ++ "FVWM &Man Pages%mini.book1.xpm%" Popup FvwmManPage ++ "" Nop ++ "&Browser%mini.folder.xpm%" Menu MenuBrowser ++ "Browser (&cached)%mini.folder.xpm%" Menu MenuBrowserCached +AddToMenu Documents MissingSubmenuFunction FuncFvwmMenuDirectory ++ "&Root dir%mini.folder.xpm%" Popup / ++ "&Home dir%mini.folder.xpm%" Popup ~ + +DestroyMenu MenuBrowser +#PREF 1 +AddToMenu MenuBrowser DynamicPopupAction Piperead 'fvwm-menu-directory --reuse --name MenuBrowser --dir $HOME --special-dirs --exec-file ^"gvim" --xterm=" aterm -e" --icon-dir=mini.folder.xpm --icon-title=mini.term.xpm --icon-file=mini.file.xpm --icon-app=mini.hex.xpm --check-subdir' + +DestroyMenu MenuBrowserCached +#PREF 1 +AddToMenu MenuBrowserCached DynamicPopupAction Piperead 'fvwm-menu-directory --all --reuse --name MenuBrowserCached --dir $HOME --special-dirs --exec-file ^"gvim" --xterm=" aterm -e" --icon-dir=mini.folder.xpm --icon-title=mini.term.xpm --icon-file=mini.file.xpm --icon-app=mini.hex.xpm --check-subdir' + +DestroyFunc FuncFvwmMenuDirectory +#PREF 1 +AddToFunc FuncFvwmMenuDirectory I PipeRead 'fvwm-menu-directory --dir "$0" --exec-file ^"gvim" --xterm=" aterm -e" --icon-dir=mini.folder.xpm --icon-title=mini.term.xpm --icon-file=mini.file.xpm --icon-app=mini.hex.xpm --check-subdir' + +#------------- FvwmManPage + +DestroyFunc ViewManPage +AddToFunc ViewManPage ++ I Exec exec xterm -g 80x40 -e man $0 + +DestroyMenu FvwmManPage +AddToMenu FvwmManPage "FVWM Man Pages" Title ++ "%mini.book1.xpm%fvwm2" ViewManPage fvwm2 ++ "%mini.book1.xpm%FvwmAnimate" ViewManPage FvwmAnimate ++ "%mini.book1.xpm%FvwmAuto" ViewManPage FvwmAuto ++ "%mini.book1.xpm%FvwmBacker" ViewManPage FvwmBacker ++ "%mini.book1.xpm%FvwmBanner" ViewManPage FvwmBanner ++ "%mini.book1.xpm%FvwmButtons" ViewManPage FvwmButtons ++ "%mini.book1.xpm%FvwmCommand" ViewManPage FvwmCommand ++ "%mini.book1.xpm%FvwmConsole" ViewManPage FvwmConsole ++ "%mini.book1.xpm%FvwmConsoleC.pl" ViewManPage FvwmConsoleC.pl ++ "%mini.book1.xpm%FvwmCpp" ViewManPage FvwmCpp ++ "%mini.book1.xpm%FvwmDebug" ViewManPage FvwmDebug ++ "%mini.book1.xpm%FvwmDragWell" ViewManPage FvwmDragWell ++ "%mini.book1.xpm%FvwmEvent" ViewManPage FvwmEvent ++ "%mini.book1.xpm%FvwmForm" ViewManPage FvwmForm ++ "%mini.book1.xpm%FvwmGtk" ViewManPage FvwmGtk ++ "%mini.book1.xpm%FvwmIconBox" ViewManPage FvwmIconBox ++ "%mini.book1.xpm%FvwmIconMan" ViewManPage FvwmIconMan ++ "%mini.book1.xpm%FvwmIdent" ViewManPage FvwmIdent ++ "%mini.book1.xpm%FvwmM4" ViewManPage FvwmM4 ++ "%mini.book1.xpm%FvwmPager" ViewManPage FvwmPager ++ "%mini.book1.xpm%FvwmRearrange" ViewManPage FvwmRearrange ++ "%mini.book1.xpm%FvwmSave" ViewManPage FvwmSave ++ "%mini.book1.xpm%FvwmSaveDesk" ViewManPage FvwmSaveDesk ++ "%mini.book1.xpm%FvwmScript" ViewManPage FvwmScript ++ "%mini.book1.xpm%FvwmScroll" ViewManPage FvwmScroll ++ "%mini.book1.xpm%FvwmTaskBar" ViewManPage FvwmTaskBar ++ "%mini.book1.xpm%FvwmTheme" ViewManPage FvwmTheme ++ "%mini.book1.xpm%FvwmWharf" ViewManPage FvwmWharf ++ "%mini.book1.xpm%FvwmWinList" ViewManPage FvwmWinList ++ "" Nop ++ "%mini.book1.xpm%fvwm-config" ViewManPage fvwm-config ++ "%mini.book1.xpm%fvwmbug" ViewManPage fvwmbug ++ "%mini.book1.xpm%fvwmrc_convert" ViewManPage fvwmrc_convert ++ "%mini.book1.xpm%fvwm24_convert" ViewManPage fvwm24_convert ++ "%mini.book1.xpm%xpmroot" ViewManPage xpmroot ++ "" Nop ++ "%mini.book1.xpm%fvwm-menu-desktop" ViewManPage fvwm-menu-desktop ++ "%mini.book1.xpm%fvwm-menu-directory" ViewManPage fvwm-menu-directory ++ "%mini.book1.xpm%fvwm-menu-headlines" ViewManPage fvwm-menu-headlines ++ "%mini.book1.xpm%fvwm-menu-xlock" ViewManPage fvwm-menu-xlock + +#------------------------------------------------------------------------------ +#--------- ScreenSaver +#------------------------------------------------------------------------------ + +DestroyMenu Screen +AddToMenu Screen +#+ "&Screensaver%mini.display.xpm%" Exec exec xlock -nolock -nice 19 -mode random +#+ "Screen&lock%mini.lock.xpm%" Exec exec xlock -nice 19 -mode random +#+ "" Nop +#+ "&Screensaver%mini.display.xpm%" Popup MenuSSaver +#+ "Sc&reen&lock%mini.lock.xpm%" Popup MenuSLock ++ "" Nop ++ "(Re)start &XscreenSaver%mini.display.xpm%" Exec xscreensaver-command -exit ; exec xscreensaver -no-splash ++ "&Stop XscreenSaver%mini.cross.xpm%" Exec exec xscreensaver-command -exit ++ "XscreenSaver &Demo%mini.display.xpm%" Exec xscreensaver-command -exit ; exec xscreensaver; exec xscreensaver-command -demo ++ "" Nop ++ "&Locked XscreenSaver%mini.lock.xpm%" Exec exec xscreensaver-command -lock ++ "&Activate XscreenSaver%mini.display.xpm%" Exec exec xscreensaver-command -activate + + +#PipeRead 'fvwm-menu-xlock -n MenuSSaver -t "Screensaver" -icon-item mini.bball.xpm -- -nice 19 -nolock' +#PipeRead 'fvwm-menu-xlock -n MenuSLock -t "Lock Screen" -icon-item mini.rball.xpm -- -nice 19' + +#------------------------------------------------------------------------------ +#--------- Restart +#------------------------------------------------------------------------------ + +DestroyMenu Restart +AddToMenu Restart "Restart Window Manager" Title ++ "&Restart Self%mini.turn.xpm%" Restart ++ "" Nop +#+ "&fvwm-themes-start%mini.fvwm.xpm%" Restart fvwm-themes-start ++ "&fvwm%mini.fvwm.xpm%" Restart fvwm -s ++ "&fvwm2%mini.fvwm.xpm%" Restart fvwm2 -s ++ "&fvwm95%mini.fvwm.xpm%" Restart fvwm95 -s +#+ "&AnotherLevel%mini.fvwm.xpm%" Restart AnotherLevel +#+ "&AnotherLevelUp%mini.fvwm.xpm%" Restart AnotherLevelUp ++ "" Nop +#+ "&afterstep%mini.windows.xpm%" Restart afterstep +#+ "&blackbox%mini.windows.xpm%" Restart blackbox +#+ "&enlightenment%mini.windows.xpm%" Restart enlightenment +#+ "&flwm%mini.windows.xpm%" Restart flwm +#+ "&icewm%mini.windows.xpm%" Restart icewm +#+ "&kwm%mini.windows.xpm%" Restart kwm +#+ "&mwm%mini.mwm.xpm%" Restart mwm +#+ "&olvwm%mini.olwm.xpm%" Restart olvwm +#+ "&sawfish%mini.windows.xpm%" Restart sawfish +#+ "&sawmill%mini.windows.xpm%" Restart sawmill +#+ "&scwm%mini.windows.xpm%" Restart scwm ++ "&twm%mini.twm.xpm%" Restart twm +#+ "&uwm%mini.windows.xpm%" Restart uwm +#+ "&wm2%mini.windows.xpm%" Restart wm2 +#+ "&wmaker%mini.windows.xpm%" Restart wmaker +#+ "&wmx%mini.windows.xpm%" Restart wmx +#+ "&xfwm%mini.windows.xpm%" Restart xfwm ++ "" Nop ++ "Just &xterm%mini.term.xpm%" Restart xterm +# A bit dangerous in a menu +#+ "" Nop +#+ "Halt%mini.stop.xpm%" Exec exec shutdown -h now +#+ "Reboot%mini.lightbolt-full.xpm%" Exec exec shutdown -r now + + +#------------------------------------------------------------------------------ +#------------- Windows Operations +#------------------------------------------------------------------------------ + +#----------------------------------------------------------------------------- +# The "root" windows ops menu (Mouse 2) + +DestroyMenu "Window" +AddToMenu "Window" "Window Operations" Title ++ "&Move%mini.move1.xpm%" Move ++ "&Resize%mini.resize3.xpm%" Resize ++ "(De)&Iconify%mini.iconify1.xpm%" Iconify ++ "(Un)M&aximize%mini.maximize1.xpm%" Maximize 100 100 ++ "(Un)Max&wide%mini.maximize-horiz1.xpm%" Maximize 100 0 ++ "(Un)Max&tall%mini.maximize-vert1.xpm%" Maximize 0 100 ++ "(Un)&Shade%mini.shade1.xpm%" WindowShade ++ "(Un)S&tick%mini.stick1.xpm%" Stick ++ "R&aise%mini.raise2.xpm%" Raise ++ "&Lower%mini.lower2.xpm%" Lower ++ "" Nop ++ "&Delete%mini.cross.xpm" Delete ++ "&Close%mini.delete.xpm" Close ++ "&Destroy%mini.bomb.xpm%" Destroy ++ "" Nop ++ "Move to &Page%mini.move1.xpm%" Popup Move-window ++ "&Group Ops%mini.windows.xpm%" Popup WindowGroupOps ++ "&Window Style%mini.window.xpm%" Popup WindowStyle ++ "&Rearrange/Scroll%mini.windows.xpm%" Popup WinRearrange ++ "" Nop ++ "&Identify%mini.question.xpm%" Module FvwmIdent ++ "Switch &to...%mini.windows.xpm%" WindowList + +#------------------------------------------------------------------------------ +# A trimmed down version of "Window Ops", good for binding to decorations + +DestroyMenu "Window-Ops2" +AddToMenu "Window-Ops2" ++ "&Move%mini.move1.xpm%" Move ++ "&Resize%mini.resize3.xpm%" Resize ++ "(De)&Iconify%mini.iconify1.xpm%" Iconify ++ "(Un)M&aximize%mini.maximize1.xpm%" Maximize 100 100 ++ "(Un)Max&wide%mini.maximize-horiz1.xpm%" Maximize 100 0 ++ "(Un)Max&tall%mini.maximize-vert1.xpm%" Maximize 0 100 ++ "(Un)&Shade%mini.shade1.xpm%" WindowShade ++ "(Un)S&tick%mini.stick1.xpm%" Stick +#+ "R&aiseLower%mini.raise2.xpm%" RaiseLower ++ "" Nop ++ "&Close%mini.delete.xpm" Close ++ "" Nop ++ "&Identify%mini.question.xpm%" Module FvwmIdent ++ "More&...%mini.window.xpm%" Menu Window This 0 0 + +#------------------------------------------------------------------------------ +# A trimmed down version of "Window Ops", good for binding to TaskBar, +# WinList ... buttons + +DestroyMenu "Window-Ops3" +AddToMenu "Window-Ops3" ++ "Move to &Page%mini.move1.xpm%" Popup Move-window ++ "&Group Ops%mini.windows.xpm%" Popup WindowGroupOps ++ "" Nop ++ "(De)&Iconify%mini.iconify1.xpm%" Iconify ++ "(Un)&Shade%mini.shade1.xpm%" WindowShade ++ "(Un)S&tick%mini.stick1.xpm%" Stick ++ "(Un)M&aximize%mini.maximize1.xpm%" Maximize 95 95 ++ "%mini.window.xpm%Scroll&Bar (75%% scr)" Module FvwmScroll 75p 75p ++ "" Nop ++ "&Close%mini.delete.xpm" Close ++ "" Nop ++ "&Identify%mini.question.xpm%" Module FvwmIdent ++ "More&...%mini.window.xpm%" Menu Window This 0 0 + + +#------------------------------------------------------------------------------ +# A "Move Window" menu + +DestroyMenu "Move-Window" +AddToMenu "Move-Window" "Move to ..." Title ++ 'Page &1%mini.move1.xpm%' MoveToPage 0 0 ++ 'Page &2%mini.move1.xpm%' MoveToPage 1 0 ++ 'Page &3%mini.move1.xpm%' MoveToPage 0 1 ++ 'Page &4%mini.move1.xpm%' MoveToPage 1 1 ++ '' Nop ++ '&Fvwm%mini.move1.xpm%' MoveToDesk 0 0 ++ '&Devel%mini.move1.xpm%' MoveToDesk 0 1 ++ '&Internet%mini.move1.xpm%' MoveToDesk 0 2 ++ '&Misc%mini.move1.xpm%' MoveToDesk 0 3 + +#------------------------------------------------------------------------------ +# A group version of WindowOps + +DestroyMenu WindowGroupOps +AddToMenu WindowGroupOps "Group Ops" Title ++ "&Iconify%mini.iconify1.xpm%" Pick All ($c) Iconify on ++ "&DeIconify%mini.iconify1.xpm%" Pick All ($c) Iconify off ++ "&Shade%mini.shade1.xpm%" Pick All ($c) WindowShade on ++ "&UnShade%mini.shade1.xpm%" Pick All ($c) WindowShade off ++ "R&aise%mini.raise2.xpm%" Pick All ($c) Raise ++ "&Lower%mini.lower2.xpm%" Pick All ($c) Lower ++ "" Nop ++ "&Delete%mini.cross.xpm" Pick Delete ++ "&Close%mini.delete.xpm" Pick Close ++ "&Destroy%mini.bomb.xpm%" Pick Destroy ++ "&Quick move to ..." Title ++ 'Page &1%mini.move1.xpm%' Pick All ($c) MoveToPage 0 0 ++ 'Page &2%mini.move1.xpm%' Pick All ($c) MoveToPage 1 0 ++ 'Page &3%mini.move1.xpm%' Pick All ($c) MoveToPage 0 1 ++ 'Page &4%mini.move1.xpm%' Pick All ($c) MoveToPage 1 1 ++ '' Nop ++ '&Fvwm%mini.move1.xpm%' Pick All ($c) MoveToDesk 0 0 ++ '&Devel%mini.move1.xpm%' Pick All ($c) MoveToDesk 0 1 ++ '&Internet%mini.move1.xpm%' Pick All ($c) MoveToDesk 0 2 ++ '&Misc%mini.move1.xpm%' Pick All ($c) MoveToDesk 0 3 + +DestroyMenu WindowStyle +AddToMenu WindowStyle ++ "%mini.window.xpm%Title&AtTop" Pick (CirculateHit) Style $n TitleAtTop ++ "%mini.window.xpm%&NoTitle" Pick (CirculateHit) Style $n NoTitle ++ "%mini.window.xpm%&Title" Pick (CirculateHit) Style $n NoTitle ++ "%mini.window.xpm%TitleAt&Bottom" Pick (CirculateHit) Style $n TitleAtBottom ++ "" Nop ++ "%mini.raise2.xpm%StaysOn&Top" Pick (CirculateHit) StyleAndRecapture $n StaysOnTop ++ "%mini.window.xpm%Stays&Put" Pick (CirculateHit) StyleAndRecapture $n StaysPut ++ "%mini.lower2.xpm%StaysOn&Bottom" Pick (CirculateHit) StyleAndRecapture $n StaysOnBottom ++ "" Nop ++ "%mini.window.xpm%&FvwmBorder" Pick (CirculateHit) Style $n FvwmBorder ++ "%mini.window.xpm%&MWMBorder" Pick (CirculateHit) Style $n MWMBorder ++ "%mini.window.xpm%&DepressableBorder" Pick (CirculateHit) Style $n DepressableBorder ++ "%mini.window.xpm%&FirmBorder" Pick (CirculateHit) Style $n FirmBorder ++ "%mini.window.xpm%&Handles" Pick (CirculateHit) Style $n Handles ++ "%mini.window.xpm%&NoHandles" Pick (CirculateHit) Style $n NoHandles ++ "%mini.window.xpm%BorderWidth &0" Pick (CirculateHit) Style $n BorderWidth 0 ++ "%mini.window.xpm%BorderWidth &5" Pick (CirculateHit) Style $n BorderWidth 5 ++ "%mini.window.xpm%HandleWidth &0" Pick (CirculateHit) Style $n HandleWidth 0 ++ "%mini.window.xpm%HandleWidth &7" Pick (CirculateHit) Style $n HandleWidth 7 ++ "" Nop ++ "%mini.resize3.xpm%&ResizeOpaque" Pick (CirculateHit) Style $n ResizeOpaque ++ "%mini.resize3.xpm%Resize&Outline" Pick (CirculateHit) Style $n ResizeOutline ++ "%mini.mouse.xpm%Sloppy&Focus" Pick (CirculateHit) Style $n SloppyFocus ++ "%mini.mouse.xpm%&ClickToFocus" Pick (CirculateHit) Style $n ClickToFocus ++ "%mini.mouse.xpm%&MouseFocus" Pick (CirculateHit) Style $n MouseFocus ++ "%mini.mouse.xpm%&NeverFocus" Pick (CirculateHit) Style $n NeverFocus + +DestroyMenu WinRearrange +AddToMenu WinRearrange ++ "&Cascade%mini.windows.xpm%" FvwmRearrange -cascade -m 3 3 -incx 2 ++ "Tile &horizontally%mini.windows.xpm%" FvwmRearrange -tile -h -m 2 2 98 98 ++ "Tile &vertically%mini.windows.xpm%" FvwmRearrange -tile -m 2 2 98 98 ++ "" Nop ++ "&ScrollBar (1/2 app)%mini.window.xpm%" Module FvwmScroll 2 2 ++ "%mini.window.xpm%&Scroll&Bar (75%% scr)" Module FvwmScroll 75p 75p ++ "" Nop ++ "&Arrange Icons%mini.icons.xpm%" All (CurrentDesk Iconic) RecaptureWindow ++ "&Refresh Screen%mini.ray.xpm%" Refresh + +#---------------------------------------------------------------------------- +# Use the winops menus styles for the "Windows Operations Menus" +# Use it also for big menu + +ChangeMenuStyle winops Window Window-Ops2 Window-Ops3 Move-Window WindowGroupOps WindowStyle WinRearrange Back-Solid Back-Gradient FvwmManPage +# MenuSSaver MenuSLock + diff --git a/.fvwm/modules b/.fvwm/modules new file mode 100644 index 0000000..7f3ae06 --- /dev/null +++ b/.fvwm/modules @@ -0,0 +1,492 @@ +#-----------------------------------------------------------------------------# +# +# 11. Definitions used by the modules +# (Alphabetic order is used, but the Form are at the end) +#-----------------------------------------------------------------------------# + +#------------------------------------------------------------------------------ +#------------------ FvwmBacker +#------------------------------------------------------------------------------ + +#*FvwmBacker: Command(Desk 0, Page * *) -solid Blue +#*FvwmBacker: Command(Desk 1, Page * *) -solid \#7F4B7F +#*FvwmBacker: Command(Desk 2, Page * *) -solid midnightblue +#*FvwmBacker: Command(Desk 3, Page * *) -solid black + +#------------------------------------------------------------------------------ +#------------------ FvwmBanner +#------------------------------------------------------------------------------ +Style FvwmBanner NoTitle, Sticky, StaysOnTop, WindowListSkip, CirculateSkip +*FvwmBannerTimeout 2 + +#------------------------------------------------------------------------------ +#------------------ FvwmButtons: BarButtons +#------------------------------------------------------------------------------ + +Style BarButtons NoTitle, NoHandles, Sticky, WindowListSkip,\ + BorderWidth 4, CirculateSkip + +DestroyModuleConfig BarButtons: * +*BarButtons: Fore Black +*BarButtons: Back #c3c3c3 +*BarButtons: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +# Geometry - really likes to pick its own size, but giving a position is OK +# Warning: I've added a size geometry to avoid pbs if the fvwm_icons are +# not in the image path ! Remove the size in this geometry especially if +# you add buttons +*BarButtons: Geometry 120x445-5-84 +# Layout: specify rows or columns, not both +*BarButtons: Columns 2 + +#LAPTOP 1 Are you a laptop user ? +#*BarButtons: (2x1, Title "xapm", Swallow(Kill) "xapm" "Exec exec xapm -geometry -1500-1500 -p") +# Define the buttons to use..... +#PREF 3 +*BarButtons: (1x2, Title FileMgr, Icon Xfm.xpm, Action 'Exec exec aterm -g 80x35 -e mc') +*BarButtons: (1x2, Title terminal, Icon rterm2.xpm, Action 'Exec exec aterm') +*BarButtons: (1x2, Title editor, Icon lemacs.xpm, Action 'Exec exec gvim') +*BarButtons: (1x2, Title xv, Icon xv.xpm, Action 'Exec exec xv', \ + Action(Mouse 2) 'Exec exec ee', \ + Action(Mouse 3) 'Exec exec gqview') +*BarButtons: (1x2, Title Gimp, Icon gimp.xpm, Action 'Exec exec gimp', \ + Action(Mouse 2) 'Exec exec xpaint', \ + Action(Mouse 3) 'Exec exec kiconedit') +*BarButtons: (1x2, Title gview, Icon gv.xpm, Action 'Exec exec ghostview', \ + Action(Mouse 2) 'Exec exec xdvi', \ + Action(Mouse 3) 'Exec exec xpdf') +*BarButtons: (1x2, Title www, Icon nscape.xpm, Action 'Exec exec netscape', \ + Action(Mouse 2) 'Exec exec vppp', \ + Action(Mouse 3) 'Exec exec xterm -geometry 80x30 -e mutt') +*BarButtons: (1x2, Padding 0 0, Container(Padding 0 0, Frame 2, Columns 3)) +*BarButtons: (Icon mini.move1.xpm, Action Move) +*BarButtons: (Icon mini.resize3.xpm, Action Resize) +*BarButtons: (Icon mini.iconify1.xpm, Action Iconify) +*BarButtons: (Icon mini.maximize1.xpm, Action Maximize 90 90) +*BarButtons: (Icon mini.shade1.xpm, Action WindowShade) +*BarButtons: (Icon mini.stick1.xpm, Action Stick) +*BarButtons: (Icon mini.cross.xpm, Action Delete) +*BarButtons: (Icon mini.bomb.xpm, Action Destroy) +*BarButtons: (Icon mini.question.xpm, Action Module FvwmIdent) +*BarButtons: (End) +*BarButtons: (1x2, Title "xload", Swallow "xload" "Exec exec nice -16 \ + xload -nolabel -update 4 -bg grey59 -hl grey70 \ + -geometry -1500-1500") +*BarButtons: (1x2, Title "xclock", Swallow "xclock" "Exec \ + exec xclock -padding 0 -geometry -1500-1500") +*BarButtons: (2x2, Swallow "FvwmPagerPager" 'FvwmPager FvwmPagerPager * *') + +#------------------------------------------------------------------------------ +#------------------ FvwmButtons: MiniButtons +#------------------------------------------------------------------------------ + +Style "MiniButtons" NoTitle,NoHandles,Sticky,WindowListSkip,BorderWidth 0,\ + CirculateSkip + +DestroyModuleConfig MiniButtons* +*MiniButtons: Fore Black +*MiniButtons: Back #c0c0c0 +*MiniButtons: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*MiniButtons: Geometry -2+2 +*MiniButtons: Rows 1 +*MiniButtons: Padding 1 1 +#PREF 3 +*MiniButtons: - mini.term.xpm Exec exec aterm +*MiniButtons: - mini.filemgr.xpm Exec exec aterm -g 80x35 -e mc +*MiniButtons: - mini.doc1.xpm Exec exec gvim +*MiniButtons: - mini.calc.xpm Exec exec xcalc +*MiniButtons: - mini.cd.xpm Exec exec xplaycd +*MiniButtons: - mini.audiovol.xpm Exec exec xmixer +*MiniButtons: - mini.happy.xpm Exec exec xmine +*MiniButtons: - mini.bomb.xpm Destroy + +#------------------------------------------------------------------------------ +#------------------ FvwmButtons: DeskerPanelButtons +#------------------------------------------------------------------------------ + +Style "DeskerPanelButtons" NoTitle,NoHandles,Sticky,WindowListSkip,\ + BorderWidth 0, CirculateSkip +#Style "DeskerPanelButtons" StayOnTop +DestroyModuleConfig DeskerPanelButtons: * +*DeskerPanelButtons: Fore Black +*DeskerPanelButtons: Back grey57 +*DeskerPanelButtons: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*DeskerPanelButtons: Geometry 12x79 +*DeskerPanelButtons: Rows 1 +*DeskerPanelButtons: Frame 1 +*DeskerPanelButtons: Padding 0 0 +#FAST 1 +*DeskerPanelButtons: (Panel(right, steps 12, delay 0, position module top, indicator10) "FvwmDesker" 'Module FvwmPager FvwmDesker 0 3') +#SLOW 1 +#*DeskerPanelButtons: (Panel(right, steps 0, position module top, indicator10) "FvwmDesker" 'Module FvwmPager FvwmDesker 0 3') + +#------------------------------------------------------------------------------ +#------------------ FvwmButtons: WinMakerAppButtons & WinMakerAppPanelCd +#------------------------------------------------------------------------------ +Style "WinMakerApp*" NoTitle, NoHandles, BorderWidth 0, Sticky, \ + WindowListSkip, CirculateSkip +DestroyModuleConfig WinMakerAppButtons: * + +#------------------------------------- +# Buttons: +# We use "hands panel", the advantage is that we use the applet +# in the panel only when we need it: Button 3 kill the panel + +*WinMakerAppButtons: Geometry +0+120 +*WinMakerAppButtons: Columns 1 +*WinMakerAppButtons: Back #c0c0c0 +*WinMakerAppButtons: Fore black +*WinMakerAppButtons: (Frame 1, Size 64 64, \ + Swallow "wmjmail" 'Exec exec wmjmail', Action(Mouse 1) \ + 'MyPanelButtons "WinMakerAppPanelMail" $right $top', \ + Action(Mouse 3) 'All (WinMakerAppPanelMail) Close') +*WinMakerAppButtons: (Frame 1, Size 64 64, \ + Swallow "wmppp" 'Exec exec wmppp' Action(Mouse 1) \ + 'MyPanelButtons "WinMakerAppPanelPPP" $right $top', \ + Action(Mouse 3) 'All (WinMakerAppPanelPPP) Close') +*WinMakerAppButtons: (Frame 1, Size 64 64, \ + Swallow "wmmount" 'Exec exec wmmount -s', Action(Mouse 1) \ + 'MyPanelButtons "WinMakerAppPanelCd" $right $top', \ + Action(Mouse 3) 'All (WinMakerAppPanelCd) Close') + +#----------------- +# The Mail Panel +*WinMakerAppPanelMail: Rows 1 +*WinMakerAppPanelMail: Back #c0c0c0 +*WinMakerAppPanelMail: Fore black +*WinMakerAppPanelMail: (Frame 1, Size 64 64, \ + Swallow "wmCalClock" 'Exec exec wmCalClock') +*WinMakerAppPanelMail: (Frame 1, Size 64 64, \ + Swallow "wmglobe" 'Exec exec wmglobe') +*WinMakerAppPanelMail: (Frame 1, Size 64 64, \ + Swallow "wmMoonClock" 'Exec exec wmMoonClock') + +#----------------- +# The PPP Panel +*WinMakerAppPanelPPP: Rows 1 +*WinMakerAppPanelPPP: Back #c0c0c0 +*WinMakerAppPanelPPP: Fore black +*WinMakerAppPanelPPP: (Frame 1, Size 64 64, \ + Swallow "wminet" 'Exec exec wminet') +*WinMakerAppPanelPPP: (Frame 1, Size 64 64, \ + Swallow "wmsysmon" 'Exec exec wmsysmon') + +#----------------- +# The Cd Panel +*WinMakerAppPanelCd: Rows 1 +*WinMakerAppPanelCd: Back #c0c0c0 +*WinMakerAppPanelCd: Fore black +*WinMakerAppPanelCd: (Frame 1, Size 64 64, \ + Swallow "wmmixer" 'Exec exec wmmixer -s') +*WinMakerAppPanelCd: (Frame 1, Size 64 64, \ + Swallow "wmcdplay" 'Exec exec wmcdplay -s') + +#------------------------------------------------------------------------------ +#------------------ FvwmEvent +#------------------------------------------------------------------------------ + +DestroyModuleConfig FvwmEvent: * + +# replace rplay by a sound player that can play .au sound file +*FvwmEvent: Cmd "Exec exec rplay " + +*FvwmEvent: StartDelay 3 +*FvwmEvent: Delay 1 + +*FvwmEvent: startup "/usr/share/sounds/gong.au" +*FvwmEvent: add_window "/usr/share/sounds/wipe.au" +*FvwmEvent: destroy_window "/usr/share/sounds/pook.au" +*FvwmEvent: iconify "/usr/share/sounds/clong.au" +*FvwmEvent: deiconify "/usr/share/sounds/clong.au" +*FvwmEvent: windowshade "/usr/share/sounds/slide.au" +*FvwmEvent: dewindowshade "/usr/share/sounds/slide.au" +*FvwmEvent: new_page "/usr/share/sounds/slide.au" +*FvwmEvent: new_desk "/usr/share/sounds/slide.au" + +#------------------------------------------------------------------------------ +#------------------ FvwmGtk for GNOME menus +#------------------------------------------------------------------------------ + + +*FvwmGtk: IconSize 22 22 +#G_SM_G 1 +#*FvwmGtk: Destroy "gnome-sys" +#G_SM_G 1 +#PipeRead "fvwm-menu-desktop --desktop gnome-sys --install-prefix No --type gtk --enable-mini-icons" +#G_RHM_G 2 +#*FvwmGtk: Destroy "gnome-redhat" +#PipeRead "fvwm-menu-desktop --desktop gnome-redhat --type gtk --enable-mini-icons" +#G_UM_G 2 +#*FvwmGtk: Destroy "gnome-user" +#PipeRead "fvwm-menu-desktop --desktop gnome-user --type gtk --enable-mini-icons" + +#------------------------------------------------------------------------------ +#------------------ IconBox +#------------------------------------------------------------------------------ +Style "FvwmIconBox" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip + +DestroyModuleConfig FvwmIconBox: * +*FvwmIconBox: Back #c0c0c0 +*FvwmIconBox: Fore Black +#WIN 1 +#*FvwmIconBox: IconHiBack Blue4 +#FVWM 1 +*FvwmIconBox: IconHiBack SlateBlue +*FvwmIconBox: IconHiFore white +*FvwmIconBox: Geometry +0-0 +*FvwmIconBox: MaxIconSize 48x48 +*FvwmIconBox: Font -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* +*FvwmIconBox: SortIcons IconName +#*FvwmIconBox: SortIcons ResClass +*FvwmIconBox: Padding 10 +*FvwmIconBox: FrameWidth 0 0 +*FvwmIconBox: Lines 6 +*FvwmIconBox: SBWidth 11 +*FvwmIconBox: Placement Left Top +*FvwmIconBox: HideSC Horizontal +*FvwmIconBox: SetWMIconSize +*FvwmIconBox: HilightFocusWin +*FvwmIconBox: Resolution Desk +*FvwmIconBox: UseSkipList +# mouse bindings +*FvwmIconBox: Mouse 1 Click DeiconifyFocusAndRaise +*FvwmIconBox: Mouse 1 DoubleClick DeiconifyFocusAndWarp +*FvwmIconBox: Mouse 2 Click Iconify +*FvwmIconBox: Mouse 3 DoubleClick Iconify off +*FvwmIconBox: Mouse 3 Click Menu Window-Ops3 c+0 -101m +*FvwmIconBox: Mouse 3 DoubleClick FvwmIdent +# Key bindings +*FvwmIconBox: Key r RaiseLower +*FvwmIconBox: Key space Iconify +*FvwmIconBox: Key d Close +# FvwmIconBox built-in functions +*FvwmIconBox: Key n Next +*FvwmIconBox: Key p Prev +*FvwmIconBox: Key h Left +*FvwmIconBox: Key j Down +*FvwmIconBox: Key k Up +*FvwmIconBox: Key l Right +# animation +*FvwmIconBoxNoIconAction SendToModule FvwmAnimate animate + +#------------------------------------------------------------------------------ +#------------------ IconMan +#------------------------------------------------------------------------------ +Style "FvwmIconMan" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip + +DestroyModuleConfig FvwmIconMan: * + +# nbr de manager +*FvwmIconMan: *nummanagers 2 +#global, desk, or page +#*FvwmIconMan: *Resolution page +*FvwmIconMan: *Resolution global +#*FvwmIconMan: *Resolution desk +*FvwmIconMan: *background #c0c0c0 +*FvwmIconMan: *foreground Black +*FvwmIconMan: *plainbutton up Black #c0c0c0 +*FvwmIconMan: *selectbutton down Black #c0c0c0 +#WIN 2 +#*FvwmIconMan: *focusbutton up white Blue4 +#*FvwmIconMan: *focusandselectbutton down white Blue4 +#FVWM 2 +*FvwmIconMan: *focusbutton up white SlateBlue +*FvwmIconMan: *focusandselectbutton down white SlateBlue +*FvwmIconMan: *iconbutton down Black grey51 +*FvwmIconMan: *font -adobe-times-bold-r-*-*-12-*-*-*-*-*-*-*- +*FvwmIconMan: *followfocus true +*FvwmIconMan: *usewinlist true +*FvwmIconMan: *sort name +*FvwmIconMan: *drawicons always +*FvwmIconMan: *2*title "Icon Man" +#PREF 4 +*FvwmIconMan: *1*title " gvim windows" +*FvwmIconMan: *1*iconname "FvwmIconMan: gvim" +*FvwmIconMan: *1*format "%i" +*FvwmIconMan: *1*show resource=VIM +*FvwmIconMan: *2*managergeometry 1x0+0-0 +*FvwmIconMan: *1*managergeometry 1x0+260-0 +*FvwmIconMan: *1*buttongeometry 200x20 +*FvwmIconMan: *2*buttongeometry 250x20 +# action +*FvwmIconMan: *action Mouse 1 N sendcommand DeiconifyFocusAndRaise +*FvwmIconMan: *action Mouse 2 N sendcommand Iconify +*FvwmIconMan: *action Mouse 3 N sendcommand "Menu Window-Ops3 c+0 -101m " +*FvwmIconMan: *action Key Left N gotobutton Left, select +*FvwmIconMan: *action Key Right N gotobutton Right, select +*FvwmIconMan: *action Key Up N gotobutton Up, select +*FvwmIconMan: *action Key Down N gotobutton Down, select +*FvwmIconMan: *action Key q A quit +*FvwmIconMan: *action Key i A sendcommand Iconify +*FvwmIconMan: *action Key g A sendcommand IconManGlobal +*FvwmIconMan: *action Key p A sendcommand IconManPage +*FvwmIconMan: *action Key d A sendcommand IconManDesk +# animation +*FvwmIconMan: *NoIconAction "SendToModule FvwmAnimate animate" + +#------------------------------------------------------------------------------ +#------------------ Identify +#------------------------------------------------------------------------------ +Style "FvwmIdent" Sticky, NoButton 2, NoButton 4, NoButton 6 + +*FvwmIdent: Back Blue4 +*FvwmIdent: Fore Yellow +*FvwmIdent: Font -adobe-times-medium-r-*-*-14-*-*-*-*-*-*-* + +#------------------------------------------------------------------------------ +#------------------ FvwmPager: Swallowed by ButtonBar +#------------------------------------------------------------------------------ +Style "FvwmPagerPager" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip + +DestroyModuleConfig FvwmPagerPager: * +*FvwmPagerPager: Back grey60 +*FvwmPagerPager: Fore black +*FvwmPagerPager: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmPagerPager: Hilight white +*FvwmPagerPager: MiniIcons +*FvwmPagerPager: Balloons +*FvwmPagerPager: BalloonFore black +*FvwmPagerPager: BalloonBack bisque +*FvwmPagerPager: Geometry 319x69+5000+5000 +#WIN 1 +#*FvwmPagerPager: WindowColors white grey51 white Blue4 +#FVWM 1 +*FvwmPagerPager: WindowColors white grey51 white SlateBlue +*FvwmPagerPager: Label 0 Fvwm +*FvwmPagerPager: Label 1 Development +*FvwmPagerPager: Label 2 Internet +*FvwmPagerPager: Label 3 Misc +*FvwmPagerPager: SmallFont 5x8 + +#------------------------------------------------------------------------------ +#------------------ FvwmPager: FvwmDesker, the panel of StartPagerButtons +#------------------------------------------------------------------------------ +Style "FvwmDesker" NoTitle, NoHandles, Sticky, WindowListSkip, CirculateSkip + +DestroyModuleConfig FvwmDesker: * +*FvwmDesker: Back grey60 +*FvwmDesker: Fore black +*FvwmDesker: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmDesker: Hilight white +*FvwmDesker: Geometry 319x69+5000+5000 +*FvwmDesker: MiniIcons +*FvwmDesker: Balloons +*FvwmDesker: BalloonFore black +*FvwmDesker: BalloonBack bisque +#WIN 1 +#*FvwmDesker: WindowColors white grey51 white Blue4 +#FVWM 1 +*FvwmDesker: Label 0 Fvwm +*FvwmDesker: Label 1 Development +*FvwmDesker: Label 2 Internet +*FvwmDesker: Label 3 Misc +*FvwmDesker: SmallFont 5x8 + +#------------------------------------------------------------------------------ +#------------------ FvwmScript +#------------------------------------------------------------------------------ + +*FvwmScript: DefaultFont -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* +*FvwmScript: DefaultFore black +*FvwmScript: DefaultBack grey85 +*FvwmScript: DefaultHilight grey100 +*FvwmScript: DefaultShadow grey55 + +#------------------------------------------------------------------------------ +#------------------ FvwmTaskBar +#------------------------------------------------------------------------------ + +Style "FvwmTaskBar" NoTitle,Sticky,WindowListSkip,CirculateSkip,NoHandles, \ + TitleAtBottom +# Note: Title at bottom is for shading. + +*FvwmTaskBar: Geometry +0-0 +*FvwmTaskBar: Fore Black +*FvwmTaskBar: Back #c0c0c0 +*FvwmTaskBar: IconFore Black +*FvwmTaskBar: IconBack grey51 +*FvwmTaskBar: Font -adobe-times-medium-r-*-*-14-*-*-*-*-*-*-* +*FvwmTaskBar: SelFont -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-* +*FvwmTaskBar: StatusFont fixed +*FvwmTaskBar: Action Click1 DeiconifyFocusAndRaise +*FvwmTaskBar: Action Click2 Iconify +*FvwmTaskBar: Action Click3 Menu Window-Ops3 c+0 -101m +*FvwmTaskBar: UseSkipList +*FvwmTaskBar: AutoStick +*FvwmTaskBar: StartName Start +*FvwmTaskBar: StartMenu StartMenu mouse -100p -100m +*FvwmTaskBar: StartIcon mini.penguin.xpm +*FvwmTaskBar: ShowTips +*FvwmTaskBar: ShowTransients +#*FvwmTaskBar: HighlightFocus +*FvwmTaskBar: AutoHide +*FvwmTaskBar: DeskOnly +*FvwmTaskBar: NoIconAction SendToModule FvwmAnimate animate + +#------------------------------------------------------------------------------ +#------------------ FvwmWharf +#------------------------------------------------------------------------------ + +Style "FvwmWharf" NoTitle, NoHandles, Sticky, WindowListSkip,\ + BorderWidth 2,CirculateSkip + +DestroyModuleConfig FvwmWharf: * +*FvwmWharf: Animate +*FvwmWharf: AnimateMain +*FvwmWharf: Geometry -2-50 +*FvwmWharf: Columns 1 +*FvwmWharf: Bgcolor Grey +#*FvwmWharf: ForceSize +*FvwmWharf: FullPush + +*FvwmWharf: TextureType 1 +*FvwmWharf: TextureColor WhiteSmoke DarkGrey + +*FvwmWharf X arrows2.xpm Folder +*FvwmWharf kill rbomb2.xpm Close +*FvwmWharf Recycler Jrecycle.xpm Restart +*FvwmWharf Exit exit.xpm FvwmForm FvwmForm-QuitVerify +*FvwmWharf xlock Jlock.xpm Exec exec xlock -nice 10 -mode random +*FvwmWharf ~Folder +#PREF 3 +*FvwmWharf term rterm2.xpm Exec exec aterm +*FvwmWharf editor lemacs.xpm Exec exec gvim +*FvwmWharf filemgr Xfm.xpm Exec exec aterm -g 80x35 -e mc + +*FvwmWharf Y arrows2.xpm Folder +*FvwmWharf netscape nscape.xpm Exec exec netscape +*FvwmWharf xview xv.xpm Exec exec xv +*FvwmWharf gimp gimp.xpm Exec exec gimp +*FvwmWharf GV gv.xpm Exec exec ghostview +*FvwmWharf ~Folder + +*FvwmWharf xclock nil MaxSwallow "xclock" xclock -padding 0 -bg white +*FvwmWharf xload nil MaxSwallow "xload" \ + xload -nolabel -update 5 -bg grey51 -geometry -1500-1500 +*FvwmWharf pager nil MaxSwallowModule "FvwmPagerPager" FvwmPager FvwmPagerPager * * + +#------------------------------------------------------------------------------ +#------------------ FvwmWinList +#------------------------------------------------------------------------------ +Style "FvwmWinList" NoTitle,Sticky,WindowListSkip,CirculateSkip + +DestroyModuleConfig FvwmWinList: * +*FvwmWinList: Back #c3c3c3 +*FvwmWinList: Fore Black +#WIN 1 +#*FvwmWinList: FocusBack Blue4 +#FVWM 1 +*FvwmWinList: FocusBack SlateBlue +*FvwmWinList: FocusFore white +*FvwmWinList: IconBack grey51 +*FvwmWinList: IconFore Black +*FvwmWinList: Font -adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-* +*FvwmWinList: Action Click1 DeiconifyFocusAndRaise +*FvwmWinList: Action Click2 Iconify +*FvwmWinList: Action Click3 Menu Window-Ops3 c+0 -101m +*FvwmWinList: UseSkipList +*FvwmWinList: ShowCurrentDesk +*FvwmWinList: MinWidth 180 +*FvwmWinList: MaxWidth 250 +*FvwmWinList: Geometry +0-0 +*FvwmWinList: NoIconAction SendToModule FvwmAnimate animate + diff --git a/.fvwm/phd.m4 b/.fvwm/phd.m4 new file mode 100644 index 0000000..66043e7 --- /dev/null +++ b/.fvwm/phd.m4 @@ -0,0 +1,1061 @@ +########################################################################## +# FVWM - F? Virtual Window Manager, Version 2.x (fvwm2) Configuration File +# + +dnl The file is in m4 format, use FvwmM4 module to read it +dnl like this: ModuleSynchronous FvwmM4 -lock .fvwm2rc + + +dnl This is to prevent FvwmM4 to shadow $HOME +undefine(`HOME') + + +dnl Echo dimension +changecom(`/*', `*/') +# width = WIDTH +changecom(`#') + + +dnl koi8-r Fonts +dnl define(`SMALL_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-100-*-*-*-*-koi8-r') +dnl define(`MEDIUM_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-120-*-*-*-*-koi8-r') +dnl define(`BIG_FONT_KOI8', `-*-fixed-medium-r-normal-*-*-140-*-*-*-*-koi8-r') + +dnl cp1251 Fonts +dnl define(`SMALL_FONT_CP1251', `-*-fixed-medium-r-normal-*-*-100-*-*-*-*-*-cp1251') +dnl define(`MEDIUM_FONT_CP1251', `-*-fixed-medium-r-normal-*-*-120-*-*-*-*-*-cp1251') +dnl define(`BIG_FONT_CP1251', `-*-fixed-medium-r-normal-*-*-140-*-*-*-*-*-cp1251') + +dnl define(`XBUFFY_FONT', `-cronyx-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r') + + +dnl TrueType Fonts +define(`SMALL_FONT', `xft:Sans:size=12') +define(`MEDIUM_FONT', `xft:Sans:size=14') +define(`BIG_FONT', `xft:Sans:size=16') +define(`LARGE_FONT', `xft:Sans:size=18') +define(`HUGE_FONT', `xft:Sans:size=20') + +dnl Bold TT fonts +define(`SMALL_BOLD_FONT', `SMALL_FONT:Bold') +define(`MEDIUM_BOLD_FONT', `MEDIUM_FONT:Bold') +define(`BIG_BOLD_FONT', `BIG_FONT:Bold') + + +dnl Font and geometry aliases that depend on whether the screen resolution is +dnl 800x600, 1024x768 or 1920x1200 + +define(`TITLE_FONT', `MEDIUM_FONT') + +define(`ICON_FONT', `LARGE_FONT') + + +define(`PAGER_GEOM', +`ifelse(eval(WIDTH < 1024), 1, `365x100+0+0',dnl +`ifelse(eval(WIDTH < 1920), 1, `365x100+0+0', `600x160+0+0'dnl +)')'dnl +) + +define(`PAGER_FONT', +`ifelse(eval(WIDTH < 1920), 1, `SMALL_FONT', `BIG_FONT'dnl +)') +define(`BUTTONS_FONT', PAGER_FONT) + + +define(`MENU_FONT', +`ifelse(eval(WIDTH < 1024), 1, `xft:Helvetica:size=16',dnl +`ifelse(eval(WIDTH < 1920), 1, `xft:Helvetica:size=18', `xft:Helvetica:size=22'dnl +)')'dnl +) +define(`IDENT_FONT', MENU_FONT) +define(`WIN_LIST_FONT', MENU_FONT) +define(`ICON_BOX_FONT', MENU_FONT) + + +dnl XSetBg message width and font +define(`TEXT_WIDTH', +`ifelse(eval(WIDTH < 1024), 1, 70,dnl +`ifelse(eval(WIDTH < 1920), 1, 75, 80 dnl +)')'dnl +) + +define(`MESSAGE_FONT', `Nimbus Sans L 18')'dnl + + +dnl Terminal emulator +define(`TERM', `urxvt') + +define(`TERM_KOI8', `Exec LC_CTYPE=ru_RU.KOI8-R exec TERM') + +define(`TERM_UTF8', `Exec exec "$HOME"/lib/X11/utf8rxvt') + +define(`TERM_GEOM', +`ifelse(eval(WIDTH < 1024), 1, `80x25-0-0',dnl +`ifelse(eval(WIDTH < 1920), 1, `80x28-0-0', `80x30-0-0'dnl +)')'dnl +) + +define(`TERM_GEOM_BIG', +`ifelse(eval(WIDTH < 1024), 1, `96x30-0-0',dnl +`ifelse(eval(WIDTH < 1920), 1, `112x32-0-0', `126x35-0-0'dnl +)')'dnl +) + + +define(`REMOTE_HOST_KOI8', +TERM_KOI8 -title "$2" -n "$2" -e ssh -4 "$1"dnl +) + +define(`REMOTE_HOST_KOI8_MENU', +"$2 (koi8)" REMOTE_HOST_KOI8($1, $2)dnl +) + +define(`REMOTE_HOST_UTF8', +TERM_UTF8 -e ssh -4 "$1"dnl +) + +define(`REMOTE_HOST_UTF8_MENU', +"$2 (utf8)" REMOTE_HOST_UTF8($1, $2)dnl +) + +define(`REMOTE_HOST_KOI8_BIG', +TERM_KOI8 -geometry TERM_GEOM_BIG -title "$2" -n "$2" -e ssh -4 "$1"dnl +) + +define(`REMOTE_HOST_KOI8_BIG_MENU', +"$2 (koi8)" REMOTE_HOST_KOI8_BIG($1, $2)dnl +) + + +########################################################################## +# PATH Setup +# +# Colon seperated unix directory paths for Modules, xpm files, and bitmaps +#ModulePath /usr/lib/fvwm +ImagePath /usr/share/pixmaps/fvwm:/usr/share/pixmaps:/usr/include/X11/bitmaps #:/usr/local/firefox/chrome/icons/default:/usr/local/firefox/icons + +############################################################################ +# COLORS and FONTS +# +# Set the fore and back border colors for the window that has focus +Style * HilightFore Black, HilightBack #c06077 + +# Set fore/back border colors for all other windows +Style * Color Black/#60a0c0 + +# Set colors/font for pop-up menus +# Syntax: MenuStyle forecolor backcolor shadecolor font style(fvwm/mwm) +MenuStyle * FVWM, Foreground Black, Background grey, Greyed SlateGrey, Font MENU_FONT fvwm + +# Set fonts to use on title bar and icon label +Style * Font TITLE_FONT + +############################################################################ +# ICON Setup +# +# If you don't want icons for some or all windows (or all of them!) +# Style * !Icon + +# If you want ALL icons to follow you around the desktop (Sticky) +#Style * StickyIcon + +# Auto Place Icons is a nice feature (Left Top Right Bottom) +#Style * IconBox 10 -75 -10 -0 + +Style * IconFont ICON_FONT + +############################################################################ +# FOCUS Setup +# +# Does the window with focus control the colormap, or the one under the mouse +ColormapFocus FollowsMouse + +# Uncomment this to force you to click in a window to give it focus +#Style * ClickToFocus + +# default: focus follows mouse +#Style * MouseFocus +#Style * FocusFollowsMouse + +# If you knock your mouse out of the term, it keeps focus while in root window +Style * SloppyFocus + +############################################################################ +# MISC Setup +# +# click/release must occur in ) +#ButtonStyle 8 8 20x40@1 50x40@1 50x20@1 80x50@1 50x80@0 50x60@0 20x60@0 20x40@1 +# Horizontal Line with arrowheads on left and right ( <-> ) +#ButtonStyle * 12 10x50@1 35x25@1 35x40@1 65x40@1 65x25@1 90x50@1 65x75@0 65x60@0 35x60@0 35x75@0 10x50@0 10x50@1 +# Vertical Line with arrowheads on top and bottom +#ButtonStyle * 12 50x10@1 25x35@1 40x35@1 40x60@1 25x60@1 50x85@1 75x60@0 60x60@0 60x35@0 75x35@0 50x10@0 50x10@1 +# Diagonal Line with arrowheads on top and bottom ( / ) +#ButtonStyle 5 11 80x15@1 45x15@1 55x25@1 25x55@1 15x45@1 15x80@1 50x80@0 40x70@0 70x40@0 80x50@0 80x15@0 +# Diagonal Line with arrowheads on top and bottom ( \ ) +#ButtonStyle 6 12 55x15@0 45x25@0 75x55@0 85x45@0 85x80@0 50x80@0 60x70@1 30x40@1 20x50@1 20x15@1 55x15@1 55x15@0 +# +# the number "2" +#ButtonStyle 8 12 80x80@0 22x80@0 80x40@0 70x25@0 30x25@0 20x35@0 20x30@1 30x20@1 70x20@1 80x30@1 20x75@1 80x75@1 + + +############################################################################ +# MOUSE Setup +# +# First, the root window. Button 1 brings up the Main Menu. B2 is the +# window operations list, and B3 is the winlist module +# Button Context Modifi Function +Mouse 1 R A Menu RootMenu Nop +Mouse 2 R A Menu Window-Ops Nop +Mouse 3 R A WindowList + +# Now, title bar buttons +# Left button is the Window-Ops2 menu +# Button Context Modifi Function +Mouse 0 1 A Menu Window-Ops2 Close +Mouse 0 3 A Stick +Mouse 0 5 A Center +# Right buttonsare iconify/maximize, rightmost is close +Mouse 0 2 A Close +Mouse 0 4 A Maximize toggle +Mouse 0 6 A Iconify + +# Button 1 in Frame or Sides is a resize-or-raise, in Icons is a move or +# de-iconify, and on Top does a move-or-raise +# Button Context Modifi Function +Mouse 1 F A Resize-or-Raise +Mouse 1 S A Move-or-Raise +Mouse 1 I A Move-or-Iconify +#Mouse 1 T A Move-or-Raise +Mouse 1 T A Shadify + +# Button 2 in an Icon is de-iconify, in Corners/Sides/Titlebar gets Ops Menu +# Button Context Modifi Function +Mouse 2 I A Iconify +Mouse 2 FST A Menu Window-Ops2 Nop + +# Button 3 does a raise-lower on anything +Mouse 3 TSIF A RaiseLower + +############################################################################ +# KEYBOARD Setup + +# +# press arrow + control + meta anywhere, and scroll by 1 page +Key Left A CM Scroll -100 +0 +Key Right A CM Scroll +100 +0 +Key Up A CM Scroll +0 -100 +Key Down A CM Scroll +0 +100 + +# press arrow + meta key, and scroll by 1/10 of a page +Key Left A M Scroll -10 +0 +Key Right A M Scroll +10 +0 +Key Up A M Scroll +0 -10 +Key Down A M Scroll +0 +10 + +# press shift arrow + control anywhere, and move the pointer by 1% of a page +Key Left A SC CursorMove -1 +0 +Key Right A SC CursorMove +1 +0 +Key Up A SC CursorMove +0 -1 +Key Down A SC CursorMove +0 +1 + +# press shift arrow + meta key, and move the pointer by 1/10 of a page +Key Left A SM CursorMove -10 +0 +Key Right A SM CursorMove +10 +0 +Key Up A SM CursorMove +0 -10 +Key Down A SM CursorMove +0 +10 + +# Switch window, mswindows style :) +Key Tab A M Next [*] focus +Key Escape A M Prev [*] focus + +# Goto desktop/page +Key 1 A CM Desk 0 0 +Key 2 A CM Desk 0 1 +Key 3 A CM Desk 0 2 +Key 4 A CM Desk 0 3 +Key 5 A CM GotoPage 0 0 +Key 6 A CM GotoPage 1 0 +Key 7 A CM GotoPage 0 1 +Key 8 A CM GotoPage 1 1 + +############################################################################# +# START-UP Functions +# +AddToFunc "InitFunction" ++ I Module FvwmBacker ++ I Module FvwmButtons ++ I Module FvwmCommandS ++ I Module FvwmPager 0 2 + +AddToFunc "RestartFunction" ++ I Module FvwmBacker ++ I Module FvwmButtons ++ I Module FvwmCommandS ++ I Module FvwmPager 0 2 ++ I Next [!iconic CurrentScreen xterm] Focus + +AddToFunc "StartStandardSession" ++ I GotoDeskAndPage 0 0 0 ++ I TERM_KOI8 ++ I Wait TERM ++ I GotoDeskAndPage 0 0 1 ++ I TERM_KOI8 -geometry 38x30+0-0 ++ I Wait TERM ++ I GotoDeskAndPage 0 1 0 ++ I TERM_KOI8 -e su - ++ I Wait TERM ++ I PaVuControl ++ I Wait "Volume Control" ++ I FireFox ++ I Wait "*Mozilla Firefox" ++ I GotoDeskAndPage 2 0 1 ++ I TERM_KOI8 -geometry TERM_GEOM_BIG ++ I Wait TERM ++ I Pidgin ++ I Wait Pidgin ++ I TERM_UTF8 -iconic -name term-im-remote ++ I Wait URxvt ++ I TERM_KOI8 -geometry 60x25-5-5 -iconic -name term-im-local ++ I Wait URxvt ++ I GotoDeskAndPage 1 1 0 ++ I Schedule 5000 GotoDeskAndPage 0 1 0 + + +############################################################################ +# COMPLEX FUNCTIONS +# +DestroyFunc Center +AddToFunc Center I Move 50-50w 50-50w ++ I WarpToWindow 74p 18p + +AddToFunc Iconify-and-Raise I Iconify ++ I Raise + +AddToFunc Maximize-Func C Maximize toggle ++ D Maximize 100 100 + +AddToFunc Move-or-Iconify I Raise ++ M Move ++ D Iconify + +AddToFunc Move-or-Raise I Raise ++ M Move ++ D Lower + +AddToFunc Move-or-Raise2 M Raise ++ M Move ++ D Lower + +AddToFunc Resize-or-Raise I Raise ++ M Resize ++ D Lower + +AddToFunc Resize-or-Raise2 M Raise ++ M Resize ++ D Lower + +AddToFunc Shadify D WindowShade ++ M Move ++ C RaiseLower + +AddToFunc warp-or-run I Next [$0 CirculateHit] Iconify -1 ++ I Next [$0 CirculateHit] Focus ++ I None [$0] $1 + +AddToFunc MailFunction I Next [$0] Iconify -1 ++ I Next [$0] focus ++ I None [$0] Exec exec $0 $1 + +AddToFunc PrintFunction I Raise ++ I Exec exec xdpr -id $w + +############################################################################## +# User-defined functions +# + +DestroyFunc PaVuControl +AddToFunc PaVuControl I GotoDeskAndPage 0 1 1 ++ I Exec exec pavucontrol + +changequote([,]) +DestroyFunc Id3Info +AddToFunc Id3Info I Exec "$HOME"/lib/audio/mp3/id3info.py "`deadbeef --nowplaying '%F'`" | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - +changequote([`], [']) + +#DestroyFunc Audacious +#AddToFunc Audacious I GotoDeskAndPage 0 1 1 +#+ I Exec LC_CTYPE=ru_RU.UTF-8 exec audacious + +DestroyFunc DeadBeef +AddToFunc DeadBeef I GotoDeskAndPage 0 1 1 ++ I Exec exec deadbeef + +DestroyFunc SMPlayer +AddToFunc SMPlayer I GotoDeskAndPage 0 1 1 ++ I Exec exec smplay -no-close-at-end + +DestroyFunc Term-Phdru +AddToFunc Term-Phdru I GotoDeskAndPage 1 0 1 ++ I REMOTE_HOST_KOI8(phdru.name, phdru.name) + +DestroyFunc Term-Phdru-Big +AddToFunc Term-Phdru-Big I GotoDeskAndPage 1 0 1 ++ I REMOTE_HOST_KOI8_BIG(phdru.name, phdru.name) + +DestroyFunc FireFox +AddToFunc FireFox I GotoDeskAndPage 1 0 0 ++ I Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser firefox + +#DestroyFunc Gajim +#AddToFunc Gajim I GotoDeskAndPage 1 1 0 +#+ I Exec exec gajim + +DestroyFunc Pidgin +AddToFunc Pidgin I GotoDeskAndPage 1 1 0 ++ I Exec exec pidgin + +DestroyFunc Raise-All +AddToFunc Raise-All I All (!"FvwmButtons|System|*clock") Raise + +DestroyFunc UrgencyFunc +AddToFunc UrgencyFunc ++ I Iconify off ++ I ThisWindow ("*Downloads") Break ++ I FlipFocus ++ I Raise ++ I WarpToWindow 5p 5p + +############################################################################## +# MENU Setup +# + +# This defines the most common window operations +AddToMenu Window-Ops "Window Ops" Title ++ "Center" Center ++ "Move" Move-or-Raise2 ++ "Resize" Resize-or-Raise2 ++ "Raise" Raise ++ "Lower" Lower ++ "(De)Iconify" Iconify ++ "(Un)Stick" Stick ++ "(Un)Maximize" maximize_func ++ "" Nop ++ "Delete" Delete ++ "Close" Close ++ "Destroy" Destroy ++ "" Nop ++ "Refresh Screen" Refresh + +# A trimmed down version of "Window Ops", good for binding to decorations +DestroyMenu "Window-Ops2" +AddToMenu Window-Ops2 "Center" Center ++ "Move" Move-or-Raise ++ "Iconify" Iconify ++ "(Un)Stick" Stick ++ "Refresh" RefreshWindow ++ "" Nop ++ "Close" Close ++ "Delete" Delete ++ "Destroy" Destroy ++ "" Nop ++ "Resize" Resize-or-Raise ++ "Shade" WindowShade ++ "Raise/Lower" RaiseLower ++ "" Nop ++ "ScrollBar" Module FvwmScroll 2 2 ++ "Print" PrintFunction + +AddToMenu Terminals "Terminals" Title ++ "Grey term (koi8)" TERM_KOI8 ++ "Grey term (utf8)" TERM_UTF8 ++ "Big grey term (koi8)" TERM_KOI8 -geometry TERM_GEOM_BIG ++ "" Nop ++ "White/black term (koi8)" TERM_KOI8 -fg white -cr white -bg black ++ "White/black term (utf8)" TERM_UTF8 -fg white -bg black + +AddToMenu TermColors "Term Colors" Title ++ "Term: black/mediumturquoise" TERM_KOI8 -fg black -cr black -bg mediumturquoise ++ "Term: black/lightseagreen" TERM_KOI8 -fg black -cr black -bg lightseagreen ++ "" Nop ++ "Term: black/lightsteelblue" TERM_KOI8 -fg black -cr black -bg lightsteelblue ++ "Term: black/lightblue3" TERM_KOI8 -fg black -cr black -bg lightblue3 ++ "" Nop ++ "Term: black/lightgoldenrod" TERM_KOI8 -fg black -cr black -bg lightgoldenrod ++ "Term: black/rosybrown1" TERM_KOI8 -fg black -cr black -bg rosybrown1 ++ "Term: black/pink1" TERM_KOI8 -fg black -cr black -bg pink1 ++ "" Nop ++ "Term: white/orchid4" TERM_KOI8 -fg white -cr white -bg orchid4 ++ "Term: white/purple3" TERM_KOI8 -fg white -cr white -bg purple3 ++ "Term: white/purple4" TERM_KOI8 -fg white -cr white -bg purple4 ++ "" Nop ++ "Term: white/lightslategrey" TERM_KOI8 -fg white -cr white -bg lightslategrey ++ "Term: white/navyblue" TERM_KOI8 -fg white -cr white -bg navyblue ++ "Term: white/mediumblue" TERM_KOI8 -fg white -cr white -bg mediumblue ++ "Term: white/steelblue" TERM_KOI8 -fg white -cr white -bg steelblue ++ "" Nop ++ "Term: white/forestgreen" TERM_KOI8 -fg white -cr white -bg forestgreen ++ "Term: white/rosybrown" TERM_KOI8 -fg white -cr white -bg rosybrown ++ "Term: white/deeppink" TERM_KOI8 -fg white -cr white -bg deeppink ++ "Term: white/black" TERM_KOI8 -fg white -cr white -bg black + +AddToMenu Systems "Systems" Title ++ REMOTE_HOST_KOI8_MENU(phdru.name, phdru) ++ REMOTE_HOST_UTF8_MENU(phdru.name, phdru) ++ REMOTE_HOST_KOI8_BIG_MENU(phdru.name, PHDRU) + +AddToMenu FvwmCommands "Fvwm Commands" Title ++ "Restart" Restart ++ "Raise all" Raise-All +#+ "Restart Fvwm2" Restart fvwm2 +#+ "Start Fvwm" Restart fvwm ++ "Fvwm Setup" Popup FvwmSetup ++ "Fvwm Modules" Popup FvwmModules ++ "" Nop ++ "Exit Fvwm" Quit + +AddToMenu FvwmSetup "Fvwm Setup" Title ++ "Start standard session" StartStandardSession ++ "Change Scrolling" Popup FvwmScroll + +AddToMenu FvwmScroll "Change Scroll Behavior" Title ++ "OFF" EdgeScroll 0 0 ++ "ON" EdgeScroll 100 100 ++ "Horizontal Only" EdgeScroll 100 0 ++ "Vertical Only" EdgeScroll 0 100 ++ "Partial" EdgeScroll 50 50 + +AddToMenu FvwmModules "Fvwm Modules" Title ++ "Animate" Module FvwmAnimate ++ "Auto" Module FvwmAuto ++ "Backer" Module FvwmBacker ++ "Banner" Module FvwmBanner ++ "Buttons" Module FvwmButtons ++ "Cascade" Module FvwmCascade ++ "CommandS" Module FvwmCommandS ++ "Console" Module FvwmConsole ++ "ConsoleC" Module FvwmConsoleC -e FvwmConsoleC.pl ++ "Cpp" Module FvwmCpp ++ "Debug" Module FvwmDebug ++ "DragWell" Module FvwmDragWell ++ "Event" Module FvwmEvent ++ "Form" Module FvwmForm ++ "Gtk" Module FvwmGtk ++ "IconBox" Module FvwmIconBox ++ "IconMan" Module FvwmIconMan ++ "Ident" Module FvwmIdent ++ "M4" Module FvwmM4 ++ "Pager" Module FvwmPager 0 2 ++ "Rearrange" Module FvwmRearrange ++ "Save" Module FvwmSave ++ "SaveDesk" Module FvwmSaveDesk ++ "Script" Module FvwmScript ++ "Scroll" Module FvwmScroll ++ "TaskBar" Module FvwmTaskBar ++ "Theme" Module FvwmTheme ++ "Tile" Module FvwmTile ++ "Wharf" Module FvwmWharf ++ "WinList" Module FvwmWinList + +# This is the root menu +AddToMenu RootMenu "Root Menu" Title ++ "Terminals" Popup Terminals +#+ "Color term" Popup TermColors ++ "Systems" Popup Systems ++ "" Nop ++ "Browsers" Popup Browsers ++ "Utilities" Popup Utilities +#+ "" Nop +#+ "Lock Screen" Popup XlockMenu ++ "XScreenSaver" Popup XScreenSaverMenu +#+ "Tv-tuner" Popup Tv-tuner ++ "" Nop ++ "XSetBg" Popup XSetBgMenu ++ "Fvwm Commands" Popup FvwmCommands + +# This menu will fire up some often used programs +DestroyMenu Utilities +AddToMenu Utilities "Choose one:" Title ++ "FBReader" Exec exec fbreader ++ "GVim (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec gvim ++ "GVim (utf8)" Exec LC_CTYPE=ru_RU.UTF-8 exec gvim ++ "MyRuLb (koi8)" Exec LC_CTYPE=ru_RU.KOI8-R exec "$HOME"/admin/prog/myrulib/myrulib ++ "MyRuLb (utf8)" Exec LC_CTYPE=ru_RU.UTF-8 exec "$HOME"/admin/prog/myrulib/myrulib +#+ "XFortune" Exec /usr/games/fortune | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - +#+ "xbuffy" Exec exec xbuffy -fn 'XBUFFY_FONT' -geometry +0+125 -boxfile mail/misc/.xbuffyrc ++ "" Nop ++ "pavucontrol" PaVuControl +#+ "audacious" Audacious ++ "DeadBeef" DeadBeef ++ "Id3Info" Id3Info +#+ "Gajim" Gajim ++ "Pidgin" Pidgin ++ "" Nop ++ "xload" Exec exec xload -geometry =136x136+0+0 ++ "Top" TERM_KOI8 -T Top -n Top -e top ++ "" Nop ++ "Refresh Screen" Refresh ++ "xrefresh" Exec exec xrefresh ++ "" Nop ++ "xcalc" Exec exec xcalc ++ "xclipboard" Exec exec xclipboard ++ "xcutsel" Exec exec xcutsel +#+ "xman" Exec exec xman -notopbox -geometry +150+102 +#+ "emacs" Exec emacs -geometry 81x35+150+34 +#+ "xv" Function warp-or-run xv "Exec exec xv -ncols 240 -geometry +0+0" + +DestroyMenu Browsers +AddToMenu Browsers "Choose one:" Title ++ "FireFox" FireFox ++ "Chromium" Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser chromium ++ "Opera" Exec LC_CTYPE=ru_RU.KOI8-R exec start-browser opera + +# A wide variety of screenlocking options... +#AddToMenu XlockMenu "Choose one:" Title +#+ "Hop" Exec exec xlock -mode hop +#+ "Image" Exec exec xlock -mode image +#+ "Life" Exec exec xlock -mode life +#+ "Flame" Exec exec xlock -mode flame +#+ "Pyro" Exec exec xlock -mode pyro +#+ "Qix" Exec exec xlock -mode qix +#+ "Rotor" Exec exec xlock -mode rotor +#+ "Swarm" Exec exec xlock -mode swarm +#+ "" Nop +#+ "Random" Exec exec xlock -mode random +#+ "Blank" Exec exec xlock -mode blank + +AddToMenu XScreenSaverMenu "Choose mode:" Title ++ "Blank Screen Now" Exec exec xscreensaver-command -activate ++ "Lock Screen Now" Exec exec xscreensaver-command -lock ++ "Screen Saver Demo" Exec exec xscreensaver-command -demo ++ "Screen Saver Preferences" Exec exec xscreensaver-command -prefs ++ "Reinitialize Screen Saver" Exec exec xscreensaver-command -restart ++ "" Nop ++ "Launch Screen Saver" Exec exec xscreensaver ++ "Kill Screen Saver" Exec exec xscreensaver-command -exit + +AddToMenu XSetBgMenu "XSetBg" Title ++ "Change wallpaper" Exec exec "$HOME"/lib/xsetbg/xsetbg-force ++ "Start" Exec exec "$HOME"/lib/xsetbg/xsetbg-http-start ++ "Stop" Exec exec "$HOME"/lib/xsetbg/xsetbg-http-stop ++ "Restart" Exec exec "$HOME"/lib/xsetbg/xsetbg-http-restart ++ "" Nop +changequote([,]) ++ "Xli" Exec fn="`$HOME/lib/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn" ++ "Xli (scaled)" Exec fn="`$HOME/lib/xsetbg/print-filename.py -e koi8-r`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn" ++ "Open in browser" Exec exec webbrowserX -n "`$HOME/lib/xsetbg/print-filename.py -e koi8-r`" ++ "Filename" Exec exec "$HOME"/lib/xsetbg/print-filename.py -e koi8-r ++ "XFilename" Exec "$HOME"/lib/xsetbg/print-filename.py | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - ++ "XFilename (wrapped)" Exec "$HOME"/lib/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - ++ "" Nop ++ "Xli (prev.)" Exec fn="`$HOME/lib/xsetbg/print-filename.py -e koi8-r -o`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" "$fn" ++ "Xli (prev., scaled)" Exec fn="`$HOME/lib/xsetbg/print-filename.py -e koi8-r -o`" && exec xli -title "`echo $fn | sed 's/ /_/g'`" -zoom auto "$fn" ++ "Open in browser (prev.)" Exec exec webbrowserX -n "`$HOME/lib/xsetbg/print-filename.py -e koi8-r -o`" +changequote([`], [']) ++ "Filename (prev.)" Exec exec "$HOME"/lib/xsetbg/print-filename.py -e koi8-r -o ++ "XFilename (prev.)" Exec "$HOME"/lib/xsetbg/print-filename.py -o | text-wrap.py -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - ++ "XFilename (prev., wrapped)" Exec "$HOME"/lib/xsetbg/print-filename.py -o | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file - + +############################################################################ +# FvwmBacker +# +#*FvwmBacker: Command (Desk 0, Page * *) -solid DarkCyan +#*FvwmBacker: Command (Desk 1, Page * *) -solid steelblue +#*FvwmBacker: Command (Desk 2, Page * *) -solid midnightblue +*FvwmBacker: Command (Desk *, Page * *) Exec exec "$HOME"/lib/xsetbg/xsetbg-http-change + +############################################################################ +# FvwmButtons +# +# Colors +*FvwmButtons: Fore Black +*FvwmButtons: Back rgb:90/80/90 + +# Font +*FvwmButtonsFont BUTTONS_FONT +*FvwmButtons: Font BUTTONS_FONT + +# Geometry-- really likes to pick its own size, but giving a position is OK +*FvwmButtons: Geometry -1+1 + +# Layout: specify rows or columns, not both +*FvwmButtons: Rows 2 #, Columns 5 + +# Transparent background +#*FvwmButtons: Pixmap none +# Background +#*FvwmButtons: Pixmap fvwm.xpm + + +# Define the buttons to use..... +#*FvwmButtons: Move arrows2.xpm Move +#*FvwmButtons: Kill skull.xpm Destroy +#*FvwmButtons: Quit nuke.xpm Popup "Quit-Verify" + +#*FvwmButtons: (de)Iconify eyenew.xpm Iconify +#*FvwmButtons: Restart eye2.xpm Restart +#*FvwmButtons: Xcalc rcalc.xpm Exec "Calculator" exec xcalc +#*FvwmButtons: junk 3dx.xpm Swallow "xload" xload -bg \#908090 +#*FvwmButtons: xmter x.xpm Swallow "xmter" xmter +#*FvwmButtons: "" clock.xpm Swallow "xclock" xclock -bg \#908090 -padding 0 +#*FvwmButtons: "" 3dx.xpm Swallow "Time 3D" t3d -fg \#908090 -mag .3 -wobber 0 + +#*FvwmButtons: (Swallow XClock 'Exec exec xclock -update 1 -geometry -3000-3000') +#*FvwmButtons: news page.xpm TERM_KOI8 -title "Tin" -fn 10x20 -fg white -cr white -bg black -e tin +#*FvwmButtons: Minicom mini-connect.xpm TERM_KOI8 -title "Minicom" -fg white -cr white -bg black -e minicom +#*FvwmButtons: Real bell.xpm Exec cd /opt/audio && exec realplay +#*FvwmButtons: Kill rbomb.xpm Destroy + + +# Buttons +*FvwmButtons: (Title Term, Icon rterm2.xpm, Action TERM_KOI8) +*FvwmButtons: (Title UTF-8, Icon rterm2.xpm, Action TERM_UTF8) +*FvwmButtons: (Title phdru, Icon xterm-sgi.xpm, Action Term-Phdru) + +*FvwmButtons: (Title Wallpaper, Icon find1.xpm, Action Exec $HOME/lib/xsetbg/print-filename.py | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -) +*FvwmButtons: (Title "-1", Icon find1.xpm, Action Exec $HOME/lib/xsetbg/print-filename.py -o | text-wrap.py -w TEXT_WIDTH -s -n | gxmessage -buttons Ok -default Ok -fn 'MESSAGE_FONT' -file -) +*FvwmButtons: (Title Next, Icon Jrecycle.xpm, Action Exec exec "$HOME"/lib/xsetbg/xsetbg-http-force) +*FvwmButtons: (Title pavucontrol, Icon mini.sound.xpm, Action PaVuControl) +#*FvwmButtons: (Title Id3Info, Icon bell.xpm, Action Id3Info) +#*FvwmButtons: (Title Audacious, Icon bell.xpm, Action Audacious) +*FvwmButtons: (Title DeadBeef, Icon bell.xpm, Action DeadBeef) +#*FvwmButtons: (Title SMPlayer, Icon bell.xpm, Action SMPlayer) +#*FvwmButtons: (Title XLock, Icon Jxlock.xpm, Action Exec exec xscreensaver-command -lock) + +############################################################################ +# FvwmForm +# +# FvwmForm alias - rlogin to host via term +#FvwmForm Rlogin +#*Rlogin: WarpPointer +#*Rlogin: Font *helvetica*m*r*n*14* +#*Rlogin: ButtonFont *helvetica*m*o*n*14* +#*Rlogin: InputFont *cour*m*r*n*14* +#*Rlogin: Fore Black +#*Rlogin: Back Light Gray +#*Rlogin: ItemFore Wheat +#*Rlogin: ItemBack Gray50 +## begin items +#*Rlogin: Line center +#*Rlogin: Text "Login to Remote Host" +#*Rlogin: Line center +#*Rlogin: Text "Host:" +#*Rlogin: Input HostName 20 "" +#*Rlogin: Line center +#*Rlogin: Selection UserSel single +#*Rlogin: Choice Default Default on "same user" +#*Rlogin: Choice Custom Custom off "user:" +#*Rlogin: Input UserName 10 "" +#*Rlogin: Line expand +#*Rlogin: Button quit "Login" ^M +#*Rlogin: Command TERM_KOI8 -T term@$(HostName) -e rlogin $(HostName) $(Custom?-l $(UserName)) +#*Rlogin: Button restart "Clear" +#*Rlogin: Command Beep +#*Rlogin: Button quit "Cancel" +#*Rlogin: Command Nop +## +## FvwmForm alias - query exit ala mwm +#FvwmForm QuitVerify +#*QuitVerify: GrabServer +#*QuitVerify: WarpPointer +#*QuitVerify: Font *helvetica*m*r*n*14* +##*QuitVerify: ButtonFont *helvetica*m*o*n*14* +#*QuitVerify: ButtonFont 7x13bold +#*QuitVerify: Fore Black +#*QuitVerify: Back Light Gray +#*QuitVerify: ItemFore Wheat +#*QuitVerify: ItemBack Gray50 +## begin items +#*QuitVerify: Line center +#*QuitVerify: Text "Do you really want to exit FVWM?" +#*QuitVerify: Line expand +#*QuitVerify: Button quit " Exit " +#*QuitVerify: Command Quit +#*QuitVerify: Button quit "Cancel" +#*QuitVerify: Command Nop +# +## +## MyTalk & MyFvwmTalk from Dave Goldberg +## MyTalk Form - dissappears after use +#FvwmForm MyTalk +#*MyTalk: WarpPointer +#*MyTalk: Font *helvetica*m*r*n*14* +#*MyTalk: ButtonFont *helvetica*m*o*n*14* +#*MyTalk: InputFont *cour*m*r*n*14* +#*MyTalk: Fore Red +#*MyTalk: Back Gray +#*MyTalk: ItemFore Blue +#*MyTalk: ItemBack Gray +#*MyTalk: Line center +#*MyTalk: Text "Fvwm Function" +#*MyTalk: Input Func 40 "" +#*MyTalk: Line expand +#*MyTalk: Button quit "Run" ^M +#*MyTalk: Command $(Func) +#*MyTalk: Button restart "Clear" ^R +#*MyTalk: Button quit "Cancel" ^C +#*MyTalk: Command Nop +## +## MyFvwmTalk Form - sticks around +#FvwmForm MyFvwmTalk +#*MyFvwmTalk: WarpPointer +#*MyFvwmTalk: Font *helvetica*m*r*n*14* +#*MyFvwmTalk: ButtonFont *helvetica*m*o*n*14* +#*MyFvwmTalk: InputFont *cour*m*r*n*14* +#*MyFvwmTalk: Fore Red +#*MyFvwmTalk: Back Gray +#*MyFvwmTalk: ItemFore Blue +#*MyFvwmTalk: ItemBack Gray +#*MyFvwmTalk: Line center +#*MyFvwmTalk: Text "Fvwm Function" +#*MyFvwmTalk: Input Func 40 "" +#*MyFvwmTalk: Line expand +#*MyFvwmTalk: Button restart "Run" ^M +#*MyFvwmTalk: Command $(Func) +#*MyFvwmTalk: Button restart "Clear" ^R +#*MyFvwmTalk: Command Nop +#*MyFvwmTalk: Button restart "Iconify" ^Z +#*MyFvwmTalk: Command Next [MyFvwmTalk] Iconify +#*MyFvwmTalk: Button quit "Quit" ^C +#*MyFvwmTalk: Command Nop + +############################################################################ +# FvwmIconBox +# +# NOTE: Icons will only be shown in module if "Style * !Icon" is set +*FvwmIconBox: IconBack #cfcfcf +*FvwmIconBox: IconHiFore black +*FvwmIconBox: IconHiBack LightSkyBlue +*FvwmIconBox: Back #5f9ea0 +#*FvwmIconBox: Fore blue +*FvwmIconBox: Geometry 5x1+0+0 +*FvwmIconBox: MaxIconSize 64x38 +*FvwmIconBox: Font ICON_BOX_FONT +*FvwmIconBox: SortIcons IconName +*FvwmIconBox: Padding 4 +*FvwmIconBox: Lines 10 +*FvwmIconBox: SBWidth 11 +*FvwmIconBox: Placement Left Top +*FvwmIconBox: Pixmap fvwm.xpm +#*FvwmIconBox: HideSC Horizontal +*FvwmIconBox: SetWMIconSize +*FvwmIconBox: HilightFocusWin +#*FvwmIconBox: Resolution Desk +*FvwmIconBox: Mouse 1 Click RaiseLower +*FvwmIconBox: Mouse 1 DoubleClick Iconify +*FvwmIconBox: Mouse 2 Click Iconify -1, Focus +*FvwmIconBox: Mouse 3 Click Module FvwmIdent +*FvwmIconBox: Key r RaiseLower +*FvwmIconBox: Key space Iconify +*FvwmIconBox: Key d Close +*FvwmIconBox: Key n Next +*FvwmIconBox: Key p Prev +*FvwmIconBox: Key h Left +*FvwmIconBox: Key j Down +*FvwmIconBox: Key k Up +*FvwmIconBox: Key l Right + +############################################################################ +# FvwmIdent +# +# Give us colors and a fonts +*FvwmIdent: Back MidnightBlue +*FvwmIdent: Fore Yellow +*FvwmIdent: Font IDENT_FONT + +############################################################################ +# FvwmPager +# +*FvwmPager: Back #908090 +*FvwmPager: Fore #484048 +*FvwmPager: Font TITLE_FONT +*FvwmPager: Hilight #cab3ca +*FvwmPager: Geometry PAGER_GEOM +*FvwmPager: Label 0 System +*FvwmPager: Label 1 Net +*FvwmPager: Label 2 Work +*FvwmPager: SmallFont PAGER_FONT + +*FvwmPager: Balloons All +*FvwmPager: BalloonBack #efe3b5 +*FvwmPager: BalloonFore Black +*FvwmPager: BalloonFont ICON_FONT +*FvwmPager: BalloonYOffset +2 +*FvwmPager: BalloonBorderWidth 1 +*FvwmPager: BalloonBorderColor Black + +############################################################################ +# FvwmScroll +# +*FvwmScroll: Back grey40 +*FvwmScroll: Fore green + +############################################################################ +# FvwmWinList +# +*FvwmWinList: Back #908090 +*FvwmWinList: Fore Black +*FvwmWinList: Font WIN_LIST_FONT +*FvwmWinList: Action Click1 Iconify -1, Focus +*FvwmWinList: Action Click2 Iconify +*FvwmWinList: Action Click3 Module "FvwmIdent: " FvwmIdent +*FvwmWinList: UseSkipList +*FvwmWinList: Geometry +10-10 diff --git a/.fvwm/restart b/.fvwm/restart new file mode 100755 index 0000000..c9932a1 --- /dev/null +++ b/.fvwm/restart @@ -0,0 +1,17 @@ +#! /bin/sh + +if [ -z "$DISPLAY" ]; then + exit 0 +fi + +if xscreensaver-command -time 2>/dev/null | grep -Eq 'screen (blanked|locked)'; then + exit 0 +fi + +if ps a | grep -v grep | grep -q mplayer; then + exit 0 +fi + +FvwmCommand Restart +sleep 3 +FvwmCommand Raise-All diff --git a/.fvwm/startup b/.fvwm/startup new file mode 100644 index 0000000..8ba71d1 --- /dev/null +++ b/.fvwm/startup @@ -0,0 +1,41 @@ +#-----------------------------------------------------------------------------# +# +# 5. Stuff to do at start-up and on restart +# +#-----------------------------------------------------------------------------# + +# The StartFunction is used at start and restart with or without a Session +# Manager. The above file .start-* defines this function. If +# we want Gtk menus and dialog (defined in the modules section) we start +# FvwmGtk. + +AddToFunc StartFunction +#G_M_G 1 +#+ I Module FvwmGtk + +# The InitFunction is used at FVWM start + +AddToFunc InitFunction +# Load the X Setup Scripts setting if we use it ++ I Exec [ -f $HOME/.xinitrc-fvwm ] && sh $HOME/.xinitrc-fvwm +#+ I Exec exec xsetroot -solid \#7F4B7F + +# The restart function: + +AddToFunc RestartFunction +#+ I Module FvwmButtons MyButtons + +# +# When used with a session manager FVWM uses SessionInitFunction and +# SessionRestartFunction in the place of InitFunction and RestartFunction +# + +AddToFunc SessionInitFunction +# Do not Load the X Setup Scripts setting, some Session Managers have its own +# method (e.g., GNOME) +#+ I Exec [ -f $HOME/.xinitrc-fvwm ] && sh $HOME/.xinitrc-fvwm +#+ I Module FvwmButtons MyButtons + +AddToFunc SessionRestartFunction +#+ I Module FvwmButtons MyButtons + diff --git a/.fvwm/styles b/.fvwm/styles new file mode 100644 index 0000000..63f65cd --- /dev/null +++ b/.fvwm/styles @@ -0,0 +1,43 @@ +#-----------------------------------------------------------------------------# +# +# 6. Set application dependent styles +# +# Order is important! +# If compatible styles are set for a single window in multiple Style +# commands, then the styles are ORed together. If conflicting styles +# are set, the last one specified is used. +# +#-----------------------------------------------------------------------------# + +Style *lock NoTitle, NoHandles, Sticky, WindowListSkip +Style xeyes NoTitle, Sticky +Style *biff* NoTitle, Sticky, WindowListSkip +Style xsysinfo NoTitle, Sticky, WindowListSkip +Style xload NoTitle, Sticky, WindowListSkip +Style xconsole Sticky, StartIconic +Style xpostit WindowListSkip +Style PostitNote WindowListSkip +Style Postit NoHandles, WindowListSkip +# gnome panel & icons +Style panel Sticky, NoTitle, WindowListSkip, CirculateSkip +Style desktop_icon CirculateSkip, WindowListSkip, NoTitle +# Animation is broken in gnome panel 1.4 with GNOMEUseHints. +# GNOMEIgnoreHints also disables panel moving itself from layer to layer. +Style panel GNOMEIgnoreHints +# xsm panel +Style xsm Sticky, NoTitle, WindowListSkip, CirculateSkip + +Style FvwmForm-QuitVerify NoButton 1, NoButton 2, NoButton 4, NoButton 6, \ + StaysOnTop, NoHandles, WindowListSkip + +# Some version of Netscape need the following if you want that the +# page source (and others horrible banner) to be decorated (but you may +# lost some MWM decor hints) +#Style Netscape NoDecorHint + +# I do not like that the "find in page" of netscape cannot be lowered. +# Uncomment the next line if your are agree. +#Style Netscape DontRaiseTransient + +#DT 1 for the CDE "desk icon" +#Style popup_* CirculateSkip, WindowListSkip diff --git a/.gitconfig b/.gitconfig new file mode 100644 index 0000000..57f7589 --- /dev/null +++ b/.gitconfig @@ -0,0 +1,29 @@ +[alias] + b = branch + checkin = commit + ci = commit + co = checkout + l1 = log --oneline + l5 = log -5 + st = status + +[core] + pager = less -FRSXgimq + +[merge] + tool = vimdiff + +#[mergetool "vimdiff3"] +# Don't forget to add -f for gvim +# 3 way diffs +# cmd = vim -d \"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\" -c \"wincmd J\" + +[web] + browser = webbrowser + +[browser "webbrowser"] + cmd = webbrowser -n + +[gui] + fontui = -family \"DejaVu Sans\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0 + fontdiff = -family \"DejaVu Sans Mono\" -size 18 -weight normal -slant roman -underline 0 -overstrike 0 diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 new file mode 100644 index 0000000..28bc74e --- /dev/null +++ b/.gtkrc-2.0 @@ -0,0 +1,131 @@ +# When turned on, this option causes gtk to select the contents of an entry field when it becomes focused. +gtk-entry-select-on-focus = 1 + +############################# +#font stuff +############################ + +# Sets the font used by all gtk applications. +gtk-font-name = "Sans 16" + +# The following section allows you to change the style of the conversation +# window widgets, log viewer widget, and request and notify window widgets. +# These only work in Gaim 0.78 or higher. +style "imhtml-fix" +{ + font_name = "Sans 16" +} +class "*" style "imhtml-fix" + +# Set the widget style for the conversation entry box +widget "*gaim_gtkconv_entry" style "imhtml-fix" +# Set the widget style for the conversation +widget "*gaim_gtkconv_imhtml" style "imhtml-fix" +# Set the widget style for the log viewer +widget "*gaim_gtklog_imhtml" style "imhtml-fix" + +# Set the widget style for IMHtml input widgets in request dialogs +widget "*gaim_gtkrequest_imhtml" style "imhtml-fix" +# Set the widget style for IMHtml widgets in notify dialogs +widget "*gaim_gtknotify_imhtml" style "imhtml-fix" + +# Uncommenting the line below sets all IMHtml widgets in Gaim to the same style +# and will work in Gaim versions prior to 0.78 +#widget_class "*.GtkScrolledWindow.GtkIMHtml" style "imhtml-fix" + +# The following lets you customize the color of hyperlinks +# and also the text cursors. The link color thing is Gaim specific +# but the rest work for any Gtk2 program. You can search the Gtk2 +# docs for other style properties. +style "my-style-name" { + GtkIMHtml::hyperlink-color = "#000080" + GtkWidget::cursor-color = "#0000FF" + GtkWidget::secondary-cursor-color = "#00FF00" #for mixed ltr and rtl +} +widget_class "*" style "my-style-name" + +############################# +#Blist stuff +############################# + +# This style sets the expander size on a treeview to 0, which has the result +# of reducing the indent for items in the tree. This can be applied to the +# Gaim buddy list to reduce it's width. +# This only works in Gaim 0.79 and higher +#style "my-narrow-tree" +#{ +# GtkTreeView::expander_size = 0 +#} +# And apply the style to the buddy list: +#widget "*gaim_gtkblist_treeview" style "my-narrow-tree" + +# Customize the New 2.0.0 Status Selector +style "gaim-statusbox-style" { + # This is a work-around that keeps you from having to scroll + # if the status selector is at the bottom of the screen. + GtkComboBox::appears-as-list = 1 + + # Depending on your theme and/or GTK+ version, one of + # the following blocks should eliminate excess padding. + # The second approach is probably more universally + # applicable, but the first removes more padding for + # some people. + + # Eliminate Padding Approach 1 + xthickness = 0 + ythickness = 0 + + # Eliminate Padding Approach 2 + xthickness = 2 + ythickness = 2 + GtkWidget::focus-line-width = 0 + GtkWidget::focus-padding = 0 +} +widget "*gaim_gtkblist_statusbox*" style "gaim-statusbox-style" + + +############################# +#key bindings +############################# + +# Controls the keybindings that gtk uses for text entry/editing/etc +# The "emacs" theme turns on things like: +# ctrl-a == move to beginning of line, ctrl-e == move to end of line, etc. +gtk-key-theme-name = "Default" + +#to let you edit your gaim key bindings +#gtk-can-change-accels = 1 + +# In Gaim 2.0.0 and later, you can set custom keybindings in your theme. Here +# is an example to follow + +#binding "my-bindings" +#{ +# enter inserts a newline +# bind "Return" { "insert-at-cursor" ("\n") } +# ctrl-s sends message +# bind "s" { "message_send" () } +# shift-f1 toggles bold +# bind "F1" { "format_function_toggle" (1) } +# alt-f2 toggles italic +# bind "F2" { "format_function_toggle" (2) } +# Ctrl-alt-shift-f3 toggles underline +# bind "F3" { "format_function_toggle" (4) } +# Ctrl-f1 resets the formatting +# bind "F1" { "format_function_clear" () } +#} +#widget "*gaim_gtkconv_entry" binding "my-bindings" + +############################# +#misc +############################# + +# Tooltips - black on yellow-white +style "tooltips" +{ + fg[NORMAL] = "#000000" + bg[NORMAL] = "#efe3b5" +} +widget "gtk-tooltips*" style "tooltips" + +gtk-recent-files-max-age=1 diff --git a/.hgrc b/.hgrc new file mode 100644 index 0000000..ee97a0a --- /dev/null +++ b/.hgrc @@ -0,0 +1,23 @@ +[alias] +l5 = log -l 5 + +[extensions] +fetch = +graphlog = +pager = +record = +transplant = + +[pager] +pager = less -FRSXgimq +attend = annotate, cat, diff, export, glog, help, log, l5, qdiff, showconfig +ignore = update, version + +[ui] +merge = vimdiff + +#[merge-tools] +#vimdiff3.executable = vim +# Don't forget to add -f for gvim +# 3 way diffs +#vimdiff3.args = -d "$output" "$local" "$base" "$other" -c "wincmd J" diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..0e96e09 --- /dev/null +++ b/.inputrc @@ -0,0 +1,48 @@ +# readline/history settings and bindings + +$include /etc/inputrc + +set meta-flag on +set convert-meta off +set input-meta on +set output-meta on + +set bell-style none +set completion-ignore-case off +set expand-tilde on + +# In all programs, all terminals, make sure this is bound. +"\C-x\C-r": re-read-init-file + +Tab: complete +M-Tab: menu-complete + +# Some terminals have ugly default behaviour for C-h. +#"\C-h": backward-delete-char +#"\e\C-h": backward-kill-word + +# Debug +"\C-xf": dump-functions +"\C-xv": dump-variables +"\C-xm": dump-macros + +# Notice the various bindings which are conditionalized depending +# on which program is running, or what terminal is active. + +# In xterm windows, make the arrow keys do the right thing. +$if term=xterm + $include $HOME/lib/X11/inputrc +$endif +$if term=rxvt + $include $HOME/lib/X11/inputrc +$endif +$if term=vt100 + $include $HOME/lib/X11/inputrc +$endif +$if term=screen + $include $HOME/lib/X11/inputrc +$endif + +# For bash, all terminals, add some bash specific hacks. +#$if Bash +#$endif diff --git a/.local/share/mc b/.local/share/mc new file mode 120000 index 0000000..ae50751 --- /dev/null +++ b/.local/share/mc @@ -0,0 +1 @@ +../../.mc \ No newline at end of file diff --git a/.mailcap b/.mailcap new file mode 100644 index 0000000..bab97ad --- /dev/null +++ b/.mailcap @@ -0,0 +1,128 @@ +# MIME types -> viewers map, RFC 1524. + +application/ogg; smplayer %s; description="Ogg container files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +application/ogg; mplayer %s; description="Ogg container files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +application/ogg; audtool --playlist-clear --playlist-addurl %s --playback-play; description="Ogg container files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +application/ogg; audacious %s; description="Ogg container files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +application/ogg; foobar %s; description="Ogg container files"; test=test -n "$DISPLAY" -a -n "`which foobar 2>/dev/null`" +application/pdf; evince %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which evince 2>/dev/null`" +application/pdf; xpdf %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which xpdf 2>/dev/null`" +application/pdf; gv %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which gv 2>/dev/null`" +application/pdf; pdftotext %s; copiousoutput; description="Portable Document Format files"; test=test -n "`which pdftotext 2>/dev/null`" +application/pdf; pstotext %s; copiousoutput; description="Portable Document Format files"; test=test -n "`which pstotext 2>/dev/null`" +application/postscript; evince %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which evince 2>/dev/null`" +application/postscript; xpdf %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which xpdf 2>/dev/null`" +application/postscript; gv %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which gv 2>/dev/null`" +application/postscript; ghostview %s; description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which ghostview 2>/dev/null`" +application/postscript; pstotext %s; copiousoutput; description="PostScript files"; test=test -n "`which pstotext 2>/dev/null`" +application/x-bittorrent; bittorrent.py %s; test=test -n "$DISPLAY" -a -n "`which bittorrent.py 2>/dev/null`" +application/x-chm; fbreader %s; description="Compiled HTML files"; test=test -n "$DISPLAY" -a -n "`which fbreader 2>/dev/null`" +application/x-dvi; xdvi %s; description="DVI files"; test=test -n "$DISPLAY" -a -n "`which xdvi 2>/dev/null`" +application/x-fb2; fbreader %s; description="FicionBook fb2 files"; test=test -n "$DISPLAY" -a -n "`which fbreader 2>/dev/null`" +application/x-fig; xfig %s; description="FIG files"; test=test -n "$DISPLAY" -a -n "`which xfig 2>/dev/null`" +application/x-tar; tar tvf %s; description="TAR files"; copiousoutput + +application/msword; doc2html_web %s; description="M$ Word Text"; test=test -n "`which wvHtml 2>/dev/null`" +application/msword; doc2html1 %s; copiousoutput; description="M$ Word Text"; test=test -n "`which wvHtml 2>/dev/null`" -a -n "`which elinks 2>/dev/null`" +application/msword; doc2html2 %s; copiousoutput; description="M$ Word Text"; test=test -n "`which wvHtml 2>/dev/null`" -a -n "`which links2 2>/dev/null`" +application/msword; catdoc %s; copiousoutput; description="M$ Word Text"; test=test -n "`which catdoc 2>/dev/null`" +application/msword; wordview %s; description="M$ Word Text"; test=test -n "$DISPLAY" -a -n "`which wordview 2>/dev/null`" +application/vnd.ms-excel; xls2csv %s; copiousoutput; description="M$ Excel files"; test=test -n "`which xls2csv 2>/dev/null`" + +audio/mpeg; smplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/mpeg; mplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/mpeg; audtool --playlist-clear --playlist-addurl %s --playback-play; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/mpeg; audacious %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/mpeg; foorbar %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which foorbar 2>/dev/null`" +audio/mpeg3; smplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/mpeg3; mplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/mpeg3; audtool --playlist-clear --playlist-addurl %s --playback-play; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/mpeg3; audacious %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/mpeg3; foorbar %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which foorbar 2>/dev/null`" +audio/mpegurl; smplayer -playlist %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/mpegurl; mplayer -playlist %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/mpegurl; audtool --playlist-clear --playlist-addurl %s --playback-play; description="MPEG URLs"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/ogg; smplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/ogg; mplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/ogg; audtool --playlist-clear --playlist-addurl %s --playback-play; description="Ogg Vorbis audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/ogg; audacious %s; description="Ogg Vorbis audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/ogg; foobar %s; description="Ogg Vorbis audio files"; test=test -n "$DISPLAY" -a -n "`which foobar 2>/dev/null`" +audio/x-mod; audtool --playlist-clear --playlist-addurl %s --playback-play; description="MOD audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/x-mod; audacious %s; description="MOD audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/x-mod; foorbar %s; description="MOD audio files"; test=test -n "$DISPLAY" -a -n "`which foorbar 2>/dev/null`" +audio/x-mpeg; smplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/x-mpeg; mplayer %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/x-mpeg; audtool --playlist-clear --playlist-addurl %s --playback-play; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/x-mpeg; audacious %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/x-mpeg; foobar %s; description="MPEG audio files"; test=test -n "$DISPLAY" -a -n "`which foobar 2>/dev/null`" +audio/x-pn-realaudio; realplay %s; description="RealAudio files"; test=test -n "$DISPLAY" -a -n "`which realplay 2>/dev/null`" +audio/x-realaudio; realplay %s; description="RealAudio files"; test=test -n "$DISPLAY" -a -n "`which realplay 2>/dev/null`" +audio/x-wav; smplayer %s; description="WAV audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/x-wav; mplayer %s; description="WAV audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/x-wav; audtool --playlist-clear --playlist-addurl %s --playback-play; description="WAV audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/x-wav; audacious %s; description="WAV audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/x-wav; foobar %s; description="WAV audio files"; test=test -n "$DISPLAY" -a -n "`which foobar 2>/dev/null`" +audio/*; smplayer %s; description="Audio files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +audio/*; mplayer %s; description="Audio files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +audio/*; audtool --playlist-clear --playlist-addurl %s --playback-play; description="Audio files"; test=test -n "$DISPLAY" -a -n "`which audtool 2>/dev/null`" && test "`audtool --get-volume`" -gt 0 +audio/*; audacious %s; description="Audio files"; test=test -n "$DISPLAY" -a -n "`which audacious 2>/dev/null`" +audio/*; foobar %s; description="Audio files"; test=test -n "$DISPLAY" -a -n "`which foobar 2>/dev/null`" + +image/gif; xli %s; description="GIF image files"; test=test -n "$DISPLAY" -a -n "`which xli 2>/dev/null`" +image/gif; xloadimage %s; description="GIF image files"; test=test -n "$DISPLAY" -a -n "`which xloadimage 2>/dev/null`" +image/gif; xview %s; description="GIF image files"; test=test -n "$DISPLAY" -a -n "`which xview 2>/dev/null`" +image/gif; display %s; description="GIF image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/jpeg; xli %s; description="JPEG image files"; test=test -n "$DISPLAY" -a -n "`which xli 2>/dev/null`" +image/jpeg; xloadimage %s; description="JPEG image files"; test=test -n "$DISPLAY" -a -n "`which xloadimage 2>/dev/null`" +image/jpeg; xview %s; description="JPEG image files"; test=test -n "$DISPLAY" -a -n "`which xview 2>/dev/null`" +image/jpeg; display %s; description="JPEG image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/tiff; xview %s; description="TIFF image files"; test=test -n "$DISPLAY" -a -n "`which xview 2>/dev/null`" +image/tiff; display %s; description="TIFF image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/x-djvu; evince %s; description="DJVu image files"; test=test -n "$DISPLAY" -a -n "`which evince 2>/dev/null`" +image/x-djvu; djview %s; description="DJVu image files"; test=test -n "$DISPLAY" -a -n "`which djview 2>/dev/null`" +image/x-icon; display %s; description="Icon image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/x-xpm2; xli %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which xli 2>/dev/null`" +image/x-xpm2; display %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/x-xpm2; sxpm %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which sxpm 2>/dev/null`" +image/x-xpm3; xli %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which xli 2>/dev/null`" +image/x-xpm3; display %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which display 2>/dev/null`" +image/x-xpm3; sxpm %s; description="XPM image files"; test=test -n "$DISPLAY" -a -n "`which sxpm 2>/dev/null`" +image/*; xli %s; description="Image files"; test=test -n "$DISPLAY" -a -n "`which xli 2>/dev/null`" + +text/html; webbrowserX -t "file://`abspath.py %s`"; description="HTML Text"; test=test -n "$DISPLAY" +text/html; webbrowser -t "file://`abspath.py %s`"; needsterminal; description="HTML Text" +text/html; webdump %s; copiousoutput; description="HTML Text"; test=test -n "`which elinks 2>/dev/null`" +text/html; webdump2 %s; copiousoutput; description="HTML Text"; test=test -n "`which links2 2>/dev/null`" +text/html; xlinks2 -force-html %s; description="HTML Text"; test=test -n "$DISPLAY" -a -n "`which links2 2>/dev/null`" +text/html; links2 -force-html %s; needsterminal; description="HTML Text"; test=test -n "`which links2 2>/dev/null`" +text/html; links -force-html %s; needsterminal; description="HTML Text"; test=test -n "`which links 2>/dev/null`" +text/html; elinks -force-html %s; needsterminal; description="HTML Text"; test=test -n "`which elinks 2>/dev/null`" +text/html; elinks -force-html -dump %s; copiousoutput; description="HTML Text"; test=test -n "`which elinks 2>/dev/null`" +text/html; w3m -T text/html %s; needsterminal; description="HTML Text"; test=test -n "`which w3m 2>/dev/null`"; nametemplate=%s.html +text/html; w3m -T text/html -dump %s; copiousoutput; description="HTML Text"; test=test -n "`which w3m 2>/dev/null`"; nametemplate=%s.html +text/html; lynx -force_html %s; needsterminal; description="HTML Text"; test=test -n "`which lynx 2>/dev/null`"; nametemplate=%s.html +text/html; lynx -force_html -dump %s; copiousoutput; description="HTML Text"; test=test -n "`which lynx 2>/dev/null`"; nametemplate=%s.html +text/plain; less %s; edit=vim %s; needsterminal; description=Text; test=test -n "`which less 2>/dev/null`" +text/plain; more %s; edit=vi %s; needsterminal; description=Text; test=test -n "`which more 2>/dev/null`" +text/rtf; fbreader %s; description="Rich Text Format"; test=test -n "$DISPLAY" -a -n "`which catdoc 2>/dev/null`" +text/rtf; catdoc %s; copiousoutput; description="Rich Text Format"; test=test -n "`which catdoc 2>/dev/null`" +text/rtf; unrtf --html --nopict %s | webstdin; description="Rich Text Format"; test=test -n "`which unrtf 2>/dev/null`" -a -n "`which elinks 2>/dev/null`" +text/*; gview %s; edit=gvim -f %s; compose=gvim -f %s; description="Text"; test=test -n "$DISPLAY" -a -n "`which gview 2>/dev/null`" +text/*; less %s; edit=vim %s; needsterminal; description=Text; test=test -n "`which less 2>/dev/null`" +text/*; more %s; edit=vi %s; needsterminal; description=Text; test=test -n "`which more 2>/dev/null`" + +video/mpeg; smplayer %s; description="MPEG video files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +video/mpeg; mplayer %s; description="MPEG video files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +video/ogg; smplayer %s; description="Ogg Theora files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +video/ogg; mplayer %s; description="Ogg Theora files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +video/quicktime; smplayer %s; description="QuickTime video files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +video/quicktime; mplayer %s; description="QuickTime video files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +video/x-msvideo; smplayer %s; description="AVI video files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +video/x-msvideo; mplayer %s; description="AVI video files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" +video/*; smplayer %s; description="Video files"; test=test -n "$DISPLAY" -a -n "`which smplayer 2>/dev/null`" -a -n "`which smplayer 2>/dev/null`" +video/*; mplayer %s; description="Video files"; test=test -n "$DISPLAY" -a -n "`which mplayer 2>/dev/null`" -a -n "`which mplayer 2>/dev/null`" + +x-world/x-vrml; freewrl -url %s; test=test -n "$DISPLAY" -a -n "`which freewrl 2>/dev/null`"; description="VRML world"; nametemplate=%s.wrl + +*/*; less %s; needsterminal; test=test -n "`which less 2>/dev/null`" +*/*; cat -vT %s; copiousoutput diff --git a/.mc/bindings b/.mc/bindings new file mode 120000 index 0000000..f9816bb --- /dev/null +++ b/.mc/bindings @@ -0,0 +1 @@ +mc.ext \ No newline at end of file diff --git a/.mc/filehighlight.ini b/.mc/filehighlight.ini new file mode 100644 index 0000000..7f05112 --- /dev/null +++ b/.mc/filehighlight.ini @@ -0,0 +1,50 @@ +[executable] + type=FILE_EXE + +[directory] + type=DIR + + +[device] + type=DEVICE + +[special] + type=SPECIAL + +[stalelink] + type=STALE_LINK + +[symlink] + type=SYMLINK + +[core] + regexp=^core\\.*\\d*$ + +[temp] + extensions=tmp;$$$;~;bak + extensions_case=false + regexp=(^#.*|.*~$) + +[archive] + extensions= +#gz;bz2;tar;tgz;rpm;Z;rar;zip;arj;cab;lzh;lha;zoo;arc;ark;xz;tbz;tbz2; + +[doc] + extensions= +#txt;doc;rtf;diz;ctl;me;ps;pdf;xml;xsd;xslt;dtd;html;shtml;htm;mail;msg;lsm;po;nroff;man;tex;sgml;css;text;letter;chm + +[source] + extensions=py +#c;h;cc;hh;cpp;cxx;hpp;asm;py;pl;pm;inc;cgi;php;phps;js;java;jav;jasm;sh;bash;diff;patch;pas;tcl;tk;awk;m4;st;mak;sl;ada;caml;ml;mli;mly;mll;mlp;sas;prg;hs;hi;erl + +[media] + extensions= +#mp2;mp3;mpg;ogg;mpeg;wav;avi;asf;mov;mol;mpl;xm;mod;it;med;mid;midi;s3m;umx;vob;mkv;flv;mp4;m3u + +[graph] + extensions= +#jpg;jpeg;gif;png;tif;pcx;bmp;xpm;xbm;eps;pic;rle;ico;wmf;omf;ai;cdr + +[database] + extensions= +#dbf;mdn;db;mdb;dat;fox;dbx;mdx;sql;mssql;msql;ssql;pgsql;xls;cdx;dbi diff --git a/.mc/ini b/.mc/ini new file mode 100644 index 0000000..0fc0804 --- /dev/null +++ b/.mc/ini @@ -0,0 +1,155 @@ +[Midnight-Commander] +alternate_plus_minus=0 +auto_fill_mkdir_name=1 +auto_menu=0 +auto_save_setup=0 +cd_symlinks=0 +classic_progressbar=1 +clear_before_exec=1 +confirm_delete=1 +confirm_directory_hotlist_delete=1 +confirm_execute=0 +confirm_exit=1 +confirm_history_cleanup=1 +confirm_overwrite=1 +confirm_view_dir=0 +copymove_persistent_attr=1 +double_click_speed=250 +drop_menus=0 +editor_backspace_through_tabs=0 +editor_backup_extension=~ +editor_check_new_line=0 +editor_cursor_beyond_eol=0 +editor_edit_confirm_save=1 +editor_fake_half_tabs=1 +editor_fill_tabs_with_spaces=0 +editor_group_undo=0 +editor_key_emulation=0 +editor_line_state=0 +editor_option_auto_para_formatting=0 +editor_option_backup_ext_int=-1 +editor_option_save_mode=0 +editor_option_save_position=1 +editor_option_typewriter_wrap=0 +editor_persistent_selections=1 +editor_return_does_auto_indent=1 +editor_show_right_margin=0 +editor_simple_statusbar=0 +editor_syntax_highlighting=1 +editor_tab_spacing=8 +editor_visible_spaces=1 +editor_visible_tabs=1 +editor_word_wrap_line_length=72 +fast_refresh=0 +fast_reload=0 +fast_reload_msg_shown=0 +file_op_compute_totals=1 +fish_directory_timeout=900 +ftpfs_always_use_proxy=0 +ftpfs_directory_timeout=900 +ftpfs_first_cd_then_ls=1 +ftpfs_retry_seconds=30 +ftpfs_use_passive_connections=1 +ftpfs_use_passive_connections_over_proxy=0 +ftpfs_use_unix_list_options=1 +have_fast_cpu=0 +ignore_ftp_chattr_errors=true +keymap=mc.keymap +mark_moves_down=1 +max_dirt_limit=10 +mcview_eof= +mcview_remember_file_position=0 +mix_all_files=0 +mouse_close_dialog=0 +mouse_move_pages=1 +mouse_move_pages_viewer=1 +mouse_repeat_rate=100 +navigate_with_arrows=0 +nice_rotating_dash=1 +num_history_items_recorded=60 +old_esc_mode=0 +old_esc_mode_timeout=1000000 +only_leading_plus_minus=1 +panel_scroll_pages=1 +pause_after_run=2 +preallocate_space=0 +safe_delete=0 +select_flags=6 +shell_patterns=1 +show_all_if_ambiguous=0 +show_backups=1 +show_dot_files=1 +show_output_starts_shell=0 +skin=default +torben_fj_mode=0 +use_8th_bit_as_meta=0 +use_file_to_guess_type=1 +use_internal_edit=0 +use_internal_view=1 +use_netrc=1 +verbose=1 +vfs_timeout=60 +wrap_mode=1 +xtree_mode=0 + +[Layout] +command_prompt=1 +equal_split=1 +filetype_mode=1 +free_space=1 +horizontal_equal=1 +horizontal_split=0 +keybar_visible=1 +menubar_visible=0 +message_visible=0 +output_lines=0 +permission_mode=0 +show_mini_info=1 +vertical_equal=1 +xterm_title=1 + +[Misc] +autodetect_codeset= +clipboard_paste= +clipboard_store= +display_codepage=KOI8-R +ftp_codepage=CP1251 +ftp_proxy_host=gate +ftpfs_password=anonymous@ +source_codepage=Other_8_bit +timeformat_old=%b %e %Y +timeformat_recent=%b %e %H:%M + +[Colors] +base_color= +color_terminals= +rxvt= + +[Panels] +auto_save_setup_panels=false +fast_reload=false +fast_reload_msg_shown=false +filetype_mode=true +kilobyte_si=false +mark_moves_down=true +mix_all_files=false +mouse_move_pages=true +navigate_with_arrows=false +panel_scroll_pages=true +permission_mode=false +quick_search_mode=2 +reverse_files_only=true +show_backups=true +show_dot_files=true +show_mini_info=true +simple_swap=true +torben_fj_mode=false + +[terminal:rxvt] +backtab=\\e[Z +kpasterisk=\\eOj + +[Panelize] +Find *.orig after patching=find . -name \\*.orig -print +Find SUID and SGID programs=find . \\( \\( -perm -04000 -a -perm +011 \\) -o \\( -perm -02000 -a -perm +01 \\) \\) -print +Find rejects after patching=find . -name \\*.rej -print diff --git a/.mc/mc.ext b/.mc/mc.ext new file mode 100644 index 0000000..c839830 --- /dev/null +++ b/.mc/mc.ext @@ -0,0 +1,771 @@ +# Midnight Commander 3.0 extension file +# Warning: Structure of this file has changed completely with version 3.0 +# +# All lines starting with # or empty lines are thrown away. +# Lines starting in the first column should have following format: +# +# keyword/descNL, i.e. everything after keyword/ until new line is desc +# +# keyword can be: +# +# shell (desc is, when starting with a dot, any extension (no wildcars), +# i.e. matches all the files *desc . Example: .tar matches *.tar; +# if it doesn't start with a dot, it matches only a file of that name) +# +# regex (desc is an extended regular expression) +# Please note that we are using the GNU regex library and thus +# \| matches the literal | and | has special meaning (or) and +# () have special meaning and \( \) stand for literal ( ). +# +# type (file matches this if `file %f` matches regular expression desc +# (the filename: part from `file %f` is removed)) +# +# directory (matches any directory matching regular expression desc) +# +# include (matches an include directive) +# +# default (matches any file no matter what desc is) +# +# Other lines should start with a space or tab and should be in the format: +# +# keyword=commandNL (with no spaces around =), where keyword should be: +# +# Open (if the user presses Enter or doubleclicks it), +# +# View (F3), Edit (F4) +# +# Include is the keyword used to add any further entries from an include/ +# section +# +# command is any one-line shell command, with the following substitutions: +# +# %% -> % character +# %p -> name of the current file (without path, but pwd is its path) +# %f -> name of the current file. Unlike %p, if file is located on a +# non-local virtual filesystem, i.e. either tarfs or ftpfs, +# then the file will be temporarily copied into a local directory +# and %f will be the full path to this local temporal file. +# If you don't want to get a local copy and want to get the +# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then +# use %d/%p instead of %f. +# %d -> name of the current directory (pwd, without trailing slash) +# %s -> "selected files", i.e. space separated list of tagged files if any +# or name of the current file +# %t -> list of tagged files +# %u -> list of tagged files (they'll be untaged after the command) +# +# (If these 6 letters are in uppercase, they refer to the other panel. +# But you shouldn't have to use it in this file.) +# +# +# %cd -> the rest is a path mc should change into (cd won't work, since it's +# a child process). %cd handles even vfs names. +# +# %view -> the command you type will be piped into mc's internal file viewer +# if you type only the %view and no command, viewer will load %f file +# instead (i.e. no piping, so it is different to %view cat %f) +# %view may be directly followed by {} with a list of any of +# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for +# text using backspace for bold and underscore) and unform +# (no highlighting for nroff sequences) separated by commas. +# +# %var -> You use it like this: %var{VAR:default}. This macro will expand +# to the value of the VAR variable in the environment if it's set +# otherwise the value in default will be used. This is similar to +# the Bourne shell ${VAR-default} construct. +# +# Rules are applied from top to bottom, thus the order is important. +# If some actions are missing, search continues as if this target didn't +# match (i.e. if a file matches the first and second entry and View action +# is missing in the first one, then on pressing F3 the View action from +# the second entry will be used. default should catch all the actions. +# +# Any new entries you develop for you are always welcome if they are +# useful on more than one system. You can post your modifications +# as tickets at www.midnight-commander.org + + +### Changes ### +# +# Reorganization: 2000-05-01 Michal Svec + + +### TODO ### +# +# Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something] +# Images asciiview +# +# All X Apps [Nothing/Warning] if no DISPLAY +# Not found [Default/Warning] +# Empty Output [Default/Warning] +# Edit: CopyOut+EDIT+CopyIn +# Security Check gzip/bzip EDIT (mktemp) +# +# Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc. + + +### GIT Repo ### +# gitfs changeset +regex/^\[git\] + Open=%cd %p/changesetfs:// + View=%cd %p/patchsetfs:// + +### Archives ### + +# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk +regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$ + Open=%cd %p/utar:// + View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - + +regex/\.tar\.bz$ + # Open=%cd %p/utar:// + View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf - + +regex/\.t(ar\.bz2|bz2?|b2)$ + Open=%cd %p/utar:// + View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf - + +# .tar.lzma, .tlz +regex/\.t(ar\.lzma|lz)$ + Open=%cd %p/utar:// + View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf - + +# .tar.xz, .txz +regex/\.t(ar\.xz|xz)$ + Open=%cd %p/utar:// + View=%view{ascii} xz -dc %f 2>/dev/null | tar tvvf - + +# .tar.F - used in QNX +regex/\.tar\.F$ + # Open=%cd %p/utar:// + View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf - + +# .qpr/.qpk - QNX Neutrino package installer files +regex/\.(qp[rk])$ + Open=%cd %p/utar:// + View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf - + +# tar +regex/\.(tar|TAR)$ + Open=%cd %p/utar:// + View=%view{ascii} tar tvvf - < %f + +# lha +type/^LHa\ .*archive + Open=%cd %p/ulha:// + View=%view{ascii} lha l %f + +# arj +regex/\.[aA]([rR][jJ]|[0-9][0-9])$ + Open=%cd %p/uarj:// + View=%view{ascii} unarj l %f + +# cab +regex/\.([cC][aA][bB])$ + Open=%cd %p/ucab:// + View=%view{ascii} cabextract -l %f + +# ha +regex/\.([Hh][Aa])$ + Open=%cd %p/uha:// + View=%view{ascii} ha lf %f + +# rar +regex/\.[rR]([aA][rR]|[0-9][0-9])$ + Open=%cd %p/urar:// + View=%view{ascii} rar v -c- %f + +# ALZip +regex/\.(alz|ALZ)$ + Open=%cd %p/ualz:// + View=%view{ascii} unalz -l %f + +# cpio +shell/.cpio.Z + Open=%cd %p/ucpio:// + View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null + +shell/.cpio.xz + Open=%cd %p/ucpio:// + View=%view{ascii} xz -dc %f | cpio -itv 2>/dev/null + +shell/.cpio.gz + Open=%cd %p/ucpio:// + View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null + +shell/.cpio + Open=%cd %p/ucpio:// + View=%view{ascii} cpio -itv < %f 2>/dev/null + +# ls-lR +regex/(^|\.)ls-?lR(\.gz|Z|bz2)$ + Open=%cd %p/lslR:// + +# patch +regex/\.(diff|patch)(\.bz2)$ + Open=%cd %p/patchfs:// + View=%view{ascii} bzip2 -dc %f 2>/dev/null + +regex/\.(diff|patch)(\.(gz|Z))$ + Open=%cd %p/patchfs:// + View=%view{ascii} gzip -dc %f 2>/dev/null + +regex/\.(diff|patch)$ + Open=%cd %p/patchfs:// + View=%view{ascii} /bin/cat %f 2>/dev/null + +# ar library +regex/\.s?a$ + Open=%cd %p/uar:// + #Open=%view{ascii} ar tv %f + View=%view{ascii} file %f && nm -C %f + +# trpm +regex/\.trpm$ + Open=%cd %p/trpm:// + View=%view{ascii} rpm -qivl --scripts `basename %p .trpm` + +# RPM packages (SuSE uses *.spm for source packages) +regex/\.(src\.rpm|spm)$ + Open=%cd %p/rpm:// + View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f + +regex/\.rpm$ + Open=%cd %p/rpm:// + View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f + +# deb +regex/\.u?deb$ + Open=%cd %p/deb:// + View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f + +# dpkg +shell/.debd + Open=%cd %p/debd:// + View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'` +# apt +shell/.deba + Open=%cd %p/deba:// + View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'` + +# ISO9660 +regex/\.([iI][sS][oO](\.wv)?)$ + Open=%cd %p/iso9660:// + View=%view{ascii} isoinfo -l -i %f + +# 7zip archives (they are not man pages) +regex/\.(7z|7Z)$ + Open=%cd %p/u7z:// + View=%view{ascii} 7za l %f 2>/dev/null + +# Mailboxes +type/^ASCII\ mail\ text + Open=%cd %p/mailfs:// + + +### Sources ### + +# C +shell/.c + Include=editor + +# Fortran +shell/.f + Include=editor + +# Header +regex/\.(h|hpp)$ + Include=editor + +# Asm +shell/.s + Include=editor + +# C++ +regex/\.(C|cc|cpp)$ + Include=editor + +include/editor + Open=%var{EDITOR:vi} %f + +# .so libraries +regex/\.(so|so\.[0-9\.]*)$ + View=%view{ascii} file %f && nm -C -D %f + +# Object +type/^ELF + #Open=%var{PAGER:more} %f + View=%view{ascii} file %f && nm -C %f + +### Documentation ### + +# Texinfo +#regex/\.(te?xi|texinfo)$ + +# GNU Info page +type/^Info\ text + Open=info -f %f + +shell/.info + Open=info -f %f + +# Exception: .3gp are video files not manual pages +regex/\.(3[gG][pP])$ + Include=video + +# Manual page +regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$ + Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) { zsoelim %f 2>/dev/null || cat %f; } | nroff -c -Tlatin1 -mandoc ;; esac + +# Perl pod page +shell/.pod + Open=pod2man %f | nroff -c -Tlatin1 -mandoc | %var{PAGER:more} + View=%view{ascii,nroff} pod2man %f | nroff -c -Tlatin1 -mandoc + +# Troff with me macros. +# Exception - "read.me" is not a nroff file. +shell/read.me + Open= + View= + +shell/.me + Open=nroff -c -Tlatin1 -me %f | %var{PAGER:more} + View=%view{ascii,nroff} nroff -c -Tlatin1 -me %f + +# Troff with ms macros. +shell/.ms + Open=nroff -c -Tlatin1 -ms %f | %var{PAGER:more} + View=%view{ascii,nroff} nroff -c -Tlatin1 -ms %f + +# Manual page - compressed +regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$ + Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac + +regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$ + Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff -c -Tlatin1 -mandoc ;; esac + +regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$ + Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff -c -Tlatin1 -mandoc ;; esac + +regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$ + Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff -c -Tlatin1 -mandoc ;; esac + +regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.xz$ + Open=case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac | %var{PAGER:more} + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) xz -dc %f ;; *) xz -dc %f | nroff -c -Tlatin1 -mandoc ;; esac + +# CHM +regex/\.(chm|CHM)$ + Open=which kchmviewer > /dev/null 2>&1 && (kchmviewer %f &) || (xchm %f &) + +### Images ### + +type/^GIF + Include=image + +type/^JPEG + View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f 2>/dev/null + Include=image + +type/^PC\ bitmap + Include=image + +type/^PNG + Include=image + +#type/^TIFF +# Include=image + +type/^PBM + Include=image + +type/^PGM + Include=image + +type/^PPM + Include=image + +type/^Netpbm + Include=image + +shell/.xcf + Open=(gimp %f &) + +shell/.xbm + Open=bitmap %f + +shell/.xpm + Include=image + View=sxpm %f + +shell/.ico + Include=image + +include/image + Open=(see %f &) + View=%view{ascii} identify %f + #View=%view{ascii} asciiview %f + + +### Sound files ### + +#regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$ +# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi +# +#regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$ +# Open=mikmod %f +# #Open=tracker %f +# +#regex/\.([wW][aA][wW]22)$ +# Open=vplay -s 22 %f +# +#regex/\.([mM][pP]3)$ +# Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi +# View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p' +# +#regex/\.([oO][gG][gG|aA|vV|xX])$ +# Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi +# View=%view{ascii} ogginfo %s +# +#regex/\.([sS][pP][xX]|[fF][lL][aA][cC])$ +# Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi +# +#regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$ +# Open=timidity %f +# +#regex/\.([wW][mM][aA])$ +# Open=mplayer -vo null %f +# View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f + + +### Play lists ### + +#regex/\.([mM]3[uU]|[pP][lL][sS])$ +# Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi + + +### Video ### + +regex/\.([aA][vV][iI])$ + Include=video + +regex/\.([aA][sS][fFxX])$ + Include=video + +regex/\.([dD][iI][vV][xX])$ + Include=video + +regex/\.([mM][kK][vV])$ + Include=video + +regex/\.([mM][oO][vV]|[qQ][tT])$ + Include=video + +regex/\.([mM][pP]4|[mM]4[vV]|[mM][pP][eE]?[gG])$ + Include=video + +# MPEG-2 TS container + H.264 codec +regex/\.([mM][tT][sS])$ + Include=video + +regex/\.([tT][sS])$ + Include=video + +regex/\.([vV][oO][bB])$ + Include=video + +regex/\.([wW][mM][vV])$ + Include=video + +regex/\.([fF][lL][iIcCvV])$ + Include=video + +regex/\.([oO][gG][mM])$ + Include=video + +regex/\.([rR][aA]?[mM])$ + Open=(realplay %f >/dev/null 2>&1 &) + +#include/video + Open=(mplayer %f >/dev/null 2>&1 &) + #Open=(gtv %f >/dev/null 2>&1 &) + #Open=(xanim %f >/dev/null 2>&1 &) + + +### Documents ### + +# Postscript +type/^PostScript + Open=(gv %f &) + View=%view{ascii} ps2ascii %f + +# PDF +type/^PDF + Open=(see %f &) + #Open=(acroread %f &) + #Open=(ghostview %f &) + View=%view{ascii} pdftotext %f - + +# The following code very ugly and should not be taken as example. +# It should be cleaned up when the new format of mc.ext is developed. + +# html +regex/\.([hH][tT][mM][lL]?)$ + Open=(if test -n "" && test -n "$DISPLAY"; then ( file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null + View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f + +# StarOffice 5.2 +shell/.sdw + Open=(libreoffice %f &) + +# StarOffice 6 and OpenOffice.org formats +regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$ + Open=(libreoffice %f &) + View=%view{ascii} odt2txt %f + +# AbiWord +shell/.abw + Open=(abiword %f &) + +# Microsoft Word Document +regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$ + Open=(abiword %f >/dev/null 2>&1 &) + View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f +type/^Microsoft\ Word + Open=(abiword %f >/dev/null 2>&1 &) + View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f + +# RTF document +#regex/\.([rR][tT][fF])$ +# Open=(abiword %f >/dev/null 2>&1 &) + +# Microsoft Excel Worksheet +regex/\.([xX][lL][sSwW])$ + Open=(gnumeric %f >/dev/null 2>&1 &) + View=%view{ascii} xls2csv %f || strings %f +type/^Microsoft\ Excel + Open=(gnumeric %f >/dev/null 2>&1 &) + View=%view{ascii} xls2csv %f || strings %f + +# Use OpenOffice.org to open any MS Office documents +type/^Microsoft\ Office\ Document + Open=(libreoffice %f &) + +# Framemaker +type/^FrameMaker + Open=fmclient -f %f + +# DVI +regex/\.([dD][vV][iI])$ + Open=run-mailcap %f 2>&1 & + View=%view{ascii} catdvi %f + +# TeX +regex/\.([Tt][Ee][Xx])$ + Include=editor + +# DjVu +regex/\.(djvu?|DJVU?)$ + Open=djview %f & + View=%view{ascii} djvused -e print-pure-txt %f + +### Miscellaneous ### + +# Makefile +regex/[Mm]akefile$ + Open=make -f %f %{Enter parameters} + +# Imakefile +shell/Imakefile + Open=xmkmf -a + +# Makefile.PL (MakeMaker) +regex/^Makefile.(PL|pl)$ + Open=%var{PERL:perl} %f + +# dbf +regex/\.([dD][bB][fF])$ + Open=%view{ascii} dbview %f + View=%view{ascii} dbview -b %f + +# REXX script +regex/\.(rexx?|cmd)$ + Open=rexx %f %{Enter parameters};echo "Press ENTER";read y + +# Disk images for Commodore computers (VIC20, C64, C128) +regex/\.(d64|D64)$ + Open=%cd %p/uc1541:// + View=%view{ascii} c1541 %f -list + Extract=c1541 %f -extract + +# Glade, a user interface designer for GTK+ and GNOME +regex/\.([Gg][Ll][Aa][Dd][Ee])$ + Open=if glade-3 --version >/dev/null 2>&1; then (glade-3 %f >/dev/null 2>&1 &); else (glade-2 %f >/dev/null 2>&1 &); fi + +# Gettext Catalogs +shell/.mo + View=%view{ascii} msgunfmt %f || cat %f + +# lyx +regex/\.(lyx|LYX)$ + Open=lyx %f + View=%view{ascii} lyxcat %f + +# torrent +#regex/\.([tT][oO][rR][rR][eE][nN][tT])$ +# View=%view{ascii} ctorrent -x %f 2>/dev/null + +### Plain compressed files ### + +# ace +regex/\.(ace|ACE)$ + Open=%cd %p/uace:// + View=%view{ascii} unace l %f + Extract=unace x %f + +# arc +regex/\.(arc|ARC)$ + Open=%cd %p/uarc:// + View=%view{ascii} arc l %f + Extract=arc x %f '*' + Extract (with flags)=I=%{Enter any Arc flags:}; if test -n "$I"; then arc x $I %f; fi + +# zip +type/^([Zz][Ii][Pp])\ archive + Open=%cd %p/uzip:// + View=%view{ascii} unzip -v %f + +# zoo +regex/\.([Zz][Oo][Oo])$ + Open=%cd %p/uzoo:// + View=%view{ascii} zoo l %f + +# gzip +type/^gzip + Open=gzip -dc %f | %var{PAGER:more} + View=%view{ascii} gzip -dc %f 2>/dev/null + +regex/\.(gz|Z)$ + View=%view{ascii} gzip -dc %f 2>/dev/null + +# bzip2 +type/^bzip2 + Open=bzip2 -dc %f | %var{PAGER:more} + View=%view{ascii} bzip2 -dc %f 2>/dev/null + +regex/\.bz2?$ + View=%view{ascii} bzip2 -dc %f 2>/dev/null + +# bzip +type/^bzip + Open=bzip -dc %f | %var{PAGER:more} + View=%view{ascii} bzip -dc %f 2>/dev/null + +# compress +type/^compress + Open=gzip -dc %f | %var{PAGER:more} + View=%view{ascii} gzip -dc %f 2>/dev/null + +# lzma +regex/\.lzma$ + Open=lzma -dc %f | %var{PAGER:more} + View=%view{ascii} lzma -dc %f 2>/dev/null + +# xz +regex/\.xz$ + Open=xz -dc %f | %var{PAGER:more} + View=%view{ascii} xz -dc %f 2>/dev/null + +### phd + +type/^Berkeley\ DB\ 1.85 + View=%view{ascii} db_dump185 -p %f + +# Compiled HTML +shell/.chm + Open=fbreader %f & + +# DejaVu +shell/.djvu + #Open=djview %f & + Open=evince %f & + +# EPUB +shell/.epub + Open=fbreader %f & + +# FB2 +shell/.fb2 + Open=fbreader %f & + View=%view{ascii} xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl %f + +# RTF +regex/\.([rR][tT][fF])$ + Open=fbreader %f & + View=%view{ascii} catdoc %f + +# ftplist +regex/\.ftplist$ + Open=%cd %p#ftplist + +# Play list +regex/\.([mM]3[uU]|[pP][lL][sS])$ + Include=audio + +# Lossless audio +regex/\.(cue|aac|ac3|ape|flac|wv|mka)$ + Include=audio + +# Object +shell/.o + View=%view{ascii} nm %f + Disassemble=%view{ascii} objdump -d -r %f + +# Python +shell/.py + Open=python %f + View=%view{ascii} + Compile=compyle %s + Icon=snake.xpm + +regex/\.(tif|TIF|tiff|TIFF)$ + Open=xview %f + +shell/.torrent + Open=%cd %p/torrent:// + +regex/\.([xX][mM][lL])$ + Include=xml + +type/^XML *(1\.0 *)?document text + Include=xml + +include/audio + #Open=[ "`audtool --get-volume`" -eq 0 ] && (audacious & sleep 3); audtool --playlist-clear --playlist-addurl %f --playback-play + #Open=smplay %f & + Open=deadbeef %f & + #Open=mediaplayer_open %f + View=%view{ascii} %f + +include/video + Open=smplay %f & + #Open=mediaplayer_open %f + View=%view{ascii} %f + +include/xml + Open=%cd %p/xml:// + +### Default ### + +# Default target for anything not described above +default/* + Open= + View= + + +### EOF ### diff --git a/.mc/menu b/.mc/menu new file mode 100644 index 0000000..4b2944f --- /dev/null +++ b/.mc/menu @@ -0,0 +1,376 @@ +shell_patterns=0 + +# This is necessary to overcome a bug in mc - without this +# mc makes default wrong item +N NOOP + : + +@ Do something on all of the file(s) at once + CMD=%{Enter command} + exec $CMD %s + ++ t t +@ Do something on the tagged files one by one + CMD=%{Enter command} + for f in %t; do + $CMD "$f" + done + ++ t r +p View the file in the pager + exec $PAGER %f + ++ t r +b View the file in a browser + exec webbrowser file://%d/%f + ++ t r +w View the file in a new browser window + exec webbrowser -n file://%d/%f + ++ t r += f \.(htm(l?)|txt)$ +t View the file in a new browser tab + exec webbrowser -t file://%d/%f + ++= f \.fb2(\.bz2|\.gz|\.zip)?$ | f \.(chm|epub|htm(l?)|txt|rtf)$ & t r +f FBReader + fbreader %f & + ++ t r & f \.fb2(\.bz2|\.gz|\.zip)$ +H fb2html + case %f in + *.fb2.bz2) A="bunzip2 -c" ;; + *.fb2.gz) A="gunzip -c" ;; + *.fb2.zip) A="unzip -p" ;; + *.fb2) A="cat" ;; + esac + $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_html_ru.xsl - | webstdin -t + ++ t r & f \.fb2(\.bz2|\.gz|\.zip)$ +T fb2txt + case %f in + *.fb2.bz2) A="bunzip2 -c" ;; + *.fb2.gz) A="gunzip -c" ;; + *.fb2.zip) A="unzip -p" ;; + *.fb2) A="cat" ;; + esac + $A %f | xsltproc /usr/local/src/FictionBook/FB2_2_txt_ru.xsl - | webstdin -e txt -t + ++= t r & f \.(pdf|PDF|djvu)(\.bz2|\.gz)?$ +e evince + evince %f & + ++= t r & f \.(doc|DOC|rtf)$ +d catdoc + catdoc %f | less + ++= t r & f \.(xls|XLS)$ +x xls2csv + xls2csv %f | less + ++ t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$ | t t += t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$ +i View image(s) scaled + xli -zoom auto %s & + ++ t r & f \.(bmp|BMP|gif|GIF|jpg|JPG|jpeg|JPEG|png|PNG|xpm)$ | t t +I View image(s) full size + xli %s & + ++ t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ | t t += t r & f \.(ico|jp2|tif|TIF|tiff|TIFF)$ +I View icon, JPEG-2000 or TIFF image + display %s & + ++ t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|pls|wv)$ | t t +a Add the audiofile(s) or playlist(s) + #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi + #for f in %s; do + # audtool --playlist-addurl "$f" + #done + #smplayer -add-to-playlist %s & + deadbeef --queue %s & + ++ t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|pls|wv)$ | t t += t r & f \.(m3u|mp3|MP3|cue|ac3|ape|flac|wv)$ +p Load the audiofile(s) or playlist(s) + #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi + #audtool --playlist-clear + #for f in %s; do + # audtool --playlist-addurl "$f" + #done + #smplayer -send-action pl_remove_all + #smplayer -add-to-playlist %s & + deadbeef --queue %s & + ++ t r & f \.(aac|ac3|ape|cue|flac|m3u|mka|mp3|MP3|pls|wv)$ | t t +P Play the audiofile(s) or playlist(s) + #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi + #audtool --playlist-clear + #for f in %s; do + # audtool --playlist-addurl "$f" + #done + #exec audtool --playback-play + #mplayer -playlist %f & + #smplayer %s & + deadbeef %s & + #exec mediaplayer_open %f + ++ t r & f \.m3u +R Play the playlist in random order + "$HOME"/lib/audio/shuffle-playlist.py %f random-playlist-tmp.m3u + #if [ "`audtool --get-volume`" -eq 0 ]; then cgmem_nice 500 audacious & sleep 3; fi + #audtool --playlist-clear + #audtool --playlist-addurl random-playlist-tmp.m3u + #audtool --playback-play + #mplayer -playlist random-playlist-tmp.m3u & + #smplayer random-playlist-tmp.m3u & + #smplayer -actions pl_shuffle %f & + deadbeef --queue random-playlist-tmp.m3u & deadbeef --play + #mediaplayer_open random-playlist-tmp.m3u + (sleep 5; exec rm random-playlist-tmp.m3u) & + ++ f \.(aac|ac3|ape|cue|flac|m3u|mp3|MP3|pls|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wmv)$ | t d | t t += t r & f \.(aac|ac3|ape|cue|flac|m3u|mp3|MP3|pls|wv|avi|AVI|flv|iso|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wmv)$ +s Play audio/video file(s) or directory with smplayer + smplayer %s & + ++= t d & f (video_ts|VIDEO_TS)$ +c Play the current directory with smplayer + smplayer . & + ++ t r & f \.(m3u|mp3|MP3|cue|aac|ac3|ape|flac|pls|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wmv)$ | t t +i Audio/video info + exec mplayer -msglevel identify=6 -frames 0 %s + ++ t d & f (video_ts|VIDEO_TS)$ +i DVD info + exec mplayer -dvd-device . dvd:// -msglevel identify=6 -frames 0 + ++ f \.(avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wmv)$ | t t +m Play video file(s) with mplayer + mplayer %s & + ++ f \.(m3u|mp3|MP3|cue|aac|ac3|ape|flac|pls|wv|avi|AVI|flv|m2ts|m4v|mka|mkv|MKV|mov|MOV|mp4|MP4|mpg|MPG|vob|VOB|wmv)$ | t t +M Play audio/video with gmplayer + gmplayer %s & + ++ t d & f (video_ts|VIDEO_TS)$ +d Play DVD directory with mplayer + mplayer -dvd-device . dvd:// & + ++ t d & f (video_ts|VIDEO_TS)$ +D Play DVD directory with gmplayer + gmplayer -dvd-device . dvd:// & + ++ t d & f (video_ts|VIDEO_TS)$ +t Play DVD title with mplayer + title=%{Enter title} + mplayer -dvd-device . dvd://"$title" & + ++ t d & f (video_ts|VIDEO_TS)$ +T Play DVD title with gmplayer + title=%{Enter title} + gmplayer -dvd-device . dvd://"$title" & + ++ t d +p Play directory with mplayer + mplayer %f/* & + ++ t d +P Play directory with gmplayer + gmplayer %f/* & + ++ t d & f ^\.\.$ +b Make a .tar.bz2 release of the current directory + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read tar + if [ "$tar"x = x ]; then tar="$Pwd"; fi + cd .. && tar cvf - "$Pwd" | bzip2 -f9 > "$tar".tar.bz2 + echo ../"$tar".tar.bz2 created. + ++ t d & f ^\.\.$ +g Make a .tar.gz release of the current directory + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read tar + if [ "$tar"x = x ]; then tar="$Pwd"; fi + cd .. && tar cvf - "$Pwd" | gzip -f9 > "$tar".tar.gz + echo ../"$tar".tar.gz created. + ++ t d & f ^\.\.$ +t Make a .tar release of the current directory + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read tar + if [ "$tar"x = x ]; then tar="$Pwd"; fi + cd .. && tar cvf - "$Pwd" > "$tar".tar + echo ../"$tar".tar created. + ++ t d & f ^\.\.$ +z Make a .zip release of the current directory + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read zip + if [ "$zip"x = x ]; then zip="$Pwd"; fi + cd .. && zip -r9 "$zip".zip "$Pwd" + echo ../"$zip".zip created. + ++ t d & f ^\.\.$ +y Make a .zip release of the current directory with recoded filenames + Pwd="`basename %d /`" + echo -n "Name of the distribution file (without extension) [$Pwd]: " + read zip + if [ "$zip"x = x ]; then zip="$Pwd"; fi + cd .. && zip.py "$zip".zip "$Pwd" + echo ../"$zip".zip created. + ++ ! f \.(\.|zip|ZIP)$ +z zip the file/directory + exec zip -r9 %f.zip %f + ++ ! f \.(\.|zip|ZIP)$ +y zip the file/directory with recoded filename(s) + exec zip.py %f.zip %f + ++ t t +Z zip these files/directories + ZIP=%{Enter zip name} + exec zip -r9 "$ZIP" %s + ++ t t +Y zip these files/directories with recoded filenames + ZIP=%{Enter zip name} + exec zip.py "$ZIP" %s + ++ t r & f \.tar\.bz2$ +u Extract from tar-bzip2 + exec bzip2 -cd %f | tar xpvf - + ++ f \.tar\.gz$ | f \.tgz$ & t r +u Extract from tar-gzip + exec gzip -cd %f | tar xpvf - + ++ t r & f \.tar$ +u Extract from tar + exec tar xpvf %f + ++ t r & f \.(zip|ZIP)$ +u Extract from zip + exec unzip %f + ++ t r & f \.(zip|ZIP)$ +y Extract from zip with recoded filenames + exec unzip.py %f + ++ t r & f \.7z$ +u Extract from 7zip + exec 7zr x %f + ++ t r & f \.(rar|RAR)$ +u Extract from rar + exec unrar x -y %f + ++ t r & f \.tar\.xz$ +u Extract from tar-xz + exec xz -cd %f | tar xpvf - + ++ T r & F \.tar\.bz2$ +U Extract from the other tar-bzip2 + exec bzip2 -cd %D/%F | tar xpvf - + ++ F \.tar\.gz$ | F \.tgz$ & T r +U Extract from the other tar-gzip + exec gzip -cd %D/%F | tar xpvf - + ++ T r & F \.tar$ +U Extract from the other tar + exec tar xpvf %D/%F + ++ T r & F \.(zip|ZIP)$ +U Extract from the other zip + exec unzip %D/%F + ++ T r & F \.(zip|ZIP)$ +Y Extract from the other zip with recoded filenames + exec unzip.py %D/%F + ++ T r & F \.(rar|RAR)$ +U Extract from the other rar + exec unrar x -y %D/%F + ++ T r & F \.7z$ +U Extract from 7zip + exec 7zr x %D/%F + ++ T r & F \.tar\.xz$ +U Extract from tar-xz + exec xz -cd %D/%F | tar xpvf - + ++ f \.tar\.bz2$ | f \.tar\.gz$ | f \.tgz$ | f \.(zip|ZIP)$ | f \.(rar|RAR)$ | f \.7z$ & t r +n Create a directory for this archive + case %f in + *.tar.bz2) D="`basename %f .tar.bz2`";; + *.tar.gz) D="`basename %f .tar.gz`";; + *.tgz) D="`basename %f .tgz`";; + *.zip) D="`basename %f .zip`";; + *.ZIP) D="`basename %f .ZIP`";; + *.rar) D="`basename %f .rar`";; + *.RAR) D="`basename %f .RAR`";; + *.7z) D="`basename %f .7z`";; + esac + exec mkdir "$D" + ++ t r +v View via mailcap + exec see %f + ++ t r +c Compare the file + exec cmp %D/%f %f + ++ t r & T r +C Compare these files + exec cmp %D/%F %f + ++ t r +d Diff the file + exec diff -u --speed-large-files %D/%f %f + ++ t r & T r +D Diff these files + exec diff -u --speed-large-files %D/%F %f + ++ t r +v vimdiff the file + exec vim -d %D/%f %f + ++ t r & T r +V vimdiff these files + exec vim -d %D/%F %f + ++ t d & ! f ^\.\.$ +d Diff the directory + exec diff -ru --speed-large-files %D/%f %f + ++ t d & T d & ! F ^\.\.$ +D Diff these directories + exec diff -ru --speed-large-files %D/%F %f + ++= f \.(asc|sig(n)?)$ & t r +v Verify signature + exec gpg --verify %f + ++= f \.[1-8]$ | f \.man$ & t r +1 Display the file with roff -man + %view nroff -man %f + +m View a manual page + MAN=%{Enter manual name} + %view man -P cat $MAN + ++ t r | t d | t t +r rsync the file(s) there + rsync -ahP --del %s %D diff --git a/.mc/panels.ini b/.mc/panels.ini new file mode 100644 index 0000000..2879d3f --- /dev/null +++ b/.mc/panels.ini @@ -0,0 +1,34 @@ + +[Dirs] +current_is_left=0 +other_dir=.. + +[New Left Panel] +case_sensitive=1 +display=listing +exec_first=0 +list_mode=full +panel_display_codepage=Other_8_bit +reverse=0 +sort_order=name +user_format=half type name | size | perm +user_mini_status=1 +user_status0=half type name | size | perm +user_status1=half type name | size | perm +user_status2=half type name | size | perm +user_status3=half type name | size | perm + +[New Right Panel] +case_sensitive=1 +display=listing +exec_first=0 +list_mode=full +panel_display_codepage=Other_8_bit +reverse=0 +sort_order=name +user_format=half type name | size | perm +user_mini_status=1 +user_status0=half type name | size | perm +user_status1=half type name | size | perm +user_status2=half type name | size | perm +user_status3=half type name | size | perm diff --git a/.mc/skins/black.ini b/.mc/skins/black.ini new file mode 100644 index 0000000..16c34e0 --- /dev/null +++ b/.mc/skins/black.ini @@ -0,0 +1,74 @@ +[skin] + description=Monochrome gray-on-black skin, similar to mc -b + +[Lines] + lefttop=╔ + righttop=╗ + centertop=╤ + centerbottom=╧ + leftbottom=╚ + rightbottom=╝ + leftmiddle=╟ + rightmiddle=╢ + centermiddle=┼ + horiz=═ + vert=║ + thinhoriz=─ + thinvert=│ + +[core] + _default_=lightgray;black + selected=black;lightgray + marked=white;black + markselect=white;lightgray + gauge=white;black + input=lightgray;black + reverse=black;lightgray + +[dialog] + _default_=black;lightgray + dfocus=white;black + dhotnormal=white;black + dhotfocus=white;black + +[error] + _default_=white;black + errdhotnormal=white;black + errdhotfocus=white;black + +[filehighlight] + _default_=lightgray;black + +[menu] + _default_=black;lightgray + menuhot=white;black + menusel=lightgray;black + menuhotsel=black;white + menuinactive=black;lightgray + +[buttonbar] + hotkey=lightgray;black + button=black;lightgray + +[help] + _default_=black;lightgray + helpitalic=white;lightgray + helpbold=white;lightgray + helplink=black;lightgray + helpslink=white;black + +[editor] + _default=lightgray;black + editbold=white;black + editmarked=black;white + editwhitespace=white;black + editlinestate= + bookmark=white; + bookmarkfound=black; + +[viewer] + viewunderline=white;black + +[widget-common] + sort-sign-up = ' + sort-sign-down = , diff --git a/.mc/skins/grey.ini b/.mc/skins/grey.ini new file mode 100644 index 0000000..a9d6ff8 --- /dev/null +++ b/.mc/skins/grey.ini @@ -0,0 +1,74 @@ +[skin] + description=Monochrome black-on-gray skin, similar to mc -b + +[Lines] + lefttop=┌ + righttop=┐ + centertop=─ + centerbottom=─ + leftbottom=└ + rightbottom=┘ + leftmiddle=├ + rightmiddle=┤ + centermiddle=┼ + horiz=─ + vert=│ + thinhoriz=─ + thinvert=│ + +[core] + _default_=black;lightgray + selected=lightgray;black + marked=white;lightgray + markselect=white;black + gauge=white;black + input=white;black + reverse=white;black + +[dialog] + _default_=black;lightgray + dfocus=white;black + dhotnormal=white;black + dhotfocus=white;black + +[error] + _default_=white;black + errdhotnormal=black;lightgray + errdhotfocus=black;lightgray + +[filehighlight] + _default_=black;lightgray + +[menu] + _default_=black;lightgray + menuhot=white;black + menusel=white;black + menuhotsel=white;black + menuinactive=black;lightgray + +[buttonbar] + hotkey=lightgray;black + button=black;lightgray + +[help] + _default_=black;lightgray + helpitalic=white;lightgray + helpbold=white;lightgray + helplink=black;lightgray + helpslink=white;black + +[editor] + _default_=black;lightgray + editbold=white;lightgray + editmarked=black;lightgray + editwhitespace=white;lightgray + editlinestate=white;black + bookmark=white;red + bookmarkfound=black;green + +[viewer] + viewunderline=white;lightgray + +[widget-common] + sort-sign-up = ' + sort-sign-down = , diff --git a/.mime.types b/.mime.types new file mode 100644 index 0000000..bf28200 --- /dev/null +++ b/.mime.types @@ -0,0 +1,476 @@ +# File extension -> MIME type map. +# MIME type Extension + +application/activexdocument vbd +application/andrew-inset ez +application/applefile +application/astound asd asn asz +application/atomicmail +application/batch-SMTP +application/beep+xml +application/cprplayer pqi +application/datawindow psr +application/dca-rft +application/dec-dx +application/dsptype tsp +application/dvcs +application/fastman lcc +application/fml fml ofml +application/font-tdpfr pfr # TrueDoc Portable Font Resource +application/freeloader frl +application/ghostview +application/hep hep # Hummingbird Host Explorer Profiles +application/http +application/hyperstudio stk +application/listenup ptlk +application/lit lit +application/lotus-123 123 wk wks # Lotus 123 +application/mac-binhex40 hqx # Macintosh binhexed archives +application/mathematica nb +application/mbedlet mbd +application/mirage mfp +application/msm msm +application/msword doc dot # Microsoft Word +application/n2p n2p +application/octet-stream ani bat com exe dll cur dbf sjf # Binary File +application/octet-stream-bin seq +application/oda oda +application/olescript axs +application/pagemaker pm5 pt5 # PageMaker +application/parityfec +application/pcphoto zpa +application/pdf pdf # Adobe Acrobat +application/pkcs10 +application/pkcs7-mime +application/pkcs7-signature +application/pkix-cert +application/pkix-crl +application/pkixcmp +application/postscript ai eps ps # Postscript File +application/presentations shw +application/quest qrt +application/remote-printing +application/riscos +application/rtc rtc +application/sgml-open-catalog cat +application/sieve +application/slate +application/smil smi smil sml +application/studiom smp +application/tajima dst +application/talker talk +application/timbuktu tbt +application/toolbook tbk # Toolbook +application/vemmi +application/vnd.cups-postscript +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.hp-HPGL +application/vnd.hp-PCL pcl +application/vnd.hp-PCLXL +application/vnd.mif mi mif +application/vnd.mozilla.xul+xml +application/vnd.ms-access mda mdb mde mdf # MS Access +application/vnd.ms-excel xla xlb xlc xlm xls xlt xlw # Microsoft Excel +application/vnd.ms-powerpoint pot pps ppt ppz # Microsoft PowerPoint Slideshow +application/vnd.ms-project mpc mpt mpx mpw mpp # MS Project +application/vnd.ms-tnef +application/vnd.ms-works +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.palm +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.stardivision.calc sdc +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd +application/vnd.stardivision.impress sdd sdp +application/vnd.stardivision.impress-packed sdp +application/vnd.stardivision.mail smd +application/vnd.stardivision.math smf +application/vnd.stardivision.math smf +application/vnd.stardivision.writer sdw vor +application/vnd.stardivision.writer sdw vor +application/vnd.stardivision.writer-global sgl +application/vnd.stardivision.writer-global sgl +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.svd +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vocaltec-media-desc vmd +application/vocaltec-media-file vmf +application/vpa vpa +application/wordperfect wp # WordPerfect +application/wordperfect5.1 wp5 # WordPerfect Version 5.1 +application/wordperfect6.1 wp6 # WordPerfect Version 6.1 +application/wordperfectd wpd # WordPerfect +application/x-CorelXARA web xar +application/x-DemoShield wid +application/x-InstallFromTheWeb rrf +application/x-InstallShield wis +application/x-NET-Install ins +application/x-Parable-Thing tmv +application/x-applix aw +application/x-arj arj +application/x-asap asp +application/x-authorware-bin aab +application/x-authorware-map aam aas +application/x-autocad dwg dxf svf +application/x-bcpio bcpio +application/x-bzip2 bz2 +application/x-cdlink vcd +application/x-chat chat +application/x-chess-pgn pgn +application/x-chm chm +application/x-cnc cnc +application/x-coda coda page +application/x-compress Z +application/x-connector con +application/x-core +application/x-cpio cpio +application/x-cprplayer pqf +application/x-crossword puz +application/x-csh csh # C-Shell Program +application/x-cu-seeme cu csm +application/x-cult3d-object co +application/x-debian-package deb +application/x-director dcr dir dxr swa # Director File +application/x-dms dms +application/x-doom wad +application/x-dreamcast-vms vms +application/x-dreamcast-vms-info vmi +application/x-dvi dvi # TeX dvi Format +application/x-dwf dwf # AutoCAD +application/x-earthtime etc +application/x-envoy evy +application/x-executable +application/x-expandedbook ebk +application/x-fb2 fb2 +application/x-fmr fmr +application/x-font pfa pfb gsf pcf pcf.Z ttf TTF # Font File +application/x-fr fr +application/x-futuresplash spl # Macromedia Flash +application/x-gnumeric gnumeric +application/x-gtar gtar taz tgz tar.gz tar.bz2 # Tar+GZip or BZip2 file +application/x-gzip gz +application/x-hdf hdf # NCSA HDF +application/x-hsp-erf erf +application/x-httpd-imap map +application/x-httpd-php php pht phtml +application/x-httpd-php-source phps +application/x-httpd-php3 php3 +application/x-httpd-php3-preprocessed php3p +application/x-httpd-php4 php4 +application/x-ica ica # WinFrames +application/x-icq uin +application/x-ipix ipx +application/x-ipscript ips +application/x-java-applet +application/x-java-archive jar +application/x-java-bean +application/x-java-jnlp-file jnlp +application/x-java-serialized-object ser +application/x-java-vm class +application/x-javascript js # Javascript +application/x-kchart chrt +application/x-kdelnk +application/x-killustrator kil +application/x-koan skd skm skp skt +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex # Latex File +application/x-lha lha +application/x-lzh lzh +application/x-lzx lzx +application/x-macbinary bin +application/x-maker book fb fbdoc fm frame frm maker +application/x-mocha moc mocha +application/x-mpire mpl mpire +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-msaddr adr +application/x-mscardfile crd +application/x-msi msi +application/x-msmediaview m13 m14 +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswallet wlt +application/x-mswrite wri +application/x-net120NM cnf +application/x-netcdf cdf nc +application/x-netfpx npx +application/x-nokia-9000-communicator-add-on-software aos +application/x-ns-proxy-autoconfig pac proxy +application/x-nschat nsc +application/x-object o +application/x-ogg ogg +application/x-oz-application oza +application/x-perl perl pl pm +application/x-pgp-plugin pgp +application/x-pkcs7-crl crl +application/x-quicktimeplayer qtl # Quicktime +application/x-redhat-package-manager rpm +application/x-rx +application/x-salsa slc +application/x-sh sh # Shell Program +application/x-shar shar +application/x-shockwave-flash swf swfl # Macromedia Shockwave file +application/x-sprite spr sprite +application/x-spss sav spp sbs sps spo # SPSS +application/x-stuffit sit # Macintosh Stuff-It +application/x-supercard sca +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar # Unix Tape Archive +application/x-tcl tcl tk # TCL Programming Language +application/x-tex tex ltx sty cls # Tex/LaTeX +application/x-tex-gf gf +application/x-tex-pk pk +application/x-texinfo texi texinfo # TexInfo +application/x-timbuktu tbp +application/x-tkined tki tkined +application/x-tlk tlk +application/x-trash ~ % bak old sik +application/x-troff roff t tr # Troff file +application/x-troff-man man # Troff with MAN macros +application/x-troff-me me # Troff with ME macros +application/x-troff-ms ms # Troff with MS macros +application/x-up-alert alt +application/x-up-cacheop che +application/x-ustar ustar # Ustar file +application/x-wais-source src # WAIS Sources +application/x-wingz wz +application/x-wordpro lwp +application/x-x509-ca-cert cacert crt +application/x-x509-email-cert ecert email +application/x-x509-server-cert scert servercert +application/x-x509-user-cert ucert usercert +application/x-xfig fig +application/x400-bp +application/xhtml+xml xhtml +application/xml xml +application/xml-dtd dtd +application/xml-external-parsed-entity +application/zip zip # ZIP Compressed File + +audio/basic au snd voc VOC # Audio Sound File +audio/echospeech es esl +audio/imelody imy +audio/mp4a-latm +audio/mpa-robust +audio/mpeg mp2 mpa mpega mpg mpga # MP2 Sound File +audio/mpeg3 mp3 # MP3 Sound File +audio/mpegurl m3u m3url # MP3 File List +audio/prs.sid sid +audio/tsplayer tsi +audio/voxware vox +audio/x-aiff aif aifc aiff faif # AIFF Sound File +audio/x-dspeech cht dus +audio/x-epac pae +audio/x-gsm gsm gsd +audio/x-midi kar mid midi # MIDI Sound File +audio/x-mod it m15 mod mtm s3m stm ult uni xm +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ra ram rm # RealAudio Sound File +audio/x-qt-stream stream +audio/x-rmf rmf +audio/x-scpls pls +audio/x-twinvq vqf vql +audio/x-twinvq-plugin vqe +audio/x-wav WAV wav # WAV Sound File +audio/x-wtx wtx + +image/bmp bmp +image/cgm cgm +image/cis-cod cod +image/cpi cpi +image/fif fif +image/g3fax +image/gif GIF gif # GIF image file +image/ief ief # Image Exchange +image/ifs ifs +image/jpeg JPEG JPG jpe jpeg jpg # JPG image file +image/naplps +image/pcx PCX pcx +image/png png # Portable Network Graphics +image/rip rip +image/svg+xml svg svgz +image/svh svh +image/tiff TIF TIFF tif tiff # TIFF image file +image/vasa mcf +image/vnd.nok-oplogo-color nokia-op-logo +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/wavelet wi +image/x-clp clp CLP +image/x-cmu-raster ras +image/x-cmx cmx +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-djvu djv djvu +image/x-emf emf EMF +image/x-etf etf +image/x-fpx fpx +image/x-freehand fh5 fh4 fhc +image/x-halo-cut cut +image/x-icon ico +image/x-iw44 iw4 iw44 +image/x-jng jng +image/x-jps jps +image/x-mgx-dsf dsf +image/x-photo-cd pcd +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-quicktime qti +image/x-rgb rgb # RGB Image File +image/x-rush uff +image/x-wmf wmf W32 MetaFile +image/x-xbitmap xbm # X-bitmap Image File +image/x-xpixmap xpm # X-pixmap Image File +image/x-xwindowdump xwd + +inode/blockdevice +inode/chardevice +inode/directory +inode/directory-locked +inode/fifo +inode/socket + +message/delivery-status +message/disposition-notification +message/external-body +message/http +message/news +message/partial +message/rfc822 +message/s-http + +multipart/alternative +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/form-data +multipart/header-set +multipart/mixed dig +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +multipart/x-mixed-replace push + +plugin/wanimate wan waf + +text/ccs ccs +text/comma-separated-values csv +text/css css # Cascading Style Sheet +text/directory +text/dss dss +text/enriched +text/html HTM HTML htm html # HTML Document +text/lsp lsp +text/mathml mml +text/parsnegar-document pgr +text/plain TXT asc cgi diff text txt # Plain Text File +text/rfc822-headers +text/richtext rtx # Rich Text File +text/rtf rtf # Rich Text Format +text/tab-separated-values tsv +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-crontab +text/x-csrc c +text/x-hdml hdml +text/x-java java +text/x-makefile +text/x-pascal p pas +text/x-server-parsed-html shtml +text/x-setext etx +text/x-sgml sgm sgml # SGML Document +text/x-speech spc +text/x-vcalendar vcs +text/x-vcard vcf +text/x-vmel mel +text/xml xml xsl +text/xml-external-parsed-entity + +urdu/urdu98 u98 + +video/animaflex afl +video/gl gl +video/isivideo fvi +video/mp4v-es +video/mpeg MPEG MPG mpe mpeg mpg # MPEG Movie File +video/quicktime mov qt # Quicktime Movie File +video/vnd.mpegurl mxu +video/vnd.vivo viv vivo +video/wavelet wv +video/x-anim anim anim5 anim3 anim7 +video/x-dl dl +video/x-flc flc +video/x-fli fli +video/x-iff iff +video/x-mng mng +video/x-mpeg2 +video/x-ms-asf asf asx # Windows Media File +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi vob # AVI Movie File +video/x-rad-screenplay avx +video/x-sgi-movie movi movie mv # SGI Movie File +video/x-sunvideo vcr +video/x-videogram vgm vgx xdr +video/x-videogram-plugin vgp + +workbook/formulaone vts vtts + +x-conference/x-cooltalk ice +x-world/x-3dmf 3dmf 3dm qd3d qd3 +x-world/x-svr svr +x-world/x-vrml vrm vrml wrl wrz +x-world/x-vrt vrt diff --git a/.muttrc b/.muttrc new file mode 100644 index 0000000..ab0edef --- /dev/null +++ b/.muttrc @@ -0,0 +1,372 @@ +# +# User configuration file for Mutt +# + +# Note: $folder should be set _before_ any other path vars where `+' or `=' +# is used because paths are expanded when parsed +# +#set folder=~/Mail # Where I keep my mailboxes; I am happy with this default + +# source aliases +source =mutt/aliases + +# All my addresses +alternates `awk '{s=s"|"$0} END {print substr(s,2)}' $HOME/mail/misc/.myemail` # All my addresses + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Mailboxes to watch for new mail +# +# mailboxes [ ... ] +# + +mailboxes ! =admin =block =bulk =spam `echo $HOME/mail/lists/* | sed s#$HOME/mail/#=#g` + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Settings +# + +#set indent_string='%v> ' # How to quote replied text + +# Settings for dumb slow term +set ascii_chars=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Use ASCII instead of ACS chars for threads +set arrow_cursor=`[ -n "$SLOWTERM" ] && echo yes || echo no` # Draw a simple cursor on slow terminals + +# Character set for my terminal +set charset=`case "$LC_CTYPE" in *UTF-8) echo utf-8 ;; *) echo koi8-r ;; esac` +set assumed_charset="us-ascii:utf-8:windows-1251:koi8-r" # Character sets for mail without a charset +set config_charset=koi8-r # Character set for this config file and alias files +set send_charset="us-ascii:iso-8859-1:koi8-r:windows-1251:utf-8" # Character sets for outgoing mail +charset-hook x-unknown koi8-r # Show unknow encoding as koi8-r +charset-hook windows-1251 cp1251 # Autoconvert windoze encoding + +set index_format="%4C %Z %{%b %d} %-15.15F (%4c) %s" # Somewhat different index format, which works nicely with mail lists. +set pager_format="%4C %Z %[%b %d] %-15.15F (%4l) %s %* ---(%P)---" # Mostly match index_format + +set sort=mailbox-order # Primary sorting method +#set sort=threads # Sort by threads,... +set sort_aux=date # ...then by date + +set sort_alias=unsorted +set sort_browser=alpha + +set history=1000 # Number of lines of history in memory +set history_file==tmp/.mutt-history +set save_history=1000 # Number of lines of history in file + +set read_inc=10 # Progress indicator when reading folders. +set write_inc=10 # Progress indicator when writing folders. + +set allow_8bit # Never do Q-P encoding on legal 8-bit chars +set abort_unmodified=no # Let me send empty messages +set alias_file==mutt/aliases # Where to store aliases +set beep=no # Never beep on errors +set collapse_unread=no # Do not collapse thread with unread messages +set confirmappend=no # Don't ask me if i want to append to mailboxes +set fast_reply # Skip initial prompts when replying if no autoedit +set forward_format="[Fwd: %s]" # Subject to use when forwarding messages +set help # Show the help lines +set ignore_list_reply_to # Ignore Reply-To headers pointing to mailing lists. +set include=yes # Always include a copy when replying. +set locale=`echo $LC_TIME` # Locale to format dates +set mail_check=30 # How often (in seconds) to poll for new mail +set mark_old=no # Distinguish between seen (but unread) and new messages +set mask="" # Show dot-files in the file browser +set menu_scroll # No implicit next-page/prev-page +set move=no # Do not move read messages to ~/mbox +set pager_context=1 # No. of lines of context to give when scrolling +set pager_index_lines=6 # How many index lines to show in the pager +set pager_stop # Don't move to the next message on next-page +set postponed==tmp/.mutt-postponed +set print=ask-no # Don't waste paper +set recall=no # When I say "compose", ask me whether I want to continue composing a postponed message. +set reply_regexp="^((re([\\[0-9\\]+])*|aw|ÎÁ):[ \t]*)+[ \t]*" # A regular expression to detect replies +set rfc2047_parameters # Sometimes, I get mails which use a bogus encoding for MIME parameters. Setting this shouldn't harm. +set sendmail_wait=5 # Wait 5 seconds before putting sendmail to the background. +set sig_dashes=no # Do not add "-- " before my sig - I already have it there +set status_on_top # I prefer the status bar on top +set suspend=no # Do not suspend on Ctrl+Z +set tilde # Indicate empty lines in the pager. +set tmpdir=~/tmp # Temporary files aren't stored in public places. +set use_domain=no # Don't qualify local addresses with $domain +set use_ipv6=no # Speed up DNS +set wait_key=no # Do not wait for a key after running external programs, pipes + +set xterm_set_titles +set xterm_title="%f: %?m?%m messages&no messages?%?n? N:%n?%?d? D:%d?%?b? [%b new mboxes]? [$USER@%h] mutt" +set xterm_icon="%f: %m%?n?:%n?%?d?/%d?%?b? [%b]? [$USER@%h] mutt" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# MIME settings +# + +alternative_order text/enriched text/plain text + +#auto_view text/html +#auto_view application/ms-tnef text/x-vcard +#auto_view application/x-gzip application/x-gunzip +#auto_view application/rtf +#set implicit_autoview # Use copiousoutput filters from mailcap for all types of attachments + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Header fields I don't normally want to see +# +ignore * # Ignore all lines by default + +# I do want to see these fields, though! +unignore date from to x-original-to reply-to mail-followup-to cc \ + newsgroups subject user-agent x-mailer x-url x-face + +# Default list of header fields to weed when displaying +# +#ignore "from " received content- mime-version status x-status message-id +#ignore sender references return-path lines + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify the order of the headers to appear when displaying a message +# +# hdr_order [ ... ] +# + +hdr_order date from to x-original-to reply-to mail-followup-to cc \ + newsgroups subject user-agent x-mailer x-url x-face + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# My special headers +# + +my_hdr X-Attribution: phd + +my_hdr X-Face: \"4chVP^f8\;3Bi>x\"ic0%DuP(ZLyn:\;kzQ1njs]5,GRZG<{<\\~\`|Shxi7|)d|8uO~HFRfyym\n\ + {[xs@OYG]2Q]0\#}0sjJp\`1^1+B6]A2+{9fW=S [ ... ] + +subscribe (python-(announce|dev|ideas)|.*-(list|sig))@python\.org \ + .*@moderators\.isc\.org .*@lists\.sourceforge\.net \ + (durus|quixote)-users@mems-exchange\.org pysqlite@lists\.initd\.org \ + .*@googlegroups\.com \ + mlug@unixcenter\.ru + +#lists + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Change settings based on mailbox +# +# folder-hook [!] +# +# is executed when opening a mailbox matching + +# Restore defaults +folder-hook .* "\ + my_hdr From: Oleg Broytman ; \ + my_hdr Reply-To: Oleg Broytman ; \ + my_hdr X-Url: http://phdru.name/; \ + set attribution='On %d, %f wrote:'; \ + set record==sent-mail; \ + set signature==signatures/phd@phdru.name" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Multiple spool mailboxes +# +# mbox-hook [!] +# +# Read mail in is moved to when is closed. + +#mbox-hook =mutt-users.in =mutt-users +#mbox-hook +TEST +inbox + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify default filename when saving messages +# +# save-hook [!] +# +# is provided as default when saving messages from + +#save-hook mutt- =mutt-mail +#save-hook aol\.com +spam + +save-hook .* =inbox + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Specify where to save composed messages +# +# fcc-hook [!] +# +# is recipient(s), is where to save a copy + +#fcc-hook joe +joe +#fcc-hook bob +bob + +#fcc-hook .* +sent + +fcc-hook .* =sent-mail + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Change settings based upon message recipient +# +# send-hook [!] +# +# is executed when sending mail to an address matching + +#send-hook mutt- 'set signature=~/.sigmutt; my_hdr From: Mutt User ' + +# Restore defaults +send-hook .* "\ + my_hdr From: Oleg Broytman ; \ + my_hdr Reply-To: Oleg Broytman ; \ + my_hdr X-Url: http://phdru.name/; \ + set attribution='On %d, %f wrote:'; \ + set signature==signatures/phd@phdru.name" + +send-hook "~L '@.*\.(r|s)u$'" "\ + my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + set attribution='÷ %{%a, %d %b %Y × %I:%M:%S%p %Z} %f ÎÁÐÉÓÁÌ:'; \ + set signature==signatures/phd@phdru.name-ru" + +send-hook "~L '@(mail|list|inbox|bk)\.ru'" "\ + my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + my_hdr X-Url: http://my.mail.ru/mail/phd; \ + set signature==signatures/phd@mail.ru" + +send-hook "~L '(@|\.)(((ya|yandex|narod)\.ru)|(yandex\.com)|yandex-team\.ru)$'" "\ + my_hdr From: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + my_hdr Reply-To: ïÌÅÇ âÒÏÊÔÍÁÎ ; \ + my_hdr X-Url: http://phd2.ya.ru/; \ + set signature==signatures/phd2@yandex.ru" + +send-hook ~u unmy_hdr Reply-To + +send-hook "~L python-announce-list@python\.org" "\ + set followup_to=no; \ + my_hdr Reply-To: python-list@python.org; \ + my_hdr Mail-Followup-To: phd@phdru.name, python-list@python.org" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Key bindings +# + +# Change Up/Down for pager +bind pager previous-line +bind pager next-line + +bind index,pager c copy-message +bind index,pager S decode-save + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Macros +# + +# Go to the first folder with unread messages +macro index C c\n +macro pager C qc\n + +# Move current message to inbox +macro index,pager S s!\n + +macro index,pager h ":auto_view text/html\n" +macro index,pager H ":unauto_view text/html\n" + +# Pipe spam +#macro index,pager z |"sa-learn --no-sync --ham\n" +#macro index,pager Z |"sa-learn --no-sync --spam\n" +macro index,pager s "q"|"spamassassin -d | ~/mail/bin/spamcop.py\nj" +macro index,pager z "q:set editor='vim -s ~/mail/misc/spamcop.vim'\nr:set editor=vim.sh\nqn" + +# Go to main mailbox +macro index H c!\n +macro pager H qc!\n + +# Go to python mailbox +macro index Y c=lists/python\n +macro pager Y qc=lists/python\n + +# Recode base64 to 8bit, html to plain text, mustdie-1251 to koi8-r, etc. +macro index,pager M "|mimedecode.py | less\n" +macro index,pager E ":set editor=mimedecode.sh\ne:set editor=vim.sh\n" + +# Convert X-Face header to an image and display it +macro index,pager f |"~/mail/bin/view-x-face\n" + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Colors +# + +# This is for an xterm with with grayish background + +# object foreground background regexp/pattern + +color normal default default +color hdrdefault black default + +color header magenta default ^(date|x-mailer|user-agent|x-operating-system): +color header blue default ^(from|to|cc|delivered-to|reply-to|mail-followup-to|x-attribution): +color header brightblack default ^subject: + +color quoted blue default +color quoted1 magenta default +color quoted2 red default +color quoted3 green default +color quoted4 cyan default +color quoted5 blue default +color quoted6 magenta default +color quoted7 red default +color quoted8 green default +color quoted9 cyan default +color quoted10 blue default + +color attachment white green +color error brightred default +color index brightblack default ~N +color indicator black cyan +color message blue default +color search black yellow +color signature magenta default +color status white blue +color underline blue default + +color markers brightblue default +color tilde blue default +color tree blue default + +# email +color body brightblue default [-a-Z_0-9.+]+@[-a-Z_0-9.]+ + +# URLs +color body brightblue default "(((https?|ftp|gopher|telnet)://|(mailto|file|news|about|ed2k|irc|sip|magnet):)[^' \t<>\"]+)[A-Za-z0-9/]" + +# Smilies (emoticons) +color body brightmagenta default " [;:]-*[dp(){}<>|\\/]| [(){}<>|\\/]-*[;:]" # :-) + +# Attributes when using a mono terminal +mono header underline ^Subject: +mono quoted bold + +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +# +# Encryption: GnuPG +# +source /usr/share/doc/mutt/examples/gpg.rc +set pgp_use_gpg_agent diff --git a/.my.cnf b/.my.cnf new file mode 100644 index 0000000..353a5fa --- /dev/null +++ b/.my.cnf @@ -0,0 +1,5 @@ +[mysql] +auto-rehash +default-character-set=utf8 +pager +prompt="\u@\d > " diff --git a/.pdbrc b/.pdbrc new file mode 100644 index 0000000..1bc8abf --- /dev/null +++ b/.pdbrc @@ -0,0 +1,11 @@ +# http://wiki.python.org/moin/PdbRcIdea + +# .pdbrc only allows for debugger commands; you cannot insert Python scripts. + +# To overcome this restriction, this .pdbrc executes pdbrc.py, +# which can contain arbitrary Python commands. + +# If pdbrc.py is missing, you get an error message (which doesn't hurt). + +import os +x = execfile(os.path.expanduser("~/lib/python/pdbrc.py")) diff --git a/.plan b/.plan new file mode 100644 index 0000000..90018f8 --- /dev/null +++ b/.plan @@ -0,0 +1,10 @@ +Home page: http://phdru.name/ +e-mail: phd@phdru.name, phd@mail.ru +Jabber: phd@phdru.name, phd@jabber.ru +SIP: phd@iptel.org, phd@sipnet.ru +ICQ: 39288223 +mobile phone: +7 (905) 704-20-85 +home phone: +7 (496 46) 3-40-83 +work phone: +7 (499) 248-5600 +PGP: 0x6E080B70B6287B03 + 0179 A9FA FE7B EB77 06FC E328 6E08 0B70 B628 7B03 diff --git a/.procmailrc b/.procmailrc new file mode 100644 index 0000000..7574f6d --- /dev/null +++ b/.procmailrc @@ -0,0 +1,419 @@ +# +# User configuration file for procmail +# + +# +# SET VARIABLES + +# Internal Variables + +SHELL=/bin/sh #Shell used to run procmail. Be sure this points to + #your system's copy of sh. DO NOT substitute a + #different shell unless you really know Unix + +LINEBUF=4096 #Needed to keep Procmail from choking on long + #"recipes", or instructions on what to do with + #particular kinds of email. + +PATH=$HOME/bin:$HOME/mail/bin:/bin:/usr/bin:/usr/local/bin + #Path for your programs -- this is probably best + #left alone. + +VERBOSE=off #Change this to "on" when you try a new recipe + #so that Procmail will log literally every step + #it takes. DO NOT LEAVE IT ON, though, because + #it creates huge logfiles. + +# Default Program & file locations + +MAILDIR=${HOME}/Mail #you'd better make sure this directory exists + +#ORGMAIL=/var/spool/mail/phd +#DEFAULT=${ORGMAIL} + +LOGFILE=${MAILDIR}/procmail.log #Logs message disposition. Recommended -- otherwise + #errors are emailed to you. :/ + +SENDMAIL=/usr/sbin/sendmail #useful for autoreply recipes. +FORMAIL=/usr/bin/formail #useful for autoreply recipes. + + +MYEMAIL=${HOME}/mail/misc/.myemail #Tells Procmail where your MYEMAIL + #file is located, a text file containing all the + #email addresses you use. + +ADMINFOLDER=${MAILDIR}/admin #for bounced mail, mail from root, + #postmaster, abuse, etc. + +BLOCKFOLDER=${MAILDIR}/block #for suspicious mail, but possibly not spam + +BULKFOLDER=${MAILDIR}/bulk #for bulk mail which appears legitimate, such + #as mail from mailing lists or mail sent using + #Bcc: + +SPAMFOLDER=${MAILDIR}/spam #change this to SPAMFOLDER=/dev/null + #to delete spam entirely. + +VIRUSFOLDER=/dev/null #Set this variable to /dev/null to delete + #all viruses. You don't want to take chances with a virus, + #and the false positive rate on the virus filters is near zero. + +# BEGIN RECIPES + + +# Create a backup cache of 2000 most recent messages in case of mistakes +:0 c +backup + + :0 ic + | cd backup && rm -f dummy `ls -t msg.* | sed -e 1,2000d` + +# Regenerate "From" lines to make sure they are valid +:0 fhw +| ${FORMAIL} -I "From " -a "From " + + +# *CLOSED (only subscribers can write)* MAILING LISTS +# No need to filter them for spam + +:0 +* ^List-Id: Moscow Linux User Group +lists/mlug + +:0 +* ^(From|To|Cc|Reply-To): .*((mlug@unixcenter\.ru)|@altlinux\.ru) +lists/mlug + +:0 +* ^(To|Cc|Reply-To|Resent-To|X-BeenThere): .*(-list@(python\.org|cwi\.nl)) +lists/python + +:0 +* ^Sender: python-list-admin@python\.org +lists/python + +:0 +* ^Newsgroups: .*comp\.lang\.python +lists/python + +:0 +* ^List-Id: Python core developers +lists/python + +:0 +* ^List-Id: "Python 3000 process, design, development" +lists/python + +:0 +* ^List-Id: Discussions of speculative Python language ideas.* +lists/python + +:0 +* ^Sender: "Email-SIG" +lists/python + +:0 +* ^Sender: mimelib-devel-admin@lists\.sourceforge\.net +lists/python + +:0 +* ^List-Id: Discussion of the Quixote Web development framework.* +lists/python + +:0 +* ^List-Id: Discussion of the Durus object database.* +lists/python + +:0 +* ^From: sitelist-bounces@lists\.sourceforge\.net +* ^To: sqlobject-discuss-owner@lists\.sourceforge\.net +* ^Subject: Uncaught bounce notification +${SPAMFOLDER} + +:0 +* ^From: sqlobject-cvs-bounces@lists\.sourceforge\.net +* ^To: sqlobject-cvs-owner@lists\.sourceforge\.net +* ^Subject: Auto-discard notification +${SPAMFOLDER} + +:0 +* ^List-Id: .+ +lists/python + +:0 +* ^To: "(\[sqlobject:bugs\] )|(Ticket [0-9]+)" <[0-9]+@bugs\.sqlobject\.p\.re\.sf\.net> +* ^Reply-To: "?(\\?\[sqlobject:bugs\\?\] )|(Ticket [0-9]+)"? <[0-9]+@bugs\.sqlobject\.p\.re\.sf\.net> +* ^Subject: (\[SQL-CVS\] )?\[sqlobject:bugs\] (Re: )?\#[0-9]+ +lists/python + +:0 +* ^Sender: ppa-qps-devel-admin@lists\.sourceforge\.net +lists/python + +:0 +* ^Sender: pysqlite-bounces@lists\.initd\.org +lists/python + +:0 +* ^List-Id: +lists/python + +:0 +* ^(To|Cc|Reply-To|Resent-To|Sender): .*(zope.*@zope\.(org|net|com))|(zip@eevolute\.com) +lists/zope + + +# Now filters + +# Klez +:0 B +* ^Content-Transfer-Encoding: base64 +* name( ?)=.*\.(com|exe|bat|scr|pif) +| ${FORMAIL} -A"X-Note: Klez" -A"X-Folder: Virus" >${VIRUSFOLDER} + +# Sobig.E +:0 HB +* ^Subject: Re: (Movie|Application)$ +* ^Content-Transfer-Encoding: base64 +* ^Content-Disposition: attachment; +* filename=.your_details\.zip +| ${FORMAIL} -A"X-Note: Sobig.E" -A"X-Folder: Virus" >${VIRUSFOLDER} + +# Sobig.F +:0 H +* ^Subject: .*(Thank you!|Your application|That movie|Approved|Details|My details|Your details|Wicked screensaver)$ +* ^X-MailScanner: Found to be clean$ +| ${FORMAIL} -A"X-Note: Sobig.F" -A"X-Folder: Virus" >${VIRUSFOLDER} + +# MyDoom/Novarg +:0 HB +* <50000 +* ^Subject: (test|hi|hello|Mail Delivery System|Mail Transaction Failed|Server Report|Status|Error|)$ +* ^Content-type: application/octet-stream; +* (file)?name="(document|readme|doc|text|file|data|test|message|body)\.(pif|scr|exe|cmd|bat|zip) +| ${FORMAIL} -A"X-Note: MyDoom" -A"X-Folder: Virus" >${VIRUSFOLDER} + +# Netsky +:0 +* > 20000 +* < 60000 +* ^Subject:[ ]*(hi|hello|read it immediately|\ +something for you|warning|information|stolen|fake|unknown) +* B ?? ^(anything ok\?|what does it mean?|ok|\ +i'm waiting|read the details\.|here is the document\.|\ +read it immediately\!|my hero|\ +here|is that true?|is that your name?|is that your account?|\ +i wait for a reply\!|is that from you?|you are a bad writer|\ +I have your password\!|something about you\!|\ +kill the writer of this document\!|i hope it is not true\!|\ +your name is wrong|i found this document about you|\ +yes, really\?|that is bad|here it is|see you|\ +greetings|stuff about you\?|something is going wrong!|\ +information about you|about me|from the chatter|\ +here, the serials|here, the introduction|here, the cheats|\ +that's funny|do you\?|reply|take it easy|why\?|\ +thats wrong|misc|you earn money|you feel the same|\ +you try to steal|you are bad|something is going wrong|\ +something is fool)$ +* B ?? ^(Content-Disposition:[ ]*attachment;)?[ ]*(file)?name="?(document|msg|doc|talk|message|creditcard|\ +details|attachment|me|stuff|posting|textfile|concert|\ +information|note|bill|swimmingpool|product|\ +topseller|ps|shower|aboutyou|nomoney| found|\ +story|mails|website|friend|jokes|location|\ +final|release|dinner|ranking|object|mail2|part2|\ +disco|party|misc)\..*(zip|exe|scr|com|pif)"?$ +| ${FORMAIL} -A"X-Note: Netsky" -A"X-Folder: Virus" >${VIRUSFOLDER} + +# Bagle.J +:0 +* ^Subject:(.*E-mail account disabling warning)|\ + (.*E-mail account security warning)|\ + (.*Email account utilization warning)|\ + (.*Important notify about your e-mail account)|\ + (.*Notify about using the e-mail account)|\ + (.*Notify about your e-mail account utilization)|\ + (.*Warning about your e-mail account) +* B ?? ^Content-Type: application/octet-stream; +* B ?? ^Content-Transfer-Encoding: base64 +* B ?? ^Content-Disposition: attachment; +| ${FORMAIL} -A"X-Note: Bagle.J" -A"X-Folder: Virus" >${VIRUSFOLDER} + + +# From http://www.internetguru.com.au/igblog-102.html + +# Redirect common virus attachments inc. zipped versions +:0 B +* name=.*(document|readme|doc|text|file|data|test|message|body)\.(vbs\"|wsf\"|vbe\"|wsh\"|hta\"|scr\"|pif\"|exe\"|shs\"|bat\"|bas\"|cmd\"|zip\") +{ + :0 + | ${FORMAIL} -A"X-Note: executable attachment virus" -A"X-Folder: Virus" >>${VIRUSFOLDER} +} + +# Some more common virus attachments inc. zipped versions +:0 B +* name=.*(Attach|Information|Readme|Document|Info|TextDocument|Textfile|MoreInfo|Message)\.(pif\"|zip\") +{ + :0 + | ${FORMAIL} -A"X-Note: executable attachment virus" -A"X-Folder: Virus" >>${VIRUSFOLDER} +} + +# Redirect windows executables (note - haven't included exe and com +:0 B +* name=.*\.(vbs\"|wsf\"|vbe\"|wsh\"|hta\"|scr\"|pif\"|shs\"|bat\"|bas\"|scr\"|dll\") +{ + :0 + | ${FORMAIL} -A"X-Note: executable attachment virus" -A"X-Folder: Virus" >>${VIRUSFOLDER} +} + +# This one finds them annoying Custom Logo spams that seem to get past most filters +:0 B +* .*out\.php\?email\=(sales|info)\@ +{ + :0 + | ${FORMAIL} -A"X-Note: Custom Logo spam" -A"X-Folder: Spam" >>${SPAMFOLDER} +} + +# This catches about 99% of deliberate viagra mispellings ie v1@GRa, v1agr@ etc +:0 H +* ^Subject.*[Vv][1jl\|][aA\@][Gg][Rr][Aa\@] +{ + :0 + | ${FORMAIL} -A"X-Note: viagra spam" -A"X-Folder: Spam" >/dev/null +} + + +# Chineese/japaneese/korean spam + +:0 +* ^Content-Type: text/(plain|html); *charset=("?)(big5|gb2312|iso-2022-jp|ks_c_5601-1987|shift_jis)("?) +| ${FORMAIL} -A"X-Note: chineese/japaneese/korean charset" -A"X-Folder: Spam" >/dev/null + +:0 +* ^X-RBL-Warning: .*(china|korea) does not seem to care about spam +| ${FORMAIL} -A"X-Note: chineese/korean source" -A"X-Folder: Spam" >>${SPAMFOLDER} + + +# SpamAssassin (spamassassin.org) +:0fw +* < 10240000 +| spamc -U /tmp/spamassassin.sock -s 10240000 + +# Mail with a score of 14 or higher is certainly spam +:0: +* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\* +| ${FORMAIL} -A"X-Note: certainly spam" -A"X-Folder: Spam" >/dev/null + +:0: +* ^X-Spam-Status: Yes +* > 20000 +| ${FORMAIL} -A"X-Note: oversized spam" -A"X-Folder: Spam" >/dev/null + +:0 HB: +* ^X-Spam-Status: Yes +* http://www\.gstinc\.com/ +| ${FORMAIL} -A"X-Note: gstinc spam" -A"X-Folder: Spam" >/dev/null + +:0 HB: +* ^X-Spam-Status: Yes +* (www\.)?sonidom\.ru +| ${FORMAIL} -A"X-Note: sonidom spam" -A"X-Folder: Spam" >/dev/null + +:0 HB: +* ^X-Spam-Status: Yes +* (www\.)?pos-tel\.ru +| ${FORMAIL} -A"X-Note: pos-tel spam" -A"X-Folder: Spam" >/dev/null + +:0 HB: +* ^X-Spam-Status: Yes +* @besttraining\.ru +| ${FORMAIL} -A"X-Note: besttraining spam" -A"X-Folder: Spam" >/dev/null + +# HTML-only mail is almost certainly spam +#:0 +#* ^Content-Type: text/html +#| ${FORMAIL} -A"X-Note: HTML-only mail" -A"X-Folder: Spam" >/dev/null + +:0: +* ^X-Spam-Status: Yes +${SPAMFOLDER} + + +# MAILING LISTS + +# Filter out mail from all mailing lists you are on. Just duplicate the recipe +# for each mailing list you are on, and put the correct address for the list in +# the condition statement. (The "* ^TO" part.) If you read mail on shell, you +# may find it easier to deliver this mail to separate folders, especially for +# busy lists. I do. :) + + +# Block all messages that are too big +:0 +* > 1000000 +| ${FORMAIL} -A"X-Note: the message is too big" -A"X-Folder: Block" >>${BLOCKFOLDER} + + +# unfiltered mail marked by exim (using RBL/ORBS/etc) + +:0 +* ^X-RBL-Warning: +* ^(To|Cc):.*phd +${BLOCKFOLDER} + +:0 +* ^X-RBL-Warning: +${SPAMFOLDER} + + +# Sort out mail that really is to you from mail Bcc'd to you, or mail +# which doesn't have any of your email addresses on the To: or Cc: line. +# For this to work properly, you must create a text file named .myemail +# in your home directory and enter all email addresses that belong to +# you in it, one per line, just as you do with your .nobounce file. +# +# This does =wonders= in keeping spam from appearing in your personal +# mail. :) +# +# Substitute your shell account email address, custom domain, and any other email +# address you may have for the entries below. +:0: +* ? test -f ${MYEMAIL} && \ + (${FORMAIL} -zxTo: -zxCc: |\ + fgrep -i -f ${MYEMAIL}) +| ${FORMAIL} -A"X-Folder: Default" >>${DEFAULT} + +# Deliver email which passed spam filtering, but which wasn't sent to +# a recognizable personal email address of yours, to your "bulk mail" +# folder, for reading on a less-urgent basis. +:0: +| ${FORMAIL} -A"X-Folder: Bulk" >>${BULKFOLDER} + + +# Vacation - modified version of procmail example from "man procmailex" + +# Drop duplicates +#:0 Wh: msgid.lock +#| ${FORMAIL} -D 65536 msgid.cache +# +#:0 Whc: vacation.lock +#* !^From: .*phd +#* !^FROM_MAILER +#* !^FROM_DAEMON +#* !^X-Loop: phd@phdru.name +#* !^X-Loop: phd@iskra.aviel.ru +#* !^From: .* +#| ${FORMAIL} -rD 65536 vacation.cache +# +#:0 ehc # if the name was not in the cache - reply +#| (egrep -v '^From phd|^Return-Path: phd' | \ +# ${FORMAIL} -r -A"Precedence: junk" \ +# -A"X-Loop: phd@phdru.name" -A"X-Loop: phd@iskra.aviel.ru" \ +# -A"Content-Type: text/plain; charset=koi8-r"; \ +# echo "Hello!"; echo "";\ +# echo " I am on vacation. This is an auto-generated reply. Your message has been"; \ +# echo "delivered to my mailbox. Thanks a lot. I will read it after 0th of ."; \ +# echo ""; \ +# echo "úÄÒÁ×ÓÔ×ÕÊÔÅ."; echo ""; \ +# echo " ñ ÕÅÈÁÌ × ÏÔÐÕÓË. üÔÏ Á×ÔÏÍÁÔÉÞÅÓËÉÊ ÏÔ×ÅÔ. ÷ÁÛÅ ÓÏÏÂÝÅÎÉÅ ÂÙÌÏ ÄÏÓÔÁ×ÌÅÎÏ."; \ +# echo "× ÍÏÊ ÐÏÞÔÏ×ÙÊ ÑÝÉË. âÏÌØÛÏÅ ÓÐÁÓÉÂÏ. ñ ÐÒÏÞÔÕ ÅÇÏ, ËÏÇÄÁ ×ÅÒÎÕÓØ 0 ."; \ +# echo ""; cat $HOME/.signature) | $SENDMAIL -oi -t diff --git a/.profile b/.profile new file mode 100644 index 0000000..9a88f80 --- /dev/null +++ b/.profile @@ -0,0 +1,247 @@ +# +# $HOME/.profile (works with sh, ksh and bash) +# + +case "$SHELL" in + */*csh) SHELL=/bin/bash + ;; + # this is for bash.exe + *command.com | \ + *\\bash) SHELL=//c/ubin/bash + ;; +esac + +if [ -z "$USER" ]; then + USER="$LOGNAME"; export USER +fi + +### umask sets a mask for the default file permissions, +### umask 022 is less restrictive, 077 more paranoid +umask 027 + +PATH="$HOME"/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +MANPATH="$HOME"/man:/usr/local/man:/usr/share/man:/usr/man +# LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib +export PATH MANPATH # LD_LIBRARY_PATH + +LANG=C +#LC_ALL=C +case "$LC_CTYPE" in + *UTF-8) # LC_CTYPE is already set + ;; + + *) LC_CTYPE=ru_RU.KOI8-R + ;; +esac +LC_COLLATE="$LC_CTYPE" +#LANGUAGE="ru en" +export LANG LC_CTYPE LC_COLLATE +unset LC_ALL LANGUAGE + +# Default for df/du +BLOCKSIZE=1k +export BLOCKSIZE + +### uncomment to select an alternate timezone (/etc/localtime is default) +# TZ=/usr/share/zoneinfo/Europe/Moscow; export TZ + +### NEWS Configuration +ORGANIZATION=Home +# NNTPSERVER=news +export ORGANIZATION # NNTPSERVER + +(set -P 2>/dev/null) && set -P # follow physical paths, not symlinks + +# Interactive only commands +if [ -t 0 ] ; then + if [ -z "$TERM" ]; then + eval `tset -Q -s -m 'network:?xterm'` + fi + + stty sane erase ^H + + case "$TERM" in + linux) + # mutt, vim and python + BACKGROUND=DARK + export BACKGROUND + ;; + + *term*|*rxvt*|vt100|screen*) + BACKGROUND=LIGHT + export BACKGROUND + ;; + esac + + PAGER=less + LESS="-gimq" + case "$LC_CTYPE" in + *UTF-8) LESSCHARSET=utf-8 + ;; + + *) LESSCHARSET=koi8-r + ;; + esac + #LESSCHARDEF=32c. + LESSEDIT='vim ?lm+%lm -- %f' + export PAGER LESS LESSCHARSET LESSEDIT # LESSCHARDEF + + EDITOR="$HOME"/.vim/vim.sh + VISUAL="$EDITOR" + FCEDIT="$EDITOR" + export EDITOR VISUAL FCEDIT + + HISTCONTROL=ignoreboth + HISTIGNORE='&: *:x:X:[bf]g' + HISTFILE="$HOME/.sh_history" + HISTFILESIZE=1000 + HISTSIZE=1000 + export HISTCONTROL HISTIGNORE HISTFILE HISTFILESIZE HISTSIZE + + # Used by bash/mc for hostname completion + HOSTFILE="$HOME"/lib/config/hosts + export HOSTFILE + + MAIL="/var/mail/$USER" + MAILPATH="$MAIL:$HOME/mail/admin:$HOME/mail/block:$HOME/mail/bulk" + if [ -d "$HOME"/mail/lists/ ]; then + MAILPATH="$MAILPATH:`echo $HOME/mail/lists/* | sed 's/ /:/g'`" + fi + export MAIL MAILPATH + + BROWSER="links2:links:elinks:w3m:lynx" + case "$TERM" in + *term*|*rxvt*|vt100|screen*) + BROWSER="l:$BROWSER" + ;; + esac + export BROWSER + + #all_proxy="http://localhost:3128" + #ftp_proxy="$all_proxy" + #gopher_proxy="$all_proxy" + #http_proxy="$all_proxy" + #https_proxy="$all_proxy" + auto_proxy="file:///home/phd/admin/WWW/Mozilla/mozilla.pac" + no_proxy="localhost,127.0.0.1" + #export all_proxy ftp_proxy http_proxy https_proxy auto_proxy no_proxy # gopher_proxy + export auto_proxy no_proxy + + ENV="$HOME/.shellrc" + export ENV + + case "$SHELL" in + */bash) + shopt -s checkwinsize + OPS1='\u@\h ' + . "$ENV" + ;; + *) + OPS1="`/usr/bin/whoami`@`/bin/hostname -s` " + ;; + esac + + export OPS1 + + case "$TERM" in + *term*|*rxvt*|vt100|screen*) + if [ -x "`which xtitle 2>/dev/null`" ]; then + PROMPT_COMMAND=xtitle + export PROMPT_COMMAND + fi + ;; + esac + + ### biff controls new mail notification + #biff n + ### mesg controls messages (write/talk) from other users + mesg n + # make mail(1) use a pager + crt=; export crt + + PYTHONSTARTUP="$HOME"/lib/python/init.py + export PYTHONSTARTUP + + name="Oleg Broytman" + email="phd@phdru.name" + + GIT_AUTHOR_NAME="$name" + GIT_AUTHOR_EMAIL="$email" + GIT_COMMITTER_NAME="$name" + GIT_COMMITTER_EMAIL="$email" + export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_COMMITTER_NAME GIT_COMMITTER_EMAIL + + HGUSER="$name <$email>" + export HGUSER + + unset name email +fi + +# No need to set DISPLAY - ssh sets DISPLAY and calls xauth +#DISPLAY="`who am i | awk '{print substr($6, 2, length($6)-2 )}' | sed -e 's/:.*$//'`:0.0" +#export DISPLAY + +if [ -n "$DISPLAY" ]; then + # mutt, vim and python + BACKGROUND=LIGHT + export BACKGROUND + + # BROWSERs + BROWSER="firefox:seamonkey:google-chrome:opera:xlinks2:$BROWSER" + + ### X Window System Configuration + #XAPPLRESDIR="$HOME/lib/X11/app-defaults/"; export XAPPLRESDIR + ### Old-style XNLSPATH + #XNLSPATH=/usr/X11R6/lib/X11/nls; export XNLSPATH + + # For GTK2/GLib to convert filenames between internal and locale encodings + G_FILENAME_ENCODING="@locale" + export G_FILENAME_ENCODING + #G_BROKEN_FILENAMES=1 + #export G_BROKEN_FILENAMES + + # X Input Method, for Multi key (Compose) to work + GTK_IM_MODULE=xim + QT_IM_MODULE=xim + export GTK_IM_MODULE QT_IM_MODULE + + # GTK2 anti-aliasing + GDK_USE_XFT=1 + export GDK_USE_XFT + + # nVidia OpenGL full scene anti-aliasing + #__GL_FSAA_MODE=4 + #export __GL_FSAA_MODE +fi + +# +# read in usepkg function +# . "$HOME"/lib/config/usepkg.sh +# + +# +# usepkg gnu +# + +# +# If SUN console, start the windows system +# +# if [ `tty` = /dev/console ] ; then +# if [ "$TERM" = sun -o "$TERM" = AT386 ] ; then +# +# if [ ${OPENWINHOME:-""} = "" ] ; then +# OPENWINHOME=/usr/openwin +# export OPENWINHOME +# fi +# +# echo "" +# echo "Starting OpenWindows in 5 seconds (type Control-C to interrupt)" +# sleep 5 +# +# "$OPENWINHOME"/bin/openwin +# +# clear # get rid of annoying cursor rectangle +# #exit # logout after leaving windows system +# +# fi +# fi diff --git a/.project b/.project new file mode 100644 index 0000000..00ca8ca --- /dev/null +++ b/.project @@ -0,0 +1,2 @@ +Senior programmer at BioChemMack - https://medap.biochemmack.ru/trac/wiki +Programmer/sysadmin at NRSC - http://oper.med.ru/ diff --git a/.psqlrc b/.psqlrc new file mode 100644 index 0000000..9758699 --- /dev/null +++ b/.psqlrc @@ -0,0 +1,8 @@ +\set FETCH_COUNT 1000 +\set HISTCONTROL ignoreboth +\set HISTSIZE 1000 +\set PROMPT1 '%m %n@%/ %R%# ' +\set PROMPT2 :PROMPT1 +\set PROMPT3 '>> ' +/* \pset pager off */ +\timing diff --git a/.screenrc b/.screenrc new file mode 100644 index 0000000..c5feba6 --- /dev/null +++ b/.screenrc @@ -0,0 +1,111 @@ +# detach on hangup +autodetach on + +deflogin on + +# set every new windows hardstatus line to somenthing descriptive +# defhstatus "screen: ^E (^Et)" + +defscrollback 1000 + +# emulate .logout message +pow_detach_msg "Screen session of \$LOGNAME \$:cr:\$:nl:ended." + +# make the shell in every window a login shell +shell -$SHELL + +# shelltitle '> |bash' +# shelltitle '$ |sh' +# shelltitle '# |root sh' + +# don't display the copyright page +startup_message off + +# no annoying audible bell, please +#vbell on + +# don't kill window after the process died +# zombie "^[" + +################ +# +# xterm tweaks +# + +# advertise hardstatus support to $TERMCAP +# termcapinfo * '' 'hs:ts=\E_:fs=\E\\:ds=\E_\E\\' + +# do not confuse Solaris :) +#term vt100 + +# xterm understands both im/ic and doesn't have a status line. +# note: do not specify im and ic in the real termcap/info file as +# some programs (e.g. vi) will not work anymore. +#termcap xterm hs@:cs=\E[%i%d;%dr:im=\E[4h:ei=\E[4l +#terminfo xterm hs@:cs=\E[%i%p1%d;%p2%dr:im=\E[4h:ei=\E[4l + +# 80/132 column switching must be enabled for ^AW to work +# change init sequence to not switch width +#termcapinfo xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l + +# make the output buffer large for (fast) xterms. +#termcapinfo xterm* OL=10000 + +# tell screen that xterm can switch to dark background and has function keys +#termcapinfo xterm 'VR=\E[?5h:VN=\E[?5l' +#termcapinfo xterm 'k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~' +#termcapinfo xterm 'kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:kP=\E[H:kN=\E[6~' + +# special xterm hardstatus: use the window title. +#termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]0;screen\007' + +# our xterm has colors! (rxvt, too) +#termcap xterm 'AF=\E[3%dm:AB=\E[4%dm' +#terminfo xterm 'AF=\E[3%p1%dm:AB=\E[4%p1%dm' + +#terminfo xterm 'vb=\E[?5h$<200/>\E[?5l' +#termcapinfo xterm 'vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l' + +# emulate part of the 'K' charset +#termcapinfo xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334,{\344,|\366,}\374,~\337' + +################ +# +# other terminals +# + +# extend the vt100 desciption by some sequences. +#termcap vt100* ms:AL=\E[%dL:DL=\E[%dM:UP=\E[%dA:DO=\E[%dB:LE=\E[%dD:RI=\E[%dC +#terminfo vt100* ms:AL=\E[%p1%dL:DL=\E[%p1%dM:UP=\E[%p1%dA:DO=\E[%p1%dB:LE=\E[%p1%dD:RI=\E[%p1%dC + +# https://savannah.gnu.org/bugs/?14930 +#termcapinfo linux|xterm|rxvt|xterm-color ti@:te@:XT + +################ +# +# keybindings +# + +# remove some stupid / dangerous key bindings +bind h +bind ^h +bind k +bind ^k +bind z +bind ^z +bind . +bind \\ +bind ^\ +# make them better +#bind 'I' login on +#bind 'O' login off + +# yet another hack: +# prepend/append register [/] to the paste if ^a^] is pressed. +# this lets me have autoindent mode in vi. +#register [ "\033:se noai\015a" +#register ] "\033:se ai\015a" +#bind ^] paste [.] + +# on backspace send ^H +bindkey -d -k kb stuff "\010" diff --git a/.shellrc b/.shellrc new file mode 100644 index 0000000..670a9a2 --- /dev/null +++ b/.shellrc @@ -0,0 +1,162 @@ +# +# $HOME/.shellrc +# + +OPS1="$OPS1\\$" +PS1="$OPS1 " + + +case "$SHELL" in +*/bash) + [ "`type -t ls`" = alias ] && unalias ls + [ "`type -t ll`" = alias ] && unalias ll + [ "`type -t mc`" = alias ] && unalias mc + + back() { cd - ${1:+"$@"}; } + clo() { clear; logout; } + eval 'functions() { typeset -f ${1:+"$@"}; }' + j() { jobs; } + + complete -A command -o default builtin cgmem_nice command dbus-launch exec \ + nice nohup pidof pidOf KillAll pgrep pkill psg pswg su sudo time \ + whence whereis which xargs + if [ -z "$BASH_COMPLETION_COMPAT_DIR" ]; then + complete -A command -o default man + fi + complete -A hostname dig host nslookup nc netcat nmap p ping ping6 socat \ + telnet t tt \ + tcptraceroute tcptraceroute6 tracert tracert6 traceroute traceroute6 \ + whois wget wget-m wget-wrapper ww + complete -A hostname -o default distribute ftp lftp r rsync \ + s scp ssh smbclient tcpdump tshark wireshark + complete -A job bg fg j jobs wait + complete -A variable unset + + if [ -d "$HOME/lib/config" ]; then + complete -W "`cd \"$HOME/lib/config\" && echo *`" include + fi + complete -W "`echo $BROWSER | sed 's/:/ /g'`" start-browser + ;; + +*/ksh) + back() { cd - ${1:+"$@"}; } + clo() { clear; exit; } + j() { jobs; } + ;; + +*/sh) + clo() { clear; exit; } + ;; +esac + + +# clear history, clear screen and logout +#chlo() { cd; unset HISTFILE; rm -f .*history*; clo; } + + +#Pwd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)\/\(.*\)\/\(.*\)/...\/\2\/\3\/\4/"; } +#PWd() { pwd | sed "s/.*\/\(.*\)\/\(.*\)/...\/\2/"; } + + +psg() { ps auxw | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } +pswg() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\)'; } + +# Like pgrep -f +pidOf() { ps auxwww | grep -i ${1:+"$@"} | grep -v '\(ps auxw\|grep\|pidOf\|KillAll\)' | awk '{print $2}'; } + +# A kind of pkill +KillAll() { + if [ -z "$2" ]; then + kill `pidOf "$1"` + else + kill "$1" `pidOf "$2"` + fi +} + + +x() { exit; } +X() { startx >> .Xserver.log 2>&1; cyr; } + + +include() +{ + cfg="$1" + if [ -f "./$cfg" -a -r "./$cfg" ]; then + echo "Reading config file \`$cfg'" 1>&2 + . "./$cfg" + elif [ -f "$HOME/lib/config/$cfg" -a -r "$HOME/lib/config/$cfg" ]; then + echo "Reading config file \`$HOME/lib/config/$cfg'" 1>&2 + . "$HOME/lib/config/$cfg" + else + echo "Cannot find config file \`$cfg'" 1>&2 + fi +} + + +mc() { + if [ -n "$SLOWTERM" ]; then + MC_SLOW="--slow" + fi + + case "$TERM" in + screen*) # screen, screen.rxvt + if [ "$TERM" = screen.rxvt ]; then + MC_SAVE_TERM="$TERM" + TERM=rxvt + fi + MC_XTERM="-x" + ;; + esac + + #TMPDIR="$HOME"/tmp + #export TMPDIR + + MC_FOUND=NO + + for wrapper in \ + /usr/local/share/mc/bin/mc-wrapper.sh \ + /usr/local/libexec/mc/mc-wrapper.sh \ + /usr/share/mc/bin/mc-wrapper.sh; do + if [ -r $wrapper ]; then + . $wrapper $MC_SLOW $MC_XTERM "$@" + rc=$? + MC_FOUND=YES + break + fi + done + + if [ $MC_FOUND = NO ]; then + for mc in /usr/local/bin/mc /usr/bin/mc; do + if [ -x $mc ]; then + MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER" + if [ ! -d MC_TMP_DIR="${TMPDIR-/tmp}/mc-$USER" ]; then + MC_TMP_DIR="${TMPDIR-/tmp}" + fi + MC_PWD_FILE="$MC_TMP_DIR/mc.pwd.$$" + mc_type="`mc_type.py $mc`" + if [ "$mc_type" = old ]; then + $mc -P $MC_SLOW $MC_XTERM "$@" > "$MC_PWD_FILE" + rc=$? + MC_FOUND=YES + elif [ "$mc_type" = new ]; then + $mc -P "$MC_PWD_FILE" $MC_SLOW $MC_XTERM "$@" + rc=$? + MC_FOUND=YES + else + continue + fi + cd "`cat \"$MC_PWD_FILE\"`" && /bin/rm "$MC_PWD_FILE" + break + fi + done + fi + + if [ $MC_FOUND = NO ]; then + echo "Cannot find mc-wrapper.sh or mc" >&2 + rc=1 + fi + + [ -n "$MC_SAVE_TERM" ] && TERM="$MC_SAVE_TERM" + unset MC_FOUND MC_PWD_FILE MC_SAVE_TERM MC_SLOW MC_TMP_DIR MC_XTERM + return $rc +} diff --git a/.sqliterc b/.sqliterc new file mode 100644 index 0000000..3e48178 --- /dev/null +++ b/.sqliterc @@ -0,0 +1,3 @@ +.headers on +.mode columns +PRAGMA cache_size=500000; diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..b301c69 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,45 @@ +# Start window numbers at 1 to match keyboard order with tmux window order +set-option -g base-index 1 +set-option -g pane-base-index 1 +# Renumber windows sequentially after closing any of them +#set-option -g renumber-windows on + +# Attempt to set the client terminal title +set-option -g set-titles on +# Terminal emulator window title +set -g set-titles-string 'tmux #S:#I.#P [ #W ]' + +# Pass [Ctrl]+[PgUp/PgDn] +set-window-option -g xterm-keys on + +# Mouse +set-window-option -g mode-mouse on +set-option -g mouse-select-pane on +set-option -g mouse-resize-pane on +# Mouse can be used to select windows (by clicking in the status bar) +set-option -g mouse-select-window on + +# Rather than constraining window size to the maximum size of any client +# connected to the *session*, constrain window size to the maximum size of any +# client connected to *that window*. Much more reasonable. +set-window-option -g aggressive-resize on + +# Activity monitoring +set-option -g visual-activity on +set-window-option -g monitor-activity on + +# Soften status bar color from harsh green to black on cyan +set-option -g status-fg black +set-option -g status-bg cyan + +# Clock color +set-window-option -g clock-mode-colour black + +# Increase scrollback lines +set-option -g history-limit 1000 + +# C-b C-a for last-window +bind-key C-a last-window + +# Reload config without restart +bind R source-file ~/.tmux.conf diff --git a/.vim/after/ftplugin/mail.vim b/.vim/after/ftplugin/mail.vim new file mode 100644 index 0000000..20cc2ce --- /dev/null +++ b/.vim/after/ftplugin/mail.vim @@ -0,0 +1,2 @@ +" Please not 'q'-flag to allow formatting over '-' at column 1. +setlocal formatoptions=2t diff --git a/.vim/after/indent/mail.vim b/.vim/after/indent/mail.vim new file mode 100644 index 0000000..08b8813 --- /dev/null +++ b/.vim/after/indent/mail.vim @@ -0,0 +1 @@ +setlocal noautoindent diff --git a/.vim/after/plugin/isk.vim b/.vim/after/plugin/isk.vim new file mode 100644 index 0000000..de39405 --- /dev/null +++ b/.vim/after/plugin/isk.vim @@ -0,0 +1 @@ +autocmd BufReadPost * set iskeyword-=. diff --git a/.vim/compiler/python.vim b/.vim/compiler/python.vim new file mode 100644 index 0000000..7dd0503 --- /dev/null +++ b/.vim/compiler/python.vim @@ -0,0 +1,12 @@ +if exists("current_compiler") + finish +endif +let current_compiler = "python" + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +CompilerSet makeprg=compyle4vim.py\ % + \ errorformat=%E\ \ File\ \"%f\"\\,\ line\ %l\\,\ column\ %c,%C%m + diff --git a/.vim/filetype.vim b/.vim/filetype.vim new file mode 100644 index 0000000..971c75e --- /dev/null +++ b/.vim/filetype.vim @@ -0,0 +1,37 @@ +if exists("did_load_filetypes") + finish +endif + +augroup filetypedetect + " Text files + autocmd BufNewFile,BufReadPost *.txt,*README* setlocal filetype=text + autocmd BufReadPost ~/tmp/*.txt setlocal textwidth=0 " Files from ViewSourceWith + + " Cheetah templates + autocmd BufNewFile,BufReadPost *.tmpl setlocal filetype=htmlcheetah + + " Pascal files with case-insensitive extensions + autocmd BufReadPost *.PAS setlocal filetype=pascal + + " Play list + autocmd BufReadPost *.m3u,*.M3U setlocal filetype=playlist + + " Python files sometimes are recognized as conf + autocmd BufReadPost *.py setlocal filetype=python + " Python Templates (Quixote) are Python files + autocmd BufNewFile,BufReadPost *.ptl setlocal filetype=python + " Python Embedded are mason-like python templates + autocmd BufNewFile,BufReadPost *.pyem setlocal filetype=python filetype=mason + + " ssh files + autocmd BufReadPost known_hosts setlocal filetype=ssh + autocmd BufReadPost authorized_keys setlocal filetype=ssh + + " Set mapping for CVS/Subversion/Mercurial commit files + autocmd BufReadPost /tmp/cvs* setlocal filetype=cvscommit + autocmd BufReadPost svn-commit.tmp*,svn-commit.*.tmp* setlocal filetype=svncommit + autocmd BufReadPost /tmp/hg-editor-*.txt setlocal filetype=hgcommit + + " Medap-RM Method files + autocmd BufNewFile,BufReadPost *.rsc setlocal filetype=conf filetype=medaprm-method +augroup END diff --git a/.vim/ftplugin/cvscommit.vim b/.vim/ftplugin/cvscommit.vim new file mode 100644 index 0000000..99dca89 --- /dev/null +++ b/.vim/ftplugin/cvscommit.vim @@ -0,0 +1 @@ +runtime! ftplugin/vcscommit.vim diff --git a/.vim/ftplugin/gitcommit.vim b/.vim/ftplugin/gitcommit.vim new file mode 100644 index 0000000..094c29c --- /dev/null +++ b/.vim/ftplugin/gitcommit.vim @@ -0,0 +1,2 @@ +runtime! ftplugin/vcscommit.vim +setlocal fileencoding=utf-8 diff --git a/.vim/ftplugin/gitconfig.vim b/.vim/ftplugin/gitconfig.vim new file mode 100644 index 0000000..4e04506 --- /dev/null +++ b/.vim/ftplugin/gitconfig.vim @@ -0,0 +1 @@ +setlocal noexpandtab softtabstop=8 shiftwidth=8 diff --git a/.vim/ftplugin/hgcommit.vim b/.vim/ftplugin/hgcommit.vim new file mode 100644 index 0000000..094c29c --- /dev/null +++ b/.vim/ftplugin/hgcommit.vim @@ -0,0 +1,2 @@ +runtime! ftplugin/vcscommit.vim +setlocal fileencoding=utf-8 diff --git a/.vim/ftplugin/html.vim b/.vim/ftplugin/html.vim new file mode 100644 index 0000000..3950834 --- /dev/null +++ b/.vim/ftplugin/html.vim @@ -0,0 +1,24 @@ +if exists("b:did_ftplugin") + finish +endif + +if version >= 702 && has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + let encoding = system("get_html_encoding.py " . shellescape(expand("%"))) + if !v:shell_error + if strlen(encoding) != 0 + call SetupEncoding(encoding) + endif + endif +endif + +setlocal matchpairs+=<:> " Add brokets to the list of pairs that match for the '%' command +set shiftwidth=2 softtabstop=2 + +if expand("%:t") == "bookmarks.html" + setlocal textwidth=0 + call SetNoWrap() + nmap \h G6k6dd1G0 +else + setlocal textwidth=78 +endif diff --git a/.vim/ftplugin/htmlcheetah.vim b/.vim/ftplugin/htmlcheetah.vim new file mode 100644 index 0000000..3b802f6 --- /dev/null +++ b/.vim/ftplugin/htmlcheetah.vim @@ -0,0 +1,15 @@ +if exists("b:did_ftplugin") + finish +endif + +if has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + if search('^#\(encoding\|unicode\) ') > 0 + let line = getline(".") + let encoding = matchlist(line, '#\(encoding\|unicode\) \([^ ]\+\)$')[2] + call SetupEncoding(encoding) + endif +endif + +setlocal autoindent shiftwidth=2 softtabstop=2 textwidth=78 +setlocal matchpairs+=<:> " Add brokets to the list of pairs that match for the '%' command diff --git a/.vim/ftplugin/iss.vim b/.vim/ftplugin/iss.vim new file mode 100644 index 0000000..adc21a2 --- /dev/null +++ b/.vim/ftplugin/iss.vim @@ -0,0 +1,3 @@ +if has("iconv") && !exists('b:encoding_set') + call SetupEncoding("cp1251") +endif diff --git a/.vim/ftplugin/mail.vim b/.vim/ftplugin/mail.vim new file mode 100644 index 0000000..79ceb6d --- /dev/null +++ b/.vim/ftplugin/mail.vim @@ -0,0 +1,23 @@ +if exists("b:did_ftplugin") + finish +endif + +if has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + if search('^Content-Type: text/\(plain\|html\);\n\?\( \|\t\)\+charset=', 'bew') > 0 + let line = getline(".") + let encoding = matchlist(line, 'charset="\?\(\(\w\|-\)\+\)')[1] + call SetupEncoding(encoding) + endif +endif + +setlocal textwidth=72 + +" SpamCop reports - goto the 9th line and start a browser +nmap z 9G3,b + +" Remove my signature from a forwarded message +nmap \f 2GddG4k5ddkdd + +" Remove boilerplate from a forwarded message from Trac +nmap \t 1G21ddG15k11dd:%s/^+//:%s/^ \*/--/1G diff --git a/.vim/ftplugin/medaprm-method.vim b/.vim/ftplugin/medaprm-method.vim new file mode 100644 index 0000000..455a750 --- /dev/null +++ b/.vim/ftplugin/medaprm-method.vim @@ -0,0 +1,12 @@ +if exists("b:did_ftplugin") + finish +endif + +if has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + if search("^encoding ") > 0 + let line = getline(".") + let encoding = matchlist(line, 'encoding *[:=] *\([^ ]\+\)$')[1] + call SetupEncoding(encoding) + endif +endif diff --git a/.vim/ftplugin/pep.vim b/.vim/ftplugin/pep.vim new file mode 100644 index 0000000..5c8a1b8 --- /dev/null +++ b/.vim/ftplugin/pep.vim @@ -0,0 +1,4 @@ +" Python Enhancement Proposal +setlocal autoindent fileencoding=utf-8 formatoptions=1t joinspaces textwidth=70 +setlocal expandtab shiftwidth=4 softtabstop=4 +inoremap . . diff --git a/.vim/ftplugin/playlist.vim b/.vim/ftplugin/playlist.vim new file mode 100644 index 0000000..5848aa0 --- /dev/null +++ b/.vim/ftplugin/playlist.vim @@ -0,0 +1 @@ +map \r :%sort!Gdd1GP diff --git a/.vim/ftplugin/po.vim b/.vim/ftplugin/po.vim new file mode 100644 index 0000000..2c798d9 --- /dev/null +++ b/.vim/ftplugin/po.vim @@ -0,0 +1,12 @@ +if exists("b:did_ftplugin") + finish +endif + +if has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + if search("^\"Content-Type: text/plain; charset=") > 0 + let line = getline(".") + let encoding = matchlist(line, 'charset=\(\(\w\|-\)\+\)')[1] + call SetupEncoding(encoding) + endif +endif diff --git a/.vim/ftplugin/python.vim b/.vim/ftplugin/python.vim new file mode 100644 index 0000000..44ec35e --- /dev/null +++ b/.vim/ftplugin/python.vim @@ -0,0 +1,46 @@ +if exists("b:did_ftplugin") + finish +endif + +" Do not set b:did_ftplugin - it prevents standard plugins from running +" let b:did_ftplugin = 1 " it will be set in the standard plugin + +if has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + let line = getline(1) + if line !~ '^ *#.*coding[=:]\s*\([-0-9A-Za-z_.]\+\)' + let line = getline(2) + endif + if line =~ '^ *#.*coding[=:]\s*\([-0-9A-Za-z_.]\+\)' + let encoding = matchlist(line, 'coding[=:]\s*\([-0-9A-Za-z_.]\+\)')[1] + call SetupEncoding(encoding) + endif +endif + +setlocal fo-=t fo+=croql +setlocal keywordprg=pydoc +setlocal shiftwidth=4 softtabstop=4 +compiler python + +if has("unix") + execute "autocmd BufWritePost " . expand("%") . " call SavePython()" +endif + +" Compile and remove *.cgi[co] files after compilation; do not remove *.py[co] files; +" if it is a shebang script change file mode to make it executable. +function! SavePython() + let ext = expand("%:e") + if ext == "pyem" + return + elif ext == "ptl" + !compyle-ptl % + else + !compyle % + if ext != "py" + !rm -f %[co] + endif + if getline(1) =~ "^#!" + !chmod +x % + endif + endif +endfunction diff --git a/.vim/ftplugin/ssh.vim b/.vim/ftplugin/ssh.vim new file mode 100644 index 0000000..fdc13ce --- /dev/null +++ b/.vim/ftplugin/ssh.vim @@ -0,0 +1,2 @@ +setlocal textwidth=0 +call SetNoWrap() diff --git a/.vim/ftplugin/svncommit.vim b/.vim/ftplugin/svncommit.vim new file mode 100644 index 0000000..99dca89 --- /dev/null +++ b/.vim/ftplugin/svncommit.vim @@ -0,0 +1 @@ +runtime! ftplugin/vcscommit.vim diff --git a/.vim/ftplugin/text.vim b/.vim/ftplugin/text.vim new file mode 100644 index 0000000..059a304 --- /dev/null +++ b/.vim/ftplugin/text.vim @@ -0,0 +1,6 @@ +if &tw == 0 + setlocal tw=72 +endif + +" Set 'formatoptions' to break text lines and keep the comment leader ">". +setlocal fo+=tcql diff --git a/.vim/ftplugin/vcscommit.vim b/.vim/ftplugin/vcscommit.vim new file mode 100644 index 0000000..2ce1476 --- /dev/null +++ b/.vim/ftplugin/vcscommit.vim @@ -0,0 +1,4 @@ +" Go home! +call cursor(1, 1) +let b:position_resored = 1 +nmap \c 1G0p8dwkdd diff --git a/.vim/ftplugin/xhtml.vim b/.vim/ftplugin/xhtml.vim new file mode 120000 index 0000000..9dfabb8 --- /dev/null +++ b/.vim/ftplugin/xhtml.vim @@ -0,0 +1 @@ +html.vim \ No newline at end of file diff --git a/.vim/ftplugin/xml.vim b/.vim/ftplugin/xml.vim new file mode 100644 index 0000000..02d8ac6 --- /dev/null +++ b/.vim/ftplugin/xml.vim @@ -0,0 +1,18 @@ +if exists("b:did_ftplugin") + finish +endif + +if version >= 702 && has("iconv") && !exists('b:encoding_set') + " Try to recognize the file encoding and convert the file + let encoding = system("get_xml_encoding.py " . shellescape(expand("%"))) + if !v:shell_error + if strlen(encoding) == 0 + " By default XML files are in UTF-8 + let encoding = "UTF-8" + endif + endif + call SetupEncoding(encoding) +endif + +setlocal matchpairs+=<:> " Add brokets to the list of pairs that match for the '%' command +set shiftwidth=2 softtabstop=2 diff --git a/.vim/misc/ispell.vim b/.vim/misc/ispell.vim new file mode 100644 index 0000000..b0c3eb4 --- /dev/null +++ b/.vim/misc/ispell.vim @@ -0,0 +1,219 @@ +" Define `Ispell' language and personal dictionary, used in several places below +let IspellLang = 'russian' +let PersonalDict = '~/.ispell_' . IspellLang + +" Try to avoid misspelling words in the first place -- have the insert mode +" +N/+P keys perform completion on partially-typed words by +" checking the Linux word list and the personal `Ispell' dictionary; sort out +" case sensibly (so that words at starts of sentences can still be completed +" with words that are in the dictionary all in lower case): +execute 'set dictionary+=' . '~/.ispell_english' +execute 'set dictionary+=' . PersonalDict +set dictionary+=/usr/dict/words + +" Spell checking operations are defined next. They are all set to normal mode +" keystrokes beginning \s but function keys are also mapped to the most common +" ones. The functions referred to are defined at the end of this .vimrc. + +" \se ("spelling english") saves the current file then spell checks it +" interactively through `Ispell' and reloads the corrected version: +nmap \se :call RecodeAndSpellcheck("") + +" \sr ("spelling russian") converts the file to the locale encoding, +" saves it, then spell checks it interactively through `Ispell', +" reloads the corrected version and converts it back to the original encoding: +nmap \sr :call RecodeAndSpellcheck(IspellLang) + +" \sl ("spelling list") lists all spelling mistakes in the current buffer, +" but excludes any in news/mail headers or in ("> ") quoted text: +execute 'nmap \sl :up! grep -v "^>" grep -E -v "^[[:alpha:]-]+: " ' . +\ ' ispell -l -d ' . IspellLang . ' sort uniq' + +" \sh ("spelling highlight") highlights (in red) all misspelt words in the +" current buffer, and also excluding the possessive forms of any valid words +" (e.g. "Lizzy's" won't be highlighted if "Lizzy" is in the dictionary); with +" mail and news messages it ignores headers and quoted text; for HTML it +" ignores tags and only checks words that will appear, and turns off other +" syntax highlighting to make the errors more apparent [function at end of +" file]: +nmap \sh :call HighlightSpellingErrors() + +" \sc ("spelling clear") clears all highlighted misspellings; for HTML it +" restores regular syntax highlighting: +nmap \sc :if &ft == 'html' sy on +\ else :sy clear SpellError endif + +" \sa ("spelling add") adds the word at the cursor position to the personal +" dictionary (but for possessives adds the base word, so that when the cursor +" is on "Ceri's" only "Ceri" gets added to the dictionary), and stops +" highlighting that word as an error (if appropriate) [function at end of +" file]: +nmap \sa :call AddWordToDictionary() + + +" Functions referred to above + +function! HighlightSpellingErrors() +" highlights spelling errors in the current window; used for the \sh operation +" defined above; +" requires the ispell, sort, and uniq commands to be in the path; +" requires the global variable IspellLang to be defined above, and to contain +" the preferred `Ispell' language; +" for mail/news messages, requires the grep command to be in the path; +" for HTML documents, saves the file to disk and requires the lynx command to +" be in the path +" +" by Smylers http://www.stripey.com/vim/ +" (inspired by Krishna Gadepalli and Neil Schemenauer's vimspell.sh) +" +" 2000 Jun 1: for `Vim' 5.6 + +" for HTML files, remove all current syntax highlighting (so that +" misspellings show up clearly), and note it's HTML for future reference: + if &filetype == 'html' + let HTML = 1 + syntax clear + + " for everything else, simply remove any previously-identified spelling + " errors (and corrections): + else + let HTML = 0 + if hlexists('SpellError') + syntax clear SpellError + endif + if hlexists('Normal') + syntax clear Normal + endif + endif + + " form a command that has the text to be checked piping through standard + " output; for HTML files this involves saving the current file and processing + " it with `Lynx'; for everything else, use all the buffer except quoted text + " and mail/news headers: + update + if HTML + let PipeCmd = '! lynx --raw --dump --nolist % |' + else + let PipeCmd = '!' + if &filetype == 'mail' + let PipeCmd = PipeCmd . ' grep -v "^> " | grep -E -v "^[[:alpha:]-]+:" |' + endif + endif + + " execute that command, then generate a unique list of misspelt words and + " store it in a temporary file: + let ErrorsFile = tempname() + execute PipeCmd . ' ispell -l -d '. g:IspellLang . + \ ' | sort | uniq > ' . ErrorsFile + + " open that list of words in another window: + execute 'split ' . ErrorsFile + + " for every word in that list ending with "'s", check if the root form + " without the "'s" is in the dictionary, and if so remove the word from the + " list: + global /'s$/ execute 'read ! echo ' . expand('') . + \ ' | ispell -l -d ' . g:IspellLang | delete + " (If the root form is in the dictionary, ispell -l will have no output so + " nothing will be read in, the cursor will remain in the same place and the + " :delete will delete the word from the list. If the root form is not in the + " dictionary, then ispell -l will output it and it will be read on to a new + " line; the delete command will then remove that misspelt root form, leaving + " the original possessive form in the list!) + + " only do anything if there are some misspellings: + if strlen(getline('.')) > 0 + + " if (previously noted as) HTML, replace each non-alphanum char with a + " regexp that matches either that char or a &...; entity: + if HTML + % substitute /\W/\\(&\\|\&\\(#\\d\\{2,4}\\|\w\\{2,8}\\);\\)/e + endif + + " turn each mistake into a `Vim' command to place it in the SpellError + " syntax highlighting group: + % substitute /^/syntax match SpellError !\\!/ + endif + + " save and close that file (so switch back to the one being checked): + exit + + " make syntax highlighting case-sensitive, then execute all the match + " commands that have just been set up in that temporary file, delete it, and + " highlight all those words in red: + syntax case match + execute 'source ' . ErrorsFile + call delete(ErrorsFile) + highlight SpellError term=reverse ctermfg=DarkRed guifg=Red + + " with HTML, don't mark any errors in e-mail addresses or URLs, and ignore + " anything marked in a fix-width font (as being computer code): + if HTML + syntax case ignore + syntax match Normal !\<[[:alnum:]._-]\+@[[:alnum:]._-]\+\.\a\+\>! + syntax match Normal + \ !\<\(ht\|f\)tp://[-[:alnum:].]\+\a\(/[-_.[:alnum:]/#&=,]*\)\=\>! + syntax region Normal start=!
! end=!
! + syntax region Normal start=!! end=!! + syntax region Normal start=!! end=!! + endif +endfunction " HighlightSpellingErrors() + + +function! AddWordToDictionary() +" adds the word under the cursor to the personal dictionary; used for the \sa +" operation defined above; +" requires the global variable PersonalDict to be defined above, and to contain +" the `Ispell' personal dictionary; +" +" by Smylers http://www.stripey.com/vim/ +" +" 2000 Apr 30: for `Vim' 5.6 + +" get the word under the cursor, including the apostrophe as a word character +" to allow for words like "won't", but then ignoring any apostrophes at the +" start or end of the word: + setlocal iskeyword+=' + let Word = substitute(expand(''), "^'\\+", '', '') + let Word = substitute(Word, "'\\+$", '', '') + setlocal iskeyword-=' + + " override any SpellError highlighting that might exist for this word, + " `highlighting' it as normal text: + execute 'syntax match Normal #\<' . Word . '\>#' + + " remove any final "'s" so that possessive forms don't end up in the + " dictionary, then add the word to the dictionary: + let Word = substitute(Word, "'s$", '', '') + execute '!echo "' . Word . '" >> ' . g:PersonalDict +endfunction " AddWordToDictionary() + + +function! RecodeAndSpellcheck(language) + " If the console encoding differs from the file encoding... + if strlen(&encoding) && strlen(&fileencoding) && &encoding != &fileencoding + " ...save the file encoding... + let FileEncoding = &fileencoding + " ...and recode to the console encoding + execute 'setlocal fileencoding=' . &encoding + else + let FileEncoding = '' + endif + + update + + if strlen(a:language) + execute '!ispell -x -d ' . a:language . ' ' . shellescape(expand("%")) + else + execute '!ispell -x ' . shellescape(expand("%")) + endif + + edit % + + if strlen(FileEncoding) + " Now recode it back to the saved file encoding + execute 'setlocal fileencoding=' . FileEncoding + update + endif +endfunction " RecodeAndSpellcheck() diff --git a/.vim/syntax/html.vim b/.vim/syntax/html.vim new file mode 100644 index 0000000..80df508 --- /dev/null +++ b/.vim/syntax/html.vim @@ -0,0 +1,4 @@ +if &background == 'light' + highlight link javaScript Identifier + highlight Title cterm=NONE ctermfg=black gui=NONE guifg=black +endif diff --git a/.vim/syntax/mail.vim b/.vim/syntax/mail.vim new file mode 100644 index 0000000..024fad9 --- /dev/null +++ b/.vim/syntax/mail.vim @@ -0,0 +1,21 @@ +syntax case ignore +syntax match mailHeaderKey contained contains=mailHeaderEmail,mailEmail,@NoSpell "\v(^(\> ?)*)@<=(from|to|cc|delivered-to|reply-to|mail-followup-to|x-attribution):.*$" +syntax match mailSmile ' [;:]-*[dp(){}<>|\\/]\| [(){}<>\\/]-*[;:]' " :-) +syntax match mailURL contains=@NoSpell `\v<(((https?|ftp|gopher|telnet)://|(mailto|file|news|about|ed2k|irc|sip|magnet):)[^' \t<>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' \t<>"]+)[a-z0-9/]` + +if &background == 'light' + highlight Constant cterm=bold ctermfg=blue gui=bold guifg=blue + highlight Statement cterm=NONE ctermfg=black gui=NONE guifg=darkgrey + highlight link mailHeaderEmail Normal + highlight link mailHeaderKey SpecialKey + highlight mailSubject cterm=bold ctermfg=darkgrey gui=bold + highlight mailSmile cterm=bold ctermfg=darkmagenta gui=bold guifg=darkmagenta + highlight mailQuoted1 cterm=NONE ctermfg=blue gui=NONE guifg=blue + highlight mailQuoted2 cterm=NONE ctermfg=darkmagenta gui=NONE guifg=darkmagenta + highlight mailQuoted3 cterm=NONE ctermfg=brown gui=NONE guifg=brown + highlight mailQuoted4 cterm=NONE ctermfg=green gui=NONE guifg=green + highlight mailQuoted5 cterm=NONE ctermfg=cyan gui=NONE guifg=cyan + highlight mailQuoted6 cterm=NONE ctermfg=white gui=NONE guifg=white +else + highlight mailSmile cterm=NONE ctermfg=yellow +endif diff --git a/.vim/syntax/python.vim b/.vim/syntax/python.vim new file mode 100644 index 0000000..a94c29c --- /dev/null +++ b/.vim/syntax/python.vim @@ -0,0 +1 @@ +let python_highlight_all=1 diff --git a/.vim/syntax/synload.vim b/.vim/syntax/synload.vim new file mode 100644 index 0000000..6ddce26 --- /dev/null +++ b/.vim/syntax/synload.vim @@ -0,0 +1,18 @@ +" Load standard colors +source $VIMRUNTIME/syntax/synload.vim + +" Override for all syntax files +if &background == 'light' + highlight Comment cterm=NONE ctermfg=darkgrey gui=NONE guifg=SlateGray + highlight Constant cterm=NONE ctermfg=blue gui=NONE guifg=blue + highlight Identifier cterm=NONE ctermfg=black gui=NONE guifg=black + highlight Statement cterm=bold ctermfg=darkgrey gui=bold guifg=black + highlight Type cterm=NONE ctermfg=black gui=NONE guifg=black + + if &diff + highlight DiffAdd ctermbg=green ctermfg=white + highlight DiffChange ctermbg=cyan ctermfg=black + highlight DiffText ctermbg=magenta ctermfg=white + highlight DiffDelete ctermbg=red ctermfg=black + endif +endif diff --git a/.vim/syntax/xml.vim b/.vim/syntax/xml.vim new file mode 100644 index 0000000..9083ff3 --- /dev/null +++ b/.vim/syntax/xml.vim @@ -0,0 +1,3 @@ +if &background == 'light' + highlight Identifier cterm=bold ctermfg=darkgrey gui=bold guifg=black +endif diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..aed3f7f --- /dev/null +++ b/.vimrc @@ -0,0 +1,730 @@ +" User configuration file for Vi IMproved. +" +" vim 6.0+ required, 7.0+ recommended. + +" 1 important + +" Remove ALL autocommands in case the file is sourced for the second time +autocmd! + +language messages C " Print messages in English + +if exists("b:wrap") " Only do this on the second and subsequent :source's + let fenc = &fileencoding + let ftype = &filetype + let mod = &modified + set all& " Reset all options, except terminal options, to their default value. + execute 'set fileencoding=' . fenc + execute 'set filetype=' . ftype + if mod + set modified + else + set nomodified + endif + unlet fenc ftype mod +endif + +" No, it is not VI, it is VIM! It is important to set this first, because this +" command resets many other options. +set nocompatible + +" Set behavior to xterm, not mswin +behave xterm + +" 2 moving around, searching and patterns + +set ignorecase " Ignore case in search patterns +set smartcase " Match 'word' case-insensitive and 'Word' case-sensitive + +set nostartofline " Keep cursor's column +set whichwrap=b,s,h,l,<,>,[,],~ " Wrap to the previous/next line on all keys and ~ command + +" 4 displaying text + +set display=lastline,uhex " Show the last line instead of '@'; show non-printable chars as +set lazyredraw " Do not update screen while executing macros +set list " listchars only works with 'list' +set listchars=tab:>_,trail:_,extends:+ " Show tabs, trailing spaces, long lines +set wrap " Visually wrap long lines + +" With 'set wrap' wrap long lines at a character in 'breakat' +" Please note 'nolist' is required to use 'linebreak' +set linebreak showbreak=+\ " A plus and a space + +set sidescroll=1 " The minimal number of columns to scroll horizontally + +" 5 highlighting + +set nohlsearch " Stop the search highlighting + +" 6 multiple windows + +set hidden " Don't unload a buffer when no longer shown in a window; allow to switch between buffers/windows when the buffer is modified +set laststatus=2 " Always show status line + +set splitbelow " A new window is put below of the current one +set splitright " A new window is put right of the current one + +" 8 terminal + +set ttyfast " terminal connection is fast + +set title " Set title to the value of 'titlestring' or to 'filename - VIM' +set titleold= " string to restore the title to when exiting Vim + +" 9 using the mouse + +set mouse=ar " Use mouse in all modes, plus hit-return + +" 12 messages and info + +set ruler " Show cursor position below each window +set showcmd " Show (partial) command keys in the status line + +" Short message for [Modified]; +" overwrite message for writing a file with subsequent message; +" truncate long file messages +set shortmess=mot + +" 14 editing text + +set backspace=indent,eol,start +set complete+=k " Scan spell dictionaries for completion in addition to standard places +set infercase " adjust case of a keyword completion match +set nojoinspaces " Do not insert two spaces after a '.', '?' and '!' with a join command +set nrformats=hex " I seldom edit octal numbers, but very often dates like 2001-02-01 + +" Default value 'croql' is a compromise for both natural and programming +" languages, but as any compromise it works good for neither natural nor +" programming languages. This value is good for natural texts, +" let ftplugins to set values suitable for programming languages. +set formatoptions=2t " list of flags that tell how automatic formatting works + +" 15 tabs and indenting + +set expandtab " expand to spaces in Insert mode +set shiftwidth=3 " number of spaces used for each step of (auto)indent +set smarttab " a in an indent inserts 'shiftwidth' spaces +set softtabstop=3 " number of spaces to insert for a + +set noautoindent " Do not automatically set the indent of a new line + +" 18 mapping + +set timeout timeoutlen=3000 " allow timing out up to 3 seconds halfway into a mapping + +" 21 command line editing + +set history=1000 " how many command lines are remembered +set suffixes+=.pyc,.pyo " list of file name extensions that have a lower priority +set wildignore+=*.py[co] " Ignore these patterns when completing file names +set wildmenu " command-line completion shows a list of matches +set wildmode=longest,list:longest,full " Bash-vim completion behavior + +" 22 executing external commands + +if has("filterpipe") + set noshelltemp " Use pipes on Unix +endif + +" 25 multi-byte characters + +" Automatically detected character encodings +set fileencodings=ucs-bom,us-ascii,utf-8,koi8-r,cp1251,cp866,latin1 + +" 26 various + +" ! - when included, save and restore global variables that start +" with an uppercase letter, and don't contain a lowercase letter; +" h - disable the effect of 'hlsearch'; +" ' - number of files for which the marks are remembered; +" " and < - maximum number of lines saved for a register; +" s - maximum size of an item in Kbytes. +if version < 603 + set viminfo=!,h,'50,\"1000 +else + set viminfo=!,h,'50,<1000,s10 +endif + +" c - convert viminfo to the current encoding; +if has("iconv") + set viminfo^=c +endif + +" Removable media paths +if has("win32") + set viminfo+=ra:,rb: +endif + +" ---------- + +if has("gui_running") + set background=light + + if has("win32") + "set guifont=Courier_New:h18:cRUSSIAN + set guifont=Lucida_Console:h18:cRUSSIAN + else + set guifont=Monospace\ 16 + set toolbar=icons,text " how to show the toolbar + endif + + " set guicursor+=a:blinkon0 " Stop cursor blinking + + " Make shift-insert work like in Xterm + " map + " map! + + + " Set nice colors + " Background for normal text is light grey + " Cursor is green + " Text below the last line is darker grey + " Status line is bright white on blue + highlight Normal guibg=grey90 + highlight Cursor guibg=green guifg=NONE + highlight NonText guibg=grey80 + highlight Constant guibg=grey90 + highlight Special gui=NONE guibg=grey90 + highlight StatusLine gui=bold guifg=white guibg=blue + + " ---------- + " From http://slobin.pp.ru/vim/_vimrc.html + + " Arrows should go into wrapped lines, but not while popup menu is visible + imap pumvisible() ? "" : "gj" + imap pumvisible() ? "" : "gk" + + " The key should select from completion menu without adding a newline + imap pumvisible() ? "" : "" + " ---------- +else + + if (&term =~ "linux") || ($BACKGROUND == 'DARK') || ($BACKGROUND == 'dark') + \ || has("win32") + " Background of the terminal is black or dark grey + set background=dark + else + set background=light + endif + + if (&term =~ "linux") + set = + else + highlight MoreMsg cterm=bold ctermfg=NONE + highlight Question cterm=bold ctermfg=NONE + endif + + if (&term =~ "term") || (&term =~ "rxvt") || (&term =~ "vt100") || (&term =~ "screen") + set = + + " 'autoselect' to always put selected text on the clipboard; + " 'unnamed' to use the * register like unnamed register '*' + " for all yank, delete and put operations; + " This allows to use mouse for copy/paste in local xterm, + " but prevents to save the unnamed register between sessions. + " set clipboard=autoselect,unnamed,exclude:cons\|linux + + if has ("terminfo") + " set t_Co=256 + set t_Co=16 + else + set t_Co=8 + set t_Sf="\e[3%dm" + set t_Sb="\e[4%dm" + endif + endif + + if (&term =~ "screen") + set ttymouse=xterm " Enable mouse codes under GNU screen + if empty(&t_ts) + " Enable window title under screen/tmux + let &t_ts = "\e]2;" + let &t_fs = "\007" + endif + endif +endif + +highlight SpellBad term=underline cterm=NONE ctermfg=white ctermbg=red guifg=white guibg=red " gui=undercurl guisp=red +highlight StatusLine cterm=bold ctermfg=white ctermbg=blue gui=NONE guifg=white guibg=blue +highlight Visual cterm=NONE ctermfg=white ctermbg=blue gui=NONE guifg=white guibg=blue " Selection highlighting + +" Multiline comments often confuse vim syntax highlighting - these maps +" allow to resynchronize; the first is faster, the second is more thorough +nmap \sc :syntax sync clear +nmap \ss :syntax sync fromstart + + +" AUTOCOMMANDS + +" Enable filetype detection +filetype plugin indent on + +" Reread me after editing +autocmd BufWritePost ~/.vimrc source ~/.vimrc | syntax on + +if version >= 700 +" Save all files before running any quickfix command (grep, makeprg, etc.) +autocmd QuickFixCmdPre * wall +endif + +" Syntax highlighting +autocmd BufReadPost * syntax on + + +" Restore last known cursor position +function! RestorePosition() + if exists('b:position_resored') + return + endif + + if line("'\"") > 0 + call cursor(line("'\""), col("'\"")) + endif + let b:position_resored = 1 +endfunction + +" When editing a file, always jump to the last cursor position (if saved) +autocmd BufReadPost * call RestorePosition() + + +function! SetupEncoding(encoding) + if !has("iconv") || exists('b:encoding_set') + return + endif + + if strlen(a:encoding) > 0 + call RestorePosition() + let b:encoding_set = 1 + execute "edit ++enc=" . a:encoding + endif +endfunction + + +" http://lwn.net/Articles/226514/ + +augroup gpg +" Remove ALL autocommands for the current group. +autocmd! +autocmd BufReadPre,FileReadPre *.gpg set viminfo= +autocmd BufReadPre,FileReadPre *.gpg setlocal noswapfile +autocmd BufReadPost *.gpg :%!gpg -q -d +autocmd BufReadPost *.gpg | redraw +autocmd BufWritePre *.gpg :%!gpg --default-recipient-self -q -e -a +autocmd BufWritePost *.gpg u +autocmd VimLeave *.gpg :!clear +" For OpenSSL: +" BufReadPost: use "openssl bf -d -a" +" BufWritePre: use "openssl bf -salt -a" +augroup END + + +function! SetWrap() + setlocal wrap + map gk + imap gk + map gj + imap gj + let b:wrap = 1 +endfunction + +function! SetNoWrap() + setlocal nowrap + map k + map j + let b:wrap = 0 +endfunction + +command! SetWrap call SetWrap() +command! SetNoWrap call SetNoWrap() + +" b:wrap can be set by an ftplugin +autocmd BufReadPost * if !exists("b:wrap") | call SetWrap() | endif + + +" MAPPINGS + +" Do not unindent #-comment +inoremap # X# + +" map +" map +" map :shell + + +if version >= 700 +" WEB BROWSERS + +let s:URL_re="\\v(((https?|ftp|gopher|telnet)://|(mailto|file|news|about|ed2k|irc|sip|magnet):)[^' \t<>\"]+|(www|web|w3)[a-z0-9_-]*\\.[a-z0-9._-]+\\.[^' \t<>\"]+)[a-z0-9/]\\c" + +function! ExtractURL() + let line = getline('.') + let parts = split(line, s:URL_re . '\zs') + + if len(parts) == 0 + throw 'ExtractURLCannotFindURL' " No URL found + endif + + let length = 0 + let column = col('.') + + for p in parts + let save_length = length + let length += len(p) + if length >= column + break + endif + endfor + + let pos = match(p, s:URL_re) + if pos == -1 + throw 'ExtractURLCannotFindURL' " No URL found + endif + + if save_length + pos >= column " cursor left of the URL + throw 'ExtractURLCannotFindURL' + endif + + return strpart(p, pos) +endfunction + +function! EscapeURL(url) + let url = substitute(a:url, ' ', '%20', 'g') + return escape(url, '!#$%') +endfunction + +function! OpenURL(url, newwin) + execute "!webbrowser " . a:newwin . " '" . EscapeURL(a:url) . "'" +endfunction + +function! ExtractOpenURL(newwin) + try + let url = ExtractURL() + catch /^ExtractURLCannotFindURL$/ + echoerr 'No URL found under cursor' + return + endtry + + call OpenURL(url, a:newwin) +endfunction + +function! EncodeOpenURL(url, newwin) + execute "!webbrowser-encode-url " . a:newwin . " '" . EscapeURL(a:url) . "'" +endfunction + + +" Send current link to a browser +nmap \b :call ExtractOpenURL('') +nmap \w :call ExtractOpenURL('-n') +nmap \t :call ExtractOpenURL('-t') +" Send visual block to a browser +vmap \b ""y:call OpenURL('"', '') +vmap \w ""y:call OpenURL('"', '-n') +vmap \t ""y:call OpenURL('"', '-t') +" Encode and send visual block to a browser +vmap \B ""y:call EncodeOpenURL('"', '') +vmap \W ""y:call EncodeOpenURL('"', '-n') +vmap \T ""y:call EncodeOpenURL('"', '-t') +" Send current file's name to a browser +nmap \B :call EncodeOpenURL('file:' . expand("%:p"), '') +nmap \W :call EncodeOpenURL('file:' . expand("%:p"), '-n') +nmap \T :call EncodeOpenURL('file:' . expand("%:p"), '-t') + +endif " version >= 700 + + +" SPELLING + +if has("spell") " Works in 7.0+ + " Use builtin spellchecker + nmap \sv :syntax off setlocal spell + " Clear + nmap \sn :syntax on setlocal nospell +endif + + +" Russian letters mapped in normal mode +"if has("keymap") +" set keymap=russian-jcuken +"endif + +if has("langmap") + if v:version >= 702 + " langmap in utf-8 mode requires at least Vim 7.2.109 + scriptencoding utf-8 + set langmap=ё`Ё~йqцwуeкrеtнyгuшiщoзpх[ъ]фaыsвdаfпgрhоjлkдlж\\;э' + \яzчxсcмvиbтnьmб\\,ю.ЙQЦWУEКRЕTНYГUШIЩOЗPÐ¥{Ъ} + \ФAЫSВDАFПGРHОJЛKДLЖ:Э\\"ЯZЧXСCМVИBТNЬMБ<Ю> + + elseif &encoding != 'utf-8' + scriptencoding koi8-r + set langmap=£`³~ÊqÃwÕeËrÅtÎyÇuÛiÝoÚpÈ[ß]ÆaÙs×dÁfÐgÒhÏjÌkÄlÖ\\;Ü' + \ÑzÞxÓcÍvÉbÔnØmÂ\\,À.êQãWõEëRåTîYçUûIýOúPè{ÿ} + \æAùS÷DáFðGòHïJìKäLö:ü\\"ñZþXóCíVéBôNøMâ<à> + endif + + scriptencoding us-ascii +endif + + +if version >= 700 +function! W() + " let encodings=filter(split(&fileencodings, ','), 'v:val != "ucs-bom"') + let encodings = ['us-ascii'] + if $LC_CTYPE == 'ru_RU.UTF-8' + let encodings += ['utf-8'] + elseif $LC_CTYPE == 'ru_RU.KOI8-R' + let encodings += ['koi8-r', 'utf-8'] + elseif v:lc_time == 'Russian_Russia.1251' + let encodings += ['cp1251', 'utf-8'] + endif + + for e in encodings + try + execute 'set fileencoding=' . e + w + break + catch /E513: write error, conversion failed/ + continue + endtry + endfor + + if &modified + throw '"' . expand('%') . '" E513: write error, conversion failed; tried ' . join(encodings, ',') + elseif has("spell") + call SetupSpell() + endif +endfunction + +command! W call W() +endif + + +function! SlowTerm() + set laststatus=1 + set noruler + set shortmess=aoOtT + set noshowcmd + set scrolljump=5 " The minimal number of lines to scroll vertically when the cursor gets of the screen + set sidescroll=5 + set nottyfast + set notitle + set timeoutlen=5000 + set nowildmenu + set wildmode=list:longest + set viminfo=!,h,'10,<100,s5 + syntax off + highlight NonText cterm=NONE ctermfg=NONE +endfunction + +if exists("$SLOWTERM") + call SlowTerm() +endif + + +" ---------- +" From http://slobin.pp.ru/vim/_vimrc.html + +" These options will be kept between editing sessions +" let options = [] + +" Called automagically after .viminfo and plugins are loaded, sets +" miscellaneous options from persistent global variables +" function! VimEnter() + " for optname in g:options + " let varname = "g:OPT_" . toupper(optname) + " if exists(varname) + " execute "let &" . optname . " = " . varname + " endif + " endfor + + " if has("gui_running") && exists("g:WINPOSX") && exists("g:WINPOSY") + " execute "winpos" g:WINPOSX g:WINPOSY + " endif +" endfunction + +" Called automagically before .viminfo is saved, saves miscellaneous +" options into persistent global variables +" function! VimLeavePre() + " call filter(g:, 'v:key !~# "^OPT_"') + " for optname in g:options + " let varname = "g:OPT_" . toupper(optname) + " execute "let " . varname . " = &g:" . optname + " endfor + + " if has("gui_running") + " let g:WINPOSX = getwinposx() + " let g:WINPOSY = getwinposy() + " endif +" endfunction + +" autocmd VimEnter * call VimEnter() +" autocmd VimLeavePre * call VimLeavePre() + + +" Called automagically after every buffer read, enables fileencoding +" setting from modeline (see Tip #911) +function! AutoEncoding() + if exists("b:justloaded") + unlet b:justloaded + if &modified && &fileencoding != "" + call SetupEncoding(&fileencoding) + endif + endif +endfunction + +" Magic autocommands installed here +autocmd BufReadPost * let b:justloaded = 1 +autocmd BufWinEnter * call AutoEncoding() + + +let CONVERT=1 + +" Value of a character under cursor; better than standard '0x%02B (%b)' +function! HexDec() + let char = matchstr(getline("."), ".", col(".") - 1) + if g:CONVERT + let char = iconv(char, &encoding, &fileencoding) + let format = "0x%02X <%d>" + else + let format = "0x%02X (%d)" + endif + let char = char2nr(char) + return printf(format, char, char) +endfunction + + +if has("iconv") + " Helper function for :DecodeQP and :DecodeURL commands + function! DecodeHex(arg) + return iconv(printf("%c", str2nr(submatch(1), 16)), a:arg, &encoding) + endfunction + + " Custom completion for encoding names + function! EncList(ArgLead, CmdLine, CursorPos) + return filter(split(&fileencodings, ','), + \ "strpart(v:val, 0, strlen(a:ArgLead)) == a:ArgLead") + endfunction + + if version >= 700 + " Command for decoding qp-encoded text + command! -bar -nargs=? -range -complete=customlist,EncList DecodeQP + \ ,s/=\(\x\x\|\n\)/\=DecodeHex()/eg + + " Command for decoding url-encoded text + command! -bar -nargs=? -range -complete=customlist,EncList DecodeURL + \ ,s/%\(\x\x\)/\=DecodeHex()/eg + endif +endif + + +if has("spell") + function! SetupSpell() + if &fileencoding =~ 'ascii' + setlocal spelllang=en spellfile=~/.vim/spell/en.ascii.add + elseif &fileencoding == 'koi8-r' + setlocal spelllang=en,ru spellfile=~/.vim/spell/en.ascii.add,~/.vim/spell/ru.koi8-r.add + elseif &fileencoding == 'utf-8' + setlocal spelllang=en,ru spellfile=~/.vim/spell/en.ascii.add,~/.vim/spell/ru.utf-8.add + else + setlocal spelllang= spellfile= + endif + endfunction + autocmd BufReadPost * call SetupSpell() +endif + + +function! SyntaxName() + echomsg synIDattr(synID(line("."), col("."), 1), "name") +endfunction + + +if has("python") + +python << END_OF_PYTHON + +import sys, rlcompleter, unicodedata, vim +from itertools import * +vim_complete = rlcompleter.Completer().complete + +def vim_comp_list(): + """Implementation of CompList() function""" + arglead = vim.eval("a:ArgLead") + fence = int(vim.eval("match(a:ArgLead, '\(\w\|\.\)*$')")) + left, right = arglead[:fence], arglead[fence:] + try: + completions = (vim_complete(right, i) for i in count()) + candidates = list(takewhile(bool, completions)) + except NameError: + candidates = [] + suggestions = [left + x for x in candidates] + vim.command("return " + repr(suggestions)) + +def vim_calc(command): + """Implementation of :Calc command""" + global _ + try: + result = eval(command) + except SyntaxError: + exec command in globals() + else: + if result != None: + print result + _ = result + xx = ''.join('\\x%02x' % ord(x) for x in str(_)) + vim.command('let @" = "%s"' % xx) + +def vim_pydo(command): + """Implementation of :Pydo command""" + codeobj = compile(command, "command", "eval") + line1 = vim.current.range.start + line2 = vim.current.range.end + delta = 0 + for numz in range(line1, line2+1): + line = vim.current.buffer[numz-delta] + uline = unicode(line, vim.eval('&fileencoding')) + num = numz + 1 + words = line.split() + result = eval(codeobj, globals(), locals()) + if result is None or result is False: + del vim.current.buffer[numz-delta] + delta += 1 + continue + if isinstance(result, list) or isinstance(result, tuple): + result = " ".join(map(str, result)) + else: + result = str(result) + vim.current.buffer[numz-delta] = result + +def vim_unicode_name(): + try: + char = vim.eval("matchstr(getline('.'), '.', col('.') - 1)") + print map(unicodedata.name, char.decode(vim.eval("&encoding"))) + except (AttributeError, ValueError), target: + print "%s: %s" % (target.__class__.__name__, target.message) + +END_OF_PYTHON + +" Custom completion for python expressions +function! CompList(ArgLead, CmdLine, CursorPos) + python vim_comp_list() +endfunction + +" Python command line calculator +command! -nargs=+ -range -complete=customlist,CompList Calc + \ , python vim_calc() + +" Python text range filter +command! -nargs=+ -range -complete=customlist,CompList Pydo + \ , python vim_pydo() + +" Display unicode name for the character under cursor +command! Uname python vim_unicode_name() +command! UName call Uname() + +endif +" ---------- + + +" This has to go to the very end of ~/.vimrc to allow reading the .vimrc +set secure " safer working with script files in the current directory diff --git a/.xinitrc b/.xinitrc new file mode 100644 index 0000000..d3a76ea --- /dev/null +++ b/.xinitrc @@ -0,0 +1,81 @@ +#!/bin/sh + +PATH="$PATH":/usr/games + +# Set initial background +xsetroot -solid DarkCyan +xli -onroot -quiet -center -border darkcyan -zoom auto "`$HOME/lib/xsetbg/print-filename.py`" + +# load .Xdefaults/.Xresources +if [ -f "$HOME"/lib/X11/.Xdefaults ]; then + xrdb -merge -I"$HOME" "$HOME"/lib/X11/.Xdefaults +fi +if [ -f "$HOME"/lib/X11/.Xresources ]; then + xrdb -merge -I"$HOME" "$HOME"/lib/X11/.Xresources +fi + +# SUN OpenWindows +#if [ -f "$HOME"/lib/X11/.OWdefaults ]; then +# xrdb -merge -nocpp "$HOME"/lib/X11/.OWdefaults # Load Users OW resource database +#fi +#if [ -f "$OPENWINHOME"/lib/Xdefaults ]; then +# xrdb -merge "$OPENWINHOME"/lib/Xdefaults # Load Default X11 resource database +#fi + +#if [ -x "$HOME"/lib/X11/.openwin-init ]; then +# "$HOME"/lib/X11/.openwin-init # Custom OpenWindows tools +#elif [ -x "$OPENWINHOME"/lib/openwin-init ]; then +# "$OPENWINHOME"/lib/openwin-init # Default OpenWindows tools +#fi + +# EN/RU/Hebrew, switch on RightAlt, Compose: RightControl, Level3:RightMenu +setxkbmap -layout '' -variant '' -option '' +setxkbmap -layout 'us,ru' -variant ',common' -option 'grp:toggle,compose:rctrl,lv3:menu_switch' + +# adjust key bindings (if any) +#[ -f "$HOME"/lib/X11/.Xmodmap ] && xmodmap "$HOME"/lib/X11/.Xmodmap + +# X settings: shorter beep +#xset b 50 400 50 +# autorepeat +xset r on +# screen saver 5 minutes +xset s 300 300 +# DPMS on desktop: standby - 1 hour, suspend - 2 hours, off - 4 hours +#xset dpms 3600 7200 14400 +# DPMS on notebook: standby - 10 minutes, suspend - 15 minutes, off - 20 minutes +xset dpms 600 900 1200 + +xscreensaver & +xbindkeys +xxkb & + +synclient AccelFactor=0.1 MaxDoubleTapTime=80 MaxSpeed=1 RightEdge=5000 \ + TapButton1=1 TapButton2=2 TapButton3=3 HorizEdgeScroll=1 VertEdgeScroll=1 + +# Turn mouse off on keyboard activity; turn it back on after 1 second +#syndaemon -dt -i1 + +# start a small console shell +#xterm -C -geometry 80x8-0+0 -n Console -T Consle -ls +ut -fn 6x10 & + +#WIDTH=1024: 85x85+400+1 +#WIDTH=1600: 100x100+600+1 +#WIDTH=1920: 150x150+880+1 +xclock -geometry 100x100+600+1 -bg white -update 1 & + +# multi-biff +#xbuffy -fn '-*-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r' -geometry +0+125 -boxfile mail/misc/.xbuffyrc & + +if [ -z "$WINDOW_MANAGER" ]; then + WINDOW_MANAGER=fvwm2 + export WINDOW_MANAGER +fi + +gpg-agent --daemon --write-env-file "$HOME"/.gnupg/agent-info \ + dbus-launch --exit-with-session \ + "$WINDOW_MANAGER" + +# Stop xscreensaver and xsetbg.py +xscreensaver-command -exit & +"$HOME/lib/xsetbg"/xsetbg-http-stop & diff --git a/.xserverrc b/.xserverrc new file mode 100644 index 0000000..ce84721 --- /dev/null +++ b/.xserverrc @@ -0,0 +1,2 @@ +#!/bin/sh +exec X -auth $HOME/.Xauthority -nolisten tcp -quiet diff --git a/bin/GET.py b/bin/GET.py new file mode 100755 index 0000000..f7fddbd --- /dev/null +++ b/bin/GET.py @@ -0,0 +1,71 @@ +#! /usr/bin/env python + +import sys +url = sys.argv[1] + +import urllib +urllib._urlopener = urllib.FancyURLopener() + +from cgi import parse_qsl +from m_lib.defenc import default_encoding + +protocol, request = urllib.splittype(url) +user, password, port = None, None, None +host, path = urllib.splithost(request) +if host: + user, host = urllib.splituser(host) + if user: + user, password = urllib.splitpasswd(user) + host, port = urllib.splitport(host) + if port: port = int(port) +path, tag = urllib.splittag(path) +path, query = urllib.splitquery(path) +path = urllib.unquote(path) +if tag: tag = urllib.unquote_plus(tag) + +if query: + qlist = [] + for name, value in parse_qsl(query): + qlist.append((name, value)) + +url = protocol + "://" +if user: + url += urllib.quote(user) + if password: + url += ':' + urllib.quote(password) + url += '@' +if host: + url += host.decode(default_encoding).encode('idna') + if port: + url += ':%d' % port +if path: + if protocol == "file": + url += urllib.quote(path) + else: + url += urllib.quote(path) +if query: + url += '?' + urllib.urlencode(qlist) +if tag: + url += '#' + urllib.quote_plus(tag) + +# I remember seeing some sites that return broken HTML or even HTTP response +# without "compatible" user agent; I don't know if such sites are still around, +# but this header doesn't cause any harm so I'd better continue to use it. +# UPDATE: I saw a number of sites that forbid "Mozilla compatible" +server_version = "Python-urllib/%s" % urllib.__version__ +urllib._urlopener.addheaders[0] = ('User-agent', server_version) +urllib._urlopener.addheaders.append(('Accept-Charset', "koi8-r;q=1.0")) + +import os +dest_file = os.path.basename(url) + +if not dest_file: + dest_file = "_index.html" + +filename, headers = urllib.urlretrieve(url, dest_file) + +if headers.has_key("last-modified"): + from m_lib.net.www.util import parse_time + last_modified = parse_time(headers["last-modified"]) + if last_modified: + os.utime(dest_file, (last_modified, last_modified)) diff --git a/bin/HEAD.py b/bin/HEAD.py new file mode 100755 index 0000000..c7b3764 --- /dev/null +++ b/bin/HEAD.py @@ -0,0 +1,61 @@ +#! /usr/bin/env python + +import sys +url = sys.argv[1] + +import socket +socket.setdefaulttimeout(30) + +from cgi import parse_qsl +import urllib +from m_lib.defenc import default_encoding + +protocol, request = urllib.splittype(url) +user, password, port = None, None, None +host, path = urllib.splithost(request) +if host: + user, host = urllib.splituser(host) + if user: + user, password = urllib.splitpasswd(user) + host, port = urllib.splitport(host) + if port: port = int(port) +path, tag = urllib.splittag(path) +path, query = urllib.splitquery(path) +path = urllib.unquote(path) +if tag: tag = urllib.unquote_plus(tag) + +if query: + qlist = [] + for name, value in parse_qsl(query): + qlist.append((name, value)) + +url = '' +host = host.decode(default_encoding).encode('idna') +if path: + url += urllib.quote(path) +if query: + url += '?' + urllib.urlencode(qlist) +if tag: + url += '#' + urllib.quote_plus(tag) + +import httplib +server = httplib.HTTP(host, port) +server.set_debuglevel(1) + +server.putrequest("HEAD", path) +if port: + server.putheader("Host", '%s:%d' % (host, port)) +else: + server.putheader("Host", host) + +# I remember seeing some sites that return broken HTML or even HTTP response +# without "compatible" user agent; I don't know if such sites are still around, +# but this header doesn't cause any harm so I'd better continue to use it. +# UPDATE: I saw a number of sites that forbid "Mozilla compatible" +client_version = "Python-urllib/%s" % urllib.__version__ +server.putheader('User-agent', client_version) + +server.putheader('Accept-Charset', "koi8-r;q=1.0") +server.endheaders() + +server.getreply() diff --git a/bin/PS b/bin/PS new file mode 100755 index 0000000..db86d2b --- /dev/null +++ b/bin/PS @@ -0,0 +1,10 @@ +#! /usr/bin/env python + +import sys, os + +args = ' '.join(sys.argv[1:]) +if "--sort=" not in args: + args += " --sort=user" + +pager = os.environ.get("PAGER", "more") +os.system("ps %s | %s" % (args, pager)) diff --git a/bin/abspath.py b/bin/abspath.py new file mode 100755 index 0000000..fe57b54 --- /dev/null +++ b/bin/abspath.py @@ -0,0 +1,4 @@ +#! /usr/bin/env python + +import sys, os +print os.path.abspath(sys.argv[1]) diff --git a/bin/browser-stack.py b/bin/browser-stack.py new file mode 100755 index 0000000..cec4f7d --- /dev/null +++ b/bin/browser-stack.py @@ -0,0 +1,31 @@ +#! /usr/bin/env python + +import sys, os +from browser_stack import get_stack, save_stack + +command = sys.argv[1] +if command.startswith('--'): + command = command[2:] + +stack = get_stack() + +if command in ('get', 'peek', 'print'): + if stack: print stack[0], + sys.exit() +elif command in ('list', 'list-all'): + if stack: print ''.join(stack), + sys.exit() + +browser = os.path.basename(sys.argv[2]) + '\n' +if browser in stack: + # With 'push' this prevents duplicates + stack.remove(browser) + +if command == 'push': + stack.insert(0, browser) +elif command == 'pop': + pass # The browser was already removed +else: + raise ValueError('Unknown command "%s"' % command) + +save_stack(stack) diff --git a/bin/browser_stack.py b/bin/browser_stack.py new file mode 100755 index 0000000..b81e6da --- /dev/null +++ b/bin/browser_stack.py @@ -0,0 +1,23 @@ +#! /usr/bin/env python + +import os, shutil +browser_stack = os.path.expanduser('~/.config/.browser-stack') + +def get_stack(): + try: + with open(browser_stack, 'rU') as stack_file: + return stack_file.readlines() + except IOError: # No such file + return [] + +def save_stack(stack): + os.umask(0066) # octal -rw------- + with open(browser_stack+'.tmp', 'w') as stack_file: + stack_file.writelines(stack) + shutil.copy(browser_stack+'.tmp', browser_stack) + os.remove(browser_stack+'.tmp') + +def set_current_browser(): + stack = get_stack() + if stack: + os.environ['BROWSER'] = stack[0].strip() diff --git a/bin/cgmem_nice b/bin/cgmem_nice new file mode 100755 index 0000000..b36a6c5 --- /dev/null +++ b/bin/cgmem_nice @@ -0,0 +1,23 @@ +#! /bin/sh + +usage() { + echo "Usage: $0 {100|200|300|500|1000|2000|4000} [command [args]]" + exit 1 +} + +case "$1" in + 100|200|300|500|1000|2000|4000) + ;; + + *) usage + ;; +esac + +size="$1" # in megabytes +shift + +CGROUPS=/sys/fs/cgroup +echo $$ > "$CGROUPS"/${size}M/tasks || exit 1 + +ulimit -d ${size}000 +exec nice -20 ionice -c3 "${@:-$SHELL}" diff --git a/bin/cleanup-filenames-recursive.sh b/bin/cleanup-filenames-recursive.sh new file mode 100755 index 0000000..1c1d69a --- /dev/null +++ b/bin/cleanup-filenames-recursive.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +if ! echo "$LC_CTYPE" | grep -Fiq utf-8; then + echo "This script requires UTF-8 locale" 1>&2 + exit 1 +fi + +if [ "$1" ]; then + cd -- "$1" || exit 1 # or just do it in current directory +fi +start_dir="`pwd`" + +find . -depth -type d -print | +while read dir; do + cd -- "$dir" && + cleanup-filenames.sh * && + cd -- "$start_dir" || exit 1 +done + +[ "$1" ] && [ "$1" != . ] && exec cleanup-filenames.sh "$1" +exit 0 diff --git a/bin/cleanup-filenames.sh b/bin/cleanup-filenames.sh new file mode 100755 index 0000000..c977312 --- /dev/null +++ b/bin/cleanup-filenames.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +if ! echo "$LC_CTYPE" | grep -Fiq utf-8; then + echo "This script requires UTF-8 locale" 1>&2 + exit 1 +fi + +for fname in "$@"; do + + newname=$(echo "$fname" | sed -e " +s/[‘“’”‘“’”″′«»\`\"]/'/g +s/ *: */ - /g +s/[–—]/-/g +s/…/.../g +s/ \+/ /g +s/\?//g +s/№/N/g +") + + if [ "$fname" \!= "$newname" ]; then + echo "$fname" + echo "$newname" + mv -- "$fname" "$newname" + echo + fi +done diff --git a/bin/cleanup-recode.sh b/bin/cleanup-recode.sh new file mode 100755 index 0000000..427cd6d --- /dev/null +++ b/bin/cleanup-recode.sh @@ -0,0 +1,22 @@ +#! /bin/sh + +if ! echo "$LC_CTYPE" | grep -Fiq utf-8; then + echo "This script requires UTF-8 locale" 1>&2 + exit 1 +fi + +from_enc=utf-8 +to_enc=koi8-r + +while getopts f:t: opt; do + case $opt in + f ) from_enc="$OPTARG" ;; + t ) to_enc="$OPTARG" ;; + esac +done +shift `expr $OPTIND - 1` + +for dir in "$@"; do + cleanup-filenames-recursive.sh "$dir" && + recode-filenames-recursive.py "$from_enc" "$to_enc" "$dir" || exit 1 +done diff --git a/bin/cmp.py b/bin/cmp.py new file mode 100755 index 0000000..37cc0ff --- /dev/null +++ b/bin/cmp.py @@ -0,0 +1,90 @@ +#! /usr/bin/env python +"""cmp.py: compare two files. Replace cmp because standard cmp cannot compare +large files. +""" + +import sys, os + +if sys.argv[1] in ("-h", "--help"): + print "Broytman cmp.py 1.0, Copyright (C) 2003 PhiloSoft Design" + print "Usage: cmp.py [-h|--help|-V|--version] [-i] file1 file2" + sys.exit() +elif sys.argv[1] in ("-V", "--version"): + print "Broytman cmp.py 1.0, Copyright (C) 2003 PhiloSoft Design" + sys.exit() +elif sys.argv[1] == "-i": + show_pbar = False + fname1 = sys.argv[2] + fname2 = sys.argv[3] +else: + show_pbar = sys.stderr.isatty() + fname1 = sys.argv[1] + fname2 = sys.argv[2] + +if show_pbar: + try: + from m_lib.pbar.tty_pbar import ttyProgressBar + except ImportError: + show_pbar = 0 + +if show_pbar: + try: + size = os.path.getsize(fname1) + except: + print filename, ": no such file" + sys.exit(1) + +if show_pbar: + pbar = ttyProgressBar(0, size) + +file1 = open(fname1, 'rb') +file2 = open(fname2, 'rb') + +M = 1024*1024 +diff = False +count = 0 + + +def report(): + if show_pbar: + global pbar + del pbar + sys.stderr.write("Files differ at %d megabayte block\n" % count) + global diff + diff = True + + +while True: + block1 = file1.read(M) + block2 = file2.read(M) + + if show_pbar: + pbar.display(file1.tell()) + + if block1 and block2: + if len(block1) <> len(block2): + report() + break + elif block1: + report() + break + elif block2: + report() + break + else: + break + + if block1 <> block2: + report() + break + + count += 1 + +if show_pbar and not diff: + del pbar + +file1.close() +file2.close() + +if diff: + sys.exit(1) diff --git a/bin/compyle b/bin/compyle new file mode 100755 index 0000000..260788a --- /dev/null +++ b/bin/compyle @@ -0,0 +1,17 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: compyle [-1] file.py..." + exit 1 +fi + +TEMPLATE="from py_compile import compile; compile('" + +for file in "$@"; do + pgm=$TEMPLATE$file"')" + python"$PY_VER" -c "$pgm" || exit 1 + python"$PY_VER" -OOc "$pgm" || exit 1 +done + +#pgm="$HOME/lib/python/com.py" +#python"$PY_VER" $pgm "$@" && python"$PY_VER" -O $pgm "$@" diff --git a/bin/compyle-ptl b/bin/compyle-ptl new file mode 100755 index 0000000..97292bb --- /dev/null +++ b/bin/compyle-ptl @@ -0,0 +1,11 @@ +#! /usr/bin/env python + + +import sys +from quixote.ptl.ptl_compile import compile + +if len(sys.argv) <= 1: + sys.exit(1) + +for file in sys.argv[1:]: + compile(file, file[:-3]+'pyc') diff --git a/bin/compyle4vim.py b/bin/compyle4vim.py new file mode 100755 index 0000000..8b5c78b --- /dev/null +++ b/bin/compyle4vim.py @@ -0,0 +1,30 @@ +#! /usr/bin/env python + + +import sys, os + +filename = sys.argv[1] +ext = os.path.splitext(filename)[1] + +infile = open(filename, 'r') +codestring = infile.read() +infile.close() + +try: + if ext == ".ptl": # Python Template (Quixote) + from quixote.ptl_compile import Template + template = Template(codestring, filename) + template.compile() + else: + compile(codestring, filename, "exec") +except SyntaxError, detail: + pass +else: + sys.exit() + +msg, (_fname, lineno, offset, line) = detail +if offset is None: offset = 1 + +sys.stderr.write(""" File "%s", line %d, column %d +SyntaxError: %s +""" % (filename, lineno, offset, msg)) diff --git a/bin/compyleall b/bin/compyleall new file mode 100755 index 0000000..8ba7cb5 --- /dev/null +++ b/bin/compyleall @@ -0,0 +1,12 @@ +#! /bin/sh + +umask 022 + +if [ -z "$PY_VER" ]; then + PY_VER="`python -c 'import sys; print sys.version[:3]'`" +fi + +PY_PREFIX="`python$PY_VER -c 'import sys; print sys.prefix'`" + +python$PY_VER $PY_PREFIX/lib/python$PY_VER/compileall.py . +python$PY_VER -O $PY_PREFIX/lib/python$PY_VER/compileall.py . diff --git a/bin/compyleall-ptl b/bin/compyleall-ptl new file mode 100755 index 0000000..bf602a9 --- /dev/null +++ b/bin/compyleall-ptl @@ -0,0 +1,7 @@ +#! /usr/bin/env python + + +import sys +from quixote.ptl.ptl_compile import compile_dir + +compile_dir('.') diff --git a/bin/decode-URLs.py b/bin/decode-URLs.py new file mode 100755 index 0000000..70400ab --- /dev/null +++ b/bin/decode-URLs.py @@ -0,0 +1,12 @@ +#! /usr/bin/env python + +import sys, urllib + +while True: + url = sys.stdin.readline() + if not url: + break + unqoted = urllib.unquote(url.strip()) + if unqoted.startswith('file://'): + unqoted = unqoted[len('file://'):] + print unqoted diff --git a/bin/distutils b/bin/distutils new file mode 100755 index 0000000..b592282 --- /dev/null +++ b/bin/distutils @@ -0,0 +1,5 @@ +#! /bin/sh + +umask 022 +python"$PY_VER" setup.py "$@" +exec rm -f MANIFEST diff --git a/bin/doc2html1 b/bin/doc2html1 new file mode 100755 index 0000000..5319869 --- /dev/null +++ b/bin/doc2html1 @@ -0,0 +1,9 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 file.doc" + exit 1 +fi + +tmpfile="`mktemp -t XXXXXX.html`" && wvHtml "$1" "$tmpfile" && +webdump "$tmpfile" && exec rm "$tmpfile" diff --git a/bin/doc2html2 b/bin/doc2html2 new file mode 100755 index 0000000..32fd6f9 --- /dev/null +++ b/bin/doc2html2 @@ -0,0 +1,9 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 file.doc" + exit 1 +fi + +tmpfile="`mktemp -t XXXXXX.html`" && wvHtml "$1" "$tmpfile" && +webdump2 "$tmpfile" && exec rm "$tmpfile" diff --git a/bin/doc2html_web b/bin/doc2html_web new file mode 100755 index 0000000..4c4c701 --- /dev/null +++ b/bin/doc2html_web @@ -0,0 +1,19 @@ +#! /bin/sh + +if [ -z "$1" ]; then + echo "Usage: $0 file.doc" + exit 1 +fi + +new_win='' + +while getopts e:nt opt; do + case $opt in + n ) new_win="-n" ;; + t ) new_win="-t" ;; + esac +done +shift `expr $OPTIND - 1` + +tmpfile="`mktemp -t XXXXXX.html`" && wvHtml "$1" "$tmpfile" && +webbrowserX $new_win file://"$tmpfile" && (sleep 10 && exec rm "$tmpfile" &) diff --git a/bin/e b/bin/e new file mode 100755 index 0000000..fca58c3 --- /dev/null +++ b/bin/e @@ -0,0 +1,2 @@ +#! /bin/sh +exec elinks "$@" diff --git a/bin/find_home_grep.sh b/bin/find_home_grep.sh new file mode 100755 index 0000000..13f725c --- /dev/null +++ b/bin/find_home_grep.sh @@ -0,0 +1,4 @@ +#! /bin/sh + +cd "$HOME" && +exec cgmem_nice 100 find . \( -type d \( -name CVS -o -name .svn -o -name .hg -o -name .git -o -path ./.cache/chromium/\* -o -path ./.cache/mozilla/\* -o -path ./Internet/WWW/htdocs/doc/\* -o -path ./archive/STORE/\* -o -path ./current/Bregis/nobackup/\* -o -path ./lib/xsetbg/images/\* -o -path ./media/\* -o -path ./mnt/\*\* \) -prune \) -o -type f -exec grep -I "$@" '{}' \+ 2>/dev/null diff --git a/bin/fromdos b/bin/fromdos new file mode 100755 index 0000000..d5dfcf7 --- /dev/null +++ b/bin/fromdos @@ -0,0 +1,2 @@ +#! /bin/sh +exec iconvx.py -f cp866 -t koi8-r "$@" diff --git a/bin/fromwin b/bin/fromwin new file mode 100755 index 0000000..57964a1 --- /dev/null +++ b/bin/fromwin @@ -0,0 +1,2 @@ +#! /bin/sh +exec iconvx.py -f cp1251 -t koi8-r "$@" diff --git a/bin/get_html_encoding.py b/bin/get_html_encoding.py new file mode 100755 index 0000000..8fd9656 --- /dev/null +++ b/bin/get_html_encoding.py @@ -0,0 +1,73 @@ +#! /usr/bin/env python + + +from HTMLParser import HTMLParseError +from m_lib.net.www.html import HTMLParser as _HTMLParser + + +class HTMLHeadDone(Exception): pass + + +class HTMLParser(_HTMLParser): + def end_head(self): + raise HTMLHeadDone() + + + def do_meta(self, attrs): + http_equiv = "" + content = "" + + for attrname, value in attrs: + if value: + value = value.strip() + if attrname == 'http-equiv': + http_equiv = value.lower() + elif attrname == 'content': + content = value + + if http_equiv == "content-type": + try: + # extract charset from "text/html; foo; charset=UTF-8; bar;" + self.charset = content.lower().split('charset=')[1].split(';')[0] + except IndexError: + pass + raise HTMLHeadDone() + + +def parse_html(filename): + infile = open(filename, 'r') + parser = HTMLParser() + + for line in infile: + try: + parser.feed(line) + except (HTMLParseError, HTMLHeadDone): + break + + infile.close() + + try: + parser.close() + except (HTMLParseError, HTMLHeadDone): + pass + + if hasattr(parser, "charset"): + parser.charset = parser.charset.replace("windows-", "cp").lower() + + return parser + + +if __name__ == '__main__': + try: + import sys + parser = parse_html(sys.argv[1]) + if hasattr(parser, "charset"): + print parser.charset + else: + import chardet + charset = chardet.detect(open(sys.argv[1]).read())["encoding"] + if charset in ("ISO-8859-2", "MacCyrillic"): + charset = "cp1251" + print charset + except: + pass diff --git a/bin/get_xml_encoding.py b/bin/get_xml_encoding.py new file mode 100755 index 0000000..5007971 --- /dev/null +++ b/bin/get_xml_encoding.py @@ -0,0 +1,18 @@ +#! /usr/bin/env python + +charset = None +def xml_decl_handler(version, encoding, standalone): + global charset + charset = encoding + raise StopIteration + +if __name__ == '__main__': + try: + import sys + import xml.parsers.expat + parser = xml.parsers.expat.ParserCreate() + parser.XmlDeclHandler = xml_decl_handler + parser.ParseFile(open(sys.argv[1], 'r')) + except: + pass + if charset: print charset diff --git a/bin/gmplay b/bin/gmplay new file mode 120000 index 0000000..015dece --- /dev/null +++ b/bin/gmplay @@ -0,0 +1 @@ +mplay \ No newline at end of file diff --git a/bin/iconv.py b/bin/iconv.py new file mode 100755 index 0000000..41631fe --- /dev/null +++ b/bin/iconv.py @@ -0,0 +1,28 @@ +#! /usr/bin/env python +"Recode to default charset" + +import sys +from getopt import getopt +from m_lib.defenc import default_encoding + +from_charset = "cp1251" +to_charset = default_encoding + +options, arguments = getopt(sys.argv[1:], 'f:t:') +for option, value in options: + if option == '-f': + from_charset = value + elif option == '-t': + to_charset = value + +if arguments: + for file in arguments: + infile = open(file) + try: + for line in infile: + sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "replace")) + except: + infile.close() +else: + for line in sys.stdin: + sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "replace")) diff --git a/bin/iconvx.py b/bin/iconvx.py new file mode 100755 index 0000000..9352e73 --- /dev/null +++ b/bin/iconvx.py @@ -0,0 +1,37 @@ +#! /usr/bin/env python +"iconv wrapper" + +import sys +from getopt import getopt + +options, arguments = getopt(sys.argv[1:], 'f:t:') + +from_charset = to_charset = None + +for option, value in options: + if option == '-f': + from_charset = value + elif option == '-t': + to_charset = value + + +if from_charset is None: + raise ValueError, "you must use -f param to name source charset" + +if to_charset is None: + raise ValueError, "you must use -t param to name destination charset" + + +import tempfile, os, shutil +tempfname = "_iconvx" + tempfile.gettempprefix() + "tmp" + +if arguments: + try: + for file in arguments: + os.system("iconv.py -f '%s' -t '%s' '%s' > '%s'" % (from_charset, to_charset, file, tempfname)) + shutil.copy2(tempfname, file) + finally: + os.unlink(tempfname) + +else: # filter stdin => stdout + os.system("iconv.py -f '%s' -t '%s'" % (from_charset, to_charset)) diff --git a/bin/iconvxml.py b/bin/iconvxml.py new file mode 100755 index 0000000..86eb66d --- /dev/null +++ b/bin/iconvxml.py @@ -0,0 +1,28 @@ +#! /usr/bin/env python +"Recode using XML char references" + +import sys +from getopt import getopt +from m_lib.defenc import default_encoding + +from_charset = "utf-8" +to_charset = default_encoding + +options, arguments = getopt(sys.argv[1:], 'f:t:') +for option, value in options: + if option == '-f': + from_charset = value + elif option == '-t': + to_charset = value + +if arguments: + for file in arguments: + infile = open(file) + try: + for line in infile: + sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) + except: + infile.close() +else: + for line in sys.stdin: + sys.stdout.write(unicode(line, from_charset, "replace").encode(to_charset, "xmlcharrefreplace")) diff --git a/bin/idna.py b/bin/idna.py new file mode 100755 index 0000000..a0dabc6 --- /dev/null +++ b/bin/idna.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python + +import sys +l = len(sys.argv) + +if (l == 2) and (sys.argv[1] != '-r'): + reverse = False + address = sys.argv[1] +elif (l == 3) and (sys.argv[1] == '-r'): + reverse = True + address = sys.argv[2] +else: + print >>sys.stderr, 'Usage: %s [-r] name.domain' % sys.argv[0] + sys.exit(1) + +from m_lib.defenc import default_encoding + +if reverse: + print address.decode("idna").encode(default_encoding) +else: + print unicode(address, default_encoding).encode("idna") diff --git a/bin/koi2lat b/bin/koi2lat new file mode 100755 index 0000000..e5cd63b --- /dev/null +++ b/bin/koi2lat @@ -0,0 +1,10 @@ +#! /usr/bin/env python + + +import sys +from m_lib.rus import rus2lat + + +for line in sys.stdin: + if line[-1] == '\n': line = line[:-1] + print rus2lat.rus2lat(line) diff --git a/bin/l b/bin/l new file mode 100755 index 0000000..c8baf8f --- /dev/null +++ b/bin/l @@ -0,0 +1,14 @@ +#! /bin/sh + +case "$TERM" in + *term*|*rxvt*|vt100|screen*) + TERM=xterm + export TERM + + xtitle "links@${HOSTNAME}" + exec links2 "$@" + ;; + + *)echo "Wrong TERM" >&2 + ;; +esac diff --git a/bin/l8 b/bin/l8 new file mode 100755 index 0000000..d8b8566 --- /dev/null +++ b/bin/l8 @@ -0,0 +1,4 @@ +#! /bin/sh + +. "$HOME"/lib/X11/koi8.vars +exec luit -encoding koi8-r "$@" diff --git a/bin/lat2koi b/bin/lat2koi new file mode 100755 index 0000000..c4ed131 --- /dev/null +++ b/bin/lat2koi @@ -0,0 +1,10 @@ +#! /usr/bin/env python + + +import sys +from m_lib.rus import lat2rus + + +for line in sys.stdin: + if line[-1] == '\n': line = line[:-1] + print lat2rus.lat2rus(line) diff --git a/bin/latin1_to_ascii.py b/bin/latin1_to_ascii.py new file mode 100755 index 0000000..974edd9 --- /dev/null +++ b/bin/latin1_to_ascii.py @@ -0,0 +1,125 @@ +#! /usr/bin/env python + +# See http://code.activestate.com/recipes/251871/ + +import sys, os + +xlate = { + u'\N{ACUTE ACCENT}': "'", + u'\N{BROKEN BAR}': '|', + u'\N{CEDILLA}': '{cedilla}', + u'\N{CENT SIGN}': '{cent}', + u'\N{COPYRIGHT SIGN}': '{C}', + u'\N{CURRENCY SIGN}': '{currency}', + u'\N{DEGREE SIGN}': '{degrees}', + u'\N{DIAERESIS}': '{umlaut}', + u'\N{DIVISION SIGN}': '/', + u'\N{FEMININE ORDINAL INDICATOR}': '{^a}', + u'\N{INVERTED EXCLAMATION MARK}': '!', + u'\N{INVERTED QUESTION MARK}': '?', + u'\N{LATIN CAPITAL LETTER A WITH ACUTE}': 'A', + u'\N{LATIN CAPITAL LETTER A WITH CIRCUMFLEX}': 'A', + u'\N{LATIN CAPITAL LETTER A WITH DIAERESIS}': 'A', + u'\N{LATIN CAPITAL LETTER A WITH GRAVE}': 'A', + u'\N{LATIN CAPITAL LETTER A WITH RING ABOVE}': 'A', + u'\N{LATIN CAPITAL LETTER A WITH TILDE}': 'A', + u'\N{LATIN CAPITAL LETTER AE}': 'Ae', + u'\N{LATIN CAPITAL LETTER C WITH CEDILLA}': 'C', + u'\N{LATIN CAPITAL LETTER E WITH ACUTE}': 'E', + u'\N{LATIN CAPITAL LETTER E WITH CIRCUMFLEX}': 'E', + u'\N{LATIN CAPITAL LETTER E WITH DIAERESIS}': 'E', + u'\N{LATIN CAPITAL LETTER E WITH GRAVE}': 'E', + u'\N{LATIN CAPITAL LETTER ETH}': 'Th', + u'\N{LATIN CAPITAL LETTER I WITH ACUTE}': 'I', + u'\N{LATIN CAPITAL LETTER I WITH CIRCUMFLEX}': 'I', + u'\N{LATIN CAPITAL LETTER I WITH DIAERESIS}': 'I', + u'\N{LATIN CAPITAL LETTER I WITH GRAVE}': 'I', + u'\N{LATIN CAPITAL LETTER N WITH TILDE}': 'N', + u'\N{LATIN CAPITAL LETTER O WITH ACUTE}': 'O', + u'\N{LATIN CAPITAL LETTER O WITH CIRCUMFLEX}': 'O', + u'\N{LATIN CAPITAL LETTER O WITH DIAERESIS}': 'O', + u'\N{LATIN CAPITAL LETTER O WITH GRAVE}': 'O', + u'\N{LATIN CAPITAL LETTER O WITH STROKE}': 'O', + u'\N{LATIN CAPITAL LETTER O WITH TILDE}': 'O', + u'\N{LATIN CAPITAL LETTER THORN}': 'th', + u'\N{LATIN CAPITAL LETTER U WITH ACUTE}': 'U', + u'\N{LATIN CAPITAL LETTER U WITH CIRCUMFLEX}': 'U', + u'\N{LATIN CAPITAL LETTER U WITH DIAERESIS}': 'U', + u'\N{LATIN CAPITAL LETTER U WITH GRAVE}': 'U', + u'\N{LATIN CAPITAL LETTER Y WITH ACUTE}': 'Y', + u'\N{LATIN SMALL LETTER A WITH ACUTE}': 'a', + u'\N{LATIN SMALL LETTER A WITH CIRCUMFLEX}': 'a', + u'\N{LATIN SMALL LETTER A WITH DIAERESIS}': 'a', + u'\N{LATIN SMALL LETTER A WITH GRAVE}': 'a', + u'\N{LATIN SMALL LETTER A WITH RING ABOVE}': 'a', + u'\N{LATIN SMALL LETTER A WITH TILDE}': 'a', + u'\N{LATIN SMALL LETTER AE}': 'ae', + u'\N{LATIN SMALL LETTER C WITH CEDILLA}': 'c', + u'\N{LATIN SMALL LETTER E WITH ACUTE}': 'e', + u'\N{LATIN SMALL LETTER E WITH CIRCUMFLEX}': 'e', + u'\N{LATIN SMALL LETTER E WITH DIAERESIS}': 'e', + u'\N{LATIN SMALL LETTER E WITH GRAVE}': 'e', + u'\N{LATIN SMALL LETTER ETH}': 'th', + u'\N{LATIN SMALL LETTER I WITH ACUTE}': 'i', + u'\N{LATIN SMALL LETTER I WITH CIRCUMFLEX}': 'i', + u'\N{LATIN SMALL LETTER I WITH DIAERESIS}': 'i', + u'\N{LATIN SMALL LETTER I WITH GRAVE}': 'i', + u'\N{LATIN SMALL LETTER N WITH TILDE}': 'n', + u'\N{LATIN SMALL LETTER O WITH ACUTE}': 'o', + u'\N{LATIN SMALL LETTER O WITH CIRCUMFLEX}': 'o', + u'\N{LATIN SMALL LETTER O WITH DIAERESIS}': 'o', + u'\N{LATIN SMALL LETTER O WITH GRAVE}': 'o', + u'\N{LATIN SMALL LETTER O WITH STROKE}': 'o', + u'\N{LATIN SMALL LETTER O WITH TILDE}': 'o', + u'\N{LATIN SMALL LETTER SHARP S}': 'ss', + u'\N{LATIN SMALL LETTER THORN}': 'th', + u'\N{LATIN SMALL LETTER U WITH ACUTE}': 'u', + u'\N{LATIN SMALL LETTER U WITH CIRCUMFLEX}': 'u', + u'\N{LATIN SMALL LETTER U WITH DIAERESIS}': 'u', + u'\N{LATIN SMALL LETTER U WITH GRAVE}': 'u', + u'\N{LATIN SMALL LETTER Y WITH ACUTE}': 'y', + u'\N{LATIN SMALL LETTER Y WITH DIAERESIS}': 'y', + u'\N{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}': '<<', + u'\N{MACRON}': '_', + u'\N{MASCULINE ORDINAL INDICATOR}': '{^o}', + u'\N{MICRO SIGN}': '{micro}', + u'\N{MIDDLE DOT}': '*', + u'\N{MULTIPLICATION SIGN}': '*', + u'\N{NOT SIGN}': '{not}', + u'\N{PILCROW SIGN}': '{paragraph}', + u'\N{PLUS-MINUS SIGN}': '{+/-}', + u'\N{POUND SIGN}': '{pound}', + u'\N{REGISTERED SIGN}': '{R}', + u'\N{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}': '>>', + u'\N{SECTION SIGN}': '{section}', + u'\N{SOFT HYPHEN}': '-', + u'\N{SUPERSCRIPT ONE}': '{^1}', + u'\N{SUPERSCRIPT THREE}': '{^3}', + u'\N{SUPERSCRIPT TWO}': '{^2}', + u'\N{VULGAR FRACTION ONE HALF}': '{1/2}', + u'\N{VULGAR FRACTION ONE QUARTER}': '{1/4}', + u'\N{VULGAR FRACTION THREE QUARTERS}': '{3/4}', + u'\N{YEN SIGN}': '{yen}' +} + +def latin1_to_ascii(uinput): + if not isinstance(uinput, unicode): + uinput = unicode(uinput, sys.getfilesystemencoding()) + out = [] + for c in uinput: + i = ord(c) + if i in xlate: + out.append(xlate[i]) + elif i >= 0x80: + pass + else: + out.append(str(c)) + return ''.join(out) + +if __name__ == '__main__': + if len(sys.argv) == 1: + sys.exit('Usage: %s filename\n' % sys.argv[0]) + for name in sys.argv[1:]: + plain_ascii = latin1_to_ascii(name) + if plain_ascii != name: + os.rename(name, plain_ascii) diff --git a/bin/ll b/bin/ll new file mode 100755 index 0000000..362c79a --- /dev/null +++ b/bin/ll @@ -0,0 +1,2 @@ +#! /bin/sh +exec ls -lAF "$@" diff --git a/bin/llp b/bin/llp new file mode 100755 index 0000000..6ad0b68 --- /dev/null +++ b/bin/llp @@ -0,0 +1,2 @@ +#! /bin/sh +ll "$@" | ${PAGER:-more} diff --git a/bin/m b/bin/m new file mode 100755 index 0000000..477c15d --- /dev/null +++ b/bin/m @@ -0,0 +1,2 @@ +#! /bin/sh +exec make "$@" diff --git a/bin/mc_type.py b/bin/mc_type.py new file mode 100755 index 0000000..a9d6322 --- /dev/null +++ b/bin/mc_type.py @@ -0,0 +1,32 @@ +#! /usr/bin/env python + +import sys, subprocess + +mc = sys.argv[1] +assert mc in ['/usr/local/bin/mc', '/usr/bin/mc'] + +mc = subprocess.Popen([mc, '--version'], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT) +mc.wait() +mc_version = mc.stdout.readline() +mc.stdout.read() +mc.stdout.close() + +if mc_version.startswith('Midnight Commander'): + mc_version = mc_version.split()[2] +elif mc_version.startswith('GNU Midnight Commander') or \ + mc_version.startswith('The Midnight Commander'): + mc_version = mc_version.split()[3] +else: + raise ValueError('Unknown mc version') +if '.' in mc_version: + major, minor = [int(v) for v in mc_version.split('.')[:2]] + if major < 4: + print 'old' + elif (major == 4) and (minor < 6): + print 'old' + else: + print 'new' +else: + print 'new' diff --git a/bin/mconfig b/bin/mconfig new file mode 100755 index 0000000..08ba64a --- /dev/null +++ b/bin/mconfig @@ -0,0 +1,4 @@ +#! /bin/sh +CC="${CC:-gcc}" CPPFLAGS="-DNDEBUG=1 $CPPFLAGS" CFLAGS="-O3 $CFLAGS" \ + CXX="${CXX:-g++}" CXXFLAGS="-O3 $CXXFLAGS" LDFLAGS="-s $LDFLAGS" \ + exec ./configure "$@" diff --git a/bin/mplay b/bin/mplay new file mode 100755 index 0000000..4786233 --- /dev/null +++ b/bin/mplay @@ -0,0 +1,16 @@ +#! /bin/sh + +options="-ao pulse -quiet" + +if [ "$DISPLAY" ]; then + (xscreensaver-command -exit + xset -dpms s off) & +fi + +cgmem_nice 500 "`basename $0`"er $options "$@" + +if [ "$DISPLAY" ]; then + cd "$HOME" + xset +dpms s on + xscreensaver & +fi diff --git a/bin/mutt8 b/bin/mutt8 new file mode 100755 index 0000000..0fa81c4 --- /dev/null +++ b/bin/mutt8 @@ -0,0 +1,4 @@ +#! /bin/sh + +. "$HOME"/lib/X11/utf-8.vars +exec mutt "$@" diff --git a/bin/p b/bin/p new file mode 100755 index 0000000..673ef8a --- /dev/null +++ b/bin/p @@ -0,0 +1,2 @@ +#! /bin/sh +exec ping "$@" diff --git a/bin/r b/bin/r new file mode 100755 index 0000000..6656358 --- /dev/null +++ b/bin/r @@ -0,0 +1,2 @@ +#! /bin/sh +exec rsync -ahP4 "$@" diff --git a/bin/recode-filenames-recursive.py b/bin/recode-filenames-recursive.py new file mode 100755 index 0000000..9afd6c7 --- /dev/null +++ b/bin/recode-filenames-recursive.py @@ -0,0 +1,39 @@ +#! /usr/bin/env python + +import sys, os + +if len(sys.argv) == 3: + start_dir = '.' +elif len(sys.argv) == 4: + start_dir = sys.argv[3] +else: + sys.exit("Usage: %s src_enc dst_enc [start_dir]" % sys.argv[0]) + + +def _p(plist, dirname, names): + plist.append((dirname, names)) + + +plist = [] +os.path.walk(start_dir, _p, plist) +plist.reverse() + + +from recode_filenames import _recode + +save_dir = os.getcwd() +for dirname, names in plist: + os.chdir(dirname) + for filename in names: + # if not exists - it was renamed already + if os.path.exists(filename) and \ + os.path.isfile(filename): + newname = _recode(filename) + if newname <> filename: + os.rename(filename, newname) + os.chdir('..') + dirname = os.path.basename(dirname) + newname = _recode(dirname) + if newname <> dirname: + os.rename(dirname, newname) + os.chdir(save_dir) diff --git a/bin/recode-inplace b/bin/recode-inplace new file mode 100755 index 0000000..e354b87 --- /dev/null +++ b/bin/recode-inplace @@ -0,0 +1,13 @@ +#! /bin/sh + +fromenc="$1" +shift + +toenc="$1" +shift + +tmpfile="`python -c 'import tempfile; print tempfile.mktemp()'`" && + +for file in "$@"; do + iconv -f "$fromenc" -t "$toenc" "$file" >"$tmpfile" && cp "$tmpfile" "$file" && rm "$tmpfile" +done diff --git a/bin/recode_filenames.py b/bin/recode_filenames.py new file mode 100755 index 0000000..93b76cb --- /dev/null +++ b/bin/recode_filenames.py @@ -0,0 +1,68 @@ +#! /usr/bin/env python +# -*- coding: koi8-r -*- + + +import sys + +src_encoding = sys.argv[1] +dst_encoding = sys.argv[2] + +if src_encoding == "translit": + if dst_encoding == "koi8-r": + from m_lib.rus.lat2rus import lat2koi as _recode + elif dst_encoding == "cp1251": + from m_lib.rus.lat2rus import lat2win as _recode + else: + raise NotImplementedError, "destination encoding must be koi8-r or cp1251, not `%s'" % dst_encoding + +elif dst_encoding == "translit": + if src_encoding == "koi8-r": + from m_lib.rus.rus2lat import koi2lat as _recode + elif src_encoding == "cp1251": + from m_lib.rus.rus2lat import win2lat as _recode + else: + raise NotImplementedError, "source encoding must be koi8-r or cp1251, not `%s'" % src_encoding + + from m_lib.rus.rus2lat import koi2lat_d + koi2lat_d["ÿ"] = '' # remove apostrophs - + koi2lat_d["ø"] = '' # they are not very good characters in filenames + koi2lat_d["ß"] = '' # especially on Windoze + koi2lat_d["Ø"] = '' # :-) + +elif src_encoding == "url": + try: + src_encoding, dst_encoding = dst_encoding.split('/') + except ValueError: + src_encoding = dst_encoding + from m_lib.opstring import recode + import urllib + def _recode(s): + s = urllib.unquote(s) + if src_encoding <> dst_encoding: + s = recode(s, src_encoding, dst_encoding, "replace") + return s + +elif dst_encoding == "url": + try: + src_encoding, dst_encoding = src_encoding.split('/') + except ValueError: + dst_encoding = src_encoding + from m_lib.opstring import recode + import urllib + def _recode(s): + if src_encoding <> dst_encoding: + s = recode(s, src_encoding, dst_encoding, "replace") + return urllib.quote(s, safe=";/?:@&=+$,()'") # wget treats them as safe + +else: + from m_lib.opstring import recode + def _recode(s): + return recode(s, src_encoding, dst_encoding, "replace") + + +if __name__ == "__main__": + import os + for filename in sys.argv[3:]: + new_name = _recode(filename) + if new_name <> filename: + os.rename(filename, new_name) diff --git a/bin/replace b/bin/replace new file mode 100755 index 0000000..166eb57 --- /dev/null +++ b/bin/replace @@ -0,0 +1,20 @@ +#! /usr/bin/env python + +import sys + +if len(sys.argv) < 4: + sys.stderr.write("Usage: %s from_re to_re file....\n" % sys.argv[0]) + sys.exit(1) + +import re +search = re.compile(sys.argv[1]) +replace = sys.argv[2] + +from fileinput import FileInput +files = FileInput(sys.argv[3:], inplace=1) + +for line in files: + line = search.sub(replace, line) + sys.stdout.write(line) + +files.close() diff --git a/bin/reset_tty b/bin/reset_tty new file mode 100755 index 0000000..0631a99 --- /dev/null +++ b/bin/reset_tty @@ -0,0 +1,2 @@ +#! /bin/sh +stty sane erase '^H' && exec xtitle diff --git a/bin/rm-pyc b/bin/rm-pyc new file mode 100755 index 0000000..1f9d7ce --- /dev/null +++ b/bin/rm-pyc @@ -0,0 +1,2 @@ +#! /bin/sh +exec find . -name '*.py[co]' -delete diff --git a/bin/rumutt b/bin/rumutt new file mode 100755 index 0000000..d0f112c --- /dev/null +++ b/bin/rumutt @@ -0,0 +1,2 @@ +#! /bin/sh +LC_TIME=$LC_CTYPE exec mutt "$@" diff --git a/bin/s b/bin/s new file mode 100755 index 0000000..4f8570d --- /dev/null +++ b/bin/s @@ -0,0 +1,2 @@ +#! /bin/sh +exec ssh -4 "$@" diff --git a/bin/screen-hardcopy b/bin/screen-hardcopy new file mode 100755 index 0000000..3df3d81 --- /dev/null +++ b/bin/screen-hardcopy @@ -0,0 +1,21 @@ +#! /bin/sh + +SESSION= +WINDOW= + +while getopts r:p: opt; do + case $opt in + r) SESSION="-r $OPTARG" ;; + p) WINDOW="-p $OPTARG" ;; + esac +done +shift `expr $OPTIND - 1` + +i=1 +screen $SESSION $WINDOW -X hardcopy && +while [ $i -lt 30 -a \! -f hardcopy.0 ]; do + sleep 0.1 && + i=$((i+1)) +done && +less hardcopy.0 && +exec rm hardcopy.0 diff --git a/bin/setattrs.sh b/bin/setattrs.sh new file mode 100755 index 0000000..fcb5a15 --- /dev/null +++ b/bin/setattrs.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +for d in "$@"; do + if [ -d "$d" ]; then + if [ "$d" = .. ]; then + echo 'Cannot operate on ".."!' >&2 + exit 1 + fi + chmod u+rwX,go+rX "$d" + find "$d" -type d -print0 | xargs -r0 chmod u+rwX,go+rX + find "$d" -type f -print0 | xargs -r0 chmod u+rwX,go+rX + else + chmod u+rwX,go+rX "$d" + fi +done diff --git a/bin/setnormattrs.sh b/bin/setnormattrs.sh new file mode 100755 index 0000000..55686fe --- /dev/null +++ b/bin/setnormattrs.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +for d in "$@"; do + if [ "$d" = .. ]; then + echo 'Cannot operate on ".."!' >&2 + exit 1 + fi + find "$d" -type d -print0 | xargs -r0 chmod u=rwX,go=rX + find "$d" -type f -print0 | xargs -r0 chmod u=rw,go=r +done diff --git a/bin/smplay b/bin/smplay new file mode 100755 index 0000000..2dd72e4 --- /dev/null +++ b/bin/smplay @@ -0,0 +1,22 @@ +#! /bin/sh + +(xscreensaver-command -exit +xset -dpms s off) & + +b="`basename $0`" + +if [ "$b" = smplay ]; then + GUI="-minigui" +elif [ "$b" = smplay-gui ]; then + GUI="-defaultgui" +else + echo "Bad script name, aborted" 1>&2 + exit 1 +fi + +cgmem_nice 500 smplayer "$GUI" "$@" +"$HOME"/lib/audio/pa-volume + +cd "$HOME" +xset +dpms s on +xscreensaver & diff --git a/bin/smplay-gui b/bin/smplay-gui new file mode 120000 index 0000000..8c13708 --- /dev/null +++ b/bin/smplay-gui @@ -0,0 +1 @@ +smplay \ No newline at end of file diff --git a/bin/start-browser b/bin/start-browser new file mode 100755 index 0000000..48a1896 --- /dev/null +++ b/bin/start-browser @@ -0,0 +1,5 @@ +#! /bin/sh + +browser-stack.py push "$@" +"$@" +exec browser-stack.py pop "$@" diff --git a/bin/t b/bin/t new file mode 100755 index 0000000..af0d2d2 --- /dev/null +++ b/bin/t @@ -0,0 +1,2 @@ +#! /bin/sh +exec traceroute -4 "$@" diff --git a/bin/text-wrap.py b/bin/text-wrap.py new file mode 100755 index 0000000..a8e4871 --- /dev/null +++ b/bin/text-wrap.py @@ -0,0 +1,71 @@ +#! /usr/bin/env python + +import sys + + +def usage(code=0): + sys.stderr.write("Usage: %s [-0|--null] [-n|--no-newline] [-s|--space] [-w|--width] [width]\n" % sys.argv[0]) + sys.exit(code) + + +def get_args(): + from getopt import getopt, GetoptError + + try: + options, arguments = getopt(sys.argv[1:], "0nsw:", + ["null", "no-newline", "space", "width="]) + except GetoptError: + usage(1) + + print0 = False + newline = True + space = '' + width = None + + for option, value in options: + if option in ("-h", "--help"): + usage() + elif option in ("-0", "--null"): + print0 = True + elif option in ("-n", "--no-newline"): + newline = False + elif option in ("-s", "--space"): + space = u' ' + elif option in ("-w", "--width"): + width = int(value) + else: + usage(2) + + if arguments: + if width is not None: + usage(3) + elif len(arguments) > 1: + usage(4) + else: + width = int(arguments[0]) + + return print0, newline, space, width + +print0, newline, space, width = get_args() + + +from m_lib.defenc import default_encoding +text = sys.stdin.read().decode(default_encoding) +if not newline: + text = text.rstrip() + +if width: + import textwrap + text = textwrap.fill(text, width - 2*len(space), + initial_indent=space, subsequent_indent=space) + if space: + text = u'\n'.join([line+space for line in text.split(u'\n')]) +else: + text = u"%s%s%s" % (space, text, space) + +sys.stdout.write(text.encode(default_encoding)) + +if print0: + sys.stdout.write('\0') +elif newline: + print diff --git a/bin/todos b/bin/todos new file mode 100755 index 0000000..59c591e --- /dev/null +++ b/bin/todos @@ -0,0 +1,2 @@ +#! /bin/sh +exec iconvx.py -f koi8-r -t cp866 "$@" diff --git a/bin/towin b/bin/towin new file mode 100755 index 0000000..f02f336 --- /dev/null +++ b/bin/towin @@ -0,0 +1,2 @@ +#! /bin/sh +exec iconvx.py -f koi8-r -t cp1251 "$@" diff --git a/bin/tt b/bin/tt new file mode 100755 index 0000000..72eca81 --- /dev/null +++ b/bin/tt @@ -0,0 +1,2 @@ +#! /bin/sh +exec tcptraceroute "$@" diff --git a/bin/untar-home b/bin/untar-home new file mode 100755 index 0000000..deba4c3 --- /dev/null +++ b/bin/untar-home @@ -0,0 +1,4 @@ +#! /bin/sh + +cd /var/tmp && +bunzip2 -c "$HOME"/archive/STORE/phd/Home/phd.tar.bz2 | tar xpvf - diff --git a/bin/unzip.py b/bin/unzip.py new file mode 100755 index 0000000..6eb4832 --- /dev/null +++ b/bin/unzip.py @@ -0,0 +1,48 @@ +#! /usr/bin/env python +"""Unzip with encoded filenames + + Written by Oleg Broytman. Copyright (C) 2009, 2010 PhiloSoft Design. +""" + +import sys, os, time +from getopt import getopt, GetoptError +from zipfile import ZipFile +from m_lib.defenc import default_encoding + +def usage(): + sys.exit('Usage: %s file.zip' % sys.argv[0]) + +try: + options, arguments = getopt(sys.argv[1:], '') +except GetoptError: + usage() + +if len(arguments) <> 1: + usage() + +zf = ZipFile(arguments[0], 'r') +out = '.' + +for zinfo in zf.infolist(): + path = zinfo.filename + if not isinstance(path, unicode): + path = path.decode('cp866') + recoded_path = path.encode(default_encoding) + print recoded_path + + if path.startswith('./'): + tgt = os.path.join(out, recoded_path[2:]) + else: + tgt = os.path.join(out, recoded_path) + + tgtdir = os.path.dirname(tgt) + if not os.path.exists(tgtdir): + os.makedirs(tgtdir) + + if not tgt.endswith('/'): + fp = open(tgt, 'wb') + fp.write(zf.read(zinfo.filename)) + fp.close() + dt = time.mktime(zinfo.date_time + (0, 0, -1)) + os.utime(tgt, (dt, dt)) +zf.close() diff --git a/bin/vim8 b/bin/vim8 new file mode 100755 index 0000000..63793c0 --- /dev/null +++ b/bin/vim8 @@ -0,0 +1,2 @@ +#! /bin/sh +exec vim -c "ed ++enc=utf-8" "$@" diff --git a/bin/webbrowser b/bin/webbrowser new file mode 100755 index 0000000..0590aa0 --- /dev/null +++ b/bin/webbrowser @@ -0,0 +1,27 @@ +#! /usr/bin/env python + +import sys, os + +# This must be imported and called before webbrowser +# because webbrowser reads BROWSER environment variable at the import time +from browser_stack import set_current_browser +set_current_browser() + +import webbrowser + +if sys.argv[1] in ("-t", "--tab"): + new = 2 + url = sys.argv[2] + +elif sys.argv[1] in ("-n", "--new"): + new = 1 + url = sys.argv[2] + +else: + new = 0 + url = sys.argv[1] + +if '://' not in url: # Make an URL from a local file name + url = 'file://' + os.path.abspath(url) + +webbrowser.open(url, new) diff --git a/bin/webbrowser-encode-url b/bin/webbrowser-encode-url new file mode 100755 index 0000000..cc8f827 --- /dev/null +++ b/bin/webbrowser-encode-url @@ -0,0 +1,82 @@ +#! /usr/bin/env python + +from cgi import parse_qsl +from getopt import getopt +import sys, urllib +from m_lib.defenc import default_encoding + +# This must be imported and called before webbrowser +# because webbrowser reads BROWSER environment variable at the import time +from browser_stack import set_current_browser +set_current_browser() + +import webbrowser + +def usage(): + sys.exit('Usage: %s [-e|--encoding=encoding] [-n|--newwin|-t|--tab] URL' % sys.argv[0]) + +try: + options, arguments = getopt(sys.argv[1:], 'e:nt', ['encoding=', 'newwin', 'tab']) +except GetoptError: + usage() + +if len(arguments) <> 1: + usage() + +encoding = None +new = 0 + +for option, value in options: + if option in ('-e', '--encoding'): + encoding = value + elif option in ('-n', '--newwin'): + new = 1 + elif option in ('-t', '--tab'): + new = 2 + +if not encoding: + encoding = default_encoding + +url = arguments[0] +protocol, request = urllib.splittype(url) +user, password, port = None, None, None +host, path = urllib.splithost(request) +if host: + user, host = urllib.splituser(host) + if user: + user, password = urllib.splitpasswd(user) + host, port = urllib.splitport(host) + if port: port = int(port) +path, tag = urllib.splittag(path) +path, query = urllib.splitquery(path) +path = urllib.unquote(path) +if tag: tag = urllib.unquote_plus(tag) + +if query: + qlist = [] + for name, value in parse_qsl(query): + name = unicode(name, default_encoding).encode(encoding) + value = unicode(value, default_encoding).encode(encoding) + qlist.append((name, value)) + +url = protocol + "://" +if user: + url += urllib.quote(unicode(user, default_encoding).encode(encoding)) + if password: + url += ':' + urllib.quote(unicode(password, default_encoding).encode(encoding)) + url += '@' +if host: + url += host.decode(encoding).encode('idna') + if port: + url += ':%d' % port +if path: + if protocol == "file": + url += urllib.quote(path) + else: + url += urllib.quote(unicode(path, default_encoding).encode(encoding)) +if query: + url += '?' + urllib.urlencode(qlist) +if tag: + url += '#' + urllib.quote_plus(unicode(tag, default_encoding).encode(encoding)) + +webbrowser.open(url, new) diff --git a/bin/webbrowserX b/bin/webbrowserX new file mode 100755 index 0000000..590c42f --- /dev/null +++ b/bin/webbrowserX @@ -0,0 +1,5 @@ +#! /bin/sh + +SHELL=/bin/sh +. "$HOME"/.profile +exec webbrowser "$@" diff --git a/bin/webdump b/bin/webdump new file mode 100755 index 0000000..4a72c09 --- /dev/null +++ b/bin/webdump @@ -0,0 +1,12 @@ +#! /bin/sh + +case "$LC_CTYPE" in + *UTF-8) charset=utf-8 + ;; + + *) charset=koi8-r + ;; +esac + +exec elinks -dump -dump-width 80 -dump-charset "$charset" \ + -no-numbering -no-references "$1" diff --git a/bin/webdump2 b/bin/webdump2 new file mode 100755 index 0000000..6110f12 --- /dev/null +++ b/bin/webdump2 @@ -0,0 +1,2 @@ +#! /bin/sh +exec links2 -dump -width 80 -codepage "$LC_CTYPE" "$1" diff --git a/bin/webstdin b/bin/webstdin new file mode 100755 index 0000000..395456c --- /dev/null +++ b/bin/webstdin @@ -0,0 +1,16 @@ +#! /bin/sh + +ext=html +new_win='' + +while getopts e:nt opt; do + case $opt in + e ) ext="$OPTARG" ;; + n ) new_win="-n" ;; + t ) new_win="-t" ;; + esac +done +shift `expr $OPTIND - 1` + +tmpfile="`mktemp -t XXXXXX.$ext`" && cat - >"$tmpfile" && +webbrowser $new_win file://"$tmpfile" && (sleep 10 && exec rm "$tmpfile" &) diff --git a/bin/wget-m b/bin/wget-m new file mode 100755 index 0000000..f678271 --- /dev/null +++ b/bin/wget-m @@ -0,0 +1,10 @@ +#! /bin/sh + +. "$HOME"/lib/config/wget + +exec wget --mirror --continue -e robots=off --limit-rate="$wget_speed" \ + --page-requisites --wait=15 --random-wait --proxy=off -nH --no-parent \ + --trust-server-names "$@" + +# Other useful flags are: -b (--background) --cut-dirs -E (--html-extension) +# -k (--convert-links) diff --git a/bin/wget-wrapper b/bin/wget-wrapper new file mode 100755 index 0000000..04ca4eb --- /dev/null +++ b/bin/wget-wrapper @@ -0,0 +1,9 @@ +#! /bin/sh + +. "$HOME"/lib/config/wget + +exec wget --continue -N --limit-rate="$wget_speed" --proxy=off \ + --no-directories --trust-server-names "$@" + +# Other useful flags are: -b (--background) +# -E (--html-extension) --page-requisites diff --git a/bin/whence b/bin/whence new file mode 100755 index 0000000..e02906e --- /dev/null +++ b/bin/whence @@ -0,0 +1,2 @@ +#! /usr/bin/env bash +type -path "$@" diff --git a/bin/ww b/bin/ww new file mode 120000 index 0000000..9cd412e --- /dev/null +++ b/bin/ww @@ -0,0 +1 @@ +wget-wrapper \ No newline at end of file diff --git a/bin/xtitle b/bin/xtitle new file mode 100755 index 0000000..3d5e8e0 --- /dev/null +++ b/bin/xtitle @@ -0,0 +1,12 @@ +#! /usr/bin/env bash + +case "$TERM" in + *term*|*rxvt*|vt100|screen) + if [ -z "$1" ]; then + TITLE="${USER}@${HOSTNAME}:$(echo ${PWD} | sed -e "s|^${HOME}|~|")" + else + TITLE="$@" + fi + echo -ne "\033]0;${TITLE}\007" + ;; +esac diff --git a/bin/zip.py b/bin/zip.py new file mode 100755 index 0000000..eebbaeb --- /dev/null +++ b/bin/zip.py @@ -0,0 +1,42 @@ +#! /usr/bin/env python +"""Zip (zip -r9) with encoded filenames + + Written by Oleg Broytman. Copyright (C) 2009, 2010 PhiloSoft Design. +""" + +import sys, os +from getopt import getopt, GetoptError +from zipfile import ZipFile, ZIP_DEFLATED +from m_lib.defenc import default_encoding + +def usage(): + sys.exit('Usage: %s file.zip file1 dir2...' % sys.argv[0]) + +try: + options, arguments = getopt(sys.argv[1:], '') +except GetoptError: + usage() + +if len(arguments) < 2: + usage() + +def addToZip(zf, path): + if os.path.isfile(path): + print path + recoded_path = path.decode(default_encoding).encode('cp866') + zf.write(path, recoded_path, ZIP_DEFLATED) + elif os.path.isdir(path): + for nm in os.listdir(path): + addToZip(zf, os.path.join(path, nm)) + # else: ignore + +zname = arguments[0] +if os.path.splitext(zname)[1] not in ('.zip', '.ZIP'): + zname += '.zip' + +zf = ZipFile(zname, 'w', allowZip64=True) + +for path in arguments[1:]: + addToZip(zf, path) + +zf.close() diff --git a/lib/X11/.XKeysymDB b/lib/X11/.XKeysymDB new file mode 100644 index 0000000..b5202b9 --- /dev/null +++ b/lib/X11/.XKeysymDB @@ -0,0 +1,203 @@ +! +! This is the file XKeysymDB, which is used by X clients at +! execution time to translate X keysyms. +! +! Your system already has one version of the XKeysymDB file. The +! path '/usr/lib/X11/XKeysymDB' is the standard place; Sun systems +! with OpenWindows will place the file in $OPENWINHOME/lib. +! +! This version of the file contains various vendor-specific +! keysyms, including the OSF keysyms needed by the OSF/Motif +! toolkit, which may be lacking from the version currently on your +! system. +! +! This file can be used in two ways: +! +! 1) It can be used to replace the existing XKeysymDB file. This +! version is most likely a superset of the existing one. To be +! safe, be sure to rename you existing file before you copy in this +! version. +! +! 2) You can define the XKEYSYMDB environment variable to point to +! this version of the file, and X clients will then use this one +! instead of the system version. +! +! For example, if you have the SAS System, Release 6.09 installed +! in /usr/local/sas, and you are using the C-Shell, then you can +! define the environment variable with the command +! +! setenv XKEYSYMDB /usr/local/sas/X11/resource_files/XKeysymDB +! +! If you are using the Bourne or Korn shells, you could do +! +! XKEYSYMDB=/usr/local/sas/X11/resource_files/XKeysymDB +! export XKEYSYMDB +! + +hpmute_acute :100000A8 +hpmute_grave :100000A9 +hpmute_asciicircum :100000AA +hpmute_diaeresis :100000AB +hpmute_asciitilde :100000AC +hplira :100000AF +hpguilder :100000BE +hpYdiaeresis :100000EE +hpIO :100000EE +hplongminus :100000F6 +hpblock :100000FC +apLineDel :1000FF00 +apCharDel :1000FF01 +apCopy :1000FF02 +apCut :1000FF03 +apPaste :1000FF04 +apMove :1000FF05 +apGrow :1000FF06 +apCmd :1000FF07 +apShell :1000FF08 +apLeftBar :1000FF09 +apRightBar :1000FF0A +apLeftBox :1000FF0B +apRightBox :1000FF0C +apUpBox :1000FF0D +apDownBox :1000FF0E +apPop :1000FF0F +apRead :1000FF10 +apEdit :1000FF11 +apSave :1000FF12 +apExit :1000FF13 +apRepeat :1000FF14 +hpModelock1 :1000FF48 +hpModelock2 :1000FF49 +hpReset :1000FF6C +hpSystem :1000FF6D +hpUser :1000FF6E +hpClearLine :1000FF6F +hpInsertLine :1000FF70 +hpDeleteLine :1000FF71 +hpInsertChar :1000FF72 +hpDeleteChar :1000FF73 +hpBackTab :1000FF74 +hpKP_BackTab :1000FF75 + +ClearLine :1000FF6F +InsertLine :1000FF70 +DeleteLine :1000FF71 +InsertChar :1000FF72 +DeleteChar :1000FF73 + +apKP_parenleft :1000FFA8 +apKP_parenright :1000FFA9 + +I2ND_FUNC_L :10004001 +I2ND_FUNC_R :10004002 +IREMOVE :10004003 +IREPEAT :10004004 +IA1 :10004101 +IA2 :10004102 +IA3 :10004103 +IA4 :10004104 +IA5 :10004105 +IA6 :10004106 +IA7 :10004107 +IA8 :10004108 +IA9 :10004109 +IA10 :1000410A +IA11 :1000410B +IA12 :1000410C +IA13 :1000410D +IA14 :1000410E +IA15 :1000410F +IB1 :10004201 +IB2 :10004202 +IB3 :10004203 +IB4 :10004204 +IB5 :10004205 +IB6 :10004206 +IB7 :10004207 +IB8 :10004208 +IB9 :10004209 +IB10 :1000420B +IB11 :1000420B +IB12 :1000420C +IB13 :1000420D +IB14 :1000420E +IB15 :1000420F +IB16 :10004210 + +DRemove :1000FF00 +Dring_accent :1000FEB0 +Dcircumflex_accent :1000FE5E +Dcedilla_accent :1000FE2C +Dacute_accent :1000FE27 +Dgrave_accent :1000FE60 +Dtilde :1000FE7E +Ddiaeresis :1000FE22 + +osfCopy :1004FF02 +osfCut :1004FF03 +osfPaste :1004FF04 +osfBackTab :1004FF07 +osfBackSpace :1004FF08 +osfClear :1004FF0B +osfEscape :1004FF1B +osfAddMode :1004FF31 +osfPrimaryPaste :1004FF32 +osfQuickPaste :1004FF33 +osfPageLeft :1004FF40 +osfPageUp :1004FF41 +osfPageDown :1004FF42 +osfPageRight :1004FF43 +osfActivate :1004FF44 +osfMenuBar :1004FF45 +osfLeft :1004FF51 +osfUp :1004FF52 +osfRight :1004FF53 +osfDown :1004FF54 +osfEndLine :1004FF57 +osfBeginLine :1004FF58 +osfEndData :1004FF59 +osfBeginData :1004FF5A +osfPrevMenu :1004FF5B +osfNextMenu :1004FF5C +osfPrevField :1004FF5D +osfNextField :1004FF5E +osfSelect :1004FF60 +osfInsert :1004FF63 +osfUndo :1004FF65 +osfMenu :1004FF67 +osfCancel :1004FF69 +osfHelp :1004FF6A +osfSelectAll :1004FF71 +osfDeselectAll :1004FF72 +osfReselect :1004FF73 +osfExtend :1004FF74 +osfRestore :1004FF78 +osfDelete :1004FFFF + +SunFA_Grave :1005FF00 +SunFA_Circum :1005FF01 +SunFA_Tilde :1005FF02 +SunFA_Acute: 1005FF03 +SunFA_Diaeresis: 1005FF04 +SunFA_Cedilla: 1005FF05 +SunF36 :1005FF10 +SunF37 :1005FF11 +SunSys_Req :1005FF60 +SunProps :1005FF70 +SunFront :1005FF71 +SunCopy :1005FF72 +SunOpen :1005FF73 +SunPaste :1005FF74 +SunCut :1005FF75 + +SunCompose :FF20 +SunPageUp :FF55 +SunPageDown :FF56 +SunPrint_Screen :FF61 +SunUndo :FF65 +SunAgain :FF66 +SunFind :FF68 +SunStop :FF69 +SunAltGraph :FF7E + +WYSetup :1006FF00 diff --git a/lib/X11/.Xmodmap b/lib/X11/.Xmodmap new file mode 100644 index 0000000..0270549 --- /dev/null +++ b/lib/X11/.Xmodmap @@ -0,0 +1,50 @@ +!clear shift +!clear control +!clear mod1 +!clear mod2 +!clear mod3 +!clear mod4 + +! Key Base Shift Caps ShiftCaps +!------------------------------------------------------------------------ +!keycode 113 = Alt_R + +! Disable RightWin +keycode 94 = + +! RightMenu = Compose +keycode 117 = Multi_key + +!add shift = Shift_L Shift_R +!add control = Control_L Control_R +!add mod1 = Alt_L Alt_R +!add mod2 = Num_Lock + +! Use CapsLock as rus/lat switch key. + +!clear lock +!clear mod5 +!add mod5 = Caps_Lock Mode_switch + + +! +! Some examples +! + +!!!!! +!!!!! Swap Caps_Lock and Control_R +!!!!! +! remove Lock = Caps_Lock +! remove Control = Control_R +! keysym Control_R = Caps_Lock +! keysym Caps_Lock = Control_R +! add Lock = Caps_Lock +! add Control = Control_R + +!!!!! move around the escape key (PC only!) +!!!!! `/~ key does Escape (shifted, ~) +! keycode 49 = Escape asciitilde + +!!!!! make backspace be ` and ~ +! keysym BackSpace = quoteleft asciitilde +! keycode 22 = quoteleft asciitilde diff --git a/lib/X11/.Xresources b/lib/X11/.Xresources new file mode 100644 index 0000000..c3622e7 --- /dev/null +++ b/lib/X11/.Xresources @@ -0,0 +1,29 @@ +! +! .Xresources -- specifies your personal preferences for X applications +! +! Load into the server with the command: +! xrdb -DHOME=$HOME -I$HOME -load $HOME/.Xresources +! +! Resource Search Order: +! RESOURCE_MANAGER (X server) +! SCREEN_RESOURCES (X server) +! $XUSERFILESEARCHPATH || $XAPPLRESDIR || $XFILESEARCHPATH +! $XENVIRONMENT || $HOME/.Xdefaults-hostname +! Command line [-xrm resource_string] +! +#include "lib/X11/conf" +#include "lib/X11/fonts" +#include "lib/X11/colors" + +#include "lib/X11/xterm" +!#include "lib/X11/mosaic" +!#include "lib/X11/netscape" + +! +! Place your application specific configuration files in +! $HOME/lib/X11/app-defaults and then include them here: +! +! #include "lib/X11/app-defaults/Twm" +! +#include "lib/X11/gvim" +!#include "lib/X11/misc" diff --git a/lib/X11/colors b/lib/X11/colors new file mode 100644 index 0000000..dc29022 --- /dev/null +++ b/lib/X11/colors @@ -0,0 +1,49 @@ +! text colors +#define FOREGROUND_TEXT black +#define BACKGROUND_TEXT light gray +#define POINTER_COLOR C_forest +#define CURSOR_COLOR C_forest +#define BORDER_COLOR blue +#define WINBACK_COLOR gray75 + +#ifdef COLOR +*customization: -color +#endif + +#ifndef XAW3DCOLOR +#define XAW3DCOLOR gray75 +#endif + +! color definitions +#define C_amber #ffc070 +#define C_grayish #bfbfbf +#define C_forest #006000 +#define C_blue #307090 +#define C_purple #8925d1 +#define C_khaki #505a1b +#define C_orange #c75a00 +#define C_brown #714820 +#define C_charcoal #403640 +#define C_chocolate #563028 +#define C_green #308070 +#define C_auga #009080 +#define C_maroon #6e003c +#define C_newgreen #007079 +#define C_gold #c08900 + +! +! Motif colors +! +! active colors and inactive colors +#define motifAC C_gold +#define motifIC C_newgreen + +! background color for IconBox +#define motifSC DimGrey + +! icontext should contrast with motifIC +#define icontext white + +! set text colors to contrast with the motif colors +#define textAC black +#define textIC white diff --git a/lib/X11/conf b/lib/X11/conf new file mode 100644 index 0000000..4f9879d --- /dev/null +++ b/lib/X11/conf @@ -0,0 +1,10 @@ +#undef bsdi +#ifndef X11VER +# define X11VER 6 +#endif +#ifndef XBITMAPS +# define XBITMAPS /usr/X11/include/X11/bitmaps +#endif + +Xcursor.theme: whiteglass +Xcursor.size: 24 diff --git a/lib/X11/fonts b/lib/X11/fonts new file mode 100644 index 0000000..8549f16 --- /dev/null +++ b/lib/X11/fonts @@ -0,0 +1,61 @@ +! font selections +#if WIDTH > 800 +! 1024x768 or bigger +# define STD_FONT -misc-fixed-medium-r-normal-*-*-140-*-*-*-*-iso10646-1 +#elif WIDTH > 640 +! 800x600 +# define STD_FONT -misc-fixed-medium-r-normal-*-*-120-*-*-*-*-iso10646-1 +#else +! 640x480 +# define STD_FONT -misc-fixed-medium-r-normal-*-*-100-*-*-*-*-iso10646-1 +#endif + +#define UNREADABLE_FONT nil2 +#define TINY_FONT x10 +#define SMALL_FONT 8x13 +#define MEDIUM_FONT 9x15 +#define LARGE_FONT 10x20 +#define HUGE_FONT 12x24 + +! good font sizes 8 10 11 12 14 16 18 20 24 34 + +#if WIDTH > 800 +! 1024x768 or bigger +# define FIXED_FONT -*-courier-medium-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define LABEL_FONT -*-lucidatypewriter-medium-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define NORML_FONT -*-helvetica-medium-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define ITAL_FONT -*-helvetica-bold-o-normal-*-14-*-*-*-*-*-iso10646-1 +# define BOLD_FONT -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define H6_FONT -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define H5_FONT -*-helvetica-bold-r-normal-*-16-*-*-*-*-*-iso10646-1 +# define H4_FONT -*-helvetica-bold-r-normal-*-18-*-*-*-*-*-iso10646-1 +# define H3_FONT -*-helvetica-bold-r-normal-*-20-*-*-*-*-*-iso10646-1 +# define H2_FONT -*-helvetica-bold-r-normal-*-24-*-*-*-*-*-iso10646-1 +# define H1_FONT -*-helvetica-bold-r-normal-*-26-*-*-*-*-*-iso10646-1 +#elif WIDTH > 640 +! 800x600 +# define FIXED_FONT -*-courier-medium-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define LABEL_FONT -*-lucidatypewriter-medium-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define NORML_FONT -*-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define ITAL_FONT -*-helvetica-bold-o-normal-*-12-*-*-*-*-*-iso10646-1 +# define BOLD_FONT -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define H6_FONT -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define H5_FONT -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define H4_FONT -*-helvetica-bold-r-normal-*-16-*-*-*-*-*-iso10646-1 +# define H3_FONT -*-helvetica-bold-r-normal-*-18-*-*-*-*-*-iso10646-1 +# define H2_FONT -*-helvetica-bold-r-normal-*-20-*-*-*-*-*-iso10646-1 +# define H1_FONT -*-helvetica-bold-r-normal-*-24-*-*-*-*-*-iso10646-1 +#else +! 640x480 +# define FIXED_FONT -*-courier-medium-r-normal-*-10-*-*-*-*-*-iso10646-1 +# define LABEL_FONT -*-lucidatypewriter-medium-r-normal-*-10-*-*-*-*-*-iso10646-1 +# define NORML_FONT -*-helvetica-medium-r-normal-*-10-*-*-*-*-*-iso10646-1 +# define ITAL_FONT -*-helvetica-bold-o-normal-*-10-*-*-*-*-*-iso10646-1 +# define BOLD_FONT -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso10646-1 +# define H6_FONT -*-helvetica-bold-r-normal-*-10-*-*-*-*-*-iso10646-1 +# define H5_FONT -*-helvetica-bold-r-normal-*-12-*-*-*-*-*-iso10646-1 +# define H4_FONT -*-helvetica-bold-r-normal-*-14-*-*-*-*-*-iso10646-1 +# define H3_FONT -*-helvetica-bold-r-normal-*-16-*-*-*-*-*-iso10646-1 +# define H2_FONT -*-helvetica-bold-r-normal-*-18-*-*-*-*-*-iso10646-1 +# define H1_FONT -*-helvetica-bold-r-normal-*-20-*-*-*-*-*-iso10646-1 +#endif diff --git a/lib/X11/gvim b/lib/X11/gvim new file mode 100644 index 0000000..52910ce --- /dev/null +++ b/lib/X11/gvim @@ -0,0 +1,12 @@ +Vim*useSchemes: all +Vim*sgiMode: true +Vim*useEnhancedFSB: true +Vim*background: #000020 +Vim*foreground: Wheat +!Vim*menuBar*backgroundPixmap: ~/graphics/slate.xpm +Vim*menuBackground: #2f4f4f +Vim*menuForeground: Wheat +Vim*scrollbarWidth: 12 +Vim*scrollBackground: #2f4f4f +Vim*scrollForeground: #3f6262 +Vim*font: fixed diff --git a/lib/X11/inputrc b/lib/X11/inputrc new file mode 100644 index 0000000..6f5424f --- /dev/null +++ b/lib/X11/inputrc @@ -0,0 +1,27 @@ +"\e[A": previous-history +"\e[B": next-history +"\e[C": forward-char +"\e[D": backward-char + +# alternate arrow key prefix +"\eOA": previous-history +"\eOB": next-history +"\eOC": forward-char +"\eOD": backward-char + +# Under Xterm in bash, we bind local Function keys to do something useful. +$if Bash +"\e[11~": "Function Key 1" +"\e[12~": "Function Key 2" +"\e[13~": "Function Key 3" +"\e[14~": "Function Key 4" +"\e[15~": "Function Key 5" + +# I know the following escape sequence numbers are 1 greater than +# the function key. Don't ask me why, I didn't design the xterm terminal. +"\e[17~": "Function Key 6" +"\e[18~": "Function Key 7" +"\e[19~": "Function Key 8" +"\e[20~": "Function Key 9" +"\e[21~": "Function Key 10" +$endif diff --git a/lib/X11/misc b/lib/X11/misc new file mode 100644 index 0000000..8b140ca --- /dev/null +++ b/lib/X11/misc @@ -0,0 +1,31 @@ +*background: BACKGROUND_TEXT +*foreground: FOREGROUND_TEXT +login*background: black +login*foreground: green + +!## Athena text widgets +*Paned.Text.translations: #override\n\ + Shift,: scroll-one-line-down()\n\ + Shift,: scroll-one-line-up()\n\ + Ctrl,: previous-page()\n\ + Ctrl,: next-page()\n\ + None,:scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()\n\ + None,:scroll-one-line-up()scroll-one-line-up()scroll-one-line-up()scroll-one-line-up()scroll-one-line-up() + +xscreensaver*splash: false + +Xautolock*time: 300 +Xautolock*locker: xlock -lockdelay 120 +usefirst + +emacs*font: -cronyx-courier-medium-r-*-*-13-*-*-*-*-*-koi8-r +emacs*Background: DarkSlateGray +emacs*Foreground: Wheat +emacs*pointerColor: Orchid +emacs*cursorColor: Orchid +emacs*bitmapIcon: on +emacs.geometry: 80x25 + +Seyon.modems: /dev/modem + +XDu*translations: #override\n\ + : info() diff --git a/lib/X11/mosaic b/lib/X11/mosaic new file mode 100644 index 0000000..afd63a0 --- /dev/null +++ b/lib/X11/mosaic @@ -0,0 +1,51 @@ +#if WIDTH > 640 +# if WIDTH > 800 +! Mosaic*geometry: DEFAULT +# else +Mosaic*geometry: 500x525 +# endif +#else +Mosaic*geometry: 445x420 +#endif + +Mosaic*Font: NORML_FONT +Mosaic*AddressFont: ITAL_FONT +Mosaic*ItalicFont: ITAL_FONT +Mosaic*BoldFont: BOLD_FONT +Mosaic*FixedFont: FIXED_FONT +Mosaic*PlainFont: FIXED_FONT +Mosaic*ListingFont: FIXED_FONT +Mosaic*TitleFont: LABEL_FONT +Mosaic*Header1Font: H1_FONT +Mosaic*Header2Font: H2_FONT +Mosaic*Header3Font: H3_FONT +Mosaic*Header4Font: H4_FONT +Mosaic*Header5Font: H5_FONT +Mosaic*Header6Font: H6_FONT + +Mosaic*XmBulletinBoard*buttonFontList: NORML_FONT +Mosaic*XmBulletinBoard*labelFontList: BOLD_FONT +Mosaic*XmCascadeButton*fontList: LABEL_FONT +Mosaic*XmCascadeButtonGadget*fontList: LABEL_FONT +Mosaic*XmIconGadget*fontList: NORML_FONT +Mosaic*XmLabel*fontList: BOLD_FONT +Mosaic*XmLabelGadget*fontList: BOLD_FONT +Mosaic*XmList*fontList: NORML_FONT +Mosaic*XmMenuShell*XmCascadeButton*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmCascadeButtonGadget*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmLabelGadget*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmPushButton*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmPushButtonGadget*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmToggleButton*fontList: ITAL_FONT +Mosaic*XmMenuShell*XmToggleButtonGadget*fontList: ITAL_FONT +Mosaic*XmPushButton*fontList: NORML_FONT +Mosaic*XmPushButtonGadget*fontList: NORML_FONT +Mosaic*XmScale*fontList: BOLD_FONT +Mosaic*XmText.fontList: LABEL_FONT +Mosaic*XmTextField.fontList: LABEL_FONT +Mosaic*XmToggleButton*fontList: NORML_FONT +Mosaic*XmToggleButtonGadget*fontList: NORML_FONT +Mosaic*optionmenu*fontList: NORML_FONT +Mosaic*optionmenu.XmLabelGadget*fontList: BOLD_FONT +Mosaic*pulldownmenu*fontList: ITAL_FONT +Mosaic*menubar*fontList: BOLD_FONT diff --git a/lib/X11/netscape b/lib/X11/netscape new file mode 100644 index 0000000..abc0532 --- /dev/null +++ b/lib/X11/netscape @@ -0,0 +1,96 @@ +Netscape*noAboutSplash: true + +!Netscape*fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*XmTextField.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*XmText.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*XmList*fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*menuBar*fontList: -*-courier-bold-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*menuBar*historyTruncated.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*popup*fontList: -*-courier-bold-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*topArea*fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*topArea*XmTextField.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*topArea*XmText.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*bookmark*fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*bookmark*XmTextField.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*bookmark*XmText.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*bookmark*selectedLabel.fontList: -*-courier-bold-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*bookmark*multiFontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r,-*-courier-bold-r-*-*-*-140-*-*-*-*-koi8-r=HEADING,-*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r=ICON +!Netscape*mouseDocumentation.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*docinfoButton.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*licenseDialog*text.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r +!Netscape*documentFonts*foundry: * +!Netscape*documentFonts*family: courier +!Netscape*documentFonts*weight: medium +!Netscape*documentFonts*slant: r +!Netscape*documentFonts*swidth: * +!Netscape*documentFonts*adstyle: * +!Netscape*documentFonts*pixelsize: * +!Netscape*documentFonts*pointsize: 140 +!Netscape*documentFonts*resx: * +!Netscape*documentFonts*resy: * +!Netscape*documentFonts*spacing: * +!Netscape*documentFonts*avgwidth: * +!Netscape*documentFonts*registry: koi8 +!Netscape*documentFonts*encoding: r +!*Netscapemailto*urlLabel.fontList: -*-courier-medium-r-*-*-*-140-*-*-*-*-koi8-r + +!Netscape*XmText.translations: #override\n\ + osfDelete: delete-previous-character() +!Netscape*XmTextField.translations: #override\n\ + osfDelete: delete-previous-character() +!Netscape*documentFonts.charset*koi8-1: iso-8859-1 +!Netscape*documentFonts.charset*koi8-r: koi8-r +!Netscape*documentFonts.charset*iso8859-1: koi8-r + +Netscape*documentFonts.sizeIncrement: 10 + +Netscape*toolBar.destinations.isEnabled: false +Netscape*toolBar.myshopping.isEnabled: false +Netscape*toolBar.search.isEnabled: false +Netscape*toolBar.viewSecurity.isEnabled: false + +!Netscape*selectForeground: White +!Netscape*selectBackground: Blue + +!## NETSCAPE +Netscape*drawingArea.translations: #replace \ + : ArmLink() \n\ + : ArmLink() \n\ + ~Shift: ActivateLink() \n\ + ~Shift: ActivateLink(new-window) \ + DisarmLink() \n\ + Shift: ActivateLink(save-only) \ + DisarmLink() \n\ + Shift: ActivateLink(save-only) \ + DisarmLink() \n\ + : DisarmLinkIfMoved() \n\ + : DisarmLinkIfMoved() \n\ + : DisarmLinkIfMoved() \n\ + : DescribeLink() \n\ + : xfeDoPopup() \n\ + : ActivatePopup() \n\ + Ctrl: PageUp()\n\ + Ctrl: PageDown()\n\ + Shift: LineUp()\n\ + Shift: LineDown()\n\ + None: LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()\n\ + None: LineDown()LineDown()LineDown()LineDown()LineDown()LineDown()\n\ + Alt: xfeDoCommand(forward)\n\ + Alt: xfeDoCommand(back) + +Netscape*globalNonTextTranslations: #override\n\ + Shift: LineUp()\n\ + Shift: LineDown()\n\ + None:LineUp()LineUp()LineUp()LineUp()LineUp()LineUp()\n\ + None:LineDown()LineDown()LineDown()LineDown()LineDown()LineDown()\n\ + Alt: xfeDoCommand(forward)\n\ + Alt: xfeDoCommand(back)\n\ + KP_9: PageUp()\n\ + KP_3: PageDown()\n\ + KP_8: LineUp()\n\ + KP_2: LineDown()\n\ + KP_4: ColumnLeft()\n\ + KP_6: ColumnRight()\n\ + : \n\ + ,: xfeDoCommand(back)\n\ + ,: xfeDoPopup() diff --git a/lib/X11/utf-8.vars b/lib/X11/utf-8.vars new file mode 100644 index 0000000..17502a9 --- /dev/null +++ b/lib/X11/utf-8.vars @@ -0,0 +1,3 @@ +LESSCHARSET=utf-8 +LC_CTYPE=ru_RU.UTF-8 +LC_COLLATE=ru_RU.UTF-8 diff --git a/lib/X11/xterm b/lib/X11/xterm new file mode 100644 index 0000000..1d28cb4 --- /dev/null +++ b/lib/X11/xterm @@ -0,0 +1,413 @@ +! +! XTerm +! +#if WIDTH > 640 +# define XTERM_GEOMETRY 80x30 +#else +! 640x480 +# define XTERM_GEOMETRY 80x25-0-0 +#endif + +XTerm*Background: BACKGROUND_TEXT +XTerm*Foreground: FOREGROUND_TEXT +XTerm*VT100*Background: BACKGROUND_TEXT +XTerm*VT100*Foreground: FOREGROUND_TEXT + +XTerm*VT100*borderColor: BORDER_COLOR +XTerm*VT100*cursorColor: CURSOR_COLOR +XTerm*VT100*pointerColor: POINTER_COLOR +XTerm*VT100*pointerColorBackGround: BACKGROUND_TEXT + +XTerm*SimpleMenu*menuLabel.font: STD_FONT +XTerm*VT100*iconFont: STD_FONT +XTerm*VT100*font: STD_FONT +XTerm*VT100*font1: UNREADABLE_FONT +XTerm*VT100*font2: TINY_FONT +XTerm*VT100*font3: SMALL_FONT +XTerm*VT100*font4: MEDIUM_FONT +XTerm*VT100*font5: LARGE_FONT +XTerm*VT100*font6: HUGE_FONT + +XTerm*VT100*c132: true +XTerm*VT100*curses: true +XTerm*VT100*deiconifyWarp: false +XTerm*VT100*fullCursor: true +XTerm*VT100*iconStartup: false +XTerm*VT100*internalBorder: 2 +XTerm*VT100*jumpScroll: true +XTerm*VT100*logFile: XtermLog.XXXXX +XTerm*VT100*logging: false +XTerm*VT100*logInhibit: false +XTerm*VT100*loginShell: true +XTerm*VT100*marginBell: false +XTerm*VT100*multiScroll: true +XTerm*VT100*nMarginBell: 10 +XTerm*VT100*pageOverlap: 1 +XTerm*VT100*pageScroll: false +XTerm*VT100*reverseVideo: false +XTerm*VT100*reverseWrap: true +XTerm*VT100*saveLines: 1024 +XTerm*VT100*scrollBar: true +XTerm*VT100*scrollInput: true +XTerm*VT100*scrollKey: false +XTerm*scrollTtyOutput: false +XTerm*VT100*scrollPosition: right +XTerm*VT100*statusLine: false +XTerm*VT100*statusNormal: false +XTerm*VT100*termName: x11term +XTerm*VT100*textUnderIcon: true +XTerm*VT100*title: xterm +XTerm*VT100*titleBar: true +XTerm*VT100*titleFont: SMALL_FONT +XTerm*VT100*utmpInhibit: false +XTerm*VT100*visualBell: false +XTerm*VT100*vt102: false +XTerm*VT100*warp: false + +XTerm*locale: true +XTerm*utf8Title: true +XTerm*EightBitInput: True +XTerm*metaSendsEscape: true +XTerm*charClass: 33:48,37:48,45-47:48,64:48,126:48 +XTerm*loginShell: true + +UXTerm*locale: true +UXTerm*utf8Title: true +UXTerm*termName: xterm +UXTerm*geometry: XTERM_GEOMETRY +UXTerm*font: STD_FONT +UXTerm*saveLines: 1024 +UXTerm*loginShell: true + +! http://threebit.net/mail-archive/kde/msg00076.html +*VT100*dynamicColors: on +XTerm*color0: black +XTerm*color1: red3 +XTerm*color2: green3 +XTerm*color3: yellow3 +XTerm*color4: blue3 +XTerm*color5: magenta3 +XTerm*color6: cyan3 +XTerm*color7: gray90 +XTerm*color8: gray30 +XTerm*color9: red +XTerm*color10: green +XTerm*color11: yellow +XTerm*color12: blue +XTerm*color13: magenta +XTerm*color14: cyan +XTerm*color15: white +XTerm*colorBD: white +XTerm*colorMode: on +XTerm*colorUL: yellow + +! http://www.muquit.com/muquit/software/ansi_xterm/XTerm +! color1 is mutt''s RFC 822 headers +! color4 is mutt''s foreground +! color7 is mutt''s background +! color10 is used for ls --color for file with execute bit set +! color12 is used in ls --color for directories +!*xterm*color16: snow +!*xterm*color17: GhostWhite +!*xterm*color18: WhiteSmoke +!*xterm*color19: gainsboro +!*xterm*color20: FloralWhite +!*xterm*color21: OldLace +!*xterm*color22: linen +!*xterm*color23: AntiqueWhite +!*xterm*color24: PapayaWhip +!*xterm*color25: BlanchedAlmond +!*xterm*color26: bisque +!*xterm*color27: PeachPuff +!*xterm*color28: NavajoWhite +!*xterm*color29: moccasin +!*xterm*color30: cornsilk +!*xterm*color31: ivory +!*xterm*color32: LemonChiffon +!*xterm*color33: seashell +!*xterm*color34: honeydew +!*xterm*color35: MintCream +!*xterm*color36: azure +!*xterm*color37: AliceBlue +!*xterm*color38: lavender +!*xterm*color39: LavenderBlush +!*xterm*color40: MistyRose +!*xterm*color41: white +!*xterm*color42: black +!*xterm*color43: DarkSlateGray +!*xterm*color44: DarkSlateGrey +!*xterm*color45: DimGray +!*xterm*color46: DimGrey +!*xterm*color47: SlateGray +!*xterm*color48: SlateGrey +!*xterm*color49: LightSlateGray +!*xterm*color50: LightSlateGrey +!*xterm*color51: gray +!*xterm*color52: grey +!*xterm*color53: LightGrey +!*xterm*color54: LightGray +!*xterm*color55: MidnightBlue +!*xterm*color56: navy +!*xterm*color57: NavyBlue +!*xterm*color58: CornflowerBlue +!*xterm*color59: DarkSlateBlue +!*xterm*color60: SlateBlue +!*xterm*color61: MediumSlateBlue +!*xterm*color62: LightSlateBlue +!*xterm*color63: MediumBlue +!*xterm*color64: RoyalBlue +!*xterm*color65: blue +!*xterm*color66: DodgerBlue +!*xterm*color67: DeepSkyBlue +!*xterm*color68: SkyBlue +!*xterm*color69: LightSkyBlue +!*xterm*color70: SteelBlue +!*xterm*color71: LightSteelBlue +!*xterm*color72: LightBlue +!*xterm*color73: PowderBlue +!*xterm*color74: PaleTurquoise +!*xterm*color75: DarkTurquoise +!*xterm*color76: MediumTurquoise +!*xterm*color77: turquoise +!*xterm*color78: cyan +!*xterm*color79: LightCyan +!*xterm*color80: CadetBlue +!*xterm*color81: MediumAquamarine +!*xterm*color82: aquamarine +!*xterm*color83: DarkGreen +!*xterm*color84: DarkOliveGreen +!*xterm*color85: DarkSeaGreen +!*xterm*color86: SeaGreen +!*xterm*color87: MediumSeaGreen +!*xterm*color88: LightSeaGreen +!*xterm*color89: PaleGreen +!*xterm*color90: SpringGreen +!*xterm*color91: LawnGreen +!*xterm*color92: green +!*xterm*color93: chartreuse +!*xterm*color94: MediumSpringGreen +!*xterm*color95: GreenYellow +!*xterm*color96: LimeGreen +!*xterm*color97: YellowGreen +!*xterm*color98: ForestGreen +!*xterm*color99: OliveDrab +!*xterm*color100: DarkKhaki +!*xterm*color101: khaki +!*xterm*color102: PaleGoldenrod +!*xterm*color103: LightGoldenrodYellow +!*xterm*color104: LightYellow +!*xterm*color105: yellow +!*xterm*color106: gold +!*xterm*color107: LightGoldenrod +!*xterm*color108: goldenrod +!*xterm*color109: DarkGoldenrod +!*xterm*color110: RosyBrown +!*xterm*color111: IndianRed +!*xterm*color112: SaddleBrown +!*xterm*color113: sienna +!*xterm*color114: peru +!*xterm*color115: burlywood +!*xterm*color116: beige +!*xterm*color117: wheat +!*xterm*color118: SandyBrown +!*xterm*color119: tan +!*xterm*color120: chocolate +!*xterm*color121: firebrick +!*xterm*color122: brown +!*xterm*color123: DarkSalmon +!*xterm*color124: salmon +!*xterm*color125: LightSalmon +!*xterm*color126: orange +!*xterm*color127: DarkOrange +!*xterm*color128: coral +!*xterm*color129: LightCoral +!*xterm*color130: tomato +!*xterm*color131: OrangeRed +!*xterm*color132: red +!*xterm*color133: HotPink +!*xterm*color134: DeepPink +!*xterm*color135: pink +!*xterm*color136: LightPink +!*xterm*color137: PaleVioletRed +!*xterm*color138: maroon +!*xterm*color139: MediumVioletRed +!*xterm*color140: VioletRed +!*xterm*color141: magenta +!*xterm*color142: violet +!*xterm*color143: plum +!*xterm*color144: orchid +!*xterm*color145: MediumOrchid +!*xterm*color146: DarkOrchid +!*xterm*color147: DarkViolet +!*xterm*color148: BlueViolet +!*xterm*color149: purple +!*xterm*color150: MediumPurple +!*xterm*color151: thistle +!*xterm*color152: snow1 +!*xterm*color153: snow2 +!*xterm*color154: snow3 +!*xterm*color155: snow4 + +! http://www.math.colostate.edu/~reinholz/freebsd/apps_terminal.html +!XTerm*Foreground: light grey +!XTerm*Background: black +!XTerm*boldMode: false +!XTerm*visiblebell: false +! +!!red +!XTerm*color1: #EA6868 +!XTerm*color9: #FF7272 +!!green +!XTerm*color2: #ABCB8D +!XTerm*color10: #AFD78A +!!yellow +!XTerm*color3: #E8AE5B +!XTerm*color11: #FFA75D +!!blue +!XTerm*color4: #71C5F4 +!XTerm*color12: #67CDE9 +!!magenta +!XTerm*color5: #E2BAF1 +!XTerm*color13: #ECAEE9 +!!cyan +!XTerm*color6: #21F1EA +!XTerm*color14: #36FFFC +!!white +!XTerm*color7: #F1F1F1 +!XTerm*color15: #FFFFFF + +!Aterm*termName: xterm +!Aterm*geometry: XTERM_GEOMETRY +!Aterm*font: STD_FONT +!Aterm*saveLines: 1024 +!Aterm*loginShell: true + +! http://www.opennet.ru/base/X/xterm_color.txt.html +! Scrollbar tuning +!BlueTerm*VT100.Scrollbar.thumb: royal blue +!BlueTerm*VT100.Scrollbar.width: 9 +!BlueTerm*VT100.Scrollbar.background: steel blue +!BlueTerm*VT100.Scrollbar.foreground: black + +!BlueTerm*mainMenu*backgroundPixmap: gradient:vertical?dimension=350&start=SkyBlue1&end=blue4 +!BlueTerm*SimpleMenu*background: dark slate blue +!BlueTerm*SimpleMenu*foreground: deep sky blue + +!BlueTerm*VT100.background: midnight blue +!BlueTerm*VT100.foreground: cornflower blue +! Uncomment this to use color for the bold attribute +!BlueTerm*VT100*colorBDMode: on +!BlueTerm*VT100*colorBD: deep sky blue +!BlueTerm*VT100*cursorColor: blue +! fonts +!BlueTerm*VT100*boldMode: false +!BlueTerm*VT100*boldFont: fixed + +!BlueTerm*VT100*color0: black +!BlueTerm*VT100*color1: red3 +!BlueTerm*VT100*color2: sea green +!BlueTerm*VT100*color3: goldenrod +!BlueTerm*VT100*color4: royal blue +!BlueTerm*VT100*color5: magenta3 +!BlueTerm*VT100*color6: #007474 +!BlueTerm*VT100*color7: lightgray +!BlueTerm*VT100*color8: gray50 +!BlueTerm*VT100*color9: red +!BlueTerm*VT100*color10: green +!BlueTerm*VT100*color11: yellow +!BlueTerm*VT100*color12: blue +!BlueTerm*VT100*color13: magenta +!BlueTerm*VT100*color14: cyan +!BlueTerm*VT100*color15: white + +Rxvt*saveLines: 1024 +Rxvt*loginShell: true +Rxvt*geometry: XTERM_GEOMETRY +Rxvt*font: STD_FONT +Rxvt*cursorColor: CURSOR_COLOR +Rxvt*colorBD: black +Rxvt*colorIT: black +Rxvt*colorUL: black +Rxvt*colorRV: black +Rxvt*scrollTtyOutput: false +Rxvt*scrollWithBuffer: false +Rxvt*scrollTtyKeypress: true + +Rxvt*foreground: black +Rxvt*background: light gray +Rxvt*boldMode: false +Rxvt*visibleBell: false + +Rxvt*color0: black +!red +Rxvt*color1: red3 +Rxvt*color9: red2 +!green +Rxvt*color2: green3 +Rxvt*color10: green2 +!yellow +Rxvt*color3: brown3 +Rxvt*color11: yellow +!blue +Rxvt*color4: blue3 +Rxvt*color12: blue2 +!magenta +Rxvt*color5: magenta3 +Rxvt*color13: magenta2 +!cyan +Rxvt*color6: cyan3 +Rxvt*color14: cyan2 +!white +Rxvt*color7: LightGrey +Rxvt*color15: white + +#if WIDTH > 1600 +# define XFT_FONT xft:Monospace:size=18 +#elif WIDTH > 1200 +# define XFT_FONT xft:Monospace:size=16 +#elif WIDTH > 800 +# define XFT_FONT xft:Monospace:size=14 +#else +# define XFT_FONT xft:Monospace:size=12 +#endif + +URxvt*termName: rxvt +URxvt*font: XFT_FONT + +Rxvt.keysym.KP_End: \033[8~ +Rxvt.keysym.KP_Down: \033OB +Rxvt.keysym.KP_Next: \033[6~ +Rxvt.keysym.KP_Left: \033OD +Rxvt.keysym.KP_Right: \033OC +Rxvt.keysym.KP_Home: \033[7~ +Rxvt.keysym.KP_Up: \033OA +Rxvt.keysym.KP_Prior: \033[5~ + +Rxvt.keysym.(AppKeypad-)KP_End: \033Oq +Rxvt.keysym.(AppKeypad-)KP_Down: \033Or +Rxvt.keysym.(AppKeypad-)KP_Next: \033Os +Rxvt.keysym.(AppKeypad-)KP_Left: \033Ot +Rxvt.keysym.(AppKeypad-)KP_Right: \033Ov +Rxvt.keysym.(AppKeypad-)KP_Home: \033Ow +Rxvt.keysym.(AppKeypad-)KP_Up: \033Ox +Rxvt.keysym.(AppKeypad-)KP_Prior: \033Oy + +!Rxvt*keysym.S-Prior: ^[[5;2~ +!Rxvt*keysym.S-Next: ^[[6;2~ + +!URxvt.keysym.C-Left: \033[1;5D +!URxvt.keysym.C-Right: \033[1;5C +!URxvt.keysym.C-Up: \033[1;5B +!URxvt.keysym.C-Down: \033[1;5A +!URxvt.keysym.C-S-Left: \033[1;6D +!URxvt.keysym.C-S-Right: \033[1;6C +!URxvt.keysym.C-S-Up: \033[1;6B +!URxvt.keysym.C-S-Down: \033[1;6A + +!pine*vt100.translations: #override\n\ +! Shift,:string("OA")\n\ +! Shift,:string("OB")\n\ +! Ctrl,:string("OAOAOAOAOA")\n\ +! Ctrl,:string("OBOBOBOBOB")\n\ +! ,: string("OA")\n\ +! ,: string("OB") diff --git a/lib/config/dbus b/lib/config/dbus new file mode 100644 index 0000000..997ee83 --- /dev/null +++ b/lib/config/dbus @@ -0,0 +1,9 @@ +if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + + . "$HOME"/.dbus/session-bus/* + export DBUS_SESSION_BUS_ADDRESS + +else + + echo "DBUS has already been set" +fi diff --git a/lib/config/gpg-agent b/lib/config/gpg-agent new file mode 100644 index 0000000..8ff9bee --- /dev/null +++ b/lib/config/gpg-agent @@ -0,0 +1,9 @@ +if test -f "$HOME"/.gnupg/agent-info && + kill -0 `head -1 "$HOME"/.gnupg/agent-info | cut -d: -f 2` 2>/dev/null; then + . "$HOME"/.gnupg/agent-info + export GPG_AGENT_INFO +else + eval `gpg-agent --daemon --write-env-file "$HOME"/.gnupg/agent-info` +fi + +include gpg-agent-update-tty diff --git a/lib/config/gpg-agent-ssh b/lib/config/gpg-agent-ssh new file mode 100644 index 0000000..61d7489 --- /dev/null +++ b/lib/config/gpg-agent-ssh @@ -0,0 +1,11 @@ +if test -f "$HOME"/.gnupg/agent-info && + kill -0 `head -1 "$HOME"/.gnupg/agent-info | cut -d: -f 2` 2>/dev/null; then + . "$HOME"/.gnupg/agent-info + export GPG_AGENT_INFO + export SSH_AUTH_SOCK + export SSH_AGENT_PID +else + eval `gpg-agent --daemon --enable-ssh-support --write-env-file "$HOME"/.gnupg/agent-info` +fi + +include gpg-agent-update-tty diff --git a/lib/config/gpg-agent-stop b/lib/config/gpg-agent-stop new file mode 100644 index 0000000..33ed837 --- /dev/null +++ b/lib/config/gpg-agent-stop @@ -0,0 +1,6 @@ +if test -f "$HOME"/.gnupg/agent-info && + kill -0 `head -1 "$HOME"/.gnupg/agent-info | cut -d: -f 2` 2>/dev/null; then + kill `head -1 "$HOME"/.gnupg/agent-info | cut -d: -f 2` +else + echo GPG agent is not running >&2 +fi diff --git a/lib/config/gpg-agent-update-tty b/lib/config/gpg-agent-update-tty new file mode 100644 index 0000000..cda45eb --- /dev/null +++ b/lib/config/gpg-agent-update-tty @@ -0,0 +1,3 @@ +GPG_TTY=`tty` +export GPG_TTY +echo UPDATESTARTUPTTY | gpg-connect-agent diff --git a/lib/config/mc-nice b/lib/config/mc-nice new file mode 120000 index 0000000..b8e12aa --- /dev/null +++ b/lib/config/mc-nice @@ -0,0 +1 @@ +nice-mc \ No newline at end of file diff --git a/lib/config/nice-mc b/lib/config/nice-mc new file mode 100644 index 0000000..575e764 --- /dev/null +++ b/lib/config/nice-mc @@ -0,0 +1,6 @@ +MC_PWD_FILE="${TMPDIR-/tmp}/mc-$USER/mc.pwd.$$" +nice -20 ionice -c3 mc -P "$MC_PWD_FILE" +rc=$? +cd "`cat \"$MC_PWD_FILE\"`" && rm "$MC_PWD_FILE" || rc=$? +unset MC_PWD_FILE +return $rc diff --git a/lib/config/wget b/lib/config/wget new file mode 100644 index 0000000..371ea50 --- /dev/null +++ b/lib/config/wget @@ -0,0 +1,5 @@ +if [ "$WGET_SPEED" ]; then + wget_speed="$WGET_SPEED" +else + wget_speed=9000k +fi diff --git a/lib/python/init.py b/lib/python/init.py new file mode 100644 index 0000000..8b86300 --- /dev/null +++ b/lib/python/init.py @@ -0,0 +1,185 @@ +# This is startup file for interactive python. +# It is not automatically loaded by python interpreter. +# To instruct the interpreter to load it insert the following commands +# into your .profile (use whatever syntax and initialization file +# is appropriate for your shell): +# +# PYTHONSTARTUP=$HOME/init.py # or where you really put it +# export PYTHONSTARTUP + +def init(): + import sys, os + import __builtin__ + + pyreadlinew32_startup = os.path.join(sys.prefix, + 'lib', 'site-packages', 'pyreadline', 'configuration', 'startup.py') + + if os.path.exists(pyreadlinew32_startup): + execfile(pyreadlinew32_startup) + + else: + # From Bruce Edge + + try: + import rlcompleter, readline + initfile = os.environ.get('INPUTRC') or os.path.expanduser('~/.inputrc') + readline.read_init_file(initfile) + + histfile = os.path.expanduser('~/.python-history') + try: + readline.read_history_file(histfile) + except IOError: + pass # No such file + + def savehist(): + histfilesize = os.environ.get('HISTFILESIZE') or \ + os.environ.get('HISTSIZE') + if histfilesize: + try: + histfilesize = int(histfilesize) + except ValueError: + pass + else: + readline.set_history_length(histfilesize) + readline.write_history_file(histfile) + + import atexit + atexit.register(savehist) + + except (ImportError, AttributeError): + pass # no readline or atexit, or readline doesn't have + # {read,write}_history_file - ignore the error + + + term = os.environ.get('TERM', '') + if 'linux' in term: + background = 'dark' + else: + background = os.environ.get('BACKGROUND', 'light').lower() + + # From Randall Hopper + + for _term in ['linux', 'term', 'rxvt', 'vt100', 'screen']: + if _term in term: + if background == 'dark': + ps1_color = '3' # yellow + stdout_color = '7' # bold white + else: + ps1_color = '4' # blue + stdout_color = '0' # bold black + + sys.ps1 = '\001\033[3%sm\002>>>\001\033[0m\002 ' % ps1_color + sys.ps2 = '\001\033[1;32m\002...\001\033[0m\002 ' # bold green + + + # From Denis Otkidach + + class ColoredFile: + def __init__(self, fp, begin, end='\033[0m'): # reset all attributes + self.__fp = fp + self.__begin = begin + self.__end = end + + def write(self, s): + self.__fp.write(self.__begin+s+self.__end) + + def writelines(self, lines): + map(self.write, lines) + + def __getattr__(self, attr): + return getattr(self.__fp, attr) + + sys.stdout = ColoredFile(sys.stdout, '\033[1;3%sm' % stdout_color) + sys.stderr = ColoredFile(sys.stderr, '\033[31m') # red + + break + + try: + import locale + except ImportError: + pass # locale was not compiled + else: + try: + locale.setlocale(locale.LC_ALL, '') + + from pprint import pprint + + def displayhook(value): + if value is not None: + __builtin__._ = value + pprint(value) + + sys.displayhook = displayhook + + except (ImportError, locale.Error): + pass # no locale support or unsupported locale + + + # From: Paul Magwene with a lot of my fixes + + class DirLister: + def __getitem__(self, key): + s = os.listdir(os.curdir) + return s[key] + + def __getslice__(self, i, j): + s = os.listdir(os.curdir) + return s[i:j] + + def __repr__(self): + return str(os.listdir(os.curdir)) + + def __call__(self, path=None): + if path: + path = os.path.expanduser(os.path.expandvars(path)) + else: + path = os.curdir + return os.listdir(path) + + class DirChanger: + def __repr__(self): + self() + return os.getcwd() + + def __call__(self, path=None): + path = os.path.expanduser(os.path.expandvars(path or '~')) + os.chdir(path) + + __builtin__.ls = DirLister() + __builtin__.cd = DirChanger() + + + # From Thomas Heller + # + #import pdb + # + #def info(*args): + # pdb.pm() + #sys.excepthook = info + + + class Pwd: + def __repr__(self): + return os.getcwd() + + def __call__(self): + return repr(self) + + __builtin__.pwd = Pwd() + + + class _Exit: + def __repr__(self): + sys.exit() + + def __call__(self, msg=None): + sys.exit(msg) + + __builtin__.x = _Exit() + + if isinstance(__builtin__.exit, str): # In Python 2.5+ exit and quit are objects + __builtin__.exit = __builtin__.quit = x + + +init() +del init diff --git a/lib/python/pdbrc.py b/lib/python/pdbrc.py new file mode 100644 index 0000000..0e67e51 --- /dev/null +++ b/lib/python/pdbrc.py @@ -0,0 +1,42 @@ +# Command line history: +import os, readline +histfile = os.path.expanduser("~/.pdb-history") + +try: + readline.read_history_file(histfile) +except IOError: + pass + +def savehist(histfile=histfile): + import os, readline + histfilesize = os.environ.get('HISTFILESIZE') or \ + os.environ.get('HISTSIZE') + if histfilesize: + try: + histfilesize = int(histfilesize) + except ValueError: + pass + else: + readline.set_history_length(histfilesize) + readline.write_history_file(histfile) + +import atexit +atexit.register(savehist) + +# return to debugger after fatal exception (Python cookbook 14.5): +import sys +def info(type, value, tb): + if hasattr(sys, 'ps1') or not sys.stderr.isatty(): + sys.__excepthook__(type, value, tb) + import traceback, pdb + traceback.print_exception(type, value, tb) + print + pdb.pm() +sys.excepthook = info + +# http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/498182 +import pdb, rlcompleter +pdb.Pdb.complete = rlcompleter.Completer().complete + +# Cleanup any variables that could otherwise clutter up the namespace. +del atexit, info, os, pdb, readline, rlcompleter, savehist, sys