From 8d38397249b2b68f755743e13cc0706a8ec7f931 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 13 Oct 2023 09:24:44 +0200 Subject: [PATCH 1/9] Remaniement : configuration system-wide de bash --- etc/bash/bashrc.d/30-ahrc--laptop.bashrc | 3 +++ etc/bash/bashrc.d/30-ahrc--pc.bashrc | 3 +++ etc/bash/bashrc.d/30-tera--io.bashrc | 4 ++++ etc/bash/bashrc.d/50-ahurac.bashrc | 14 ++++++++++++++ etc/bash/bashrc.d/ahrc-laptop.bashrc | 10 ---------- etc/bash/bashrc.d/ahrc-pc.bashrc | 10 ---------- etc/bash/bashrc.d/ahurac.bashrc | 7 ------- etc/bash/bashrc.d/tera-io.bashrc | 12 ------------ 8 files changed, 24 insertions(+), 39 deletions(-) create mode 100644 etc/bash/bashrc.d/30-ahrc--laptop.bashrc create mode 100644 etc/bash/bashrc.d/30-ahrc--pc.bashrc create mode 100644 etc/bash/bashrc.d/30-tera--io.bashrc create mode 100644 etc/bash/bashrc.d/50-ahurac.bashrc delete mode 100644 etc/bash/bashrc.d/ahrc-laptop.bashrc delete mode 100644 etc/bash/bashrc.d/ahrc-pc.bashrc delete mode 100644 etc/bash/bashrc.d/ahurac.bashrc delete mode 100644 etc/bash/bashrc.d/tera-io.bashrc diff --git a/etc/bash/bashrc.d/30-ahrc--laptop.bashrc b/etc/bash/bashrc.d/30-ahrc--laptop.bashrc new file mode 100644 index 0000000..2dcbd5d --- /dev/null +++ b/etc/bash/bashrc.d/30-ahrc--laptop.bashrc @@ -0,0 +1,3 @@ +ps1_brackets='()' +ps1_color_1=32 +ps1_color_2=34 diff --git a/etc/bash/bashrc.d/30-ahrc--pc.bashrc b/etc/bash/bashrc.d/30-ahrc--pc.bashrc new file mode 100644 index 0000000..7cd2ffd --- /dev/null +++ b/etc/bash/bashrc.d/30-ahrc--pc.bashrc @@ -0,0 +1,3 @@ +ps1_brackets='[]' +ps1_color_1=35 +ps1_color_2=34 diff --git a/etc/bash/bashrc.d/30-tera--io.bashrc b/etc/bash/bashrc.d/30-tera--io.bashrc new file mode 100644 index 0000000..fa0ddc3 --- /dev/null +++ b/etc/bash/bashrc.d/30-tera--io.bashrc @@ -0,0 +1,4 @@ +ps1_color_1=36 +ps1_color_2=34 + +export SYSTEMD_PAGER= diff --git a/etc/bash/bashrc.d/50-ahurac.bashrc b/etc/bash/bashrc.d/50-ahurac.bashrc new file mode 100644 index 0000000..97346cf --- /dev/null +++ b/etc/bash/bashrc.d/50-ahurac.bashrc @@ -0,0 +1,14 @@ +if [ "$(id -u)" -eq 0 ]; then + ps1_color_1=31 + ps1_color_2=32 +fi + +PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\$ " + +shrc_d=/usr/local/etc/sh/shrc.d +if [ -d "$shrc_d" ]; then + for i in "${shrc_d}/"*; do + . "$i" + done +fi + diff --git a/etc/bash/bashrc.d/ahrc-laptop.bashrc b/etc/bash/bashrc.d/ahrc-laptop.bashrc deleted file mode 100644 index 69356c3..0000000 --- a/etc/bash/bashrc.d/ahrc-laptop.bashrc +++ /dev/null @@ -1,10 +0,0 @@ -# PS1 -if [ "$(id -u)" -eq 0 ]; then - ps1_color_1=1 - ps1_color_2=10 -else - ps1_color_1=2 - ps1_color_2=4 -fi -export PS1="(\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\])\\$ \[$(tput sgr0)\]" - diff --git a/etc/bash/bashrc.d/ahrc-pc.bashrc b/etc/bash/bashrc.d/ahrc-pc.bashrc deleted file mode 100644 index 48ca71f..0000000 --- a/etc/bash/bashrc.d/ahrc-pc.bashrc +++ /dev/null @@ -1,10 +0,0 @@ -# PS1 -if [ "$(id -u)" -eq 0 ]; then - ps1_color_1=1 - ps1_color_2=10 -else - ps1_color_1=5 - ps1_color_2=4 -fi -export PS1="[\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]]\\$ \[$(tput sgr0)\]" - diff --git a/etc/bash/bashrc.d/ahurac.bashrc b/etc/bash/bashrc.d/ahurac.bashrc deleted file mode 100644 index 9cc867e..0000000 --- a/etc/bash/bashrc.d/ahurac.bashrc +++ /dev/null @@ -1,7 +0,0 @@ -shrc_d=/usr/local/etc/sh/shrc.d -if [ -d "$shrc_d" ]; then - for i in "${shrc_d}/"*; do - . "$i" - done -fi - diff --git a/etc/bash/bashrc.d/tera-io.bashrc b/etc/bash/bashrc.d/tera-io.bashrc deleted file mode 100644 index 55f34ee..0000000 --- a/etc/bash/bashrc.d/tera-io.bashrc +++ /dev/null @@ -1,12 +0,0 @@ -# PS1 -if [ "$(id -u)" -eq 0 ]; then - ps1_color_1=1 - ps1_color_2=10 -else - ps1_color_1=6 - ps1_color_2=4 -fi -export PS1="{\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]}\\$ \[$(tput sgr0)\]" - -export SYSTEMD_PAGER= - From 231211b7c47039e7bb7c2dc0a15e4399755d8755 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 13 Oct 2023 09:29:50 +0200 Subject: [PATCH 2/9] Remaniement : noms des fichiers dans /etc/sh/shrc.d --- etc/sh/shrc.d/{arch_aliases.bashrc => arch_aliases} | 0 etc/sh/shrc.d/{aliases.bashrc => core_aliases} | 0 etc/sh/shrc.d/{functions.bashrc => core_functions} | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename etc/sh/shrc.d/{arch_aliases.bashrc => arch_aliases} (100%) rename etc/sh/shrc.d/{aliases.bashrc => core_aliases} (100%) rename etc/sh/shrc.d/{functions.bashrc => core_functions} (100%) diff --git a/etc/sh/shrc.d/arch_aliases.bashrc b/etc/sh/shrc.d/arch_aliases similarity index 100% rename from etc/sh/shrc.d/arch_aliases.bashrc rename to etc/sh/shrc.d/arch_aliases diff --git a/etc/sh/shrc.d/aliases.bashrc b/etc/sh/shrc.d/core_aliases similarity index 100% rename from etc/sh/shrc.d/aliases.bashrc rename to etc/sh/shrc.d/core_aliases diff --git a/etc/sh/shrc.d/functions.bashrc b/etc/sh/shrc.d/core_functions similarity index 100% rename from etc/sh/shrc.d/functions.bashrc rename to etc/sh/shrc.d/core_functions From 02c351baa74657f6246c5da760f889a1b1757a05 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 13 Oct 2023 09:33:12 +0200 Subject: [PATCH 3/9] =?UTF-8?q?Correction=20:=20backslash=20pour=20autoris?= =?UTF-8?q?er=20l'interpr=C3=A9tation=20du=20$=20dans=20le=20PS1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/bash/bashrc.d/50-ahurac.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bash/bashrc.d/50-ahurac.bashrc b/etc/bash/bashrc.d/50-ahurac.bashrc index 97346cf..e3e9017 100644 --- a/etc/bash/bashrc.d/50-ahurac.bashrc +++ b/etc/bash/bashrc.d/50-ahurac.bashrc @@ -3,7 +3,7 @@ if [ "$(id -u)" -eq 0 ]; then ps1_color_2=32 fi -PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\$ " +PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\\$ " shrc_d=/usr/local/etc/sh/shrc.d if [ -d "$shrc_d" ]; then From ad01f94bdbd5fff293e7691ecb4911045a1cc2c3 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 13 Oct 2023 09:40:03 +0200 Subject: [PATCH 4/9] Ajout : brackets dans la configuration de bash pour tera-io --- etc/bash/bashrc.d/30-tera--io.bashrc | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/bash/bashrc.d/30-tera--io.bashrc b/etc/bash/bashrc.d/30-tera--io.bashrc index fa0ddc3..c2dba41 100644 --- a/etc/bash/bashrc.d/30-tera--io.bashrc +++ b/etc/bash/bashrc.d/30-tera--io.bashrc @@ -1,3 +1,4 @@ +ps1_brackets='{}' ps1_color_1=36 ps1_color_2=34 From c0896ee09d799d33b5787d7df1225330eec054f6 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Fri, 13 Oct 2023 10:02:25 +0200 Subject: [PATCH 5/9] =?UTF-8?q?Mise=20=C3=A0=20jour=20:=20configurations?= =?UTF-8?q?=20de=20Sway,=20Hyprland=20et=20Waybar=20suite=20=C3=A0=20la=20?= =?UTF-8?q?modification=20des=20noms=20des=20binaires?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/hypr/hyprland.conf.d/startup.conf | 2 +- config/sway/config.d/10-startup.conf | 2 +- config/sway/config.d/70-bindings.conf | 10 +++++----- config/waybar-hyprland/config | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/config/hypr/hyprland.conf.d/startup.conf b/config/hypr/hyprland.conf.d/startup.conf index fe330dc..524d83f 100644 --- a/config/hypr/hyprland.conf.d/startup.conf +++ b/config/hypr/hyprland.conf.d/startup.conf @@ -4,7 +4,7 @@ exec-once = waybar exec-once = hyprpaper exec-once = artix-pipewire-launcher exec-once = /usr/lib/xdg-desktop-portal-hyprland -exec-once = swayosd +exec-once = swayosd-server exec-once = $terminal & $terminal -e sudo -i exec-once = webcord exec-once = joplin-desktop diff --git a/config/sway/config.d/10-startup.conf b/config/sway/config.d/10-startup.conf index dc25e8a..f90edd5 100644 --- a/config/sway/config.d/10-startup.conf +++ b/config/sway/config.d/10-startup.conf @@ -1,6 +1,6 @@ exec --no-startup-id swaybg -i $wallpaper exec --no-startup-id swaync -exec --no-startup-id swayosd +exec --no-startup-id swayosd-server exec --no-startup-id xdg-session-start exec --no-startup-id $term exec --no-startup-id $term -e sudo -i diff --git a/config/sway/config.d/70-bindings.conf b/config/sway/config.d/70-bindings.conf index 8328e50..38b0b9a 100644 --- a/config/sway/config.d/70-bindings.conf +++ b/config/sway/config.d/70-bindings.conf @@ -64,11 +64,11 @@ bindsym $mod+space focus mode_toggle bindsym $mod+a focus parent # Control -bindsym XF86AudioLowerVolume exec swayosd --output-volume=lower -bindsym XF86AudioRaiseVolume exec swayosd --output-volume=raise -bindsym XF86AudioMute exec swayosd --output-volume=mute-toggle -bindsym XF86MonBrightnessUp exec swayosd --brightness=raise -bindsym XF86MonBrightnessDown exec swayosd --brightness=lower +bindsym XF86AudioLowerVolume exec swayosd-client --output-volume=lower +bindsym XF86AudioRaiseVolume exec swayosd-client --output-volume=raise +bindsym XF86AudioMute exec swayosd-client --output-volume=mute-toggle +bindsym XF86MonBrightnessUp exec swayosd-client --brightness=raise +bindsym XF86MonBrightnessDown exec swayosd-client --brightness=lower # Modes # Resize diff --git a/config/waybar-hyprland/config b/config/waybar-hyprland/config index 9f6e342..c9f6bd6 100644 --- a/config/waybar-hyprland/config +++ b/config/waybar-hyprland/config @@ -70,8 +70,8 @@ "default": ["", "", ""] }, "on-click": "pavucontrol -t 3", - "on-scroll-up": "swayosd --output-volume=raise", - "on-scroll-down": "swayosd --output-volume=lower" + "on-scroll-up": "swayosd-client --output-volume=raise", + "on-scroll-down": "swayosd-client --output-volume=lower" }, "pulseaudio#input": { "format": "{format_source}", @@ -87,8 +87,8 @@ "default": ["", "", ""] }, "on-click": "pavucontrol -t 4", - "on-scroll-up": "swayosd --input-volume=raise", - "on-scroll-down": "swayosd --input-volume=lower" + "on-scroll-up": "swayosd-client --input-volume=raise", + "on-scroll-down": "swayosd-client --input-volume=lower" }, "temperature": { "thermal-zone": 2, From 4d22f92c76668efd027bc5de49c2a85451a86def Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sat, 14 Oct 2023 14:30:03 +0200 Subject: [PATCH 6/9] =?UTF-8?q?Remaniement=20:=20modularisation=20de=20la?= =?UTF-8?q?=20configuration=20de=20bash,=20r=C3=A9glage=20du=20PS1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/bash/bashrc.d/50-ahurac.bashrc | 14 -------------- etc/bash/bashrc.d/50-common_sh_directives.bashrc | 7 +++++++ etc/bash/bashrc.d/50-ps1.bashrc | 7 +++++++ 3 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 etc/bash/bashrc.d/50-ahurac.bashrc create mode 100644 etc/bash/bashrc.d/50-common_sh_directives.bashrc create mode 100644 etc/bash/bashrc.d/50-ps1.bashrc diff --git a/etc/bash/bashrc.d/50-ahurac.bashrc b/etc/bash/bashrc.d/50-ahurac.bashrc deleted file mode 100644 index e3e9017..0000000 --- a/etc/bash/bashrc.d/50-ahurac.bashrc +++ /dev/null @@ -1,14 +0,0 @@ -if [ "$(id -u)" -eq 0 ]; then - ps1_color_1=31 - ps1_color_2=32 -fi - -PS1="\033[0m${ps1_brackets:0:1}\033[1;${ps1_color_1}m\u@\h\033[0m \033[1;${ps1_color_2}m\W\033[0m${ps1_brackets:1:1}\\$ " - -shrc_d=/usr/local/etc/sh/shrc.d -if [ -d "$shrc_d" ]; then - for i in "${shrc_d}/"*; do - . "$i" - done -fi - diff --git a/etc/bash/bashrc.d/50-common_sh_directives.bashrc b/etc/bash/bashrc.d/50-common_sh_directives.bashrc new file mode 100644 index 0000000..9cc867e --- /dev/null +++ b/etc/bash/bashrc.d/50-common_sh_directives.bashrc @@ -0,0 +1,7 @@ +shrc_d=/usr/local/etc/sh/shrc.d +if [ -d "$shrc_d" ]; then + for i in "${shrc_d}/"*; do + . "$i" + done +fi + diff --git a/etc/bash/bashrc.d/50-ps1.bashrc b/etc/bash/bashrc.d/50-ps1.bashrc new file mode 100644 index 0000000..a146885 --- /dev/null +++ b/etc/bash/bashrc.d/50-ps1.bashrc @@ -0,0 +1,7 @@ +if [ "$(id -u)" -eq 0 ]; then + ps1_color_1=31 + ps1_color_2=32 +fi + +PS1="\\033[0m${ps1_brackets:0:1}\\033[1;${ps1_color_1}m\\u@\\h\\033[0m \\033[1;${ps1_color_2}m\\W\\033[0m${ps1_brackets:1:1}\\$ " + From 7cdb673bb46cda6016df7d5aa441b3c6dbac667d Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sat, 14 Oct 2023 22:02:50 +0200 Subject: [PATCH 7/9] =?UTF-8?q?Correction=20:=20PS1=20buggu=C3=A9=20dans?= =?UTF-8?q?=20la=20configuration=20de=20bash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/bash/bashrc.d/50-ps1.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/bash/bashrc.d/50-ps1.bashrc b/etc/bash/bashrc.d/50-ps1.bashrc index a146885..e26a780 100644 --- a/etc/bash/bashrc.d/50-ps1.bashrc +++ b/etc/bash/bashrc.d/50-ps1.bashrc @@ -3,5 +3,5 @@ if [ "$(id -u)" -eq 0 ]; then ps1_color_2=32 fi -PS1="\\033[0m${ps1_brackets:0:1}\\033[1;${ps1_color_1}m\\u@\\h\\033[0m \\033[1;${ps1_color_2}m\\W\\033[0m${ps1_brackets:1:1}\\$ " +PS1='\[\033[0m\]'"${ps1_brackets:0:1}"'\[\033[1;'"${ps1_color_1}"'m\]\u@\h\[\033[0m\] \[\033[1;'"${ps1_color_2}"'m\]\W\[\033[0m\]'"${ps1_brackets:1:1}"'\$ ' From 075c59ec4c9fefe8771911ec856e2a8aa3230c1f Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sat, 14 Oct 2023 22:03:11 +0200 Subject: [PATCH 8/9] =?UTF-8?q?Mise=20=C3=A0=20jour=20:=20utilisation=20de?= =?UTF-8?q?=20nvim=20=C3=A0=20la=20place=20de=20helix=20pour=20git?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/gitconfig b/home/gitconfig index 22a8f95..22e504c 100644 --- a/home/gitconfig +++ b/home/gitconfig @@ -2,7 +2,7 @@ name = Hippolyte Chauvin email = hchauvin38@outlook.fr [core] - editor = hx + editor = nvim [init] defaultbranch = main [pull] From 3d6d5a9ae2a592f4342cb7cf5ca09df3cf220e4d Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sat, 14 Oct 2023 22:25:24 +0200 Subject: [PATCH 9/9] Ajout : script docker-browse_volume --- bin/docker-browse_volume | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 bin/docker-browse_volume diff --git a/bin/docker-browse_volume b/bin/docker-browse_volume new file mode 100755 index 0000000..9ca3bc6 --- /dev/null +++ b/bin/docker-browse_volume @@ -0,0 +1,4 @@ +#!/bin/sh +mount_point="/mnt/${1}" +docker run --rm -it -v "${1}:${mount_point}" -w "$mount_point" busybox sh +