From 3f71e5e47055550d187eb1b60d889f82bb1de28f Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 14 Feb 2021 18:59:26 +0100 Subject: update --- .Xresources | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index b1c3e3d..be0e99f 100644 --- a/.Xresources +++ b/.Xresources @@ -18,10 +18,11 @@ URxvt.keysym.C-Next: font-size:decrease xterm*termName: xterm-256color xterm*VT100.Translations: #override \ - Ctrl Next: smaller-vt-font() \n\ - Ctrl Prior: larger-vt-font() \n -xterm*faceName: DejaVu Sans Mono -xterm*faceSize: 10 + Meta minus: smaller-vt-font() \n\ + Meta equal: larger-vt-font() \n +xterm*cursorColor: red +!xterm*faceName: DejaVu Sans Mono +!xterm*faceSize: 10 ! xterm*font: 7x14 ! Allow sixel graphics. (Try: "convert -colors 16 foo.jpg sixel:-"). xterm*decTerminalID: vt340 -- cgit v1.3 From 90ec7bf2b039599f987066c4e16b5817743fafcf Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 15 Feb 2021 17:19:55 +0100 Subject: update --- .Xresources | 1 + .vimrc | 2 ++ .zsh-powerline.sh | 12 +++++++----- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index be0e99f..1514003 100644 --- a/.Xresources +++ b/.Xresources @@ -21,6 +21,7 @@ xterm*VT100.Translations: #override \ Meta minus: smaller-vt-font() \n\ Meta equal: larger-vt-font() \n xterm*cursorColor: red +xterm*visualBell: true !xterm*faceName: DejaVu Sans Mono !xterm*faceSize: 10 ! xterm*font: 7x14 diff --git a/.vimrc b/.vimrc index 671af49..9e45e2d 100644 --- a/.vimrc +++ b/.vimrc @@ -1,6 +1,8 @@ " set background= set t_te= t_ti= laststatus=2 +set rtp+=/opt/local/share/fzf/vim + syntax off filetype on filetype plugin on diff --git a/.zsh-powerline.sh b/.zsh-powerline.sh index f0835a4..e3f05f1 100644 --- a/.zsh-powerline.sh +++ b/.zsh-powerline.sh @@ -1,9 +1,10 @@ # Colorscheme readonly COLOR_CWD='blue' readonly COLOR_GIT='cyan' -readonly COLOR_SUCCESS='green' +#readonly COLOR_SUCCESS='green' +readonly COLOR_SUCCESS='blue' readonly COLOR_FAILURE='red' -readonly COLOR_TIME='cyan' +#readonly COLOR_TIME='cyan' readonly SYMBOL_GIT_BRANCH='⑂' readonly SYMBOL_GIT_MODIFIED='*' @@ -56,12 +57,13 @@ _config_prompt() { local symbol="%F{$COLOR_FAILURE}$PS_SYMBOL%f" fi - local cwd="%F{$COLOR_CWD}%~%f" + #local cwd="%F{$COLOR_CWD}%~%f" + local cwd="%F{$COLOR_CWD}%2~%f" local git="%F{$COLOR_GIT}$(_git_info)%f" - local time="%F{$COLOR_TIME}%D{%H:%M:%S}%f" + #local time="%F{$COLOR_TIME}%D{%H:%M:%S}%f" PROMPT="$cwd$git $symbol " - RPROMPT="$time" + #RPROMPT="$time" } -- cgit v1.3 From 17b6d57450341896743f31ae67921d2abd8551bc Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 22 Feb 2021 17:10:51 +0100 Subject: updated --- .Xresources | 1 + .bashrc | 2 ++ .gitconfig | 2 ++ .vimrc | 3 +-- bin/gauth | 4 +++- bin/p4a | 3 +++ bin/xt | 3 ++- 7 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 bin/p4a (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 1514003..bdf02a3 100644 --- a/.Xresources +++ b/.Xresources @@ -22,6 +22,7 @@ xterm*VT100.Translations: #override \ Meta equal: larger-vt-font() \n xterm*cursorColor: red xterm*visualBell: true +xterm*geometry: 100x32 !xterm*faceName: DejaVu Sans Mono !xterm*faceSize: 10 ! xterm*font: 7x14 diff --git a/.bashrc b/.bashrc index c086d45..95f2377 100644 --- a/.bashrc +++ b/.bashrc @@ -131,3 +131,5 @@ unset base # load Nix config files (aka auto-completion etc.) export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash diff --git a/.gitconfig b/.gitconfig index cefd5e5..11f0d14 100644 --- a/.gitconfig +++ b/.gitconfig @@ -15,3 +15,5 @@ rebase = false [hub] protocol = ssh +[init] + defaultBranch = main diff --git a/.vimrc b/.vimrc index 9e45e2d..5220bba 100644 --- a/.vimrc +++ b/.vimrc @@ -1,14 +1,13 @@ " set background= set t_te= t_ti= laststatus=2 -set rtp+=/opt/local/share/fzf/vim - syntax off filetype on filetype plugin on filetype plugin indent on let mapleader = "," +set rtp+=/opt/homebrew/opt/fzf let g:fzf_preview = 'cat {}' " vimki plugin diff --git a/bin/gauth b/bin/gauth index 575d6fc..699cd84 100755 --- a/bin/gauth +++ b/bin/gauth @@ -1,7 +1,9 @@ #!/bin/sh # Use backup from andOTP -gpg -qd ~/.otp_accounts.json.gpg | +#gpg -qd ~/otp_accounts.json.gpg.pgp | +#gpg -qd ~/.otp_accounts.json.gpg | +cat ~/otp_accounts.json | jq -r '.[] | "\(.label) \(.secret)"' | while read -r l s; do echo "$l $(oathtool --totp -b "$s")" diff --git a/bin/p4a b/bin/p4a new file mode 100755 index 0000000..30e54ff --- /dev/null +++ b/bin/p4a @@ -0,0 +1,3 @@ +#!/bin/sh +adb forward tcp:8222 tcp:8022 +ssh ssh://u0_a250@localhost:8222 diff --git a/bin/xt b/bin/xt index 71b92d3..9395b3e 100755 --- a/bin/xt +++ b/bin/xt @@ -1,4 +1,5 @@ #!/bin/sh -exec xterm -sl 500 -j -cr red "$@" & +#exec xterm -sl 500 -j -cr red "$@" & +exec xterm "$@" & #cmd="urxvtc ${@:--T $HOSTNAME}" #eval "$cmd" || { [ $? = 2 ] && urxvtd -q -o -f && eval "$cmd"; } -- cgit v1.3 From 9793ed6f2c0a89728d19a8b06d084c3c3fb102e5 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 24 Feb 2021 22:28:41 +0100 Subject: update --- .Xresources | 2 +- .vimrc | 2 +- bin/start_godoc | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100755 bin/start_godoc (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index bdf02a3..8aaf72c 100644 --- a/.Xresources +++ b/.Xresources @@ -22,7 +22,7 @@ xterm*VT100.Translations: #override \ Meta equal: larger-vt-font() \n xterm*cursorColor: red xterm*visualBell: true -xterm*geometry: 100x32 +!xterm*geometry: 100x32 !xterm*faceName: DejaVu Sans Mono !xterm*faceSize: 10 ! xterm*font: 7x14 diff --git a/.vimrc b/.vimrc index 5220bba..35fb5e1 100644 --- a/.vimrc +++ b/.vimrc @@ -14,7 +14,7 @@ let g:fzf_preview = 'cat {}' let g:vimki_lower = "a-zàçéèêếëîïñôöùûü" autocmd filetype vimki syntax on autocmd filetype vimki set autowrite -"autocmd filetype vimki setlocal spell spelllang=fr +" autocmd filetype vimki setlocal spell spelllang=fr autocmd filetype vimki nmap z :FZF ~/Wiki autocmd filetype vimki nnoremap = YpVr= diff --git a/bin/start_godoc b/bin/start_godoc new file mode 100755 index 0000000..15bb70a --- /dev/null +++ b/bin/start_godoc @@ -0,0 +1,3 @@ +#!/bin/sh + +/Users/marc/go/bin/godoc >/tmp/godoc.out 2>&1 & -- cgit v1.3 From 737e83162766162be992f76e068386736abea71d Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sun, 28 Feb 2021 22:10:26 +0100 Subject: update --- .Xresources | 2 +- bin/rdate | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 bin/rdate (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 8aaf72c..28b8436 100644 --- a/.Xresources +++ b/.Xresources @@ -21,7 +21,7 @@ xterm*VT100.Translations: #override \ Meta minus: smaller-vt-font() \n\ Meta equal: larger-vt-font() \n xterm*cursorColor: red -xterm*visualBell: true +!xterm*visualBell: true !xterm*geometry: 100x32 !xterm*faceName: DejaVu Sans Mono !xterm*faceSize: 10 diff --git a/bin/rdate b/bin/rdate new file mode 100755 index 0000000..a69d137 --- /dev/null +++ b/bin/rdate @@ -0,0 +1,11 @@ +#!/bin/sh + +# Set date on remote machine from local one. This version works +# from MacOS to AlpineLinux. It is intended to re-sync clock of a +# virtual machine after host wakeup. + +# TODO: option to display the time difference between host and remote. +# hint: use 'date +%s' to get timestamp in seconds since epoch. + +ssh "$1" "sudo date $(date +%m%d%H%M%Y.%S)" + -- cgit v1.3 From 547f1550666700a087acb13f1cc3ef010bbb78fc Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 15 May 2021 18:11:23 +0200 Subject: fvwm is back --- .Xresources | 9 +- .config/i3/config | 1 + .fvwm2rc | 340 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ .xinitrc | 4 +- .xsession | 4 +- bin/wol | 6 + bin/xt | 1 + 7 files changed, 357 insertions(+), 8 deletions(-) create mode 100644 .fvwm2rc create mode 100755 bin/wol (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index b1c3e3d..7ca66a3 100644 --- a/.Xresources +++ b/.Xresources @@ -7,9 +7,10 @@ URxvt.colorBD: blue3 URxvt.colorUL: magenta3 URxvt.cursorColor: red ! URxvt.color12: rgb:5c/5c/ff -!URxvt.font: xft:Mono:size=12 -!URxvt.letterSpace: -1 Urxvt.font: 6x13 +!URxvt.font: xft:Mono:size=12 +!URxvt.font: xft:Mono:size=10 +URxvt.letterSpace: -1 URxvt.perl-ext-common: font-size URxvt.keysym.C-Prior: font-size:increase URxvt.keysym.C-Next: font-size:decrease @@ -20,8 +21,8 @@ xterm*termName: xterm-256color xterm*VT100.Translations: #override \ Ctrl Next: smaller-vt-font() \n\ Ctrl Prior: larger-vt-font() \n -xterm*faceName: DejaVu Sans Mono -xterm*faceSize: 10 +!xterm*faceName: DejaVu Sans Mono +!xterm*faceSize: 10 ! xterm*font: 7x14 ! Allow sixel graphics. (Try: "convert -colors 16 foo.jpg sixel:-"). xterm*decTerminalID: vt340 diff --git a/.config/i3/config b/.config/i3/config index 48c461c..a1de2b3 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -87,6 +87,7 @@ for_window [class="vlc"] floating enable for_window [instance="wish"] floating enable for_window [class="wpa_gui"] floating enable for_window [class="XVroot"] floating enable +#for_window [class="XTerm"] floating enable for_window [class="zoom"] floating enable bindsym button3 floating toggle diff --git a/.fvwm2rc b/.fvwm2rc new file mode 100644 index 0000000..fac2b23 --- /dev/null +++ b/.fvwm2rc @@ -0,0 +1,340 @@ +HilightColor black IndianRed +WindowFont fixed +IconFont fixed +MenuStyle black grey76 grey30 fixed fvwm +IgnoreModifiers 2 + +#Style "*" SloppyFocus +Style "*" MouseFocusClickRaises +Style "*" ForeColor black +Style "*" BackColor SteelBlue +Style "*" IconBox 800x64+0-0 +Style "*" MWMFunctions, MWMButtons, MWMBorder, MWMDecor, DecorateTransient, StickyIcon +Style "*" RandomPlacement + +OpaqueMoveSize 0 +#EdgeScroll 100 100 +#EdgeScroll 100000 100000 +EdgeScroll 0 0 +EdgeResistance 100000 100000 +#style "*" EdgeMoveResistance 100000 100 + +DeskTopSize 2x2 + +#ImagePath /usr/X11R6/include/X11/pixmaps/ +#ImagePath /usr/share/pixmaps/ + +Style "*" BorderWidth 4, HandleWidth 4 +Style "Fvwm*" NoTitle, Sticky, WindowListSkip +Style "*Pager" NoHandles, BorderWidth 0, WindowListSkip, CirculateSkip +Style "FvwmBanner" StaysOnTop +Style "FvwmButtons" NoTitle, NoHandles, Sticky, WindowListSkip,BorderWidth 4 +Style "*lock" NoTitle, NoHandles, WindowListSkip +Style "gkrellm" NoTitle, Sticky, WindowListSkip, CirculateSkip +#Style "*unknown*" NoTitle, BorderWidth 0, NoHandles, WindowListSkip + +#Style "rxvt" Icon Monitor.xpm +#Style "xterm" Icon Monitor.xpm +#Style "uxterm" Icon Monitor.xpm + +#========================================================================# +# Stuff to do at start-up +# + +AddToFunc "StartFunction" ++ "I" Module FvwmPager 0 0 ++ "I" Exec dunst +#+ "I" Exec xsetroot -solid rgb:3/4/5 +#+ "I" Exec setxkbmap fr +#+ "I" Exec synclient VertScrollDelta=-114 + +#========================================================================# +# Now define some handy complex functions +# +AddToFunc "Move-or-Raise" "M" Move ++ "M" Raise ++ "C" Raise ++ "D" Maximize 100 100 + +AddToFunc "Move-or-Lower" "M" Move ++ "M" Lower ++ "C" Lower ++ "D" RaiseLower + +AddToFunc "Move-or-Iconify" "M" Move ++ "D" Iconify + +AddToFunc "Resize-or-Raise" "M" Resize ++ "M" Raise ++ "C" Raise ++ "D" RaiseLower + +AddToFunc "Focus-and-Raise" I Focus ++ I Iconify false ++ I Raise ++ I WarpToWindow 50 8p + +#========================================================================# +DestroyMenu "Quit-Verify" +AddToMenu "Quit-Verify" +#+ "&Lock screen" Exec exec vlock -an ++ "&Fvwm restart" Restart +#+ "&Lock screen" Exec exec slock sudo sh -c "echo mem > /sys/power/state" ++ "&Quit X11" Quit ++ "&Suspend" Exec exec slock sudo sh -c "echo mem > /sys/power/state" +#+ "&Suspend" Exec exec suspend ++ "&Reboot" Exec exec sudo /sbin/reboot ++ "&Power off" Exec exec sudo /sbin/poweroff + +DestroyMenu "Module-Popup" +AddToMenu "Module-Popup" ++ "Debug" Module FvwmDebug ++ "Identify" Module FvwmIdent ++ "Window List" Module FvwmWinList + +DestroyMenu "Desktop-Apps" +AddToMenu "Desktop-Apps" ++ "&Brave" Exec exec brave ++ "&Chromium" Exec exec chromium ++ "&Discord" Exec exec discord ++ "&Firefox" Exec exec firefox ++ "&LibreOffice" Exec exec libreoffice ++ "&Keybase" Exec exec keybase-gui ++ "S&ignal" Exec exec signal-desktop ++ "&Slack" Exec exec slack ++ "&Zoom" Exec exec zoom + +DestroyMenu "Settings" +AddToMenu "Settings" ++ "&Display" Exec exec arandr ++ "&Keyboard" Exec exec setxkbmap fr ++ "&Power" Exec exec sudo xt -e powertop ++ "&Sound" Exec exec pavucontrol ++ "&Wifi" Exec exec sudo wpa_gui -i wlo1 + +DestroyMenu "Multimedia" +AddToMenu "Multimedia" ++ "&Geeqie" Exec exec geeqie ++ "&Molotov" Exec exec molotov ++ "&Spotify" Exec exec spotify ++ "&Vlc" Exec exec vlc + +DestroyMenu "Utilities" +AddToMenu "Utilities" +#+ "&Xterm" Exec exec uxterm -sl 500 -j -ls -cr red +#+ "&Top" Exec exec uxterm -T Top -n Top -e top +#+ "&Xterm" Exec exec urxvtc +sb -sl 500 -j -ls -cr red ++ "&Xterm" Exec exec xt ++ "&Black Xterm" Exec exec bxt ++ "&Top" Exec exec xt -T Top -n Top -e /bin/top ++ "&Web" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache +#+ "&Web" Exec exec brave +#+ "&Firefox" Exec exec firefox +#+ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache ++ "&Mail" Exec exec thunderbird +#+ "xclipboard" Exec exec xclipboard +#+ "" Nop ++ "" Nop ++ "&System" Popup Settings ++ "&Desktop" Popup Desktop-Apps ++ "M&ultimedia" Popup Multimedia ++ "ssh bip" Exec exec uxterm -j -sl 500 -cr red -e mosh bip +#+ "ssh dev.ugrid.net" Exec exec uxterm -j -sl 500 -cr red -e ssh dev.ugrid.net ++ "" Nop ++ "&Quit" Popup Quit-Verify + +# Define the most common window operations +DestroyMenu "Window Ops" +AddToMenu "Window Ops" ++ "&Move Alt+F5" Function Move-or-Raise ++ "&Resize Alt+F6" Function Resize-or-Raise ++ "R&aise" Raise ++ "&Lower" Lower ++ "(De)Iconify" Iconify ++ "(Un)Stick" Stick ++ "(Un)Maximize Alt+F12" Function maximize_func ++ "" Nop ++ "&Kill" Destroy ++ "&Close" Delete ++ "" Nop ++ "Switch to..." WindowList ++ "Refresh Screen" Refresh + +# +# A trimmed down version of "Window Ops", good for binding to decorations +# +AddToMenu "Window-Ops2" "&Move Alt+F5" Move-or-Raise ++ "&Size Alt+F6" Resize-or-Raise ++ "Mi&nimize Alt+F4" Iconify 1 ++ "&Horizontal Max Alt+F10" Maximize 100 0 ++ "&Vertical Max Alt+F11" Maximize 0 100 ++ "Ma&ximize Alt+F12" Maximize 100 100 ++ "" Nop ++ "&Kill" Destroy ++ "&Close" Delete + +#========================================================================# +# +# One more complex function - couldn't be defined earlier because it used +# pop-up menus +# +# This creates the "system" menu for the title-bar window-ops +# pop-up +# +AddToFunc "window_ops_func" "C" PopUp Window-Ops2 ++ "M" PopUp Window-Ops2 ++ "D" Delete + +#========================================================================# +# +# Mouse bindings +# + +# First, for the mouse in the root window +# 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-control-whatever combination you want! + +# Button Context Modifi Function +Mouse 1 R A Menu "Utilities" Nop +Mouse 2 R A Menu "Window Ops" Nop +Mouse 3 R A WindowList + +# Now the title bar buttons +# Any button in the left title-bar button gives the window ops menu +# Any button in the first right title-bar button Iconifies the window +# Any button in the second title-bar button full-maximizes +# Note the use of "Mouse 0" for AnyButton. + +# Button Context Modif Function +Mouse 0 1 A Function "window_ops_func" +Mouse 0 2 A Maximize 100 100 +Mouse 0 4 A Iconify + +# Now the rest of the frame +# Here I invoke my complex functions for Move-or-lower, Move-or-raise, +# and Resize-or-Raise. +# +# Button 1 in the corner/sides pieces, with any modifiers, gives resize or raise +Mouse 1 FS A Function "Resize-or-Raise" +# Button 1 in the title, or icon, w/ any modifiers, gives move or raise +Mouse 1 T A Function "Move-or-Raise" + +# Button 1 in an icons gives move for a drag, de-iconify for a double-click, +# nothing for a single click +# Button 2 in an icon, w/ any modifiers, gives de-iconify +Mouse 1 I A Function "Move-or-Iconify" +Mouse 2 I A Iconify + +# Button 2 in the corners, sides, or title-bar gives the window ops menu +Mouse 2 FST A Function "window_ops_func" + +# Button 3 anywhere in the decoration (except the title-bar buttons) +# does a raise-lower +Mouse 3 TSIF A RaiseLower + +# 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 M RaiseLower + +#========================================================================# +# Now some keyboard shortcuts. +# Arrow Keys, wrap mode enabled +# press arrow + control anywhere, and scroll by 1 page +Key Left A C Scroll -100000 0 +Key Right A C Scroll +100000 +0 +Key Up A C Scroll +0 -100000 +Key Down A C Scroll +0 +100000 + +#Key Left A C Scroll -100 0 +#Key Right A C Scroll +100 +0 +#Key Up A C Scroll +0 -100 +#Key Down A C 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 + +# Keyboard accelerators +Key Super_L A A Popup "Utilities" +Key F1 A M Popup "Utilities" +Key F2 A M Popup "Window Ops" +Key F3 A M Module "WindowList" FvwmWinList +Key F4 A M Iconify +Key F5 A M Move +Key F6 A M Resize +Key F7 A M RaiseLower +#Key F8 A M Exec exec xbacklight +10 +Key F9 A M Close +Key F10 A M Maximize 100 0 +Key F11 A M Maximize 0 100 +Key F12 A M Maximize + +#Key XF86MonBrightnessDown A A Exec exec xbacklight -10 +#Key XF86MonBrightnessUp A A Exec exec xbacklight +10 +Key XF86AudioRaiseVolume A A Exec exec amixer set Master 5%+ +Key XF86AudioLowerVolume A A Exec exec amixer set Master 5%- +Key XF86AudioMute A A Exec exec amixer set Master toggle + +#Page Up/Dapge Down keys are used to scroll by one desktop page +# in any context, press page up/down + control +# in root context, just pressing page up/down is OK +# +# I prefer the non-wrapping scroll. These are for example purposes only +#Key Next A C Scroll 100000 0 +#Key Next R N Scroll 100000 0 +#Key Prior A C Scroll -100000 0 +#Key Prior R N Scroll -100000 0 + +#Key Tab A M Prev Focus +#Key Tab A MS Next Focus +Key Tab A M Prev Focus-and-Raise +Key Tab A MS Next Focus-and-Raise + +Key Escape A C WindowList + + +#========================================================================# + +# Definitions used by the modules + +#------------------ Pager +*FvwmPagerBack grey60 +*FvwmPagerFore black +#*FvwmPagerFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmPagerFont fixed +*FvwmPagerHilight #c3c3c3 +*FvwmPagerGeometry 80x60-1-1 +*FvwmPagerLabel 0 "swift" +*FvwmPagerSmallFont 5x8 + +#------------------ Identify +*FvwmIdentBack #000080 +*FvwmIdentFore Yellow +*FvwmIdentFont -adobe-helvetica-medium-r-*-*-12-*-*-*-*-*-*-* + +#------------------ FvwmWinList +*FvwmWinListBack #c3c3c3 +*FvwmWinListFore Black +*FvwmWinListFont -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-* +*FvwmWinListAction Click1 Iconify -1,Focus +*FvwmWinListAction Click2 Iconify +*FvwmWinListAction Click3 Module "FvwmIdent" FvwmIdent +*FvwmWinListUseSkipList +*FvwmWinListGeometry +0-1 diff --git a/.xinitrc b/.xinitrc index f982ca7..92f75e1 100644 --- a/.xinitrc +++ b/.xinitrc @@ -20,5 +20,5 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -#exec fvwm -exec i3 +exec fvwm +#exec i3 diff --git a/.xsession b/.xsession index f982ca7..92f75e1 100755 --- a/.xsession +++ b/.xsession @@ -20,5 +20,5 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -#exec fvwm -exec i3 +exec fvwm +#exec i3 diff --git a/bin/wol b/bin/wol new file mode 100755 index 0000000..146e46a --- /dev/null +++ b/bin/wol @@ -0,0 +1,6 @@ +#!/bin/sh -x +ip_plex=192.168.1.90 mac_plex=b0:83:fe:61:a7:aa +eval "mac=\$mac_$1 ip=\$ip_$1" +wakeonlan "$mac" +#ping -o "$ip" +ssh "root@$ip" diff --git a/bin/xt b/bin/xt index 71b92d3..f14954c 100755 --- a/bin/xt +++ b/bin/xt @@ -1,4 +1,5 @@ #!/bin/sh exec xterm -sl 500 -j -cr red "$@" & #cmd="urxvtc ${@:--T $HOSTNAME}" +#cmd="urxvtc $@" #eval "$cmd" || { [ $? = 2 ] && urxvtd -q -o -f && eval "$cmd"; } -- cgit v1.3 From 053556962bb2d29ac76bcca51cabd1df238f80e3 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 7 Jan 2022 15:24:15 +0100 Subject: update --- .Xresources | 2 + .bashrc | 7 +- .config/i3/config | 4 +- .vim/plugin/cscope_maps.vim | 167 ++++++++++++++++++++++++++++ bin/hdmi | 8 +- bin/vm | 258 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 439 insertions(+), 7 deletions(-) create mode 100644 .vim/plugin/cscope_maps.vim create mode 100755 bin/vm (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 7ca66a3..64ab14c 100644 --- a/.Xresources +++ b/.Xresources @@ -30,6 +30,8 @@ xterm*decTerminalID: vt340 xterm*allowWindowOps : False xterm*disallowedWindowOps : 1,2,3,4,5,6,7,8,9,11,13,18,19,20,21,GetSelection,SetSelection,SetWinLines,SetXprop +! Colors optimized for a light background +! ! Black + DarkGrey *color0: #000000 *color8: #555753 diff --git a/.bashrc b/.bashrc index f20fbdd..642c6d7 100644 --- a/.bashrc +++ b/.bashrc @@ -46,6 +46,7 @@ alias cl='cf xft:Mono:size=12' alias cp='cp --reflink' alias ls='ls --color=auto -v' alias ll='ls -AlFhv' +alias more='less' alias vi='vim' alias view='vim -R' #alias op='xdg-open' @@ -131,7 +132,9 @@ unset base # Display git status in prompt . ~/.bash-powerline.sh -# export PS1='; ' +# export PS1='; ' # load Nix config files (aka auto-completion etc.) -export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" +#export XDG_DATA_DIRS="$HOME/.nix-profile/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" + +eval "$(direnv hook bash)" diff --git a/.config/i3/config b/.config/i3/config index 84f31c2..182f119 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -68,6 +68,7 @@ for_window [class="Display"] floating enable for_window [class="Feedreader"] floating enable for_window [class="feh"] floating enable for_window [class="firefox"] floating enable +for_window [class="fluent-reader"] floating enable for_window [class="Geeqie"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable @@ -79,8 +80,9 @@ for_window [class="libreoffice"] floating enable for_window [class="Liferea"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable -for_window [class="Pavucontrol"] floating enable for_window [class="Org.gnome.Software"] floating enable +for_window [class="Pavucontrol"] floating enable +for_window [title="QEMU"] floating enable for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable diff --git a/.vim/plugin/cscope_maps.vim b/.vim/plugin/cscope_maps.vim new file mode 100644 index 0000000..abcae71 --- /dev/null +++ b/.vim/plugin/cscope_maps.vim @@ -0,0 +1,167 @@ +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" CSCOPE settings for vim +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +" +" This file contains some boilerplate settings for vim's cscope interface, +" plus some keyboard mappings that I've found useful. +" +" USAGE: +" -- vim 6: Stick this file in your ~/.vim/plugin directory (or in a +" 'plugin' directory in some other directory that is in your +" 'runtimepath'. +" +" -- vim 5: Stick this file somewhere and 'source cscope.vim' it from +" your ~/.vimrc file (or cut and paste it into your .vimrc). +" +" NOTE: +" These key maps use multiple keystrokes (2 or 3 keys). If you find that vim +" keeps timing you out before you can complete them, try changing your timeout +" settings, as explained below. +" +" Happy cscoping, +" +" Jason Duell jduell@alumni.princeton.edu 2002/3/7 +"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + + +" This tests to see if vim was configured with the '--enable-cscope' option +" when it was compiled. If it wasn't, time to recompile vim... +if has("cscope") + + """"""""""""" Standard cscope/vim boilerplate + + " use both cscope and ctag for 'ctrl-]', ':ta', and 'vim -t' + set cscopetag + + " check cscope for definition of a symbol before checking ctags: set to 1 + " if you want the reverse search order. + set csto=0 + + " add any cscope database in current directory + if filereadable("cscope.out") + cs add cscope.out + " else add the database pointed to by environment variable + elseif $CSCOPE_DB != "" + cs add $CSCOPE_DB + endif + + " show msg when any other cscope db added + set cscopeverbose + + + """"""""""""" My cscope/vim key mappings + " + " The following maps all invoke one of the following cscope search types: + " + " 's' symbol: find all references to the token under cursor + " 'g' global: find global definition(s) of the token under cursor + " 'c' calls: find all calls to the function name under cursor + " 't' text: find all instances of the text under cursor + " 'e' egrep: egrep search for the word under cursor + " 'f' file: open the filename under cursor + " 'i' includes: find files that include the filename under cursor + " 'd' called: find functions that function under cursor calls + " + " Below are three sets of the maps: one set that just jumps to your + " search result, one that splits the existing vim window horizontally and + " diplays your search result in the new window, and one that does the same + " thing, but does a vertical split instead (vim 6 only). + " + " I've used CTRL-\ and CTRL-@ as the starting keys for these maps, as it's + " unlikely that you need their default mappings (CTRL-\'s default use is + " as part of CTRL-\ CTRL-N typemap, which basically just does the same + " thing as hitting 'escape': CTRL-@ doesn't seem to have any default use). + " If you don't like using 'CTRL-@' or CTRL-\, , you can change some or all + " of these maps to use other keys. One likely candidate is 'CTRL-_' + " (which also maps to CTRL-/, which is easier to type). By default it is + " used to switch between Hebrew and English keyboard mode. + " + " All of the maps involving the macro use '^$': this is so + " that searches over '#include " return only references to + " 'time.h', and not 'sys/time.h', etc. (by default cscope will return all + " files that contain 'time.h' as part of their name). + + + " To do the first type of search, hit 'CTRL-\', followed by one of the + " cscope search types above (s,g,c,t,e,f,i,d). The result of your cscope + " search will be displayed in the current window. You can use CTRL-T to + " go back to where you were before the search. + " + + " MV: replace C-\ by C-, + nmap s :cs find s =expand("") + nmap g :cs find g =expand("") + nmap c :cs find c =expand("") + nmap t :cs find t =expand("") + nmap e :cs find e =expand("") + nmap f :cs find f =expand("") + nmap i :cs find i ^=expand("")$ + nmap d :cs find d =expand("") + + + " Using 'CTRL-spacebar' (intepreted as CTRL-@ by vim) then a search type + " makes the vim window split horizontally, with search result displayed in + " the new window. + " + " (Note: earlier versions of vim may not have the :scs command, but it + " can be simulated roughly via: + " nmap s :cs find s =expand("") + + " MV: replace C-@ by C-; + nmap s :scs find s =expand("") + nmap g :scs find g =expand("") + nmap c :scs find c =expand("") + nmap t :scs find t =expand("") + nmap e :scs find e =expand("") + nmap f :scs find f =expand("") + nmap i :scs find i ^=expand("")$ + nmap d :scs find d =expand("") + + + " Hitting CTRL-space *twice* before the search type does a vertical + " split instead of a horizontal one (vim 6 and up only) + " + " (Note: you may wish to put a 'set splitright' in your .vimrc + " if you prefer the new window on the right instead of the left + + nmap s :vert scs find s =expand("") + nmap g :vert scs find g =expand("") + nmap c :vert scs find c =expand("") + nmap t :vert scs find t =expand("") + nmap e :vert scs find e =expand("") + nmap f :vert scs find f =expand("") + nmap i :vert scs find i ^=expand("")$ + nmap d :vert scs find d =expand("") + + + """"""""""""" key map timeouts + " + " By default Vim will only wait 1 second for each keystroke in a mapping. + " You may find that too short with the above typemaps. If so, you should + " either turn off mapping timeouts via 'notimeout'. + " + "set notimeout + " + " Or, you can keep timeouts, by uncommenting the timeoutlen line below, + " with your own personal favorite value (in milliseconds): + " + "set timeoutlen=4000 + " + " Either way, since mapping timeout settings by default also set the + " timeouts for multicharacter 'keys codes' (like ), you should also + " set ttimeout and ttimeoutlen: otherwise, you will experience strange + " delays as vim waits for a keystroke after you hit ESC (it will be + " waiting to see if the ESC is actually part of a key code like ). + " + "set ttimeout + " + " personally, I find a tenth of a second to work well for key code + " timeouts. If you experience problems and have a slow terminal or network + " connection, set it higher. If you don't set ttimeoutlen, the value for + " timeoutlent (default: 1000 = 1 second, which is sluggish) is used. + " + "set ttimeoutlen=100 + +endif + + diff --git a/bin/hdmi b/bin/hdmi index d6f206a..e6e3094 100755 --- a/bin/hdmi +++ b/bin/hdmi @@ -2,8 +2,8 @@ # Toggle auxiliary HDMI screen on/off when connected/disconnected. opt="--auto --left-of eDP1" -#opt="--auto --right-of eDP-1" -#opt="--auto --above eDP-1" +#opt="--auto --right-of eDP1" +#opt="--auto --above eDP1" # Also add the following rule to /etc/udev/rules.d/hdmi.rules # KERNEL=="card0", SUBSYSTEM=="drm", ENV{DISPLAY}=":0", ENV{XAUTHORITY}="/home/marc/.Xauthority", RUN+="/home/marc/bin/hdmi" @@ -11,5 +11,5 @@ opt="--auto --left-of eDP1" # wait for the screen to settle sleep 3 -xrandr | grep -q 'HDMI1 connected' || opt="--off" -xrandr --output HDMI1 $opt +xrandr | grep -q '^DP1 connected' || opt="--off" +xrandr --output DP1 $opt diff --git a/bin/vm b/bin/vm new file mode 100755 index 0000000..8b4da42 --- /dev/null +++ b/bin/vm @@ -0,0 +1,258 @@ +#!/bin/sh + +# Manage virtual machines +# +# Prereq: +# - curl +# - cdrtools (isoinfo) +# - expect +# - qemu +# - screen +# +# TODO: +# - extract bzImage and initrd.gz with isoinfo +# - ssh scripts to finish install (once ssh is ready) +# +# DONE: +# - setup vde and networking +# - setup ssh keys so it is possible to ssh in vm from host +# +unset CDPATH +export LC_ALL=C IFS=' +' + +version='vm-0.1' + +arch=$(uname -m) +sys=$(uname -s) +alpine_version='3.15.0' +pubkey=$HOME/.ssh/id_rsa.pub +dir="${VM_DIR:-$HOME/.vm}" + +console() { + usage 'console name' 'Attach a console to a virtual machine' && return + [ "$1" ] || die "missing argument" + is_running "$1" && screen -r "vm!$1!" +} + +create() { + usage 'create [-s size] name' 'Create an alpinelinux disk image' && return + size=8g + while getopts :s: opt; do + case $opt in + s) size=$OPTARG ;; + *) Opth=2 create_alpine_image; return ;; + esac + done + shift $((OPTIND - 1)) + [ -d "$dir/$1" ] && die "create failed: $dir/$1 already exists" + mkdir "$dir/$1" + cd "$dir/$1" || die "create failed: invalid directory $dir/$1" + qemu-img create "$1.raw" "$size" || die "create failed" + mac=$(new_macaddr) + ip=$(new_ip) + hdd="$1.raw" + echo "hdd=$hdd +mac=$mac +ip=$ip" >> config + + # Before install do not use virtio, as devices may not recognized as bootable + # TODO: alternate way: extract kernel and initrd files and pass them directly to qemu + screen -S "vm!$1!" -d -m qemu-system-$arch -nographic \ + -cdrom ../alpine-iso/alpine-virt-$alpine_version-$arch.iso \ + -hdd "$hdd" -net nic,macaddr=$mac -net vde + setup_alpine "$1" + post_setup_alpine "$1" +} + +die() { [ "$1" ] && echo "$0: $*" >&2; exit 1; } + +help() { + usage 'help' 'Print this help text' && return + printf "$version\n Manage virtual machines\n\nUsage: vm command [options] [args]\n" + Opth=1; for c in $Cmdlist; do $c; done +} + +init() { + mkdir -p "$dir" +} + +init_alpine_iso() { + usage init_alpine_iso '' && return + mkdir -p "$dir/alpine-iso" + iso_url="https://dl-cdn.alpinelinux.org/alpine/v${alpine_version%.*}/releases/$arch" + iso="alpine-virt-$alpine_version-$arch.iso" + cd "$dir/alpine-iso" + [ -f "$iso" ] || curl -LO "$iso_url/$iso" || rm -f "$iso" + echo "iso=$iso +" > config + echo 10 > ../index +} + +is_running() { screen -ls "vm!$1!" >/dev/null 2>&1; } + +ls() { + usage 'ls' 'list virtual machines' && return + init && cd "$dir" || die "could not change dir to $dir" + for i in */; do + i=${i%/} + [ "$i" = '*' ] && continue + is_running "$i" && state=active || state=stopped + printf "%-20s %s\n" "$i" "$state" + done +} + +new_ip() { + read index < $dir/index + index=$((index + 1)) + echo "$index" > $dir/index + echo "10.0.2.$index/24" +} + +new_macaddr() { printf 'de:ad:be:ef:%02x:%02x\n' $((RANDOM % 256)) $((RANDOM % 256)); } + +pidof() { + usage 'pidof name' 'print the PID of a virtual machine' && return + p=$(screen -ls "vm!$1!" | awk 'NR==2 {print substr($1, 1, index($1, ".")-1)}') + [ "$p" ] && pgrep -P $p +} + +post_setup_alpine() { + start "$1" + read proto key id < "$pubkey" + # echo ' + expect -c ' + set timeout -1 + spawn screen -x "vm!'$1'!" + expect { + " login: " { send "root\r"; exp_continue } + "Password: " { send "root\r"; exp_continue } + ":~# " + } + send "mkdir -pm 0700 .ssh\r" + expect ":~# " + send "echo '$proto' '$key' '$id' >.ssh/authorized_keys\r" + expect ":~# " + send "exit\r" + ' +} + +# setup_alpine automates alpine installation from iso to image. +# When done, base image system is ready, with storage and network up. +# No user nor ssh access configured yet. +# TODO: custom network (in case of no dhcp). +setup_alpine() { + usage 'setup_alpine' && return + expect -c ' + set timeout -1 + spawn screen -x "vm!'$1'!" + expect { + "localhost login: " { send "root\r"; exp_continue } + "localhost:~# " { send "SWAP_SIZE=0 setup-alpine\r"; exp_continue } + "Select keyboard layout: " { send "\r"; exp_continue } + "Enter system hostname" { send "'$1'\r"; exp_continue } + "Which one do you want to initialize?" { send "\r"; exp_continue } + "Ip address for eth0?" { send "'$ip'\r"; exp_continue } + "Gateway?" { send "10.0.2.2\r"; exp_continue } + "manual network configuration?" { send "\r"; exp_continue } + "DNS domain name?" { send "lan\r"; exp_continue } + "DNS nameserver(s)?" { send "10.0.2.2 1.1.1.1\r"; exp_continue } + "New password:" { send "root\r"; exp_continue } + "Retype password:" { send "root\r"; exp_continue } + "Which timezone are you in?" { send "\r"; exp_continue } + "HTTP/FTP proxy URL?" { send "\r"; exp_continue } + "Enter mirror number " { send "\r"; exp_continue } + "Which SSH server?" { send "\r"; exp_continue } + "Which disk(s) would you like to use?" { send "sda\r"; exp_continue } + "How would you like to use it?" { send "sys\r"; exp_continue } + "Erase the above disk(s) and continue?" { send "y\r"; exp_continue } + "Installation is complete" { send "poweroff\r" } + } + interact + ' +} + +start_vde() { + usage start_vde && return + sudo sh <<- EOT + vde_switch -tap tap0 -sock /tmp/vde.ctl -daemon -mod 666 + sleep 1 + ip address add 10.0.2.2/24 dev tap0 + ip link set tap0 up + echo 1 > /proc/sys/net/ipv4/ip_forward + iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE + iptables -t nat -A POSTROUTING -s 10.0.2.0/24 -o wlan0 -j MASQUERADE + EOT + #slirpvde --dhcp --daemon +} + +stop_vde() { + # killall slirpvde + sudo sh <<- EOT + iptables -t nat -D POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE + iptables -t nat -D POSTROUTING -s 10.0.2.0/24 -o wlan0 -j MASQUERADE + ip link set tap0 down + killall vde_switch + EOT +} + +start() { + usage 'start [-acd] name' 'start a virtual machine' && return + while getopts :acd opt; do + case $opt in + a) opta=1 ;; + c) boot=c ;; + d) boot=d ;; + esac + done + shift $((OPTIND -1)) + [ "$1" ] || die 'start failed: name missing' + cd "$dir/$1" || die "start failed: invalid directory $dir/$1" + is_running "$1" || start_qemu "$1" + [ "$opta" ] && console "$1" +} + +start_qemu() ( + opt='-nographic -cpu max' + [ "$sys" = Linux ] && opt="$opt -enable-kvm" + . ./config || die "could not source $PWD/config" + exec 1>>qemu.log 2>&1 + date +%F_%T + set -x + screen -S "vm!$1!" -d -m qemu-system-$arch $opt \ + ${smp+-smp $smp} \ + ${ram+-m $ram} \ + ${mac+-net nic,macaddr=$mac,model=virtio-net-pci} -net vde \ + ${hdd+-drive file="$hdd",if=virtio,media=disk,format=raw} \ + ${iso+-drive file="$iso",if=virtio,media=cdrom,format=raw} \ + ${boot+-boot $boot} +) + +stop() { + usage 'stop name' 'stop a virtual machine' && return + is_running "$1" && kill "$(pidof "$1")" +} + +usage() { + case $Opth in + 1) printf " %-34s %s\n" "$1" "$2" ;; + 2) printf "$0 $1\n\t$2\n" ;; + *) return 1 ;; + esac +} + +version() { + usage 'version' 'Print version' && return + echo "$version" +} + +Cmdlist='console create help init_alpine_iso ls pidof setup_alpine start start_vde stop version' +[ "$1" ] && C=$1 && shift 1 || { help; exit 1; } +#for c in $Cmdlist; do +# case $c in +# ("$C") cmd=$c; break ;; +# ("$C"*) [ "$cmd" ] && die "ambiguous command $C" || cmd=$c ;; +# esac +#done +cmd=$C +[ "$cmd" ] || { help; exit 1; } && $cmd "$@" -- cgit v1.3 From 06ba4aa1a24be8fbb3a16f9e509f1dad00208df4 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 30 Sep 2022 12:13:54 +0200 Subject: update --- .Xresources | 3 ++ .w3m/config | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .w3m/keymap | 1 + .xsession | 2 +- README.md | 23 +++++++++ 5 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 .w3m/config create mode 100644 .w3m/keymap create mode 100644 README.md (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index b3589ed..8fc5281 100644 --- a/.Xresources +++ b/.Xresources @@ -1,3 +1,6 @@ +! Better to use multiples of 96 +Xft.dpi: 96 + ! uncomment following to display corretly using font 10x20 ! URxvt.boldFont: URxvt.transparent: false diff --git a/.w3m/config b/.w3m/config new file mode 100644 index 0000000..74a71ed --- /dev/null +++ b/.w3m/config @@ -0,0 +1,163 @@ +tabstop 8 +indent_incr 4 +pixel_per_char 9 +pixel_per_line 13 +frame 1 +target_self 0 +open_tab_blank 0 +open_tab_dl_list 0 +display_link 0 +display_link_number 0 +decode_url 0 +display_lineinfo 0 +ext_dirlist 1 +dirlist_cmd file:///$LIB/dirlist.cgi +use_dictcommand 1 +dictcommand file:///$LIB/w3mdict.cgi +multicol 0 +alt_entity 0 +graphic_char 0 +display_borders 0 +disable_center 0 +fold_textarea 0 +display_ins_del 1 +ignore_null_img_alt 1 +view_unseenobject 0 +display_image 1 +pseudo_inlines 1 +auto_image 1 +max_load_image 4 +ext_image_viewer 1 +image_scale 100 +inline_img_protocol 0 +imgdisplay w3mimgdisplay +image_map_list 1 +fold_line 0 +show_lnum 0 +show_srch_str 1 +label_topline 0 +nextpage_topline 0 +color 1 +basic_color terminal +anchor_color blue +image_color green +form_color red +mark_color cyan +bg_color terminal +active_style 0 +active_color cyan +visited_anchor 0 +visited_color magenta +pagerline 10000 +use_history 1 +history 100 +save_hist 1 +confirm_qq 0 +close_tab_back 0 +mark 0 +emacs_like_lineedit 0 +space_autocomplete 0 +vi_prec_num 0 +mark_all_pages 0 +wrap_search 0 +ignorecase_search 1 +use_mouse 1 +reverse_mouse 0 +relative_wheel_scroll 0 +relative_wheel_scroll_ratio 30 +fixed_wheel_scroll_count 5 +clear_buffer 1 +decode_cte 0 +auto_uncompress 0 +preserve_timestamp 1 +keymap_file keymap +document_root +personal_document_root +cgi_bin +index_file +mime_types ~/.mime.types, /usr/etc/mime.types +mailcap ~/.w3m/mailcap, /usr/etc/w3m/mailcap +urimethodmap ~/.w3m/urimethodmap, /usr/etc/w3m/urimethodmap +editor /usr/bin/vi +mailto_options 1 +mailer /usr/bin/mail +extbrowser /usr/bin/firefox +extbrowser2 +extbrowser3 +extbrowser4 +extbrowser5 +extbrowser6 +extbrowser7 +extbrowser8 +extbrowser9 +bgextviewer 1 +use_lessopen 0 +passwd_file ~/.w3m/passwd +disable_secret_security_check 0 +ftppasswd +ftppass_hostnamegen 1 +pre_form_file ~/.w3m/pre_form +siteconf_file ~/.w3m/siteconf +user_agent +no_referer 0 +cross_origin_referer 1 +accept_language en;q=1.0 +accept_encoding gzip, compress, bzip, bzip2, deflate, br +accept_media text/html, text/*;q=0.5, image/* +argv_is_url 1 +retry_http 1 +default_url 1 +follow_redirection 10 +meta_refresh 0 +localhost_only 0 +dns_order 0 +nntpserver +nntpmode +max_news 50 +use_proxy 1 +http_proxy +https_proxy +gopher_proxy +ftp_proxy +no_proxy +noproxy_netaddr 1 +no_cache 0 +ssl_forbid_method 2, 3, t, 5 +ssl_min_version +ssl_cipher +ssl_verify_server 1 +ssl_cert_file +ssl_key_file +ssl_ca_path +ssl_ca_file +ssl_ca_default 1 +use_cookie 1 +show_cookie 0 +accept_cookie 1 +accept_bad_cookie 0 +cookie_reject_domains +cookie_accept_domains +cookie_avoid_wrong_number_of_dots +display_charset UTF-8 +document_charset UTF-8 +auto_detect 2 +system_charset UTF-8 +follow_locale 1 +ext_halfdump 0 +use_wide 1 +use_combining 1 +east_asian_width 0 +use_language_tag 1 +ucs_conv 1 +pre_conv 0 +search_conv 1 +fix_width_conv 1 +use_gb12345_map 0 +use_jisx0201 0 +use_jisc6226 0 +use_jisx0201k 0 +use_jisx0212 0 +use_jisx0213 0 +strict_iso2022 1 +gb18030_as_ucs 0 +simple_preserve_space 0 diff --git a/.w3m/keymap b/.w3m/keymap new file mode 100644 index 0000000..d53ab11 --- /dev/null +++ b/.w3m/keymap @@ -0,0 +1 @@ +keymap M-/ COMMAND "GOTO https://duckduckgo.com/lite/; NEXT_LINK; GOTO_LINK" diff --git a/.xsession b/.xsession index 6d4b699..25e7837 100755 --- a/.xsession +++ b/.xsession @@ -18,7 +18,7 @@ hdmi xrdb ~/.Xresources #xsetroot -solid rgb:3/4/5 #xsetroot -solid rgb:1/3/4 -feh --bg-fill ~/night1.jpg +feh --bg-fill ~/Pictures/night1.jpg #feh --bg-fill ~/Downloads/Alaska_Range.jpg #conky #slock diff --git a/README.md b/README.md new file mode 100644 index 0000000..36af6d0 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ +# Dotfiles + +Configuration files, stored in a bare git repository. Avoid symlinks and extra tooling + +Use: + + git init --bare ~/dotfiles + alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME' + +Au lieu de +dotfiles config status.showUntrackedFiles no + cat ~/.gitignore : + * + +On other machine, to reconstruct: + git clone --bare git@bip.im:dotfiles dotfiles + alias dotfiles as above + dotfiles checkout +remove files in the way if necessary + +Manage one branch per computer if necessary. + +If a change is for all, do it on master, then: dotfiles merge master -- cgit v1.3 From 5b201b3fcd94c8bad917e2b45dbb1105cb060cdb Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 1 Oct 2022 12:41:24 +0200 Subject: update --- .Xresources | 1 + .config/i3/config | 6 ++++-- .screenrc | 2 ++ bin/backup | 26 +++++++++++++++++--------- 4 files changed, 24 insertions(+), 11 deletions(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 8fc5281..ec47c2e 100644 --- a/.Xresources +++ b/.Xresources @@ -21,6 +21,7 @@ URxvt.keysym.C-Next: font-size:decrease !URxvt.background: black xterm*termName: xterm-256color +xterm*internalBorder: 4 xterm*VT100.Translations: #override \ Ctrl Next: smaller-vt-font() \n\ Ctrl Prior: larger-vt-font() \n diff --git a/.config/i3/config b/.config/i3/config index 6220086..1740966 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -120,6 +120,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec --no-startup-id xt bindsym $mod+t exec --no-startup-id uxterm +bindsym $mod+Shift+t exec --no-startup-id xtb # kill focused window bindsym $mod+Shift+a kill @@ -133,9 +134,10 @@ bindsym --release button2 kill # installed. #bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Mono-9'" #bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Mono-9'" -bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +#bindsym $mod+d exec --no-startup-id i3-dmenu-desktop #bindsym F1 exec --no-startup-id i3-dmenu-desktop -entry-type=command -bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" +#bindsym F1 exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -dmenu="dmenu -i -fn 'Fixed-12'" # Use playerctl to control media player from keyboard bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause diff --git a/.screenrc b/.screenrc index 3337674..1a802d2 100644 --- a/.screenrc +++ b/.screenrc @@ -1 +1,3 @@ startup_message off +defmousetrack on +mousetrack on diff --git a/bin/backup b/bin/backup index d682849..9e73703 100755 --- a/bin/backup +++ b/bin/backup @@ -1,5 +1,7 @@ #!/bin/sh +# A backup a day keeps the doctor away. + usage() { echo "Usage: $0 [-nv] [[[user@]host]:dir] @@ -34,13 +36,19 @@ BACKUP=${1:-$BACKUP} ignore="$HOME/.backupignore" volumes="$HOME" [ -f "$ignore" ] && ignore="--exclude-from=$ignore" || ignore= -last=$(rsync --list-only "$BACKUP/" 2>/dev/null | awk '{r=$NF} END {print r}') -case $last in -([12]*) opt_link=--link-dest=../$last;; -(*) opt_link=;; -esac - -date=$(date +%Y-%m-%d-%H%M%S) +now=$(date +%F) +opt_link='' +past=$(rsync --list-only "$BACKUP/" 2>/dev/null | awk '{print $NF}' | sort -r) +for f in $past +do + case $f in + ([0-9][0-9][0-9][0-9]-*) ;; + (*) continue ;; + esac + [ "$f" = "$now" ] && continue + opt_link="--link-dest=../$f" + break +done -echo "# Backup $volumes to $BACKUP/$date" -exec rsync -HSxa$optv $ignore $opt_link $volumes "$BACKUP/$date" +echo "# Backup $volumes to $BACKUP/$now" +exec rsync -HSXxa$optv $ignore $opt_link $volumes "$BACKUP/$now" -- cgit v1.3 From 4489efe4b753a2edfad646c4b3506c95f2348813 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 15 Nov 2022 17:30:45 +0100 Subject: update --- .Xresources | 3 ++- .bashrc | 2 ++ .vim/pack/mvertes/install.sh | 2 ++ bin/wag | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index ec47c2e..274ee87 100644 --- a/.Xresources +++ b/.Xresources @@ -13,7 +13,8 @@ URxvt.cursorColor: red Urxvt.font: 6x13 !URxvt.font: xft:Mono:size=12 !URxvt.font: xft:Mono:size=10 -URxvt.letterSpace: -1 +!URxvt.letterSpace: 0 +URxvt.letterSpace: 0 URxvt.perl-ext-common: font-size URxvt.keysym.C-Prior: font-size:increase URxvt.keysym.C-Next: font-size:decrease diff --git a/.bashrc b/.bashrc index b8f2d75..926f90e 100644 --- a/.bashrc +++ b/.bashrc @@ -145,3 +145,5 @@ meteo() { eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 + +set -o vi diff --git a/.vim/pack/mvertes/install.sh b/.vim/pack/mvertes/install.sh index 48d5950..90cd4b3 100755 --- a/.vim/pack/mvertes/install.sh +++ b/.vim/pack/mvertes/install.sh @@ -5,6 +5,8 @@ git@github.com:mvertes/vimki git@github.com:fatih/vim-go git@github.com:othree/xml.vim git@github.com:junegunn/fzf.vim +git@github.com:mattn/libcallex-vim +git@github.com:bytesnake/vim-graphical-preview ' ht='test -d doc && vim -c "helptags doc" -c "q"' diff --git a/bin/wag b/bin/wag index 4e0c802..a1542b6 100755 --- a/bin/wag +++ b/bin/wag @@ -1,6 +1,8 @@ #!/bin/sh ## wag is a tool to generate static web sites +## +## Commands: unset CDPATH export LC_ALL=C IFS=' @@ -8,6 +10,48 @@ export LC_ALL=C IFS=' cmd=$(command -v "$0") +dest=./public + +footer() { + : +} + +# front parses front matter +front() { + { + read a b && [ "$a" = "---" ] && [ "$b" = "" ] || return + while read a b; do + [ "$a" = "---" ] && [ "$b" = "" ] && break + eval "front_${a%:}=\"$b\"" + done + } < "$1" +} + +## gen generates site content from source files +gen() { + [ -d "$dest" ] || mkdir -p "$dest" + for f in *.md; do + [ "$f" = "*.md" ] && continue + g="$dest/${f%.md}.html" + [ "$f" -ot "$g" ] && continue + echo "f: $f $g" + front "$f" + { + header + md2html "$f" + footer + } > "$g" + done +} + +header() { + cat <<- EOT + $front_title + + + EOT +} + ## help prints this program documentation help() { awk '/^## / {print substr($0, 4)}' "$cmd"; } -- cgit v1.3 From 6bfaa0bd5de54bd8c9225832a83a6d606a84bbb5 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Tue, 14 Feb 2023 22:51:50 +0100 Subject: update --- .Xresources | 1 + .config/i3/config | 2 +- .fvwm2rc | 22 ++++++++++++---------- .xsession | 4 ++-- 4 files changed, 16 insertions(+), 13 deletions(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 274ee87..4ca3ee9 100644 --- a/.Xresources +++ b/.Xresources @@ -24,6 +24,7 @@ URxvt.keysym.C-Next: font-size:decrease xterm*termName: xterm-256color xterm*internalBorder: 4 xterm*VT100.Translations: #override \ + F11: fullscreen(toggle) \n\ Ctrl Next: smaller-vt-font() \n\ Ctrl Prior: larger-vt-font() \n ! Meta minus: smaller-vt-font() \n\ diff --git a/.config/i3/config b/.config/i3/config index 6c871ae..0c7c3d3 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -95,7 +95,7 @@ for_window [class="io.elementary.music"] floating enable for_window [class="org.gnome.Music"] floating enable for_window [class="Org.gnome.Software"] floating enable for_window [class="Pavucontrol"] floating enable -for_window [class="Pcmanfm"] floating enable +for_window [class="pcmanfm-qt"] floating enable for_window [class="Picard"] floating enable for_window [title="QEMU"] floating enable for_window [class="Quodlibet"] floating enable diff --git a/.fvwm2rc b/.fvwm2rc index 1159092..84a402c 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -94,7 +94,7 @@ AddToMenu "Module-Popup" DestroyMenu "Desktop-Apps" AddToMenu "Desktop-Apps" -+ "&Brave" Exec exec brave +#+ "&Brave" Exec exec brave + "&Chromium" Exec exec chromium + "&Discord" Exec exec discord + "&Firefox" Exec exec firefox @@ -108,15 +108,17 @@ AddToMenu "Desktop-Apps" DestroyMenu "Settings" AddToMenu "Settings" + "&Display" Exec exec arandr -+ "&Keyboard" Exec exec setxkbmap fr -+ "&Power" Exec exec sudo xt -e powertop +#+ "&Keyboard" Exec exec setxkbmap fr ++ "&Power" Exec exec xt -e sudo powertop + "&Sound" Exec exec pavucontrol -+ "&Wifi" Exec exec sudo wpa_gui -i wlo1 ++ "&Wifi" Exec exec wpa_gui -i wlan0 DestroyMenu "Multimedia" AddToMenu "Multimedia" ++ "&Asunder" Exec exec asunder + "&Geeqie" Exec exec geeqie -+ "&Molotov" Exec exec molotov +#+ "&Molotov" Exec exec molotov + "&Quodlibet" Exec exec quodlibet + "&Spotify" Exec exec spotify + "&Vlc" Exec exec vlc @@ -126,14 +128,14 @@ AddToMenu "Utilities" #+ "&Top" Exec exec uxterm -T Top -n Top -e top #+ "&Xterm" Exec exec urxvtc +sb -sl 500 -j -ls -cr red + "&Xterm" Exec exec xt -+ "&Black Xterm" Exec exec bxt ++ "&Black Xterm" Exec exec xtb ++ "File manager" Exec exec pcmanfm-qt + "&Top" Exec exec xt -T Top -n Top -e /bin/top #+ "&Web" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache #+ "&Web" Exec exec brave -+ "&Web" Exec exec firefox -#+ "&Firefox" Exec exec firefox -#+ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache -+ "&Mail" Exec exec thunderbird ++ "&Firefox" Exec exec firefox ++ "&Chromium" Exec exec chromium --disk-cache-dir=/tmp/chromium-cache ++ "T&hunderbird" Exec exec thunderbird #+ "xclipboard" Exec exec xclipboard #+ "" Nop + "" Nop diff --git a/.xsession b/.xsession index 08383ba..804c3cd 100755 --- a/.xsession +++ b/.xsession @@ -24,6 +24,6 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -#exec fvwm -exec i3 +exec fvwm +#exec i3 #exec cwm -- cgit v1.3 From c6a598df705fd3dcc1d3e8ef0c6d42a68e647dc3 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 23 Mar 2023 22:36:12 +0100 Subject: update --- .Xresources | 4 +++- .profile | 2 +- .xsession | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to '.Xresources') diff --git a/.Xresources b/.Xresources index 4ca3ee9..3745cc9 100644 --- a/.Xresources +++ b/.Xresources @@ -26,7 +26,9 @@ xterm*internalBorder: 4 xterm*VT100.Translations: #override \ F11: fullscreen(toggle) \n\ Ctrl Next: smaller-vt-font() \n\ - Ctrl Prior: larger-vt-font() \n + Ctrl Prior: larger-vt-font() \n\ + Shift Ctrl C: copy-selection(CLIPBOARD) \n\ + Shift Ctrl V: insert-selection(CLIPBOARD) \n ! Meta minus: smaller-vt-font() \n\ ! Meta equal: larger-vt-font() \n xterm*cursorColor: red diff --git a/.profile b/.profile index 4de3901..90091ca 100644 --- a/.profile +++ b/.profile @@ -1,6 +1,6 @@ # ~/.profile -PATH=~/bin:$PATH:~/go/bin +PATH=~/bin:~/mu/bin:$PATH:~/go/bin [ "${SHELL##*/}" = bash ] && . ~/.bashrc diff --git a/.xsession b/.xsession index f4d42ec..005713f 100755 --- a/.xsession +++ b/.xsession @@ -24,6 +24,6 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -#exec fvwm -exec i3 +exec fvwm +#exec i3 #exec cwm -- cgit v1.3