Compare commits

...

8 commits

Author SHA1 Message Date
lara 2a3ced9900 Misc tweaks 2021-08-27 20:37:30 +02:00
lara 50f6350f2f [pipe-viewer] upstream update 2021-08-27 20:37:05 +02:00
lara c6812303b5 [vim] rename bepo config 2021-08-27 20:36:25 +02:00
lara 53027824c7 [neomutt] small tweaks 2021-08-27 20:34:55 +02:00
lara c82ef3eb3a [sway] Bring config up to date 2021-02-15 00:02:01 +01:00
lara 734c05a6da [neomutt] Tribute to Elise, may you ride eternal, shiny and chrome! 2021-02-14 23:46:57 +01:00
lara 26e8ae9884 Add config for pipe-viewer 2021-02-14 23:44:41 +01:00
lara db86016a6d [mailcap] Temporarily removed feh action because of weird quoting 2021-02-14 23:39:27 +01:00
19 changed files with 302 additions and 25 deletions

View file

@ -12,6 +12,7 @@ if date --version > /dev/null 2>&1 ;then
alias ip='ip --color'
alias ipa='ip route && echo && ip --brief address'
alias ipr='ip --brief address && echo && ip route'
alias cal='cal -m -3'
else
alias ls='ls -FGh'
alias ipa='ip address'

19
bin/import-gsettings Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
# Inspired from https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(sed -nE '/^gtk-theme-name/s/^gtk-theme-name\s*=\s*//p' "$config")"
icon_theme="$(sed -nE '/^gtk-icon-theme-name/s/^gtk-icon-theme-name\s*=\s*//p' "$config")"
cursor_theme="$(sed -nE '/^gtk-cursor-theme-name/s/^gtk-cursor-theme-name\s*=\s*//p' "$config")"
font_theme="$(sed -nE '/^gtk-font-name/s/^gtk-font-name\s*=\s*//p' "$config")"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"

View file

@ -38,6 +38,6 @@ fi
notify-send -t 3000 "mp3dl" "Downloading $url..."
youtube-dl -x --audio-format mp3 --no-playlist -o "$dest/%(title)s.%(ext)s" "$url" 2>&1 \
youtube-dl -x --audio-format mp3 --no-playlist --add-metadata -o "$dest/%(title)s.%(ext)s" "$url" 2>&1 \
| grep 'ERROR:' \
| notify_err

View file

@ -15,4 +15,4 @@ if [ "$1" = "-l" ]; then
quality=360
fi
mpv --ytdl-format="bestvideo[height<=?$quality]+bestaudio/best" "$1" 2>&1 | grep 'ERROR:' | notify_err
mpv --ytdl-format="bestvideo[height<=?$quality]+bestaudio/best" "$@" 2>&1 | grep 'ERROR:' | notify_err

View file

@ -41,7 +41,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing window manager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 30
transparency = 20
# The height of the entire notification. If the height is smaller
# than the font height and padding combined, it will be raised

View file

@ -34,7 +34,18 @@ set $ws8 "8:8"
set $ws9 "9:9"
set $ws10 "10:10"
# Your preferred terminal emulator
set $term kitty --single-instance
set $term kitty --single-instance --instance-group i3
# Other utilities
set $backlightinc light -A 5
set $backlightdec light -U 5
set $volinc volcont --up
set $voldec volcont --down
set $voltog volcont --toggle
set $cliplumber cliplumber
set $mpdtoggle mpc toggle
set $mpdnext mpc next
set $mpdprev mpc prev
# Font for window titles and bar
font pango:Hack 8
@ -60,7 +71,7 @@ client.background $base07
# Basics:
# exit i3/sway
bindsym $mod+Shift+e exec $exit
bindsym $mod+Shift+q exec $exit
# lock session
bindsym Mod4+l exec $lock
@ -72,12 +83,24 @@ client.background $base07
bindsym $mod+Return exec $term
# call clipboard plumber
bindsym $mod+v exec cliplumber
bindsym $mod+v exec $cliplumber
# volume control
bindsym XF86AudioRaiseVolume exec amixer -q set Master 1%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q set Master 1%- unmute
bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym XF86AudioRaiseVolume exec $volinc
bindsym XF86AudioLowerVolume exec $voldec
bindsym XF86AudioMute exec $voltog
# MPD control
bindsym $mod+greater exec $mpdnext
bindsym $mod+less exec $mpdprev
bindsym $mod+p exec $mpdtoggle
bindsym XF86AudioNext exec $mpdnext
bindsym XF86AudioPrev exec $mpdprev
bindsym XF86AudioPlay exec $mpdtoggle
# brightness control (using Super because MSI weirdness)
bindsym Mod4+Up exec $backlightinc
bindsym Mod4+Down exec $backlightdec
# reload the configuration file
bindsym $mod+Shift+r reload
@ -208,6 +231,9 @@ bindsym $mod+Ctrl+$down resize grow height 5 px or 5 ppt
bindsym $mod+Ctrl+$up resize shrink height 5 px or 5 ppt
bindsym $mod+Ctrl+$right resize grow width 5 px or 5 ppt
# App specific settings
for_window [class="mpv"] floating enable
### Status Bar
#
# Read `man 5 sway-bar` for more information about this section.

View file

@ -269,3 +269,6 @@ set $lock i3lock -c 000000
# Application launcher
set $menu dmenu_run
# App specific settings
for_window [class="mpv"] floating enable

View file

@ -1,2 +1,3 @@
# Download current video as mp3 using youtube-dl
g-d run mp3dl ${path}
#y-y run yank url

View file

@ -5,6 +5,6 @@ set postponed = "+$my_account/Draft"
set trash = "+$my_account/Trash"
macro index,pager gs "<shell-escape>mbsync $my_mbsync_conf $my_account<enter>" "IMAP sync account"
macro index,pager gi "<shell-escape>mbsync $my_mbsync_conf $my_account:Inbox<enter>" "IMAP sync Inbox"
macro index,pager gi "<shell-escape>mbsync $my_mbsync_conf $my_account:INBOX<enter>" "IMAP sync Inbox"
# vim: syntax=neomuttrc

View file

@ -65,7 +65,7 @@ unignore Organization X-Label X-Mailer User-Agent
# Compose #
###########
# https://www.zigg.com/2018/natalie-nguyen.html
my_hdr X-Clacks-Overhead: GNU Laura, Natalie Nguyen, Terry Pratchett
my_hdr X-Clacks-Overhead: GNU Elise Nodel, Laura, Natalie Nguyen, Terry Pratchett
set use_from # set a From: header
set use_envelope_from # which from?
set sig_dashes # dashes before sig

View file

@ -69,7 +69,8 @@ bind index,pager \Cf vfolder-from-query
bind index,pager z entire-thread
# Addresses autocompetion using notmuch
# https://github.com/neomutt/neomutt/issues/629
set query_command = "notmuch address from:%s"
# https://github.com/neomutt/neomutt/issues/1333
set query_command = "echo '' && notmuch address from:%s"
bind editor <Tab> complete-query
bind editor ^T complete
set query_format="%4c %t %-70.70a %-70.70n %?e?(%e)?"

5
config/pipe-viewer/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
cli-history.txt
gtk-history.txt
instances.json
session.dat
users.txt

View file

@ -0,0 +1,91 @@
#!/usr/bin/perl
# GTK+ Pipe Viewer 0.0.5 - configuration file
our $CONFIG = {
active_channel_type_combobox => 0,
active_more_options_expander => 0,
active_panel_account_combobox => 0,
active_resolution_combobox => 4,
active_subscriptions_order_combobox => 0,
api_host => "auto",
audio_only => 0,
auto_captions => 0,
autoscroll_to_end => 0,
cache_dir => "$ENV{HOME}/.cache/pipe-viewer",
clear_search_list => 1,
clear_text_entries_on_click => 0,
comments_order => "top",
comments_width => 80,
cookie_file => undef,
dash => 1,
debug => 0,
default_notebook_page => 1,
downloads_dir => ".",
entry_completion_limit => 10,
env_proxy => 1,
fullscreen => 0,
get_captions => 1,
hfr => 1,
history => 1,
history_file => "$ENV{HOME}/.config/pipe-viewer/gtk-history.txt",
history_limit => 100000,
hpaned_position => 1152,
hpaned_width => 250,
http_proxy => undef,
ignore_av1 => 0,
m4a_audio => 1,
mainw_centered => 0,
mainw_fullscreen => 0,
mainw_maximized => 0,
mainw_size => "1920x1061",
maxResults => 10,
pipe_viewer => "/usr/bin/pipe-viewer",
pipe_viewer_args => [],
prefer_av1 => 0,
prefer_fork => 0,
prefer_mp4 => 0,
recent_history => 10,
region => undef,
remember_session => 1,
remember_session_depth => 10,
resolution => 720,
save_titles_to_history => 0,
show_thumbs => 1,
split_videos => 1,
srt_languages => ["en", "fr"],
terminal => "/usr/bin/fbterm",
terminal_exec => "-e '%s'",
thousand_separator => ",",
thumbnail_type => "medium",
timeout => undef,
tooltip_max_len => 512,
tooltips => 1,
user_agent => undef,
video_player_selected => "mpv",
video_players => {
mpv => {
arg => "--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*",
audio => "--audio-file=*AUDIO*",
cmd => "/usr/bin/mpv",
fs => "--fullscreen",
srt => "--sub-file=*SUB*",
},
vlc => {
arg => "--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE* *VIDEO*",
audio => "--input-slave=*AUDIO*",
cmd => "vlc",
fs => "--fullscreen",
srt => "--sub-file=*SUB*",
},
},
videoDimension => undef,
videoLicense => undef,
web_browser => undef,
youtube_channel_url => "https://www.youtube.com/channel/%s",
youtube_playlist_url => "https://www.youtube.com/playlist?list=%s",
youtube_users_file => "$ENV{HOME}/.config/pipe-viewer/users.txt",
youtube_video_url => "https://www.youtube.com/watch?v=%s",
ytdl => 1,
ytdl_cmd => "/usr/bin/youtube-dl",
}

View file

@ -0,0 +1,117 @@
#!/usr/bin/perl
# CLI Pipe Viewer 0.0.7 - configuration file
our $CONFIG = {
api_host => "auto",
auto_captions => 0,
autoplay_mode => 0,
cache_dir => "$ENV{HOME}/.cache/pipe-viewer",
colors => 1,
comments_order => "top",
confirm => 0,
convert_cmd => "ffmpeg -i *IN* *OUT*",
convert_to => undef,
cookie_file => undef,
copy_caption => 0,
custom_channel_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*AUTHOR*", width => "55%" },
{ align => "right", color => "green", text => "*VIDEOS* videos", width => 14 },
{
align => "right",
color => "green",
text => "*SUBS_SHORT* subs",
width => 10,
},
],
custom_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*TITLE*", width => "55%" },
{ align => "left", color => "yellow", text => "*AUTHOR*", width => "15%" },
{ align => "right", color => "green", text => "*AGE_SHORT*", width => 3 },
{ align => "right", color => "green", text => "*VIEWS_SHORT*", width => 5 },
{ align => "right", color => "blue", text => "*TIME*", width => 8 },
],
custom_playlist_layout_format => [
{ align => "right", color => "bold", text => "*NO*.", width => 3 },
{ align => "left", color => "bold blue", text => "*TITLE*", width => "55%" },
{ align => "right", color => "green", text => "*ITEMS* videos", width => 14 },
{ align => "left", color => "magenta", text => "*AUTHOR*", width => "20%" },
],
dash => 1,
date => undef,
debug => 0,
download_and_play => 0,
download_with_wget => 1,
downloads_dir => ".",
env_proxy => 1,
fat32safe => 0,
ffmpeg_cmd => "/usr/bin/ffmpeg",
fullscreen => 0,
get_captions => 1,
get_term_width => 1,
hfr => 1,
highlight_color => "bold",
highlight_watched => 1,
history => 1,
history_file => "$ENV{HOME}/.config/pipe-viewer/cli-history.txt",
history_limit => 100000,
http_proxy => undef,
ignore_av1 => 0,
interactive => 1,
keep_original_video => 0,
m4a_audio => 1,
maxResults => 20,
merge_into_mkv => 1,
merge_into_mkv_args => "-loglevel warning -c:s srt -c:v copy -c:a copy -disposition:s forced",
merge_with_captions => 1,
order => undef,
page => 1,
prefer_av1 => 0,
prefer_invidious => 0,
prefer_mp4 => 0,
region => undef,
remember_watched => 0,
remove_played_file => 0,
resolution => "720p",
show_video_info => 1,
skip_if_exists => 1,
skip_watched => 0,
split_videos => 1,
srt_languages => ["en", "fr"],
subscriptions_order => "relevance",
thousand_separator => ",",
timeout => undef,
user_agent => undef,
video_filename_format => "*FTITLE* - *ID*.*FORMAT*",
video_player_selected => "mpv",
video_players => {
mpv => {
arg => "--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*",
audio => "--audio-file=*AUDIO*",
cmd => "/usr/bin/mpv",
fs => "--fullscreen",
novideo => "--no-video",
srt => "--sub-file=*SUB*",
},
vlc => {
arg => "--quiet --play-and-exit --no-video-title-show --input-title-format=*TITLE* *VIDEO*",
audio => "--input-slave=*AUDIO*",
cmd => "vlc",
fs => "--fullscreen",
novideo => "--intf=dummy --novideo",
srt => "--sub-file=*SUB*",
},
},
videoCaption => undef,
videoDefinition => undef,
videoDimension => undef,
videoDuration => undef,
videoLicense => undef,
watched_file => "$ENV{HOME}/.config/pipe-viewer/watched.txt",
wget_cmd => "/usr/bin/wget",
youtube_video_url => "https://www.youtube.com/watch?v=%s",
ytdl => 1,
ytdl_cmd => "/usr/bin/youtube-dl",
}

View file

@ -7,7 +7,7 @@
include ../i3/common
# exit sway (logs you out of your Wayland session)
set $exit swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
set $exit swaymsg exit
# Screen locker
set $lock swaylock -f -c 000000
@ -16,17 +16,28 @@ set $lock swaylock -f -c 000000
# Note: it's recommended that you pass the final command to sway
set $menu dmenu_path | bemenu | xargs swaymsg exec --
# App specific settings
for_window [app_id="mpv"] floating enable
# Default wallpaper
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
# Apps autostart (run on each config reload)
exec_always {
import-gsettings
}
# Set keyboard layout
input * xkb_layout fr,ru
input * xkb_variant ,phonetic
input * xkb_layout fr,ru,fr
input * xkb_variant oss,phonetic,bepo
input * xkb_options grp:shift_caps_toggle
input * xkb_numlock enable
# Configure touchpad
input * tap enabled
# Configure touchpad (man 5 sway-input)
input type:touchpad {
tap enabled
tap_button_map lmr
}
############
# Examples #

View file

@ -2,6 +2,8 @@
defaultBranch = dev
[core]
excludesfile = ~/.gitignore_global
[user]
useConfigOnly = true
[include]
path = ~/.git_user
[master]

View file

@ -1,3 +1,3 @@
text/html; unshare -n -r w3m -I %{charset} -T text/html; copiousoutput;
image/*; mutt_bgrun /usr/bin/feh --action1 ";dragon -x '\%F'" -. %s; test=test -n "$DISPLAY"
image/*; mutt_bgrun /usr/bin/feh -. %s; test=test -n "$DISPLAY"
application/pdf; mutt_bgrun /usr/bin/zathura %s; test=test -n "$DISPLAY"

View file

@ -21,8 +21,8 @@ noremap W <C-w><C-w>
noremap c h
noremap r l
" {ts} = « haut / bas »
noremap t j
noremap s k
map t j
map s k
" {CR} = « haut / bas de l'écran »
noremap C H
noremap R L
@ -72,10 +72,10 @@ noremap » >
" Remaper la gestion des fenêtres
" ———————————————————————————————
noremap wt <C-w>j
noremap ws <C-w>k
noremap wc <C-w>h
noremap wr <C-w>l
nmap <C-t> <C-j>
nmap <C-s> <C-k>
nmap <C-c> <C-h>
nmap <C-r> <C-l>
noremap wd <C-w>c
noremap wo <C-w>s
noremap wp <C-w>o

2
vimrc
View file

@ -343,5 +343,5 @@ endif " has("autocmd")
" Enable bépo layout if detected
silent call system("detectbepo")
if v:shell_error == 0
source ~/.vim/bepo.rc
source ~/.vim/bepo.vim
endif