diff --git a/bashrc b/bashrc index 8544d4c..e554993 100644 --- a/bashrc +++ b/bashrc @@ -6,8 +6,8 @@ # Favourite commands export PAGER=less -export EDITOR=vim -export VISUAL=vim +export EDITOR=nvim +export VISUAL=nvim export BROWSER=qutebrowser # Some programs need those changes diff --git a/config/autorandr/bg b/config/autorandr/bg new file mode 100644 index 0000000..a23f010 --- /dev/null +++ b/config/autorandr/bg @@ -0,0 +1,3 @@ +# Derivate of these ones https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-230622.png +https://geoffrey.frogeye.fr/files/backgrounds/VertBleu.png +# https://geoffrey.frogeye.fr/files/backgrounds/BleuVert.png diff --git a/config/autorandr/postswitch b/config/autorandr/postswitch index 0647836..28d08f5 100755 --- a/config/autorandr/postswitch +++ b/config/autorandr/postswitch @@ -1,10 +1,26 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +# From https://stackoverflow.com/a/246128 + # Relaunch the bars # i3-msg exec ~/.config/polybar/launch.sh # TODO Make something better with that i3-msg exec ~/.config/lemonbar/launch.sh # Resize background -feh --bg-fill ~/.config/i3/bg.jpg +BGDIR="$HOME/.cache/background" +mkdir -p "$BGDIR" + +list="$DIR/bg" +url="$(cat "$list" | sed -e 's/#.*$//' -e 's/ \+$//' -e '/^$/d' | sort -R | head -1)" + +hash="$(printf "$url" | md5sum | cut -f1 -d' ')" +filepath="$BGDIR/$hash" + +if [ ! -e "$filepath" ]; then + wget -c "$url" -O "$filepath" +fi + +feh --bg-fill "$filepath" diff --git a/config/i3/bg.jpg b/config/i3/bg.jpg deleted file mode 100644 index 78ed2e5..0000000 Binary files a/config/i3/bg.jpg and /dev/null differ diff --git a/config/i3/config b/config/i3/config index dee99d7..db37a6f 100644 --- a/config/i3/config +++ b/config/i3/config @@ -38,8 +38,8 @@ bindsym $mod+z kill bindsym button2 kill bindsym $mod+c exec --no-startup-id rofi-pass --last-used -bindsym $mod+asterisk exec --no-startup-id rofi -modi ssh -show ssh -bindsym $mod+dollar exec --no-startup-id rofi -modi ssh -show ssh -ssh-command '{terminal} -e {ssh-client} {host} -t "sudo -s -E"' +bindsym $mod+plus exec --no-startup-id rofi -modi ssh -show ssh +bindsym $mod+ù exec --no-startup-id rofi -modi ssh -show ssh -ssh-command '{terminal} -e {ssh-client} {host} -t "sudo -s -E"' bindsym $mod+Tab exec --no-startup-id rofi -modi window -show window # start program launcher @@ -48,6 +48,7 @@ bindsym $mod+Shift+d exec --no-startup-id rofi -modi drun -show drun # Start Applications bindsym $mod+Return exec urxvtc +bindsym $mod+Shift+Return exec urxvt bindsym $mod+p exec thunar bindsym $mod+m exec qutebrowser --override-restore --backend=webengine @@ -64,8 +65,8 @@ bindsym $mod+F11 exec urxvtc -e 'pacmixer' bindsym $mod+F12 exec urxvtc -e 'pacmixer' #Brightness control -bindsym XF86MonBrightnessDown exec xbacklight -dec 20 -time 0 -bindsym XF86MonBrightnessUp exec xbacklight -inc 20 -time 0 +bindsym XF86MonBrightnessDown exec xbacklight -dec 5 -time 0 +bindsym XF86MonBrightnessUp exec xbacklight -inc 5 -time 0 # Screenshots bindsym Print exec scrot -ue 'mv $f ~/Screenshots/' diff --git a/config/lemonbar/bar.py b/config/lemonbar/bar.py index 12902ab..b4585fc 100755 --- a/config/lemonbar/bar.py +++ b/config/lemonbar/bar.py @@ -1,5 +1,4 @@ #!/usr/bin/env python3 - from providers import * # TODO If multiple screen, expand the sections and share them diff --git a/config/lemonbar/providers.py b/config/lemonbar/providers.py index bd26bcd..a7aec71 100755 --- a/config/lemonbar/providers.py +++ b/config/lemonbar/providers.py @@ -223,6 +223,8 @@ class PulseaudioProvider(StatefulSection, ThreadedUpdater): icon = "" elif sink.port_active.name == "analog-output-speaker": icon = "" if sink.mute else "" + elif sink.port_active.name == "headset-output": + icon = '' else: icon = "?" vol = pulse.volume_get_all_chans(sink) @@ -265,7 +267,7 @@ class NetworkProviderSection(StatefulSection, Updater): self.icon = '' else: self.icon = '' - elif self.iface.startswith('wlan') or self.iface.startswith('wlp'): + elif self.iface.startswith('wlan') or self.iface.startswith('wl'): self.icon = '' if self.showSsid: cmd = ["iwgetid", self.iface, "--raw"] diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf index 8b81368..dc2f3cd 100644 --- a/config/mpd/mpd.conf +++ b/config/mpd/mpd.conf @@ -10,7 +10,7 @@ # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # -music_directory "~/Musique" +music_directory "~/Musiques" # # This setting sets the MPD internal playlist directory. The purpose of this # directory is storage for playlists created by MPD. The server will use diff --git a/config/qutebrowser/config.py b/config/qutebrowser/config.py index bd367eb..f2e0515 100644 --- a/config/qutebrowser/config.py +++ b/config/qutebrowser/config.py @@ -83,7 +83,8 @@ config.bind('T', None) import os dirname = os.path.dirname(__file__) filename = os.path.join(dirname, 'theme.py') -exec(open(filename).read()) +with open(filename) as file: + exec(file.read()) # Uncomment this to still load settings configured via autoconfig.yml config.load_autoconfig() diff --git a/config/systemd/user/default.target.wants/offlineimap.service b/config/systemd/user/default.target.wants/offlineimap.service deleted file mode 120000 index aacc641..0000000 --- a/config/systemd/user/default.target.wants/offlineimap.service +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/systemd/user/offlineimap.service \ No newline at end of file diff --git a/gitconfig b/gitconfig index 0dac09d..1652cad 100644 --- a/gitconfig +++ b/gitconfig @@ -3,7 +3,7 @@ email = geoffrey@frogeye.fr signingkey = D8A7ECA00A8CD3DD [core] - editor = vim + editor = nvim excludesfile = ~/.gitignore [push] default = matching diff --git a/scripts/changeColors b/scripts/changeColors index 8ad9fb0..5dc7110 100755 --- a/scripts/changeColors +++ b/scripts/changeColors @@ -20,7 +20,7 @@ chmod +x ~/.local/bin/colorSchemeApply curl "https://raw.githubusercontent.com/chriskempson/base16-xresources/master/xresources/base16-${scheme}-256.Xresources" > ~/.Xresources.d/theme # Vim -echo -e "let base16colorspace=256\nset termguicolors\ncolorscheme base16-${scheme}" > ~/.vim/colorscheme.vim +echo -e "let base16colorspace=256\n\"set termguicolors\ncolorscheme base16-${scheme}" > ~/.vim/colorscheme.vim # FZF curl "https://raw.githubusercontent.com/nicodebo/base16-fzf/master/bash/base16-${scheme}.config" > ~/.local/bin/colorSchemeApplyFzf diff --git a/scripts/install-arch b/scripts/install-arch index cf083aa..537e0ee 100755 --- a/scripts/install-arch +++ b/scripts/install-arch @@ -59,14 +59,18 @@ inst wget pacman -Q aurman &> /dev/null if [[ $AURMAN == 1 && $? == 1 ]]; then + gpg --recv-keys 465022E743D71E39 installPKGBUILD "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=aurman" fi # Git for /etc inst etckeeper sudo etckeeper init +(cd /etc/; sudo git config user.name "etckeeper on $(cat /etc/hostname)"; sudo git config user.email "etckeeper@$(cat /etc/hostname)") sudo etckeeper commit "~/.dotfiles/scripts/install-arch commit" + + # Uninstall Manjaro's pamac if pacman -Q pamac &> /dev/null ; then sudo pacman -Rsc pamac --noconfirm diff --git a/scripts/install-prefs b/scripts/install-prefs index 0cca79e..3c6ea44 100755 --- a/scripts/install-prefs +++ b/scripts/install-prefs @@ -175,8 +175,8 @@ function altInst { } function systemdUserUnit { - systemctl enable "$1" - systemctl start "$1" + systemctl --user enable "$1" + systemctl --user start "$1" } # Common CLI @@ -233,7 +233,7 @@ if [ $GUI == 1 ]; then # Desktop manager inst dunst feh i3-wm i3lock numlockx qutebrowser rofi rxvt-unicode scrot trayer unclutter xautolock xclip if [ $ARCH == 1 ]; then - inst xorg-xinit xorg-backlight + inst xorg-xinit xorg-xbacklight altInst lemonbar-xft-git autorandr-git keynav-enhanced pacmixer rofi-pass elif [ $DEBIAN == 1 ]; then # TODO autorandr pacmixer rofi-pass @@ -261,10 +261,11 @@ if [ $EXTRA == 1 ]; then fi # Extra CLI - inst ffmpeg optipng syncthing mutt jq + inst ffmpeg optipng syncthing mutt notmuch mbsync jq + inst unzip unrar jdupes bedup systemdUserUnit syncthing if [ $ARCH == 1 ]; then - insta pandoc youtube-dl translate-shell + insta pandoc youtube-dl translate-shell imagemagick altInst insect pdftk visidata # Orga diff --git a/scripts/machines b/scripts/machines index a99aca5..fbc6b51 100755 --- a/scripts/machines +++ b/scripts/machines @@ -52,7 +52,7 @@ function _machines-api { wget $MACHINES_API/$route --content-on-error --quiet --output-document=- "$@" result=$? if [ $result != 0 ]; then - echo "[ERROR] wget returned $result..." 1>&2; + echo "[ERROR] wget returned $result for route $route" 1>&2; exit 2 fi } diff --git a/xprofile b/xprofile index 0a6e061..0b821e2 100755 --- a/xprofile +++ b/xprofile @@ -8,7 +8,6 @@ [ -f ~/.Xresources ] && xrdb ~/.Xresources -setxkbmap fr oss xset b off export GTK2_RC_FILES="$HOME/.gtkrc-2.0"