From 0e2d387565cb03c41cef33b9ff01eac5a5cb9132 Mon Sep 17 00:00:00 2001 From: marcellus Date: Thu, 14 Sep 2023 22:26:17 +0200 Subject: update: general changes, read the diff --- scripts/icstocal | 3 +- scripts/lfub | 23 ++++++ scripts/plumber | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/rotdir | 13 ++++ 4 files changed, 247 insertions(+), 1 deletion(-) create mode 100755 scripts/lfub create mode 100755 scripts/plumber create mode 100644 scripts/rotdir (limited to 'scripts') diff --git a/scripts/icstocal b/scripts/icstocal index 3d086ca..9bff2be 100755 --- a/scripts/icstocal +++ b/scripts/icstocal @@ -68,7 +68,8 @@ while line != "END:VCALENDAR\n": starts.append([year, month, day, hour, min]) elif line.startswith("DTEND"): end = line.lstrip("DTEND") - while start[n] != ":": + n = 0 + while end[n] != ":": n+=1 hour = "" min = "" diff --git a/scripts/lfub b/scripts/lfub new file mode 100755 index 0000000..0d8b7fe --- /dev/null +++ b/scripts/lfub @@ -0,0 +1,23 @@ +#!/bin/sh +# This is a wrapper script for lf that allows it to create image previews with +# ueberzug. This works in concert with the lf configuration file and the +# lf-cleaner script. + +set -e + +cleanup() { + exec 3>&- + rm "$FIFO_UEBERZUG" +} + +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + lf "$@" +else + [ ! -d "$XDG_CACHE_HOME/lf" ] && mkdir -p "$XDG_CACHE_HOME/lf" + export FIFO_UEBERZUG="$XDG_CACHE_HOME/lf/ueberzug-$$" + mkfifo "$FIFO_UEBERZUG" + ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + exec 3>"$FIFO_UEBERZUG" + trap cleanup HUP INT QUIT TERM PWR EXIT + lf "$@" 3>&- +fi diff --git a/scripts/plumber b/scripts/plumber new file mode 100755 index 0000000..b6931a1 --- /dev/null +++ b/scripts/plumber @@ -0,0 +1,209 @@ +#!/bin/sh +# Copywrong © 2023 Ratakor. Under ISC License. +# plumber 🪠 +# dependencies: +# - default programs +# - xdo +# - xclip or xsel +# - (optional) herbe and dmenusearch web +# - (optional) dmenu_path +# - (optional) st with plumber patch +# shellcheck disable=SC2086 + +# default programs +WEB="xdg-open" +TEXT="$TERMINAL -e $EDITOR" +VIDEO="mpv --ytdl-format=22 --loop" +AUDIO="music --shuffle" +PIC="nsxiv -a" +DOC="zathura" +DIR="$TERMINAL -e lfub" + +openlink() { + case "$1" in + *.mkv|*.webm|*.mp4|*.mov|*youtube.com/watch*|*youtube.com/playlist*|\ + *youtube.com/shorts*|*youtu.be*|*inv*/playlist*|*inv*/watch*) + setsid -f $VIDEO "$1" >/dev/null 2>&1 ;; + *.mp3|*.flac|*.opus|*mp3?source*|*.ogg|*.wav|*soundcloud.com*) + setsid -f $AUDIO "$1" >/dev/null 2>&1 ;; + *.png|*.jpg|*.jpeg|*.gif|*.webp) + file=$(printf '%s' "$1" | sed "s/.*\///;s/%20/ /g") + curl -sL "$1" > "/tmp/$file" && + $PIC "/tmp/$file" >/dev/null 2>&1 & ;; + *.pdf|*.ps|*.cbz|*.cbr|*.djvu|*.epub) + file=$(printf '%s' "$1" | sed "s/.*\///;s/%20/ /g") + curl -sL "$1" > "/tmp/$file" && + $DOC "/tmp/$file" >/dev/null 2>&1 & ;; + *wp.com/stonetoss.com*) + file=$(printf '%s' "${1%"?resize=150%2C150&ssl=1"}" |\ + sed "s/.*\///;s/%20/ /g") + curl -sL "${1%"?resize=150%2C150&ssl=1"}" > "/tmp/$file" && + $PIC "/tmp/$file" >/dev/null 2>&1 & ;; + git://*|git@*|*.git) + "$TERMINAL" -e git clone "$1" ;; + *) + setsid -f $WEB "$1" >/dev/null 2>&1 ;; + esac +} + +openfile() { + if [ -d "$1" ]; then + setsid -f $DIR "$1" >/dev/null 2>&1 + return + fi + + if [ ! -f "$1" ]; then + printf '\033[31mError:\033[m %s is not a valid file\n' "$1" >&2 + return 1 + fi + + case "$1" in + *.mkv|*.webm|*.mp4|*.mov) + setsid -f $VIDEO "$1" >/dev/null 2>&1 ;; + *.mp3|*.flac|*.opus|*.ogg|*.wav) + setsid -f $AUDIO "$1" >/dev/null 2>&1 ;; + *.png|*.jpg|*.jpeg|*.gif|*.webp) + setsid -f $PIC "$1" >/dev/null 2>&1 ;; + *.pdf|*.ps|*.cbz|*.cbr|*.djvu|*.epub) + setsid -f $DOC "$1" >/dev/null 2>&1 ;; + *) + setsid -f $TEXT "$1" >/dev/null 2>&1 ;; + esac +} + +checksel() { + case "$1" in + http://*|https://*|irc://*|ircs://*|git://*|git@*) + openlink "$1" ;; + /*) + opensel "$1" "$1" ;; + + *) + pid=$(pstree -lpA "$(xdo pid)" | tail -n 1 |\ + awk -F '---' '{print $NF}' | sed -re 's/[^0-9]//g') + opensel "$(readlink "/proc/$pid/cwd")/$1" "$1" ;; + esac +} + +opensel() { + if [ -d "$1" ]; then + case $1 in + "$XDG_MUSIC_DIR"/*) + setsid -f $AUDIO "$1" >/dev/null 2>&1 ;; + *) + xdo kill + $TERMINAL -e sh -c "cd $1; $SHELL" ;; + esac + return + fi + + if [ ! -f "$1" ]; then + progname=${2%\ *} + for prog in $(dmenu_path); do + case $prog in + "$progname") + $TERMINAL -e sh -c\ + "cd ${1%"$2"}; echo \$ $2; $2; $SHELL" + return ;; + esac + done + herbe "Do you want to search for '$2' ?" && dmenusearch web "$2" + return + fi + + case "$1" in + *.mkv|*.webm|*.mp4|*.mov) + setsid -f $VIDEO "$1" >/dev/null 2>&1 ;; + *.mp3|*.flac|*.opus|*.ogg|*.wav) + setsid -f $AUDIO "$1" >/dev/null 2>&1 ;; + *.png|*.jpg|*.jpeg|*.gif|*.webp) + setsid -f $PIC "$1" >/dev/null 2>&1 ;; + *.pdf|*.ps|*.cbz|*.cbr|*.djvu|*.epub) + setsid -f $DOC "$1" >/dev/null 2>&1 ;; + *) + pid=$(xdo pid) + xdo hide -p "$pid" + $TEXT "$1" >/dev/null 2>&1 + xdo show -p "$pid" ;; + esac +} + + +usage() { + cat << EOF >&2 +Usage: ${0##*/} [options] [arg] + +Options: + no option [arg] | Try to guess what to do + -l|--link [link] | Open the link + -f|--file [file] | Open the file or the folder + -s|--sel | Use the selection buffer instead, Plan9's way + -t|--term | To be used only when invoking through a patched st + -h|--help │ Print this help message + +Config: + browser = $WEB + editor = $TEXT + video = $VIDEO + audio = $AUDIO + picture = $PIC + document = $DOC + file manager = $DIR +EOF +} + +main() { + case "$1" in + -l|--link) + if [ -z "$2" ]; then + printf '\033[31mError:\033[m no argument given\n' >&2 + usage + return 1 + fi + openlink "$2" ;; + -f|--file) + if [ -z "$2" ]; then + printf '\033[31mError:\033[m no argument given\n' >&2 + usage + return 1 + fi + openfile "$2" ;; + -s|--sel|'') + sel=$(xclip -o -sel 2>/dev/null || xsel -opn 2>/dev/null) + sel=${sel#"${sel%%[![:space:]]*}"} + + # clear clipboard + true | xclip 2>/dev/null || true | xsel 2>/dev/null + + if [ -z "$sel" ]; then + printf '\033[31mError:\033[m selection buffer is empty\n' >&2 + usage + return 1 + fi + + checksel "$sel" ;; + -t|--term) + #if [ "$(ps -o comm= $PPID)" != "st" ]; then + # printf '\033[31mError:\033[m --term option used outside of st\n' >&2 + # usage + # return 1 + #fi + [ -n "$2" ] && checksel "$2" ;; + -h|--help) + usage + return 0 ;; + -*) + printf '\033[31mError:\033[m unknown option\n' >&2 + usage + return 1 ;; + *) + case "$1" in + http://*|https://*|git://*|irc://*|ircs://*) + openlink "$1" ;; + *) + openfile "$1" ;; + esac + esac +} + +main "$@" diff --git a/scripts/rotdir b/scripts/rotdir new file mode 100644 index 0000000..3b3f39d --- /dev/null +++ b/scripts/rotdir @@ -0,0 +1,13 @@ +#!/bin/sh + +# When I open an image from the file manager in sxiv (the image viewer), I want +# to be able to press the next/previous keys to key through the rest of the +# images in the same directory. This script "rotates" the content of a +# directory based on the first chosen file, so that if I open the 15th image, +# if I press next, it will go to the 16th etc. Autistic, I know, but this is +# one of the reasons that sxiv is great for being able to read standard input. +# ^ this is Luke's toughts and I approve them + +[ -z "$1" ] && echo "usage: rotdir regex 2>&1" && exit 1 +base="$(basename "$1")" +ls "$PWD" | awk -v BASE="$base" 'BEGIN { lines = ""; m = 0; } { if ($0 == BASE) { m = 1; } } { if (!m) { if (lines) { lines = lines"\n"; } lines = lines""$0; } else { print $0; } } END { print lines; }' -- cgit v1.2.3 From 1b7402b9e0d623cab9284aada81fb5429cf662e7 Mon Sep 17 00:00:00 2001 From: marcellus Date: Thu, 2 Nov 2023 19:56:27 +0100 Subject: various --- .gitignore | 5 +++ crontab | 4 +- dwmblocks/config | 2 +- picom/picom.conf | 2 +- redshift/redshift.conf | 70 +++++++++++++++++++++++++++++ scripts/rotdir | 0 scripts/ytdl | 22 ++++----- sx/sxrc | 7 ++- sxhkd/sxhkdrc | 10 ++++- wallpapers/SFW/guitar/wallhaven-0pjzxm.jpg | Bin 0 -> 82874 bytes wallpapers/SFW/guitar/wallhaven-0w78p6.jpg | Bin 0 -> 504584 bytes wallpapers/SFW/guitar/wallhaven-4olmom.png | Bin 0 -> 73985 bytes wallpapers/SFW/guitar/wallhaven-5w38p7.jpg | Bin 0 -> 945106 bytes wallpapers/SFW/guitar/wallhaven-nzq17v.jpg | Bin 0 -> 208787 bytes wallpapers/SFW/memes/Kmm7WsF_d.jpg | Bin 0 -> 56384 bytes wallpapers/SFW/planes/shuttle.jpg | Bin 0 -> 35409 bytes zsh/.zprofile | 3 ++ zsh/.zshenv | 3 ++ zsh/.zshrc | 19 ++++---- zsh/gitHelp | 15 +++++++ 20 files changed, 133 insertions(+), 29 deletions(-) create mode 100644 redshift/redshift.conf mode change 100644 => 100755 scripts/rotdir create mode 100644 wallpapers/SFW/guitar/wallhaven-0pjzxm.jpg create mode 100644 wallpapers/SFW/guitar/wallhaven-0w78p6.jpg create mode 100644 wallpapers/SFW/guitar/wallhaven-4olmom.png create mode 100644 wallpapers/SFW/guitar/wallhaven-5w38p7.jpg create mode 100644 wallpapers/SFW/guitar/wallhaven-nzq17v.jpg create mode 100644 wallpapers/SFW/memes/Kmm7WsF_d.jpg create mode 100644 wallpapers/SFW/planes/shuttle.jpg create mode 100644 zsh/gitHelp (limited to 'scripts') diff --git a/.gitignore b/.gitignore index 122c843..8a7218e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,9 @@ ## uninteresting configs +PCSX2/ +geany/ +supertuxkart/ +trizen/ +unity3d/ pulse/ var/ JetBrains/ diff --git a/crontab b/crontab index 0197eb0..6f68ce5 100644 --- a/crontab +++ b/crontab @@ -1,2 +1,2 @@ -1/10 * * * * kill -52 $(pidof dwmblocks); randwp -1/30 * * * * kill -49 $(pidof dwmblocks) +0,10,20,30,40,50 * * * * kill -52 $(pidof dwmblocks); randwp +30 * * * * kill -49 $(pidof dwmblocks) diff --git a/dwmblocks/config b/dwmblocks/config index dc92fe0..76138b7 100644 --- a/dwmblocks/config +++ b/dwmblocks/config @@ -12,7 +12,7 @@ volume = true // 44 mic = false // 45 news = false // 46 mail = false // 47 -weather = true// 48 +weather = false // 48 daypercent = false // 49 date = true // 50 time = true // 51 diff --git a/picom/picom.conf b/picom/picom.conf index a5392f6..573f1d6 100644 --- a/picom/picom.conf +++ b/picom/picom.conf @@ -131,7 +131,7 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # Note we don't make any guarantee about possible conflicts with other # programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. # example: -opacity-rule = [ "100:class_g= 'mpv'" ]; +opacity-rule = [ "100:class_g= 'mpv'", "95:name *= 'librewolf'" ]; # opacity-rule = [] diff --git a/redshift/redshift.conf b/redshift/redshift.conf new file mode 100644 index 0000000..9ad4cce --- /dev/null +++ b/redshift/redshift.conf @@ -0,0 +1,70 @@ +; Global settings for redshift +[redshift] +; Set the day and night screen temperatures +temp-day=5700 +temp-night=3500 + +; Disable the smooth fade between temperatures when Redshift starts and stops. +; 0 will cause an immediate change between screen temperatures. +; 1 will gradually apply the new screen temperature over a couple of seconds. +fade=1 + +; Solar elevation thresholds. +; By default, Redshift will use the current elevation of the sun to determine +; whether it is daytime, night or in transition (dawn/dusk). When the sun is +; above the degrees specified with elevation-high it is considered daytime and +; below elevation-low it is considered night. +;elevation-high=3 +;elevation-low=-6 + +; Custom dawn/dusk intervals. +; Instead of using the solar elevation, the time intervals of dawn and dusk +; can be specified manually. The times must be specified as HH:MM in 24-hour +; format. +;dawn-time=6:00-7:45 +;dusk-time=18:35-20:15 + +; Set the screen brightness. Default is 1.0. +; brightness=0.9 +; It is also possible to use different settings for day and night +; since version 1.8. +brightness-day=0.8 +brightness-night=0.6 +; Set the screen gamma (for all colors, or each color channel +; individually) +gamma=0.8 +;gamma=0.8:0.7:0.8 +; This can also be set individually for day and night since +; version 1.10. +;gamma-day=0.8:0.7:0.8 +;gamma-night=0.6 + +; Set the location-provider: 'geoclue2', 'manual' +; type 'redshift -l list' to see possible values. +; The location provider settings are in a different section. +location-provider=manual + +; Set the adjustment-method: 'randr', 'vidmode' +; type 'redshift -m list' to see all possible values. +; 'randr' is the preferred method, 'vidmode' is an older API. +; but works in some cases when 'randr' does not. +; The adjustment method settings are in a different section. +adjustment-method=randr + +; Configuration of the location-provider: +; type 'redshift -l PROVIDER:help' to see the settings. +; ex: 'redshift -l manual:help' +; Keep in mind that longitudes west of Greenwich (e.g. the Americas) +; are negative numbers. +[manual] +lat=48.864716 +lon=2.349014 + +; Configuration of the adjustment-method +; type 'redshift -m METHOD:help' to see the settings. +; ex: 'redshift -m randr:help' +; In this example, randr is configured to adjust only screen 0. +; Note that the numbering starts from 0, so this is actually the first screen. +; If this option is not specified, Redshift will try to adjust _all_ screens. +[randr] +screen=0 diff --git a/scripts/rotdir b/scripts/rotdir old mode 100644 new mode 100755 diff --git a/scripts/ytdl b/scripts/ytdl index e69cf26..9aafb42 100755 --- a/scripts/ytdl +++ b/scripts/ytdl @@ -1,33 +1,33 @@ #!/bin/sh # wrapper for yt-dlp -MUSICDIR="${XDG_MUSIC_DIR:-$HOME/Music}" +MUSICDIR="${XDG_MUSIC_DIR:-$HOME/music}" VIDEODIR="${XDG_VIDEOS_DIR:-$HOME/Videos}" case $1 in v) mkdir -p "$VIDEODIR" - notify-send "Video download started" + herbe "Video download started" yt-dlp -f 'bv,ba' -o '%(title)s [%(id)s].%(ext)s'\ -P "$VIDEODIR" "$2" && - notify-send "Video downloaded" || - (notify-send "Error: No internet connection" && exit 1) ;; + herbe "Video downloaded" || + (herbe "Error: No internet connection" && exit 1) ;; m) mkdir -p "$MUSICDIR/download" - notify-send "Music download started" + herbe "Music download started" yt-dlp -f 'ba' -x --embed-thumbnail --audio-format mp3\ -o '%(title)s [%(id)s].%(ext)s' -P "$MUSICDIR/download" "$2" && - notify-send "Music downloaded" || - (notify-send "Error: No internet connection" && exit 1) ;; + herbe "Music downloaded" || + (herbe "Error: No internet connection" && exit 1) ;; p) NAME=$(printf '' | dmenu -p 'Name ') mkdir -p "$MUSICDIR/$NAME" - notify-send "Playlist download started" + herbe "Playlist download started" yt-dlp -f 'ba' -x --embed-thumbnail --audio-format mp3\ -o '%(playlist_index)s - %(title)s [%(id)s].%(ext)s'\ -P "$MUSICDIR/$NAME" "$2" && - notify-send "Playlist downloaded" || - (notify-send "Error: No internet connection" && exit 1) ;; + herbe "Playlist downloaded" || + (herbe "Error: No internet connection" && exit 1) ;; *) exit 1 ;; -esac \ No newline at end of file +esac diff --git a/sx/sxrc b/sx/sxrc index 00847b1..94ed5dc 100755 --- a/sx/sxrc +++ b/sx/sxrc @@ -1,10 +1,9 @@ setxkbmap fr -curl -m 3 -s $CAL_PERSO | grep -v END:VCALENDAR >/tmp/calendar.ics -curl -m 3 -s $CAL_SCHOOL | grep -v BEGIN:VCALENDAR >> /tmp/calendar.ics -icstocal /tmp/calendar.ics /tmp/calendar >/dev/null -scron -f $XDG_CONFIG_HOME/crontab +killall scron +scron -f ~/.config/crontab $HOME/.config/scripts/randwp sxhkd& picom& dwmblocks& +redshift& exec dwm diff --git a/sxhkd/sxhkdrc b/sxhkd/sxhkdrc index 91436f3..01027a5 100644 --- a/sxhkd/sxhkdrc +++ b/sxhkd/sxhkdrc @@ -12,6 +12,12 @@ Scroll_Lock themeswap Print screenshot +XF86Explorer + st -e lfub ~ +super + g + st -e lfub ~/games +XF86WakeUp + nsxiv -f ~/img/wakeup.png XF86MonBrightnessUp BRIGHTNESS=$(($BRIGHTNESS+0.1));setbrightness $BRIGHTNESS XF86MonBrightnessDown @@ -24,8 +30,8 @@ XF86AudioMute pamixer -t; kill -44 $(pidof dwmblocks) XF86Mail betterbird -{super + n,super + shift + n} - $TERMINAL -e {lfub "$XDG_DATA_HOME/notes",newsboat} +XF86Calculator + $TERMINAL -e calc super + m music super + shift + m diff --git a/wallpapers/SFW/guitar/wallhaven-0pjzxm.jpg b/wallpapers/SFW/guitar/wallhaven-0pjzxm.jpg new file mode 100644 index 0000000..70780f3 Binary files /dev/null and b/wallpapers/SFW/guitar/wallhaven-0pjzxm.jpg differ diff --git a/wallpapers/SFW/guitar/wallhaven-0w78p6.jpg b/wallpapers/SFW/guitar/wallhaven-0w78p6.jpg new file mode 100644 index 0000000..670ea4a Binary files /dev/null and b/wallpapers/SFW/guitar/wallhaven-0w78p6.jpg differ diff --git a/wallpapers/SFW/guitar/wallhaven-4olmom.png b/wallpapers/SFW/guitar/wallhaven-4olmom.png new file mode 100644 index 0000000..165057f Binary files /dev/null and b/wallpapers/SFW/guitar/wallhaven-4olmom.png differ diff --git a/wallpapers/SFW/guitar/wallhaven-5w38p7.jpg b/wallpapers/SFW/guitar/wallhaven-5w38p7.jpg new file mode 100644 index 0000000..6b19987 Binary files /dev/null and b/wallpapers/SFW/guitar/wallhaven-5w38p7.jpg differ diff --git a/wallpapers/SFW/guitar/wallhaven-nzq17v.jpg b/wallpapers/SFW/guitar/wallhaven-nzq17v.jpg new file mode 100644 index 0000000..2a35f0e Binary files /dev/null and b/wallpapers/SFW/guitar/wallhaven-nzq17v.jpg differ diff --git a/wallpapers/SFW/memes/Kmm7WsF_d.jpg b/wallpapers/SFW/memes/Kmm7WsF_d.jpg new file mode 100644 index 0000000..af45845 Binary files /dev/null and b/wallpapers/SFW/memes/Kmm7WsF_d.jpg differ diff --git a/wallpapers/SFW/planes/shuttle.jpg b/wallpapers/SFW/planes/shuttle.jpg new file mode 100644 index 0000000..bcd78ff Binary files /dev/null and b/wallpapers/SFW/planes/shuttle.jpg differ diff --git a/zsh/.zprofile b/zsh/.zprofile index 2a73493..dad305e 100644 --- a/zsh/.zprofile +++ b/zsh/.zprofile @@ -1,2 +1,5 @@ +curl -m 3 -s "$CAL_PERSO" | grep -v END:VCALENDAR >/tmp/calendar.ics +curl -m 3 -s "$CAL_SCHOOL" | grep -v BEGIN:VCALENDAR >> /tmp/calendar.ics +icstocal /tmp/calendar.ics /tmp/calendar >/dev/null [ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec sx diff --git a/zsh/.zshenv b/zsh/.zshenv index 9b82ff7..a020302 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,3 +1,6 @@ +[ -f "$ZDOTDIR/paliasrc" ] && source "$ZDOTDIR/paliasrc" # Private aliases +[ -f "$ZDOTDIR/epitaliasrc" ] && source "$ZDOTDIR/epitaliasrc" # Private aliases + export PATH="$HOME/.config/scripts:$PATH" export TERMINAL="st" export EDITOR="nvim" diff --git a/zsh/.zshrc b/zsh/.zshrc index dc2013b..ad2d299 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,23 +1,22 @@ -[ -f "$ZDOTDIR/paliasrc" ] && source "$ZDOTDIR/paliasrc" # Private aliases -[ -f "$ZDOTDIR/epitaliasrc" ] && source "$ZDOTDIR/epitaliasrc" # Private aliases +autoload -U colors && colors # Load colors +PS1="%B%F{214}%n %F{209}%~ %f%F{45} %f%b " +RPS1="%f(%B%(?.%F{green}0%f.%F{red}%?%f)%b%)" -# quand +# To do cat ~/todo -autoload -U colors && colors # Load colors -PS1="%B%(?.0.%F{red}%?) %F{blue}%n %F{green}%~ %f$%b " - alias ls="ls -a --color=auto" alias shut="sudo openrc-shutdown -p now" alias shutr="sudo openrc-shutdown -r now" -alias upd="sudo pacman -Syuu" +alias upd="sudo pacman -Syuu; setxkbmap fr" alias ins="sudo pacman -Syu" alias uins="sudo pacman -Rns" alias c="clear; cat ~/todo" # git +alias aled="cat $XDG_CONFIG_HOME/zsh/gitHelp" alias {clone,cloner}="git clone" alias {tirer,tir,poule}="git pull" alias {statut,sta}="git status" @@ -29,12 +28,15 @@ alias {difference,ference}="git diff" alias {tronc,tr}="git log" alias {resto,restau}="git restore" alias {étiquette,etiqu}="git tag" +alias branche="git branch" alias bri5="xrandr --output eDP-1 --brightness 0.5" alias bri6="xrandr --output eDP-1 --brightness 0.6" alias ascii="ascii -d" +alias sudo="sudo " alias lf="lfub" alias vmk="v Makefile" +alias cmk="xsel -bo > Makefile" alias cf="$HOME/.config/" alias cspt="$HOME/.config/scripts" alias cz="$HOME/.config/zsh" @@ -47,6 +49,7 @@ alias py="python3" alias wtr="curl wttr.in/Lyon" alias doc="$HOME/Documents" alias usbmnt="sudo mount /dev/sdb1 $HOME/usb" +alias sss="ssh root@140.82.10.231" autoload -U compinit zstyle ':completion:*' menu select @@ -60,7 +63,7 @@ autoload -Uz vcs_info precmd_vcs_info() { vcs_info } precmd_functions+=( precmd_vcs_info ) setopt prompt_subst -RPROMPT=\$vcs_info_msg_0_ +# RPROMPT=\$vcs_info_msg_0_ zstyle ':vcs_info:git:*' formats '%F{cyan}(%b)%f' zstyle ':vcs_info:*' enable git diff --git a/zsh/gitHelp b/zsh/gitHelp new file mode 100644 index 0000000..4d4d686 --- /dev/null +++ b/zsh/gitHelp @@ -0,0 +1,15 @@ +# Trouduction de Git + +clone / cloner : "git clone" +tirer / tir / poule : "git pull" +statut / sta : "git status" +ajouter / aj : "git add" +atome_de_code / ato : "git commit -m" # voir bitoduc.fr, Commit +pousser / pous : "git push" +poussétiquettes / poussE : "git push --follow-tags" +difference / ference / "git diff" +tronc / tr : "git log" +resto / restau : "git restore" +étiquette / etiqu : "git tag" +branche : "git branch" + -- cgit v1.2.3