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 --- .xsession | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '.xsession') 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 -- cgit v1.3 From a3a3a61742950d45f1573a45a928e9b04c115634 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Thu, 3 Feb 2022 14:43:32 +0100 Subject: update --- .config/i3/config | 4 +++- .profile | 6 +++--- .xsession | 6 ++++-- bin/hdmi | 10 +++++----- bin/vm | 30 +++++++++++++++++++++++++++++- 5 files changed, 44 insertions(+), 12 deletions(-) (limited to '.xsession') diff --git a/.config/i3/config b/.config/i3/config index 182f119..5284bcc 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -59,6 +59,8 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU # enable floating mode for_window [class="Arandr"] floating enable for_window [class="Brave-browser"] floating enable +for_window [class="Blueberry.py"] floating enable +for_window [class="Blueman-manager"] floating enable for_window [class="Chromium"] floating enable for_window [title="Task Manager - Chromium"] floating enable for_window [title="Gestionnaire de tâches – Chromium"] floating enable @@ -68,7 +70,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="fluent-reader"] floating enable border normal for_window [class="Geeqie"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable diff --git a/.profile b/.profile index cb09e87..acb8299 100644 --- a/.profile +++ b/.profile @@ -5,6 +5,6 @@ PATH=~/bin:$PATH:~/go/bin [ "${SHELL##*/}" = bash ] && . ~/.bashrc # Last action: auto start X11 when logged on first console -case $HOSTNAME in -([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; -esac +#case $HOSTNAME in +#([sS]wift|yoda) [ "$(tty)" != /dev/tty1 ] || exec startx ;; +#esac diff --git a/.xsession b/.xsession index 92f75e1..278c5fc 100755 --- a/.xsession +++ b/.xsession @@ -2,6 +2,8 @@ # start pulseaudio on crux only. Should be handled by systemd on arch #pulseaudio --start --exit-idle-time=-1 --log-target=syslog & +eval $(ssh-agent) + # enable tapping and natural scrolling on touchpad # see xinput --list[-props] for ids xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1 @@ -20,5 +22,5 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -exec fvwm -#exec i3 +#exec fvwm +exec i3 diff --git a/bin/hdmi b/bin/hdmi index e6e3094..0a81716 100755 --- a/bin/hdmi +++ b/bin/hdmi @@ -1,9 +1,9 @@ #!/bin/sh # Toggle auxiliary HDMI screen on/off when connected/disconnected. -opt="--auto --left-of eDP1" -#opt="--auto --right-of eDP1" -#opt="--auto --above eDP1" +opt="--auto --left-of eDP-1" +#opt="--auto --right-of eDP-1" +#opt="--auto --above eDP-1" # 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 '^DP1 connected' || opt="--off" -xrandr --output DP1 $opt +xrandr | grep -q '^DP-1 connected' || opt="--off" +xrandr --output DP-1 $opt diff --git a/bin/vm b/bin/vm index 8b4da42..35a107e 100755 --- a/bin/vm +++ b/bin/vm @@ -35,13 +35,41 @@ console() { is_running "$1" && screen -r "vm!$1!" } +create_arch() { + usage 'create_arch [-s size] name' 'Create an archlinux disk image' && return + size=8g + while getopts :s: opt; do + case $opt in + s) size=$OPTARG ;; + *) Opth=2 create_arch; 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 + + mkfs.ext4 "$1.raw" + mkdir -p mnt + sudo mount "$1.raw" mnt + sudo pacstrap mnt base base-devel + sudo umount mnt +} + 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 ;; + *) Opth=2 create_arch; return ;; esac done shift $((OPTIND - 1)) -- cgit v1.3 From ae63ac14a53f3a1eae825e985709aa183e522980 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Mon, 22 Aug 2022 16:30:00 +0200 Subject: update --- .xsession | 1 + 1 file changed, 1 insertion(+) (limited to '.xsession') diff --git a/.xsession b/.xsession index 278c5fc..ea74ab4 100755 --- a/.xsession +++ b/.xsession @@ -4,6 +4,7 @@ eval $(ssh-agent) +# See also /etc/X11/xorg.conf.d/10-input.conf # enable tapping and natural scrolling on touchpad # see xinput --list[-props] for ids xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1 -- cgit v1.3 From 5e90fa775e4c654d5383e7a14876dde51ee94913 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 26 Aug 2022 15:45:27 +0200 Subject: update --- .config/i3/config | 5 +- .fvwm2rc | 5 +- .local/share/applications/thunderbird.desktop | 173 ++++++++++++++++++++++++++ .xsession | 3 +- 4 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 .local/share/applications/thunderbird.desktop (limited to '.xsession') diff --git a/.config/i3/config b/.config/i3/config index 7f094d2..563bd4c 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -37,7 +37,7 @@ exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -c 000000 --nofork # Notification daemon (see ~/.config/dunst/dunstrc for configuration) exec --no-startup-id dunst -bindsym $mod+a exec --no-startup-id dunstctl action +#bindsym $mod+a exec --no-startup-id dunstctl action bindsym $mod+c exec --no-startup-id dunstctl context bindsym $mod+n exec --no-startup-id dunstctl close bindsym $mod+twosuperior exec --no-startup-id dunstctl history-pop @@ -95,11 +95,11 @@ for_window [class="Signal"] floating enable for_window [class="Slack"] floating enable for_window [class="Spotify"] floating enable for_window [class="Thunderbird"] floating enable +for_window [class="UXTerm"] floating enable 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 @@ -109,6 +109,7 @@ floating_modifier $mod # start a terminal bindsym $mod+Return exec --no-startup-id xt +bindsym $mod+a exec --no-startup-id uxterm # kill focused window bindsym $mod+Shift+a kill diff --git a/.fvwm2rc b/.fvwm2rc index fac2b23..e8b061b 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -127,8 +127,9 @@ AddToMenu "Utilities" + "&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 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 @@ -138,7 +139,7 @@ AddToMenu "Utilities" + "&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 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 diff --git a/.local/share/applications/thunderbird.desktop b/.local/share/applications/thunderbird.desktop new file mode 100644 index 0000000..e1e8dc0 --- /dev/null +++ b/.local/share/applications/thunderbird.desktop @@ -0,0 +1,173 @@ +[Desktop Entry] +Name=Thunderbird +Comment=Send and receive mail with Thunderbird +Comment[ast]=Lleer y escribir corréu electrónicu +Comment[ca]=Llegiu i escriviu correu +Comment[cs]=Čtení a psaní pošty +Comment[da]=Skriv/læs e-post/nyhedsgruppe med Mozilla Thunderbird +Comment[de]=E-Mails und Nachrichten mit Thunderbird lesen und schreiben +Comment[el]=Διαβάστε και γράψτε γράμματα με το Mozilla Thunderbird +Comment[es]=Lea y escriba correos y noticias con Thunderbird +Comment[fi]=Lue ja kirjoita sähköposteja +Comment[fr]=Lire et écrire des courriels +Comment[gl]=Lea e escriba correo electrónico +Comment[he]=קריאה/כתיבה של דוא״ל/חדשות באמצעות Mozilla Thunderbird +Comment[hr]=Čitajte/šaljite e-poštu s Thunderbird +Comment[hu]=Levelek írása és olvasása a Thunderbirddel +Comment[it]=Per leggere e scrivere email +Comment[ja]=メールの読み書き +Comment[ko]=Mozilla Thunderbird 메일/뉴스 읽기 및 쓰기 클라이언트 +Comment[nl]=E-mail/nieuws lezen en schrijven met Mozilla Thunderbird +Comment[pl]=Czytanie i wysyłanie e-maili +Comment[pt_BR]=Leia e escreva suas mensagens +Comment[ru]=Читайте и пишите письма +Comment[sk]=Čítajte a píšte poštu pomocou programu Thunderbird +Comment[sv]=Läs och skriv e-post +Comment[ug]=ئېلخەت ۋە خەۋەرلەرنى Mozilla Thunderbird دا كۆرۈش ۋە يېزىش +Comment[uk]=Читання та написання листів +Comment[vi]=Đọc và soạn thư điện tử +Comment[zh_CN]=阅读邮件或新闻 +Comment[zh_TW]=以 Mozilla Thunderbird 讀寫郵件或新聞 +GenericName=Mail Client +GenericName[ast]=Client de correu +GenericName[ca]=Client de correu +GenericName[cs]=Poštovní klient +GenericName[da]=E-postklient +GenericName[de]=E-Mail-Anwendung +GenericName[el]=Λογισμικό αλληλογραφίας +GenericName[es]=Cliente de correo +GenericName[fi]=Sähköpostiohjelma +GenericName[fr]=Client de messagerie +GenericName[gl]=Cliente de correo electrónico +GenericName[he]=לקוח דוא״ל +GenericName[hr]=Klijent e-pošte +GenericName[hu]=Levelezőkliens +GenericName[it]=Client email +GenericName[ja]=電子メールクライアント +GenericName[ko]=메일 클라이언트 +GenericName[nl]=E-mailprogramma +GenericName[pl]=Klient poczty +GenericName[pt_BR]=Cliente de E-mail +GenericName[ru]=Почтовый клиент +GenericName[sk]=Poštový klient +GenericName[ug]=ئېلخەت دېتالى +GenericName[uk]=Поштова програма +GenericName[vi]=Phần mềm khách quản lý thư điện tử +GenericName[zh_CN]=邮件新闻客户端 +GenericName[zh_TW]=郵件用戶端 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird %u +Terminal=false +Type=Application +Icon=thunderbird +Categories=Network;Email; +MimeType=message/rfc822;x-scheme-handler/mailto;application/x-xpinstall; +StartupNotify=true +Actions=ComposeMessage;OpenAddressBook; + +[Desktop Action ComposeMessage] +Name=Write new message +Name[ar]=اكتب رسالة جديدة +Name[ast]=Redactar mensaxe nuevu +Name[be]=Напісаць новы ліст +Name[bg]=Съставяне на ново съобщение +Name[br]=Skrivañ ur gemennadenn nevez +Name[ca]=Escriu un missatge nou +Name[cs]=Napsat novou zprávu +Name[da]=Skriv en ny meddelelse +Name[de]=Neue Nachricht verfassen +Name[el]=Σύνταξη νέου μηνύματος +Name[es_AR]=Escribir un nuevo mensaje +Name[es_ES]=Redactar nuevo mensaje +Name[et]=Kirjuta uus kiri +Name[eu]=Idatzi mezu berria +Name[fi]=Kirjoita uusi viesti +Name[fr]=Rédiger un nouveau message +Name[fy_NL]=Skriuw in nij berjocht +Name[ga_IE]=Scríobh teachtaireacht nua +Name[gd]=Sgrìobh teachdaireachd ùr +Name[gl]=Escribir unha nova mensaxe +Name[he]=כתיבת הודעה חדשה +Name[hr]=Piši novu poruku +Name[hu]=Új üzenet írása +Name[hy_AM]=Գրել նոր նամակ +Name[is]=SKrifa nýjan póst +Name[it]=Scrivi nuovo messaggio +Name[ja]=新しいメッセージを作成する +Name[ko]=새 메시지 작성 +Name[lt]=Rašyti naują laišką +Name[nb_NO]=Skriv ny melding +Name[nl]=Nieuw bericht aanmaken +Name[nn_NO]=Skriv ny melding +Name[pl]=Nowa wiadomość +Name[pt_BR]=Nova mensagem +Name[pt_PT]=Escrever nova mensagem +Name[rm]=Scriver in nov messadi +Name[ro]=Scrie un mesaj nou +Name[ru]=Создать новое сообщение +Name[si]=නව ලිපියක් ලියන්න +Name[sk]=Nová e-mailová správa +Name[sl]=Sestavi novo sporočilo +Name[sq]=Shkruani mesazh të ri +Name[sr]=Писање нове поруке +Name[sv_SE]=Skriv ett nytt meddelande +Name[ta_LK]=புதிய செய்தியை எழுதுக +Name[tr]=Yeni ileti yaz +Name[uk]=Написати нового листа +Name[vi]=Viết thư mới +Name[zh_CN]=编写新消息 +Name[zh_TW]=寫一封新訊息 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird -compose + +[Desktop Action OpenAddressBook] +Name=Open address book +Name[ar]=افتح دفتر العناوين +Name[ast]=Abrir llibreta de direiciones +Name[be]=Адкрыць адрасную кнігу +Name[bg]=Отваряне на адресник +Name[br]=Digeriñ ur c'harned chomlec'hioù +Name[ca]=Obre la llibreta d'adreces +Name[cs]=Otevřít Adresář +Name[da]=Åbn adressebog +Name[de]=Adressbuch öffnen +Name[el]=Άνοιγμα ευρετηρίου διευθύνσεων +Name[es_AR]=Abrir libreta de direcciones +Name[es_ES]=Abrir libreta de direcciones +Name[et]=Ava aadressiraamat +Name[eu]=Ireki helbide-liburua +Name[fi]=Avaa osoitekirja +Name[fr]=Ouvrir un carnet d'adresses +Name[fy_NL]=Iepenje adresboek +Name[ga_IE]=Oscail leabhar seoltaí +Name[gd]=Fosgail leabhar-sheòlaidhean +Name[gl]=Abrir a axenda de enderezos +Name[he]=פתיחת ספר כתובות +Name[hr]=Otvori adresar +Name[hu]=Címjegyzék megnyitása +Name[hy_AM]=Բացել Հասցեագիրքը +Name[is]=Opna nafnaskrá +Name[it]=Apri rubrica +Name[ja]=アドレス帳を開く +Name[ko]=주소록 열기 +Name[lt]=Atverti adresų knygą +Name[nb_NO]=Åpne adressebok +Name[nl]=Adresboek openen +Name[nn_NO]=Opne adressebok +Name[pl]=Książka adresowa +Name[pt_BR]=Catálogo de endereços +Name[pt_PT]=Abrir livro de endereços +Name[rm]=Avrir il cudeschet d'adressas +Name[ro]=Deschide agenda de contacte +Name[ru]=Открыть адресную книгу +Name[si]=ලිපින පොත විවෘත කරන්න +Name[sk]=Otvoriť adresár +Name[sl]=Odpri adressar +Name[sq]=Hapni libër adresash +Name[sr]=Отвори адресар +Name[sv_SE]=Öppna adressboken +Name[ta_LK]=முகவரி பத்தகத்தை திறக்க +Name[tr]=Adres defterini aç +Name[uk]=Відкрити адресну книгу +Name[vi]=Mở sổ địa chỉ +Name[zh_CN]=打开通讯录 +Name[zh_TW]=開啟通訊錄 +Exec=env MOZ_USE_XINPUT2=1 /usr/lib/thunderbird/thunderbird -addressbook diff --git a/.xsession b/.xsession index ea74ab4..6d4b699 100755 --- a/.xsession +++ b/.xsession @@ -17,7 +17,8 @@ hdmi xrdb ~/.Xresources #xsetroot -solid rgb:3/4/5 -xsetroot -solid rgb:1/3/4 +#xsetroot -solid rgb:1/3/4 +feh --bg-fill ~/night1.jpg #feh --bg-fill ~/Downloads/Alaska_Range.jpg #conky #slock -- 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 '.xsession') 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 7883e56fadc6c8be32c455b69fd43dedb95c9d20 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Wed, 7 Dec 2022 14:53:33 +0100 Subject: update --- .bashrc | 5 ++++- .config/i3/config | 3 +++ .xsession | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) (limited to '.xsession') diff --git a/.bashrc b/.bashrc index 926f90e..adafe27 100644 --- a/.bashrc +++ b/.bashrc @@ -5,7 +5,7 @@ export PAGER=less export EDITOR=vim -export HISTIGNORE=ls:ps:history +export HISTIGNORE='sudo id:uname:date:exit:df:ll:ls:ps:pwd:top:history' export HISTCONTROL=ignoreboth:erasedups # no start space and duplicate entries export HISTSIZE=100000 # big big history export HISTFILESIZE=100000 # big big history @@ -147,3 +147,6 @@ eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 set -o vi +bind -m vi-command ".":insert-last-argument +bind -m vi-command 'Control-l: clear-screen' +bind -m vi-insert 'Control-l: clear-screen' diff --git a/.config/i3/config b/.config/i3/config index e0e8c9b..6c871ae 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -77,6 +77,8 @@ for_window [class="feh"] floating enable for_window [class="firefox"] floating enable for_window [class="fluent-reader"] floating enable border normal for_window [class="Geeqie"] floating enable +for_window [class="Google-chrome"] floating enable +for_window [title="Google Chrome"] floating enable for_window [class="Gpicview"] floating enable for_window [class="Ghb"] floating enable for_window [class="Gitk"] floating enable @@ -86,6 +88,7 @@ for_window [class="index"] floating enable for_window [class="Keybase"] floating enable for_window [class="libreoffice"] floating enable for_window [class="Liferea"] floating enable +for_window [class="lagrange"] floating enable for_window [class="llpp"] floating enable for_window [class="MuPDF"] floating enable for_window [class="io.elementary.music"] floating enable diff --git a/.xsession b/.xsession index 25e7837..33a4251 100755 --- a/.xsession +++ b/.xsession @@ -26,3 +26,4 @@ feh --bg-fill ~/Pictures/night1.jpg # Start window manager #exec fvwm exec i3 +#exec cwm -- cgit v1.3 From 0a215cad87338787410af0df999d41c14f00c9e0 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 14 Jan 2023 18:32:46 +0100 Subject: update --- .bashrc | 2 + .forward | 1 + .xsession | 4 +- bin/dv | 653 +++++++++++---------------------------------- swift/etc/smtpd/smtpd.conf | 20 ++ 5 files changed, 180 insertions(+), 500 deletions(-) create mode 100644 .forward create mode 100644 swift/etc/smtpd/smtpd.conf (limited to '.xsession') diff --git a/.bashrc b/.bashrc index adafe27..739bdb2 100644 --- a/.bashrc +++ b/.bashrc @@ -104,6 +104,8 @@ export -f mosht ssht() { ssh -t "$@" -- tmux new -A; } export -f ssht +sshs() { ssh -t "$@" -- screen -d -R; } + mpvx() { mpv --vo=sixel --profile=sw-fast --really-quiet "$@"; } export -f mpvx diff --git a/.forward b/.forward new file mode 100644 index 0000000..b561804 --- /dev/null +++ b/.forward @@ -0,0 +1 @@ +marc mvertes@free.fr diff --git a/.xsession b/.xsession index 33a4251..08383ba 100755 --- a/.xsession +++ b/.xsession @@ -17,8 +17,8 @@ hdmi xrdb ~/.Xresources #xsetroot -solid rgb:3/4/5 -#xsetroot -solid rgb:1/3/4 -feh --bg-fill ~/Pictures/night1.jpg +xsetroot -solid rgb:1/3/4 +#feh --bg-fill ~/Pictures/night1.jpg #feh --bg-fill ~/Downloads/Alaska_Range.jpg #conky #slock diff --git a/bin/dv b/bin/dv index 0737295..39164db 100755 --- a/bin/dv +++ b/bin/dv @@ -1,556 +1,213 @@ #!/bin/sh -# Local dv (aka sim) +# - Usage: dv command [options] [args] +# - dv is a dumb version management tool. +# - Options: +# - -a num set ancestor level (default 1) +# - -n dry-run mode, no changes are made +# - -v verbose mode +# - Commands: -dv_version='dv-0.23 Copyright 2013-2014 Marc Vertes, Philippe Bergheaud' unset CDPATH export LC_ALL=C IFS=' ' - -anc() { - usage 'anc [Version]' 'print ancestor' && return - getdv .dv || die no item - case $1 in - (""|.|$PWD) - [ "$Opt_N" ] && Opt_N=$(($Opt_N - 1)) - [ "$Opt_N" ] && info anc $R2 $Opt_N || echo $R2 +version=dv-0.2 +dvlib=${DVLIB:-$HOME/dvlib} +script="$(cd "$(dirname "$0")" && pwd)/${0##*/}" +aopt=1 + +case $(uname -o) in + (Android|Linux) + diffopt='--color=always' + lsopt='-v --color' ;; - (*) info anc $1 ${Opt_N:-1};; - esac -} + (Darwin) + diffopt='--color=always' + lsopt='-G' + ;; + (*BSD) + ;; +esac -cache() { - isremote "$1" || return - o=$1 _d=$cacheprefix/$1; pd=${_d%/*}; ppd=${pd%/*} t=$pd/.${_d##*/} - [ -d "$ppd" ] || mkdir -p "$ppd" - [ -L "$ppd/.dv." ] || ln -s . "$ppd/.dv." - [ -f "$_d/.dv" ] && return - [ -d "$pd" ] || mkdir -p "$pd" - set -- $pd/*; shift $(($# - 1)) - [ -d "$1" ] && ropt="--link-dest=../${1##*/}" || ropt= - rsync -aDS $ropt "$o/" "$t" && mv "$t" "$_d" +# anc [-a num] [dir] - prints the current ancestor of dir or current. +anc() { + set -- "$(dvdir "$1")" + for _ in $(seq "$aopt"); do + set -- "$1/.dv/anc" + done + [ -L "$1" ] && readlink -f "$1" } -client() { - usage 'client [Version]' 'print clients' && return - getdv .dv || die no item +# clone [-nv] v1 [dir] - clones an iterm version into dir (default: item). +clone() { case $1 in - (""|.|$PWD) - while getpdir .dv .. - do - cd "$R1" - getdv ".dv" - [ "$OptM" ] && echo "$R2 -> $PWD" || echo "$R2" - ((Opt_N = Opt_N-1)) || break - done ;; - (*) info cli $1 ${Opt_N:-9999} | sort -u ;; + ('') die 'missing argument' ;; + (*[/.-]*) set -- "$(path "$1")" "$2" ;; + (*) set -- "$(head "$1")" "$2" ;; esac + [ "$2" ] || { set -- "$1" "${1##*/}"; set -- "$1" "${2%%-*}"; } + [ -d "$1" ] || die "not found: $1" + rsync ${vopt:+"$vopt"} ${nopt:+"$nopt"} -a "$1/" "$2/" + rm -f "$2/.dv/anc" && ln -s "$1" "$2/.dv/anc" } -clone() { - usage 'clone [-A Author] [-m Msg] Version [Dir]' \ - 'Copy version to dir' && return - [ "$1" ] || die missing argument - [ "$3" ] && die too many arguments - getpdir .dv . && root=$R1 && getdv $root/.dv && lib=$R1 item=${R2%/*} - new_version=${1##*/} - if [ "$new_version" = "$1" ] - then - getdv .dv && lib=$R1 new_item=${R2%/*} || die no item - else - v=${1%/$new_version} - new_item=${v##*/} - [ "$new_item" = "$v" ] || new_lib=${v%/$new_item} - fi - [ "$PWD" = "$root" ] && [ "$item" != "$new_item" ] && - die "already a clone of $item" - lib=${lib:-$new_lib} - [ "$lib" ] || die no lib - [ "$new_lib" -a "$new_lib" != "$lib" ] && die "already in lib: $lib" - if [ "$new_version" = 0 ] # Init item in lib - then - initlib "$lib" - getdvinfo "$lib" || die "could not lock $lib" - mkdir -p /tmp/dv.$$/$new_item/0 - dv_write $new_item/0 $new_item/0 >/tmp/dv.$$/$new_item/0/.dv - { cat /tmp/dv.$$/$new_item/0/.dv; echo; } >>/tmp/dv.$$/.dvinfo.0 - ln -f /tmp/dv.$$/.dvinfo.0 /tmp/dv.$$/.dvinfo.1 - rsync -a /tmp/dv.$$/ "$lib" - fi - if [ ! "$2" ] # Use the item name as default directory (a la git) - then - set -- "$1" "${1%/*}" - set -- "$1" "${2##*/}" - echo cloning into "$2" - fi - [ ! -d "$2" ] && mkdir "$2" - cd "$2" || die cannot chdir to "$2" - # Rename existing supplier directories to allow supplier symlinks - find . -name .dv | while read l - do - l=${l%/.dv} && [ "$l" = "." ] && continue - mv "$l" "$l.dvold" - done - # Sync from lib, starting from most client item, up to last supplier - d=. s=$new_item/$new_version - while [ "$d" ] - do - [ -L "$d" ] && { - rm -f "$d" - [ -d "$d.dvold" ] && mv "$d.dvold" "$d" - } - cache "$lib/$s" && pref=$cacheprefix/ || pref= - rsync -aDS "$pref$lib/$s/" "$d" - dv_header "$d" Anc "$s" - dv_header "$d" Lib "$lib" - # Find next symlink pointing to a supplier - d= l= - eval "$(find . -type l | while read -r l - do - f=$(readlink "$l") - case $f in - (*/.dv./*) echo "d=\"$l\" s=\"${f#*/.dv./}\"" - break;; - esac - done)" +# desc - prints the descendants of a version +desc() { + set -- "$(path "$1")" + set -- "$1" "${1%/*}" + set -- "$1" "${2##*/}" + for a in "$dvlib/$2"/*/.dv/anc*; do + [ "$a" -ef "$1" ] && echo "${a%/*/*}" done } -desc() { - usage 'desc [Version]' 'print descendants' && return - getdv .dv || die no item - case $1 in - (""|.|$PWD) ;; - (*) info desc $1 ;; - esac +die() { + echo "$@" >&2 + exit 1 } -die() { echo "$0: fatal: $@" >&2; exit 1; } - +# diff [-a num] [[v1] v2] - prints differences (default: current and ancestor). diff() { - usage 'diff [-x pat] [-F File] [V1 [V2]]' 'Print differences' && return - getpdir .dv && getdv "$R1/.dv" || die not in a clone - lib=$R1 item=${R2%/*} old=${R2#*/} - [ "$lib" = "" ] && [ -L "../../.dv." ] && lib=${PWD%/*/*} - if [ "$2" ] - then - case $2 in - (.) new=. new_is_clone=1 ;; - (*) new=$lib/$item/$2 ;; - esac - cache "$new" && np=$cacheprefix/ || np= - old=$lib/$item/$1 - elif [ "$1" ] - then - case $1 in - (.) new=. new_is_clone=1 ;; - (*) new=$lib/$item/$1 ;; - esac - cache "$new" && np=$cacheprefix/ || np= - getdv "$np$new/.dv" && old=${R1:-$lib}/$R2 + if [ "$2" ]; then + set -- "$(path "$2")" "$(path "$1")" + elif [ "$1" ]; then + set -- "$(path "$1")" "$(anc "$(path "$1")")" else - new=$PWD new_is_clone=1 - cache "$new" && np=$cacheprefix/ || np= - getdv "$np$new/.dv" && old=${R1:-$lib}/$R2 + set -- "$(dvdir)" "$(anc)" fi - cache "$old" && op=$cacheprefix/ || op= - [ "$Opts" ] || printf "old %s\nnew %s\n" "$old" "$new" - # Itemized diff for all suppliers, deepest first - cd "$np$new" && for f in $(find . -type f -name .dv | sort -r) - do - d=${f%/.dv} - [ "$d" = . ] && prefix= || prefix=${d#./}/ - getdv "$f" && cache "$lib/$R2" - [ "$new_is_clone" ] && dest=$np$d || dest=$prefix$d - diffdir "$op$lib/$R2" "$dest" - Optx="$Optx --exclude=${d##*/}" - done -} - -# Usage: diffdir oldpath newpath -# Print differences between 2 directories -diffdir() { - [ -f "$2/.dvignore" ] && xf=--exclude-from=$2/.dvignore || xf= - rsync -aDSniv $xf --delete --exclude=".dv.*/" $Optx "$2/" "$1" | - awk -v OptF="${OptF#./}" -v prefix=$prefix ' - NF == 0 {exit} - NR < 2 || /\/*\.dv$/ || /\/$/ {next} - # Match an itemized status for all versions of rsync -i - $1 !~ /^[<>ch.*][fdLDS+][.+?cstpoguaxz]+$/ {next} - {key = $1; file = substr($0, length(key) + 2)} - OptF && OptF != file {next} - key == "*deleting" {print "deleted " prefix file; next} - substr(key, 3, 7) == "+++++++" {print "created " prefix file; next} - { # Avoid false positive if only mtime is changed. - of = "'$1'/" file; gsub("'\''", "'\'\\\\\'\''", of) - nf = "'$2'/" file; gsub("'\''", "'\'\\\\\'\''", nf) - if (substr(key, 2, 1) == "L") { # Symlink - src = target = file - sub(/.* -> /, "", target); - sub(/ -> .*/, "", src); - "readlink '$2'/" src | getline otarget - if (target != otarget) - print "changed " src - } else if (system("cmp -s '\''" of "'\'\ \''" nf "'\''")) - print "changed " file - }' - # Or: scan key for file/link size, checksum or permission change - # rsync -c is required - #key ~ /[cps]/ { print "changed " prefix file }' + [ "$2" ] && command diff $diffopt -U 3 -x .dv "$2" "$1" | less -F } -dv_write() { - cat <<- EOT - From $(username) - Date: $(date +"%F %T %z") - Version: $1 - Anc: $2 - EOT - - [ "$OptA" ] && echo "Author: $OptA" - printf "\n%s\n" "$Optm" +# dvdir prints the dir containing .dv. +dvdir() { + set -- "$(realpath "${1:-.}")" + while [ "$1" ]; do + [ -d "$1/.dv" ] && echo "$1" && return + set -- "${1%/*}" + done } -dv_header() { - awk -v val="$3" '/^'$2':/ {print "'$2': " val; done = 1; next} - NF == 0 && done == 0 {print "'$2': " val; done = 1} - {print}' $1/.dv >$1/.dv.$$ && mv $1/.dv.$$ $1/.dv +# head - prints the branch head versions. +head() { + for v in "$dvlib/${1:-$(name)}/"*; do + [ "$(desc "$v")" ] || echo "$v" + done } -# Usage: getdv path -# Return lib in R1, anc in R2, version in R3 -getdv() { - R1= R2= - while read -r line - do +# help - prints this help text. +help() { + while read -r line; do case $line in - ("Lib: "*) R1=${line#Lib: };; - ("Anc: "*) R2=${line#Anc: };; - ("Version: "*) R3=${line#Version: };; + (\#*\ -\ *) ;; + (*) continue ;; esac - done <$1 - [ "$R1" -o "$R2" ] + set -- "${line% - *}" "${line#* - }" + [ "$1" = '#' ] || printf " %-26s" "${1#\# }" + echo "$2" + done < "$script" } -# Usage: getdvinfo lib -# Get exclusive write access to a dvlib, for new version commit -getdvinfo() { - [ -d /tmp/dv.$$ ] || mkdir /tmp/dv.$$ - [ "$Optn" ] && { rsync "$1/.dvinfo.1" /tmp/dv.$$/.dvinfo.0; return; } - t=0 - for i in 1 2 3 4 5 - do - rsync --remove-source-files "$1/.dvinfo.0" /tmp/dv.$$/ && break - t=$(($t + $i)) && sleep $t - done - test -f /tmp/dv.$$/.dvinfo.0 +# incv increments version. +incv() { + set -- "$1" "${1##*[-.a-z_A-Z]}" + set -- "${1%"$2"}" "$2" + echo "$1$(($2 + 1))" } -putdvinfo() { - [ "$Optn" ] && return - ln -f /tmp/dv.$$/.dvinfo.0 /tmp/dv.$$/.dvinfo.1 - rsync -a /tmp/dv.$$/.dvinfo.[01] "$1/" - isremote "$1" && cp /tmp/dv.$$/.dvinfo.0 "$cacheprefix/$1/" +# init - creates an initial clone in the current directory. +init() { + [ "$(dvdir)" ] && die "already initialized: $(dvdir)" + mkdir .dv } -# Usage: getpdir file [path] -# Return absolute parent dir of path or PWD containing file -getpdir() { - R1="$([ -d "${2:-.}" ] && cd "${2:-.}" && pwd)" - while [ "$R1" ] - do - [ -f "$R1/$1" ] && return || R1=${R1%/*} - done - return 1 -} +# ls [item] - lists dvlib. +ls() ( + cd "$dvlib" && command ls $lsopt "$@" +) -# Usage: getprd file [path] -# Return relative path to parent directory containing file -getprd() { - R2="$(cd "${2:-.}" && pwd)"; R2=${R2%/*} R1=.. - while [ "$R2" ] - do - [ -f "$R2/$1" ] && return || R2=${R2%/*} R1=$R1/.. - done - return 1 +# name prints the item name. +name() { + set -- "$(dvdir)" + [ "$1" ] && echo "${1##*/}" || die "not a dv item, no .dv found" } -info() { - usage info && return - case $2 in - (*:*) lib=${2%/*/*} ;; - (*) getpdir .dv && getdv $R1/.dv && lib=$R1 || die no dvlib found - esac - case $2 in # $2 specifies: - (*/*/*) v=${2%/*/*}; v=${2#$v/} ;; # lib/item/version - (*/*) v=$2 ;; # item/version - (*) v=${R2%/*}/$2 ;; # version +# path prints the version path, if exist. +path() { + case $1 in + (*/*|.) dvdir "$1"; return ;; + ([0-9]*) set -- "$(name)-$1" ;; esac - isremote "$lib" && { - p=$cacheprefix - [ -d "$p/$lib" ] || mkdir -p "$p/$lib" - [ "$Optl" ] || rsync -a "$lib/.dvinfo.1" "$p/$lib/" - } || p= - info_query $1 $v $3 <$p/$lib/.dvinfo.1 -} - -info_query() -{ - awk -v arg0=$1 -v arg1=$2 -v arg2=$3 ' - /^From / { - if (v) msg[v] = var["Body"] - delete var - var["From"] = substr($0, 6) - header = 1 - next - } - header == 1 && NF == 0 { - v = var["Version"]; a = var["Anc"]; s = var["Sup"] - if (a != v) { - anc[v] = a; desc[a] = desc[a] ? desc[a] " " v : v - } - n = split(s, as) - for (i = 1; i <= n; i++) { - cli[as[i]] = cli[as[i]] ? cli[as[i]] " " v : v - } - sup[v] = s; msg[v] = var["Msg"]; date[v] = var["Date"] - if (var["Root"]) root[v] = var["Root"] - header = 0 - next - } - header == 1 { - i = index($0, ":") - var[substr($0, 1, i-1)] = substr($0, i+2) - next - } - header == 0 { - if ($0 ~ />+From /) sub(/>/, "") - var["Body"] = var["Body"] ? var["Body"] "\n" $0 : $0 - } - END { - if (v) msg[v] = var["Body"] - if (arg0 == "graph") anc_graph() - else if (arg0 == "anc") query_anc(arg1, arg2) - else if (arg0 == "sup") query_sup(arg1, arg2) - else if (arg0 == "cli") query_cli(arg1, arg2) - else if (arg0 == "log") print msg[arg1] - else if (arg0 == "from") print from[arg1] - else if (arg0 == "date") print date[arg1] - else if (arg0 == "desc") printl(desc[arg1]) - } - function anc_graph() { - print "digraph G {" - for (v in anc) print "\"" anc[v] "\" -> \"" v "\"" - print "}" - } - function query_anc(v, n) { while (n-- > 0) v = anc[v]; print v } - function query_cli(v, n) { - while (n-- > 0 && v != "") { - num = split(v, av); v = "" - for (i = 1; i <= num; i++) { - printl(cli[av[i]]) - v = v ? v " " cli[av[i]] : cli[av[i]] - } - } - } - function query_sup(v, n) { - while (n-- > 0 && v != "") { - num = split(v, av); v = "" - for (i = 1; i <= num; i++) { - printl(sup[av[i]]) - v = v ? v " " sup[av[i]] : sup[av[i]] - } - } - } - function printl(l, i, n) { - n = split(l, al) - for (i = 1; i <= n; i++) - if (root[al[i]]) - print al[i] " -> '"$PWD/"'" root[al[i]] - else - print al[i] - }' + set -- "${1%%-*}" "${1#*-}" + [ -d "$dvlib/$1/$1-$2" ] && echo "$dvlib/$1/$1-$2" } -initlib() { - rsync --list-only "$1/.dv." >/dev/null 2>&1 && return - mkdir -p /tmp/dv.$$ - ln -s . /tmp/dv.$$/.dv. - >/tmp/dv.$$/.dvinfo.0 - >/tmp/dv.$$/.dvinfo.1 - chmod g+w /tmp/dv.$$/.dvinfo.[01] - rsync -a /tmp/dv.$$/ "$1" -} +# save [-nv] [v1] - creates a new version from clone. +save() { + [ "$1" ] && case $1 in (*[0-9]) ;; (*) die "invalid version: $1" ;; esac + set -- "$(dvdir)" "$(aopt=1 anc)" "$(name)" "${1#[a-zA-Z_]*-}" + set -- "$1" "$2" "$3" "${4:-$(incv "${2##*/[a-zA-Z_]*-}")}" + echo "$dvlib/$3/$3-$4" + command diff -q -x .dv "$2" "$1" >/dev/null 2>&1 && die 'no changes, abort' + [ "$nopt" ] && return -isremote() { case $1 in (*:*) return;; esac; return 1; } + # Update ancestor in clone then copy in dvlib. + rm -f "$1/.dv/anc" && [ "$2" ] && ln -s "../../${2##*/}" "$1/.dv/anc" + rsync ${vopt:+"$vopt"} -a ${2:+--link-dest="$2"} --mkpath "$1/" "$dvlib/$3/$3-$4/" -help_all() { - printf "$dv_version\nUsage: dv command [options] [args]\n" - Opth=1; for c in $Cmdlist; do $c; done + # After save, clone ancestor points to new saved version. + rm -f "$1/.dv/anc" && ln -s "$dvlib/$3/$3-$4" "$1/.dv/anc" } -newversion() { - [ "$OptV" ] && R1=$OptV && return - case $OptB in - ('') R1=$1 ;; - (*[-/]*) die 'illegal character [-/] in branch name' ;; - (*[0-9.]) die 'illegal end character [0-9.] in branch name' ;; - (*) case $1 in (*-${OptB}[1-9]*) R1=$1;; (*) R1=$1-${OptB}0;; esac ;; - esac - R2=${R1##*[!0-9]} - optb=$Optb - [ "$optb" ] && R3=.1 optb=${optb%b} || R3= R1=${R1%$R2}$(($R2 + 1)) - while [ "${optb}" ]; do optb=${optb%b} R3=.0$R3; done - R1=$R1$R3 - while grep -q "^Version: $item/$R1\$" /tmp/dv.$$/.dvinfo.0 - do - R2=${R1##*[!0-9]} - [ "$R2" ] && R1=${R1%$R2}$(($R2 - 1)).1 || R1=${R1}1 - done +# status - prints dv informations. +status() { + echo "lib: $dvlib" + set -- "$(dvdir)" "$(anc)" + [ "$1" ] || die "not a dv item, no .dv found" + echo "root: $1" + [ "$2" ] || die "no ancestor found, please save it first" + echo "anc: $2" + command diff -q -x .dv "$2" "$1" } -patch() { - usage 'patch [-x pat] [-F File] [Dir|Version]' \ - 'Print patch diff from ancestor' && return - diff "$@" | awk -v wdflag="-v${OptD:+3}${OptN:+1}${OptO:+2}" ' - { key = $1; file = substr($0, length(key) + 2) } - key == "old" { old = (file ~ /:/ ? "'$cacheprefix'/" : "") file; next } - key == "new" { new = (file ~ /:/ ? "'$cacheprefix'/" : "") file; next } - { - of = old "/" file; gsub("'\''", "'\'\\\\\'\''", of) - nf = new "/" file; gsub("'\''", "'\'\\\\\'\''", nf) - system("diff -Naup '\''" of "'\'\ \''" nf "'\''; echo") - }' +# sync [url] - synchronize a remote dvlib. +sync() { + set -- "${1:-$(cat "$dvlib/.url" 2>/dev/null)}" + [ "$1" ] || die "missing url" + [ "$(cat "$dvlib/.url" 2>/dev/null)" = "$1" ] || echo "$1" > "$dvlib/.url" + rsync ${vopt:+"$vopt"} ${nopt:+"$nopt"} -aH --mkpath "$1/" "$dvlib/" + rsync ${vopt:+"$vopt"} ${nopt:+"$nopt"} -aH --mkpath "$dvlib/" "$1/" } -save() { - usage 'save [-bln] [-A Author] [-m msg] [-x pat] [-B Branch|-V Version] [Dir]'\ - 'Save dir into a new version' && return - [ "$2" ] && die 'too many arguments' - getpdir .dv "$1" || die "not in a clone: ${1:-$PWD}" && root=$R1 - cd "$root" - getdv .dv && lib=$R1 && getdvinfo "$lib" - # Process supplier subdirs from the deepest up to "." (most client) - for d in $(find . -type f -name .dv | sort -r) - do - d=${d%/.dv} - cd "$root/$d" - OptF= save1 "$d" && nanc=$R1 && echo $nanc - [ "$d" = . ] && continue # not a supplier, done - - # Replace supplier subdir by symlink in lib - getprd .dv && s=$R1/../.dv./$nanc - t=${d##*/}; t=.dv.$t - mv "$root/$d" "$root/${d%/*}/$t" - ln -s "$s" "$root/$d" - done - putdvinfo "$lib" - # Restore supplier subdirs and remove links to lib, deepest first - find . -type d -name ".dv.*" | sort -r | while read d - do - t=${d##*/.dv.}; t=${d%/*}/$t - rm -f "$t" && mv "$d" "$t" - done +# version - prints the current version of dv. +version() { + echo "$version" } -save1() { - getdv .dv && lib=$R1 anc=$R2 && item=${anc%/*} old=${anc#*/} - [ "$(diffdir "$lib/$anc" .)" ] || { R1=$anc; return; } - newversion $old && new=$item/$R1 - [ "$Optn" ] || dv_write "$new" "$anc" >.dv - # Compute list of direct suppliers, for caching in .dvinfo.0 - lsup=$(find . -type l | while read -r l - do - case $l in (*/.dv.*) continue ;; esac - f=$(readlink "$l") - case $f in (*/.dv./*) printf "%s " ${f#*/.dv./} ;; esac - done) - [ ! "$Optn" ] && [ "$lsup" ] && dv_header . Sup "$lsup" - { cat .dv; echo; } >>/tmp/dv.$$/.dvinfo.0 - [ -f ".dvignore" ] && xf=--exclude-from=.dvignore || xf= - rsync -aDS$Optn$Optv --link-dest=../$old $xf --exclude=".dv.*/" \ - ./ "$lib/$new" - R1=$new - [ "$Optn" ] && return - isremote "$lib" && rsync -aDS --link-dest=../$old --exclude=".dv.*/" \ - ./ "$cacheprefix/$lib/$new" - dv_header . Anc "$new" - dv_header . Lib "$lib" -} - -supplier() { - usage 'supplier [Version]' 'print suppliers' && return - getdv .dv || die no item +# Main program starts here. +[ "$DVDEBUG" ] && set -x || case $1 in - (""|.|$PWD) # create a temporary dvinfo file, query it - V=$R2; find . -name .dv | - while read dv - do - [ "$dv" = "./.dv" ] && continue - # get the supplier - getdv "$dv"; v=$R2; dv=${dv%/.dv} - # get the client - getpdir .dv "${dv%/*}"; getdv "$R1/.dv" - # declare the client as supplier - printf "From \nVersion: %s\nSup: %s\n" "$v" "$R2" - [ "$OptM" ] && echo "Root: ${dv#./}"; echo - done | info_query cli $V ${Opt_N:-9999} ;; - (*) info sup $1 ${Opt_N:-9999} ;; - esac | sort -u -} - -usage() { [ "$Opth" ] && printf " %-34s %s\n" "$1" "$2"; } - -username() { - case $(uname -s) in - (Darwin) id -P | awk -v FS=: '{print $8}' ;; - (*) awk -v FS=[:,] '/^'$USER':/ {print $5; exit}' /etc/passwd ;; + (anc|clone|desc|diff|head|help|init|ls|path|save|status|sync|version) ;; + (*) help; exit 1;; esac -} - -wdiff() { - usage 'wdiff [-DNO] [-x pat] [-F File] [Dir|Version]' \ - 'Print word diffs from ancestor' && return - diff "$@" | - awk -v wdflag="-v${OptD:+3}${OptN:+1}${OptO:+2}" ' - { key = $1; file = substr($0, length(key) + 2) } - key == "old" { old = (file ~ /:/ ? "'$cacheprefix'/" : "") file; next } - key == "new" { new = (file ~ /:/ ? "'$cacheprefix'/" : "") file; next } - { - of = old "/" file; gsub("'\''", "'\'\\\\\'\''", of) - nf = new "/" file; gsub("'\''", "'\'\\\\\'\''", nf) - system("wd " wdflag " '\''" of "'\'\ \''" nf "'\''; echo") - }' | less -FCimnqGrX -j5 -h0 +/'\[0' -} - -cacheprefix=$HOME/.cache/dv -Cmdlist='anc client clone desc diff info patch save supplier wdiff' -while getopts :nvV opt # Parse global options -do +cmd="$1" +shift +while getopts :a:nv opt; do case $opt in - (V) echo "$dv_version"; exit ;; - (*) help_all; exit ;; + (a) aopt="$OPTARG" ;; + (n) nopt=-n ;; + (v) vopt=-v ;; + (*) help; exit ;; esac done shift $((OPTIND - 1)) -[ $1 ] && C=$1 && shift 1 || { help_all; exit 1; } -for c in $Cmdlist -do - case $c in - ($C|_$C) cmd=$c; break;; - ($C*) [ $cmd ] && die ambiguous command $C || cmd=$c;; - esac -done -while getopts :0123456789A:bB:F:hl:m:MnNOsvV:x: opt # Parse command options -do - case $opt in - ([0-9]) Opt_N=$Opt_N$opt;; - ([bhlnMNOsv]) eval Opt$opt=\${Opt$opt}$opt ;; - ([ABFmV]) eval Opt$opt=\$OPTARG ;; - (x) Optx="$Optx --exclude=$OPTARG" ;; - (*) Opth=1; $cmd; exit 1;; - esac -done -shift $(($OPTIND - 1)) -trap "rm -rf /tmp/dv.$$" EXIT -[ "$cmd" ] || die "no command \"$C\"" && $cmd "$@" +$cmd "$@" + +# Todo: +# * a function to squash a branch in the trunk +# * merge another ancestor (use anc0, anc1, ...) +# * vendor management +# * show graphs (dot) +# * sync: dvlib sync / mirror: resolve conflict by branching +# * rename version. +# * .dvignore +# * make dvlib versions immutable. diff --git a/swift/etc/smtpd/smtpd.conf b/swift/etc/smtpd/smtpd.conf new file mode 100644 index 0000000..ac4dabf --- /dev/null +++ b/swift/etc/smtpd/smtpd.conf @@ -0,0 +1,20 @@ +# $OpenBSD: smtpd.conf,v 1.10 2018/05/24 11:40:17 gilles Exp $ + +# This is the smtpd server system-wide configuration file. +# See smtpd.conf(5) for more information. + +table aliases file:/etc/smtpd/aliases +table secrets file:/etc/smtpd/secrets + +# To accept external mail, replace with: listen on all +# +listen on localhost + +action "local" maildir alias +action "relay" relay host smtps://mvertes@smtp.free.fr auth + +# Uncomment the following to accept external mail for domain "example.org" +# +# match from any for domain "example.org" action "local" +match for local action "local" +match for any action "relay" -- 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 '.xsession') 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 abe00380ff8b708b890371c73116e1006ea05178 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 11 Mar 2023 16:11:37 +0100 Subject: update --- .bashrc | 8 ++++---- .config/i3/config | 2 +- .i3status.conf | 9 ++++++++- .xsession | 6 +++--- bin/lt | 1 + 5 files changed, 17 insertions(+), 9 deletions(-) (limited to '.xsession') diff --git a/.bashrc b/.bashrc index 739bdb2..23a8084 100644 --- a/.bashrc +++ b/.bashrc @@ -148,7 +148,7 @@ meteo() { eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 -set -o vi -bind -m vi-command ".":insert-last-argument -bind -m vi-command 'Control-l: clear-screen' -bind -m vi-insert 'Control-l: clear-screen' +#set -o vi +#bind -m vi-command ".":insert-last-argument +#bind -m vi-command 'Control-l: clear-screen' +#bind -m vi-insert 'Control-l: clear-screen' diff --git a/.config/i3/config b/.config/i3/config index 0c7c3d3..d898633 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -44,7 +44,7 @@ bindsym $mod+twosuperior exec --no-startup-id dunstctl history-pop # pulse audio systray icon -exec --no-startup-id pasystray +# exec --no-startup-id pasystray # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status diff --git a/.i3status.conf b/.i3status.conf index 6cc7210..31c0a8d 100644 --- a/.i3status.conf +++ b/.i3status.conf @@ -22,6 +22,7 @@ order += "disk /" order += "cpu_usage" #order += "load" order += "memory" +order += "volume master" order += "cpu_temperature 0" order += "tztime local" @@ -33,7 +34,7 @@ read_file hostname { wireless _first_ { #format_up = "🌐 %essid %quality" #format_up = "📶 %essid %quality" - format_up = "📡 %essid %quality" + format_up = "📡 %essid %signal %bitrate" format_down = "📡 down" } @@ -104,3 +105,9 @@ tztime local { format = "%a %d %b %H:%M:%S" #format = "📅 %a %d %b ⌚ %H:%M:%S" } + +volume master { + format = "🎜 %volume" + format_muted = "🎜 mute (%volume)" + device = "pulse:alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink" +} diff --git a/.xsession b/.xsession index 804c3cd..f4d42ec 100755 --- a/.xsession +++ b/.xsession @@ -10,7 +10,7 @@ eval $(ssh-agent) xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Tapping Enabled' 1 xinput --set-prop 'SYNA7DAB:00 06CB:CD40 Touchpad' 'libinput Natural Scrolling Enabled' 1 -# Better use /etc/X11/xorg.conf.d/10-keyboard.conf to handle hot plugged keyboards +# Better use /etc/X11/xorg.conf.d/10-keyboard.conf for hot plugged keyboards #setxkbmap fr #xk hdmi @@ -24,6 +24,6 @@ xsetroot -solid rgb:1/3/4 #slock # Start window manager -exec fvwm -#exec i3 +#exec fvwm +exec i3 #exec cwm diff --git a/bin/lt b/bin/lt index f09f3b7..2a182f7 100755 --- a/bin/lt +++ b/bin/lt @@ -36,6 +36,7 @@ ca() { pp() { pp_s=$1 pp_b=$2 R1='' while true; do + ! [ "$pp_s" ] && R1='' && return [ "$pp_b" = "$pp_s" ] && break pp_s=${pp_s%/*} [ "$R1" ] && R1=$R1/.. || R1=.. -- 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 '.xsession') 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 From b04d54fc52df277b189c2d794241c49c2ab61fb4 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Sat, 14 Oct 2023 14:24:47 +0200 Subject: update --- .config/sway/config | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++ .fvwm2rc | 7 ++- .xsession | 4 +- bin/idot | 4 -- bin/status2 | 27 +++++++++ 5 files changed, 197 insertions(+), 9 deletions(-) create mode 100644 .config/sway/config delete mode 100755 bin/idot create mode 100755 bin/status2 (limited to '.xsession') diff --git a/.config/sway/config b/.config/sway/config new file mode 100644 index 0000000..561f443 --- /dev/null +++ b/.config/sway/config @@ -0,0 +1,164 @@ +# xwayland disable + +input * { + xkb_layout "fr" +} + +input xkb_model "pc101" + +bar { + status_command i3status +} + +output * bg #103040 solid_color + +# output eDP-1 scale 1.25 + +input "1739:52544:SYNA7DAB:00_06CB:CD40_Touchpad" { + tap enabled + natural_scroll enabled +} + +font Monospace 9 + +set $mod Mod4 + +bindsym $mod+q kill +bindsym $mod+Return exec --no-startup-id foot +#bindsym $mod+d exec --no-startup-id bemenu-run +bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -dmenu="bemenu -i -fn 'Mono-12'" + +for_window [app_id="google-chrome"] floating enable +for_window [class="firefox"] floating enable +for_window [class="thunderbird"] floating enable + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+m focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+m move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+z layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +#bindsym $mod+q focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+ampersand workspace number $ws1 +bindsym $mod+eacute workspace number $ws2 +bindsym $mod+quotedbl workspace number $ws3 +bindsym $mod+apostrophe workspace number $ws4 +bindsym $mod+parenleft workspace number $ws5 +bindsym $mod+minus workspace number $ws6 +bindsym $mod+egrave workspace number $ws7 +bindsym $mod+underscore workspace number $ws8 +bindsym $mod+ccedilla workspace number $ws9 +bindsym $mod+agrave workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+ampersand move container to workspace number $ws1 +bindsym $mod+Shift+eacute move container to workspace number $ws2 +bindsym $mod+Shift+quotedbl move container to workspace number $ws3 +bindsym $mod+Shift+apostrophe move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+minus move container to workspace number $ws6 +bindsym $mod+Shift+egrave move container to workspace number $ws7 +bindsym $mod+Shift+underscore move container to workspace number $ws8 +bindsym $mod+Shift+ccedilla move container to workspace number $ws9 +bindsym $mod+Shift+agrave move container to workspace number $ws10 + +# Cycle through active workspaces +bindsym $mod+Tab workspace next +bindsym $mod+Shift+Tab workspace prev + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +# bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" +bindsym $mod+Ctrl+backspace exec killall sway + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym m resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# Move a workspace to a different monitor +bindsym $mod+greater move workspace to output right +bindsym $mod+less move workspace to output left + diff --git a/.fvwm2rc b/.fvwm2rc index d9e203c..e3aea63 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -42,8 +42,9 @@ Style "gkrellm" NoTitle, Sticky, WindowListSkip, CirculateSkip # AddToFunc "StartFunction" -+ "I" Module FvwmPager 0 0 -+ "I" Exec dunst ++ I Module FvwmPager 0 0 ++ I Exec status2 ++ I Exec dunst #+ "I" Exec xsetroot -solid rgb:3/4/5 #+ "I" Exec setxkbmap fr #+ "I" Exec synclient VertScrollDelta=-114 @@ -327,7 +328,7 @@ Key Escape A C WindowList *FvwmPagerFont fixed *FvwmPagerHilight #c3c3c3 *FvwmPagerGeometry 80x60-1-1 -*FvwmPagerLabel 0 "swift" +*FvwmPagerLabel 0 "arch" *FvwmPagerSmallFont 5x8 #------------------ Identify diff --git a/.xsession b/.xsession index 005713f..f4d42ec 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 diff --git a/bin/idot b/bin/idot deleted file mode 100755 index 44387e8..0000000 --- a/bin/idot +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -# dot -Gsize=9 -Nshape=box -Nstyle=rounded -Tsvg | convert -- - sixel:/dev/tty -# dot -Gsize=9 -Nfontname=Helvetica -Tsvg | convert -- - sixel:/-dev/tty -dot -Gsize=9 -Nfontname=Arial -Tpng | icat - /dev/tty diff --git a/bin/status2 b/bin/status2 new file mode 100755 index 0000000..1b7ea55 --- /dev/null +++ b/bin/status2 @@ -0,0 +1,27 @@ +#!/bin/sh + +ip() { + while read -r w1 w2 w3; do + [ $w1 = /32 ] && [ $w2 = host ] && [ $ip != 127.0.0.1 ] && break + ip=$w2 + done < /proc/net/fib_trie +} + +power() { + while read -r line; do + case $line in POWER_SUPPLY_CAPACITY*) power=${line#*=}% && break;; esac + done < /sys/class/power_supply/BAT0/uevent +} + +status() { + power + ip + sound="$(pamixer --get-volume-human)" + clock="$(date +'%a %d %b %H:%M')" +} + +while true; do + status && echo "$ip , power $power , sound $sound , $clock" + sleep 17 +done | +root-tail -g '500x20-80-0' -fn '-*-fixed-medium-*-*-*-15-*-*-*-*-*-*-*' --color grey70 - -- cgit v1.3