fix hyprlock, hypridle & monitor management
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
file:///home/lucas/scripts
|
||||
file:///home/lucas/Documents
|
||||
file:///home/lucas/Images
|
||||
file:///home/lucas/Musique
|
||||
file:///home/lucas/Vid%C3%A9os
|
||||
file:///home/lucas/T%C3%A9l%C3%A9chargements
|
||||
file:///home/lucas/LocalProjets
|
||||
file:///home/lucas/LocalProjets/04%202Limited/VJ
|
||||
file:///home/lucas/Nextcloud
|
||||
file:///home/lucas/Nextcloud/Projets
|
||||
file:///home/lucas/Nextcloud/Projets/2Limited
|
||||
file:///home/lucas/Nextcloud/Projets/2Limited/Vid%C3%A9os
|
||||
file:///home/lucas/Nextcloud2
|
||||
file:///home/lucas/Nextcloud2/03.%20Associatif/V%C3%A9lo%20Boom%20Boom
|
||||
file:///home/lucas/Nextcloud2/03.%20Associatif/V%C3%A9lo%20Boom%20Boom/01%20Communication
|
||||
|
||||
@@ -2,9 +2,8 @@ general {
|
||||
lock_cmd = pidof hyprlock || hyprlock
|
||||
unlock_cmd = pkill -x hyprlock
|
||||
before_sleep_cmd = loginctl lock-session
|
||||
after_sleep_cmd = hyprctl dispatch dpms on && ./home/lucas/scripts/restart-external-screen
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
ignore_dbus_inhibit = false
|
||||
no_fade_in = true
|
||||
}
|
||||
listener {
|
||||
timeout = 180
|
||||
|
||||
@@ -2,9 +2,8 @@ general {
|
||||
lock_cmd = pidof hyprlock || hyprlock # Commande de verrouillage
|
||||
unlock_cmd = pkill -x hyprlock # Commande de déverrouillage
|
||||
before_sleep_cmd = loginctl lock-session # Avant la mise en veille
|
||||
after_sleep_cmd = hyprctl dispatch dpms on && ./home/lucas/scripts/restart-external-screen # Après réveil
|
||||
after_sleep_cmd = hyprctl dispatch dpms on
|
||||
ignore_dbus_inhibit = false # Respecte les inhibiteurs DBus
|
||||
no_fade_in = true
|
||||
}
|
||||
|
||||
listener {
|
||||
@@ -16,8 +15,3 @@ listener {
|
||||
timeout = 900 # 15 minutes d'inactivité
|
||||
on-timeout = systemctl suspend # Met en veille
|
||||
}
|
||||
|
||||
animations {
|
||||
animation = fadeIn, 0
|
||||
animation = fadeOut, 0
|
||||
}
|
||||
|
||||
@@ -14,6 +14,8 @@ xwayland {
|
||||
|
||||
misc {
|
||||
vrr = 2 # 0: off, 1: on, 2: fullscreen only
|
||||
key_press_enables_dpms = true
|
||||
mouse_move_enables_dpms = true
|
||||
}
|
||||
|
||||
# --- IDENTITÉ DE LA SESSION ---
|
||||
@@ -42,18 +44,25 @@ env = XCURSOR_SIZE,24
|
||||
|
||||
|
||||
# --- LANCEMENT AUTOMATIQUE ---
|
||||
exec-once = /home/lucas/scripts/hdm-config-select.sh
|
||||
exec-once = waybar &
|
||||
exec-once = mako &
|
||||
exec-once = ~/scripts/hypridle-launch &
|
||||
exec-once = nm-applet --indicator &
|
||||
exec-once = blueman-applet &
|
||||
exec-once = kdeconnectd &
|
||||
exec-once = xdg-user-dirs-update &
|
||||
exec-once = xapp-sn-watcher &
|
||||
exec-once = /usr/lib/polkit-kde-authentication-agent-1 &
|
||||
exec-once = wl-paste --type text --watch cliphist store &
|
||||
exec-once = wl-paste --type image --watch cliphist store &
|
||||
exec-once = dex -a &
|
||||
exec-once = ~/.config/hypr/scripts/wallpaper.sh &
|
||||
exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||
exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark's
|
||||
exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'
|
||||
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland
|
||||
exec-once = /usr/lib/xdg-desktop-portal-hyprland &
|
||||
exec-once = sleep 1 && /usr/lib/xdg-desktop-portal-gtk &
|
||||
exec-once = sleep 2 && /usr/lib/xdg-desktop-portal -r &
|
||||
|
||||
# --- CLAVIER & TRACKPAD ---
|
||||
input {
|
||||
@@ -82,6 +91,7 @@ bind = $mainMod, M, exit,
|
||||
bind = $mainMod, ugrave, exec, systemctl poweroff
|
||||
bind = $mainMod, asterisk, exec, systemctl reboot
|
||||
bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
||||
bind = $mainMod, W, exec, thunar
|
||||
|
||||
# Navigation Workspaces (AZERTY)
|
||||
bind = $mainMod, ampersand, workspace, 1
|
||||
@@ -107,13 +117,14 @@ bind = $mainMod SHIFT, Down, resizeactive, 0 50
|
||||
bind = $mainMod SHIFT, F, togglefloating
|
||||
bind = $mainMod SHIFT, G, pin
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindowss
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Screenshot
|
||||
bind = , Print, exec, grim -g "$(slurp)" - | wl-copy
|
||||
bind = SHIFT, Print, exec, grimblast copy screen
|
||||
|
||||
# Display mode
|
||||
bind = $mainMod, P, exec, ~/.config/hypr/scripts/display-mode.sh
|
||||
# Display manager
|
||||
bind = $mainMod, P, exec, ~/scripts/display-manager.sh
|
||||
|
||||
# Contrôles Hardware
|
||||
bindel = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
@@ -122,6 +133,7 @@ bindel = , XF86AudioRaiseVolume, exec, pamixer -i 5
|
||||
bindel = , XF86AudioLowerVolume, exec, pamixer -d 5
|
||||
bindl = , XF86AudioMute, exec, pamixer -t
|
||||
|
||||
# --- ANCIENNES RÈGLES À REMPLACER ---
|
||||
windowrule = workspace 1, match:class ^(Alacritty)$
|
||||
windowrule = workspace 2, match:title ^(Obsidian)$
|
||||
windowrule = workspace 3, match:title ^(Beeper)$
|
||||
@@ -130,7 +142,6 @@ windowrule = workspace 5, match:class ^(org.inkscape.Inkscape)$
|
||||
windowrule = workspace 6, match:title ^(ncspot)$
|
||||
windowrule = workspace 6, match:title ^(Kasts)$
|
||||
|
||||
|
||||
# --- APPARENCE (Catppuccin Mocha) ---
|
||||
general {
|
||||
gaps_in = 0
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
|
||||
|
||||
|
||||
monitor=,highres,auto,1.25
|
||||
|
||||
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
env = XDG_CURRENT_DESTKOP,Hyprland
|
||||
env = XDG_SESSION_DESKTOP,Hyprland
|
||||
env = LIBVA_DRIVER_NAME,nvidia
|
||||
env = GBM_BACKEND,nvidia-drm
|
||||
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
|
||||
env = QT_QPA_PLATFORM,wayland
|
||||
|
||||
exec-once = waybar &
|
||||
exec-one =
|
||||
|
||||
|
||||
|
||||
input {
|
||||
kb_layout = fr
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = true
|
||||
tap-to-click = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$mainMod = SUPER
|
||||
|
||||
bind = $mainMod, Q, exec, alacritty
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, thunar
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, D, exec, rofi -show drun
|
||||
bind = $mainMod, L, exec, swaylock
|
||||
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 0
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
|
||||
bindel = , XF86MonBrightnessUp, exec, brightnessctl set 5%+
|
||||
bindel = , XF86MonBrightnessDown, exec, brightnessctl set 5%-
|
||||
bindel = , XF86AudioRaiseVolume, exec, pamixer -i 5
|
||||
bindel = , XF86AudioLowerVolume, exec, pamixer -d 5
|
||||
bindl = , XF86AudioMute, exec, pamixer -t
|
||||
187
.config/hypr/hyprland.lua
Normal file
187
.config/hypr/hyprland.lua
Normal file
@@ -0,0 +1,187 @@
|
||||
-- Generated by hyprconf2lua v1.4.0 (manuellement corrigé)
|
||||
---@module 'hl'
|
||||
|
||||
-- === MONITEURS ===
|
||||
local monitors = require("monitors")
|
||||
|
||||
-- Workspace rules (intégrées directement)
|
||||
hl.workspace_rule({ workspace = 1, monitor = "eDP-1" })
|
||||
hl.workspace_rule({ workspace = 2, monitor = "eDP-1" })
|
||||
hl.workspace_rule({ workspace = 3, monitor = "eDP-1" })
|
||||
hl.workspace_rule({ workspace = 4, monitor = "HDMI-A-1" })
|
||||
hl.workspace_rule({ workspace = 5, monitor = "HDMI-A-1" })
|
||||
hl.workspace_rule({ workspace = 6, monitor = "HDMI-A-1" })
|
||||
|
||||
-- === OPTIONS GÉNÉRALES ===
|
||||
hl.config({
|
||||
xwayland = { force_zero_scaling = true },
|
||||
misc = { vrr = 2 }, -- 0: off, 1: on, 2: fullscreen only
|
||||
})
|
||||
|
||||
-- === ENVIRONNEMENT ===
|
||||
hl.env("XDG_SESSION_TYPE", "wayland")
|
||||
hl.env("XDG_CURRENT_DESKTOP", "Hyprland")
|
||||
hl.env("XDG_SESSION_DESKTOP", "Hyprland")
|
||||
|
||||
-- GPU NVIDIA
|
||||
hl.env("LIBVA_DRIVER_NAME", "nvidia")
|
||||
hl.env("__GLX_VENDOR_LIBRARY_NAME", "nvidia")
|
||||
hl.env("NVD_BACKEND", "direct")
|
||||
|
||||
-- Toolkits
|
||||
hl.env("QT_QPA_PLATFORM", "wayland;xcb")
|
||||
hl.env("GDK_BACKEND", "wayland,x11")
|
||||
hl.env("SDL_VIDEODRIVER", "wayland")
|
||||
hl.env("CLUTTER_BACKEND", "wayland")
|
||||
|
||||
-- Thème
|
||||
hl.env("GTK_THEME", "Adwaita:dark")
|
||||
hl.env("QT_STYLE_OVERRIDE", "adwaita-dark")
|
||||
|
||||
-- Curseur
|
||||
hl.env("XCURSOR_THEME", "Adwaita")
|
||||
hl.env("XCURSOR_SIZE", 24)
|
||||
|
||||
-- === CLAVIER & TRACKPAD ===
|
||||
hl.config({
|
||||
input = {
|
||||
kb_layout = "fr",
|
||||
kb_options = "caps:shiftlock",
|
||||
numlock_by_default = true,
|
||||
follow_mouse = 1,
|
||||
touchpad = {
|
||||
natural_scroll = true,
|
||||
tap_to_click = true,
|
||||
},
|
||||
scroll_factor = 1.0,
|
||||
},
|
||||
})
|
||||
|
||||
-- === RACCOURCIS CLAVIER ===
|
||||
local mainMod = "SUPER"
|
||||
|
||||
-- Lanceurs
|
||||
hl.bind(mainMod .. " + C", hl.dsp.exec_cmd("alacritty"))
|
||||
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("thunar"))
|
||||
hl.bind(mainMod .. " + D", hl.dsp.exec_cmd("rofi -show drun"))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.exec_cmd("hyprlock"))
|
||||
hl.bind(mainMod .. " + V", hl.dsp.exec_cmd("cliphist list | rofi -dmenu | cliphist decode | wl-copy"))
|
||||
hl.bind(mainMod .. " + W", hl.dsp.exec_cmd("thunar"))
|
||||
hl.bind(mainMod .. " + P", hl.dsp.exec_cmd("~/scripts/display-manager.sh"))
|
||||
|
||||
-- Gestion des fenêtres
|
||||
hl.bind(mainMod .. " + Q", hl.dsp.window.close())
|
||||
hl.bind(mainMod .. " + X", hl.dsp.window.float())
|
||||
hl.bind(mainMod .. " + M", hl.dsp.exit())
|
||||
hl.bind(mainMod .. " + SHIFT + F", hl.dsp.window.float())
|
||||
hl.bind(mainMod .. " + SHIFT + G", hl.dsp.window.pin())
|
||||
|
||||
-- Redimensionnement (via hyprctl pour compatibilité)
|
||||
hl.bind(mainMod .. " + SHIFT + Right", hl.dsp.exec_cmd("hyprctl dispatch resizeactive 50 0"))
|
||||
hl.bind(mainMod .. " + SHIFT + Left", hl.dsp.exec_cmd("hyprctl dispatch resizeactive -50 0"))
|
||||
hl.bind(mainMod .. " + SHIFT + Up", hl.dsp.exec_cmd("hyprctl dispatch resizeactive 0 -50"))
|
||||
hl.bind(mainMod .. " + SHIFT + Down", hl.dsp.exec_cmd("hyprctl dispatch resizeactive 0 50"))
|
||||
|
||||
-- Déplacement avec la souris (bindm)
|
||||
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||
|
||||
-- Extinction / redémarrage
|
||||
hl.bind(mainMod .. " + ugrave", hl.dsp.exec_cmd("systemctl poweroff"))
|
||||
hl.bind(mainMod .. " + asterisk", hl.dsp.exec_cmd("systemctl reboot"))
|
||||
|
||||
-- Navigation des workspaces (AZERTY)
|
||||
hl.bind(mainMod .. " + ampersand", hl.dsp.focus({ workspace = 1 }))
|
||||
hl.bind(mainMod .. " + eacute", hl.dsp.focus({ workspace = 2 }))
|
||||
hl.bind(mainMod .. " + quotedbl", hl.dsp.focus({ workspace = 3 }))
|
||||
hl.bind(mainMod .. " + apostrophe",hl.dsp.focus({ workspace = 4 }))
|
||||
hl.bind(mainMod .. " + parenleft", hl.dsp.focus({ workspace = 5 }))
|
||||
hl.bind(mainMod .. " + minus", hl.dsp.focus({ workspace = 6 }))
|
||||
|
||||
-- Déplacement des fenêtres vers les workspaces (SHIFT + AZERTY)
|
||||
hl.bind(mainMod .. " + SHIFT + ampersand", hl.dsp.window.move({ workspace = 1 }))
|
||||
hl.bind(mainMod .. " + SHIFT + eacute", hl.dsp.window.move({ workspace = 2 }))
|
||||
hl.bind(mainMod .. " + SHIFT + quotedbl", hl.dsp.window.move({ workspace = 3 }))
|
||||
hl.bind(mainMod .. " + SHIFT + apostrophe", hl.dsp.window.move({ workspace = 4 }))
|
||||
hl.bind(mainMod .. " + SHIFT + parenleft", hl.dsp.window.move({ workspace = 5 }))
|
||||
hl.bind(mainMod .. " + SHIFT + minus", hl.dsp.window.move({ workspace = 6 }))
|
||||
|
||||
-- Captures d'écran
|
||||
hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy"))
|
||||
hl.bind("SHIFT + Print", hl.dsp.exec_cmd("grimblast copy screen"))
|
||||
|
||||
-- Contrôles matériels (bindl / bindel)
|
||||
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl set 5%+"), { locked = true })
|
||||
hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl set 5%-"), { locked = true })
|
||||
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("pamixer -i 5"), { locked = true })
|
||||
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("pamixer -d 5"), { locked = true })
|
||||
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("pamixer -t"), { locked = true })
|
||||
|
||||
-- === RÈGLES POUR LES FENÊTRES ===
|
||||
hl.window_rule({ name = "workspace_1", match = { class = "^(Alacritty)$" }, workspace = 1 })
|
||||
hl.window_rule({ name = "workspace_2", match = { title = "^(Obsidian)$" }, workspace = 2 })
|
||||
hl.window_rule({ name = "workspace_3", match = { title = "^(Beeper)$" }, workspace = 3 })
|
||||
hl.window_rule({ name = "workspace_4", match = { class = "^(firefox)$" }, workspace = 4 })
|
||||
hl.window_rule({ name = "workspace_5", match = { class = "^(org.inkscape.Inkscape)$" }, workspace = 5 })
|
||||
hl.window_rule({ name = "workspace_6", match = { title = "^(ncspot)$" }, workspace = 6 })
|
||||
hl.window_rule({ name = "workspace_6", match = { title = "^(Kasts)$" }, workspace = 6 })
|
||||
|
||||
-- === APPARENCE ===
|
||||
hl.config({
|
||||
general = {
|
||||
gaps_in = 0,
|
||||
gaps_out = 0,
|
||||
border_size = 0,
|
||||
layout = "dwindle",
|
||||
col = {
|
||||
active_border = { colors = { "rgb(cba6f7)", "rgb(89b4fa)" }, angle = 45 },
|
||||
inactive_border = "rgba(1e1e2eaa)",
|
||||
},
|
||||
},
|
||||
decoration = {
|
||||
rounding = 3,
|
||||
active_opacity = 1.0,
|
||||
inactive_opacity = 1.0,
|
||||
shadow = {
|
||||
enabled = false,
|
||||
range = 4,
|
||||
render_power = 3,
|
||||
color = "rgba(1a1a1aee)",
|
||||
},
|
||||
blur = {
|
||||
enabled = false,
|
||||
size = 3,
|
||||
passes = 1,
|
||||
},
|
||||
},
|
||||
cursor = {
|
||||
no_hardware_cursors = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- === DÉMARRAGE AUTOMATIQUE (exec-once) ===
|
||||
hl.on("hyprland.start", function()
|
||||
hl.exec_cmd("/home/lucas/scripts/hdm-config-select.sh")
|
||||
hl.exec_cmd(
|
||||
"bash -c 'while [ $(hyprctl monitors | grep -c \"Monitor\") -lt 2 ]; do sleep 1; done; hyprdynamicmonitors'"
|
||||
)
|
||||
hl.exec_cmd("waybar")
|
||||
hl.exec_cmd("mako")
|
||||
hl.exec_cmd("~/scripts/hypridle-launch")
|
||||
hl.exec_cmd("nm-applet --indicator")
|
||||
hl.exec_cmd("blueman-applet")
|
||||
hl.exec_cmd("kdeconnectd")
|
||||
hl.exec_cmd("xdg-user-dirs-update")
|
||||
hl.exec_cmd("xapp-sn-watcher")
|
||||
hl.exec_cmd("/usr/lib/polkit-kde-authentication-agent-1")
|
||||
hl.exec_cmd("wl-paste --type text --watch cliphist store")
|
||||
hl.exec_cmd("wl-paste --type image --watch cliphist store")
|
||||
hl.exec_cmd("~/.config/hypr/scripts/wallpaper.sh")
|
||||
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'")
|
||||
hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'")
|
||||
hl.exec_cmd("dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=Hyprland")
|
||||
hl.exec_cmd("/usr/lib/xdg-desktop-portal-hyprland")
|
||||
-- Les portails avec délai
|
||||
hl.exec_cmd("sleep 1 && /usr/lib/xdg-desktop-portal-gtk")
|
||||
hl.exec_cmd("sleep 2 && /usr/lib/xdg-desktop-portal -r")
|
||||
end)
|
||||
@@ -62,3 +62,12 @@ auth {
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
general {
|
||||
no_fade_in = true
|
||||
}
|
||||
|
||||
animations {
|
||||
animation = fadeIn, 0
|
||||
animation = fadeOut, 0
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
# If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
|
||||
# and leave the markers.
|
||||
# <<<<< TUI AUTO START
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00200,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
# <<<<< TUI AUTO END
|
||||
|
||||
41
.config/hypr/monitors.lua
Normal file
41
.config/hypr/monitors.lua
Normal file
@@ -0,0 +1,41 @@
|
||||
-- Generated by hyprconf2lua v1.4.0
|
||||
-- https://github.com/Prateek-squadron/hyprconf2lua
|
||||
-- Manual review may be needed for complex directives
|
||||
|
||||
---@module 'hl'
|
||||
|
||||
-- Generated with hyprdynamicmonitors freeze.
|
||||
|
||||
-- This is a template that you can edit, it is just a starter that pulled your current monitor setup,
|
||||
|
||||
-- adjust as needed.
|
||||
|
||||
-- You can use templates here etc, see https://github.com/fiffeek/hyprdynamicmonitors/blob/main/examples/basic/hyprconfigs/template.go.tmpl.
|
||||
|
||||
-- Monitors are given arbitrary tags (the "monitor" prefix and the ID coming from hyprland).
|
||||
|
||||
-- If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
|
||||
|
||||
-- and leave the markers.
|
||||
|
||||
-- <<<<< TUI AUTO START
|
||||
|
||||
hl.monitor({
|
||||
output = "desc:BOE 0x0B29",
|
||||
mode = "2560x1600@120.00",
|
||||
position = "320x1440",
|
||||
scale = 1.33333333,
|
||||
transform = 0,
|
||||
vrr = 0,
|
||||
})
|
||||
|
||||
hl.monitor({
|
||||
output = "desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000",
|
||||
mode = "2560x1440@119.99800",
|
||||
position = "0x0",
|
||||
scale = 1.00000000,
|
||||
transform = 0,
|
||||
vrr = 0,
|
||||
})
|
||||
|
||||
-- <<<<< TUI AUTO END
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
STATE_FILE="/tmp/hypr_display_mode"
|
||||
INTERNAL="eDP-1"
|
||||
EXTERNAL=$(hyprctl monitors all -j | jq -r '.[].name' | grep -v "$INTERNAL" | head -1)
|
||||
CURRENT=$(cat "$STATE_FILE" 2>/dev/null || echo "both")
|
||||
|
||||
if [ -z "$EXTERNAL" ]; then
|
||||
notify-send "Display" "Aucun écran externe détecté" -t 2000
|
||||
exit 0
|
||||
fi
|
||||
|
||||
case "$CURRENT" in
|
||||
"both")
|
||||
hyprctl keyword monitor "$INTERNAL, disable"
|
||||
echo "external" > "$STATE_FILE"
|
||||
notify-send "Display" "Externe uniquement ($EXTERNAL)" -t 2000
|
||||
;;
|
||||
"external")
|
||||
hyprctl keyword monitor "$EXTERNAL, disable"
|
||||
hyprctl keyword monitor "$INTERNAL, 2560x1600@120.0, 0x0, 1.33"
|
||||
echo "internal" > "$STATE_FILE"
|
||||
notify-send "Display" "Interne uniquement" -t 2000
|
||||
;;
|
||||
"internal")
|
||||
hyprctl keyword monitor "$INTERNAL, 2560x1600@120.0, 1995x1440, 1.33"
|
||||
sleep 0.5
|
||||
hyprctl keyword monitor "$EXTERNAL, 2560x1440@120.0, 1697x0, 1"
|
||||
echo "both" > "$STATE_FILE"
|
||||
notify-send "Display" "Double écran" -t 2000
|
||||
;;
|
||||
esac
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
if grep -q "eco_mode=1" /proc/cmdline; then
|
||||
swaybg -c 000000 &
|
||||
swaybg -i ~/Pictures/wallpaper-eco.jpg -m fill &
|
||||
else
|
||||
swaybg -i ~/Pictures/wallpaper.jpg -m fill &
|
||||
fi
|
||||
33
.config/hyprdynamicmonitors/config-eco.toml
Normal file
33
.config/hyprdynamicmonitors/config-eco.toml
Normal file
@@ -0,0 +1,33 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
|
||||
[power_events]
|
||||
|
||||
[power_events.dbus_query_object]
|
||||
path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
[[power_events.dbus_signal_match_rules]]
|
||||
object_path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
|
||||
[profiles.dual]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/dual.go.tmpl"
|
||||
config_file_type = "template"
|
||||
[profiles.dual.conditions]
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "Shenzhen KTC Technology Group H27T7P-2 0000000000000"
|
||||
monitor_tag = "monitor1"
|
||||
|
||||
[profiles.solo]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/solo.go.tmpl"
|
||||
config_file_type = "template"
|
||||
|
||||
[profiles.solo.conditions]
|
||||
[[profiles.solo.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
37
.config/hyprdynamicmonitors/config-power.toml
Normal file
37
.config/hyprdynamicmonitors/config-power.toml
Normal file
@@ -0,0 +1,37 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
|
||||
[power_events]
|
||||
|
||||
[power_events.dbus_query_object]
|
||||
path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
[[power_events.dbus_signal_match_rules]]
|
||||
object_path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
|
||||
[profiles.dual]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/dual.go.tmpl"
|
||||
config_file_type = "template"
|
||||
[profiles.dual.conditions]
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "Shenzhen KTC Technology Group H27T7P-2 0000000000000"
|
||||
monitor_tag = "monitor1"
|
||||
|
||||
[profiles.solo]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/solo.go.tmpl"
|
||||
config_file_type = "template"
|
||||
|
||||
[profiles.solo.conditions]
|
||||
[[profiles.solo.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[fallback_profile]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/fallback.go.tmpl"
|
||||
config_file_type = "template"
|
||||
@@ -1,24 +0,0 @@
|
||||
[general]
|
||||
destination = "$HOME/.config/hypr/monitors.conf"
|
||||
|
||||
[power_events]
|
||||
|
||||
[power_events.dbus_query_object]
|
||||
path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
[[power_events.dbus_signal_match_rules]]
|
||||
object_path = "/org/freedesktop/UPower/devices/line_power_AC"
|
||||
|
||||
|
||||
[profiles.dual]
|
||||
config_file = "/home/lucas/.config/hyprdynamicmonitors/hyprconfigs/dual.go.tmpl"
|
||||
config_file_type = "template"
|
||||
[profiles.dual.conditions]
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "BOE 0x0B29"
|
||||
monitor_tag = "monitor0"
|
||||
|
||||
[[profiles.dual.conditions.required_monitors]]
|
||||
description = "Shenzhen KTC Technology Group H27T7P-2 0000000000000"
|
||||
monitor_tag = "monitor1"
|
||||
1
.config/hyprdynamicmonitors/config.toml
Symbolic link
1
.config/hyprdynamicmonitors/config.toml
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/lucas/.config/hyprdynamicmonitors/config-power.toml
|
||||
11
.config/hyprdynamicmonitors/hyprconfigs/dual-eco.go.tmpl
Normal file
11
.config/hyprdynamicmonitors/hyprconfigs/dual-eco.go.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
# Generated with hyprdynamicmonitors freeze.
|
||||
# This is a template that you can edit, it is just a starter that pulled your current monitor setup,
|
||||
# adjust as needed.
|
||||
# You can use templates here etc, see https://github.com/fiffeek/hyprdynamicmonitors/blob/main/examples/basic/hyprconfigs/template.go.tmpl.
|
||||
# Monitors are given arbitrary tags (the "monitor" prefix and the ID coming from hyprland).
|
||||
# If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
|
||||
# and leave the markers.
|
||||
# <<<<< TUI AUTO START
|
||||
monitor=desc:BOE 0x0B29,2560x1600@48.00,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
# <<<<< TUI AUTO END
|
||||
@@ -6,6 +6,6 @@
|
||||
# If you are using tui to edit, leave this at the end of your file (the last monitor config applies)
|
||||
# and leave the markers.
|
||||
# <<<<< TUI AUTO START
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00200,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,320x1440,1.33333333,transform,0,vrr,0
|
||||
monitor=desc:Shenzhen KTC Technology Group H27T7P-2 0000000000000,2560x1440@119.99800,0x0,1.00000000,transform,0,vrr,0
|
||||
# <<<<< TUI AUTO END
|
||||
|
||||
7
.config/hyprdynamicmonitors/hyprconfigs/fallback.go.tmpl
Normal file
7
.config/hyprdynamicmonitors/hyprconfigs/fallback.go.tmpl
Normal file
@@ -0,0 +1,7 @@
|
||||
{{- range .Monitors}}
|
||||
{{- if eq .Name "eDP-1"}}
|
||||
monitor=eDP-1,2560x1600@120,320x1440,1.3333334
|
||||
{{- else}}
|
||||
monitor={{.Name}},preferred,auto,1
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
1
.config/hyprdynamicmonitors/hyprconfigs/solo-eco.go.tmpl
Normal file
1
.config/hyprdynamicmonitors/hyprconfigs/solo-eco.go.tmpl
Normal file
@@ -0,0 +1 @@
|
||||
monitor=desc:BOE 0x0B29,2560x1600@48.00,0x0,1.33333333,transform,0,vrr,0
|
||||
1
.config/hyprdynamicmonitors/hyprconfigs/solo.go.tmpl
Normal file
1
.config/hyprdynamicmonitors/hyprconfigs/solo.go.tmpl
Normal file
@@ -0,0 +1 @@
|
||||
monitor=desc:BOE 0x0B29,2560x1600@120.00,0x0,1.33333333,transform,0,vrr,0
|
||||
@@ -23,6 +23,10 @@ audio/x-opus+ogg=mpv.desktop
|
||||
audio/flac=mpv.desktop
|
||||
video/x-matroska=mpv.desktop
|
||||
application/json=codium.desktop
|
||||
video/webm=mpv.desktop
|
||||
video/vnd.avi=mpv.desktop
|
||||
video/quicktime=mpv.desktop
|
||||
text/x-shellscript=codium.desktop
|
||||
|
||||
[Added Associations]
|
||||
x-scheme-handler/http=firefox.desktop;
|
||||
@@ -45,3 +49,11 @@ audio/flac=mpv.desktop;
|
||||
text/csv=onlyoffice-desktopeditors.desktop;codium.desktop;
|
||||
video/x-matroska=mpv.desktop;
|
||||
application/json=codium.desktop;
|
||||
video/webm=mpv.desktop;
|
||||
application/xml=codium.desktop;
|
||||
video/vnd.avi=mpv.desktop;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=onlyoffice-desktopeditors.desktop;
|
||||
video/quicktime=mpv.desktop;
|
||||
text/x-ssa=codium.desktop;org.aegisub.Aegisub.desktop;
|
||||
text/x-shellscript=codium.desktop;
|
||||
text/x-python3=codium.desktop;
|
||||
|
||||
Binary file not shown.
1
.config/systemd/user/xdg-desktop-portal-gtk.service
Symbolic link
1
.config/systemd/user/xdg-desktop-portal-gtk.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/dev/null
|
||||
7
.zshrc
7
.zshrc
@@ -51,10 +51,11 @@ export TERMINAL=alacritty
|
||||
bindkey '^[[3~' delete-char
|
||||
|
||||
# Update and clean
|
||||
alias update='yay -Syu --noconfirm && yay -Yc --noconfirm && sudo mkinitcpio -P && sudo /home/lucas/scripts/mkinitcpio-eco && clean'
|
||||
alias clean='sudo rm -f /var/cache/pacman/pkg/download-* 2>/dev/null; yay -Sc --noconfirm 2>/dev/null; sudo journalctl --vacuum-time=2weeks; pacman -Qdtq | grep -q . && sudo pacman -Rns $(pacman -Qdtq) 2>/dev/null || true'
|
||||
alias update='yay -Syu --noconfirm && yay -Yc --noconfirm && sudo mkinitcpio -P && sudo /home/lucas/scripts/mkinitcpio-eco && rm -f ~/.cache/updates-count && clean'
|
||||
alias clean='/home/lucas/scripts/clean.sh'
|
||||
alias clr='clear'
|
||||
alias dotpush='~/scripts/dotpush.sh'
|
||||
alias etcpush='sudo etckeeper commit "Sauvegarde auto $(date "+%Y-%m-%d %H:%M")"'
|
||||
|
||||
alias rembg='~/.venv/rembg/bin/rembg'
|
||||
alias pio="$HOME/.platformio/penv/bin/pio"
|
||||
@@ -62,3 +63,5 @@ alias pio="$HOME/.platformio/penv/bin/pio"
|
||||
# Created by `pipx` on 2026-06-16 16:04:30
|
||||
export PATH="$PATH:/home/lucas/.local/bin"
|
||||
alias config='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
|
||||
alias obs='OBS_USE_EGL=1 obs'
|
||||
export PATH="$HOME/.local/share/flutter/bin:$PATH"
|
||||
|
||||
14
scripts/auto/extract-lrc.sh
Executable file
14
scripts/auto/extract-lrc.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
for file in "$@"; do
|
||||
# Vérifie si c'est un fichier opus
|
||||
if [[ "$file" == *.opus ]]; then
|
||||
# Extrait et formate les paroles
|
||||
lyrics=$(exiftool -b -Syncedlyrics "$file" | sed 's/\[/\n\[/g' | sed '/^$/d')
|
||||
|
||||
# Crée le fichier .lrc uniquement si le tag n'est pas vide
|
||||
if [ -n "$lyrics" ]; then
|
||||
echo "$lyrics" > "${file%.*}.lrc"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
4
scripts/auto/to-opus.sh
Executable file
4
scripts/auto/to-opus.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
for f in "$@"; do
|
||||
ffmpeg -i "$f" -c:a libopus -b:a 160k "${f%.*}.opus"
|
||||
done
|
||||
41
scripts/backups/pkglist_aur.txt
Normal file
41
scripts/backups/pkglist_aur.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
adwaita-qt5-git
|
||||
adwaita-qt6-git
|
||||
android-studio
|
||||
appimagelauncher
|
||||
balena-etcher
|
||||
beeper-v4-bin
|
||||
bibata-cursor-theme-bin
|
||||
catppuccin-gtk-theme-mocha
|
||||
chirp-next
|
||||
chromium-widevine
|
||||
cnrdrvcups-lb-bin
|
||||
collabora-office
|
||||
dell-command-configure
|
||||
dupeguru
|
||||
electron40-bin
|
||||
gimp-plugin-resynthesizer
|
||||
google-chrome
|
||||
hyprdynamicmonitors-bin
|
||||
hyprgraphics-git
|
||||
hyprlang-git
|
||||
hyprutils-git
|
||||
hyprwayland-scanner-git
|
||||
kdeconnect-git
|
||||
libjpeg6-turbo
|
||||
log2ram
|
||||
networkmanager-dmenu-git
|
||||
onlyoffice-bin
|
||||
openssl-1.1
|
||||
orca-slicer-bin
|
||||
pinta
|
||||
python-yattag
|
||||
refind-theme-catppuccin-git
|
||||
rustdesk-bin
|
||||
sddm-theme-catppuccin-git
|
||||
ungoogled-chromium-bin
|
||||
ventoy-bin
|
||||
vesktop-bin
|
||||
vscodium-bin
|
||||
wlogout
|
||||
yay
|
||||
zsh-theme-powerlevel10k-git
|
||||
180
scripts/backups/pkglist_officiel.txt
Normal file
180
scripts/backups/pkglist_officiel.txt
Normal file
@@ -0,0 +1,180 @@
|
||||
adwaita-qt5-git
|
||||
adwaita-qt6-git
|
||||
alacritty
|
||||
android-studio
|
||||
appimagelauncher
|
||||
audacity
|
||||
balena-etcher
|
||||
base
|
||||
base-devel
|
||||
bc
|
||||
beeper-v4-bin
|
||||
bibata-cursor-theme-bin
|
||||
blender
|
||||
blueman
|
||||
bluez
|
||||
bluez-utils
|
||||
bolt
|
||||
brightnessctl
|
||||
btop
|
||||
catppuccin-gtk-theme-mocha
|
||||
chirp-next
|
||||
chromium-widevine
|
||||
cliphist
|
||||
cnrdrvcups-lb-bin
|
||||
collabora-office
|
||||
converseen
|
||||
cups
|
||||
dell-command-configure
|
||||
dex
|
||||
dnsmasq
|
||||
drawio-desktop
|
||||
dupeguru
|
||||
exfat-utils
|
||||
eza
|
||||
f3d
|
||||
file-roller
|
||||
firefox
|
||||
flatpak
|
||||
fwupd
|
||||
gamemode
|
||||
ghostscript
|
||||
gimp
|
||||
gimp-plugin-gmic
|
||||
gimp-plugin-resynthesizer
|
||||
git
|
||||
github-cli
|
||||
gnome-calculator
|
||||
gnome-characters
|
||||
gnome-keyring
|
||||
godot
|
||||
google-chrome
|
||||
gptfdisk
|
||||
grim
|
||||
gst-plugin-pipewire
|
||||
gvfs
|
||||
gvfs-afc
|
||||
gvfs-mtp
|
||||
gvfs-smb
|
||||
handbrake
|
||||
hyprdynamicmonitors-bin
|
||||
hypridle
|
||||
hyprland
|
||||
hyprlock
|
||||
inkscape
|
||||
intel-gpu-tools
|
||||
intel-media-driver
|
||||
intel-ucode
|
||||
iwd
|
||||
jq
|
||||
kasts
|
||||
kdeconnect-git
|
||||
kdenlive
|
||||
kid3-qt
|
||||
lib32-gamemode
|
||||
lib32-nvidia-utils
|
||||
libva-utils
|
||||
libvirt
|
||||
linux
|
||||
linux-firmware
|
||||
linux-headers
|
||||
log2ram
|
||||
mako
|
||||
man-db
|
||||
man-pages
|
||||
mesa-utils
|
||||
mixxx
|
||||
mpv
|
||||
mtools
|
||||
mumble
|
||||
nano
|
||||
ncdu
|
||||
ncspot
|
||||
network-manager-applet
|
||||
networkmanager
|
||||
networkmanager-dmenu-git
|
||||
nextcloud-client
|
||||
nm-connection-editor
|
||||
nmap
|
||||
noto-fonts-cjk
|
||||
nvidia-open-dkms
|
||||
nvidia-settings
|
||||
nvidia-utils
|
||||
nvtop
|
||||
nwg-look
|
||||
obs-studio
|
||||
obsidian
|
||||
onlyoffice-bin
|
||||
orca-slicer-bin
|
||||
pacman-contrib
|
||||
pamixer
|
||||
papirus-icon-theme
|
||||
pavucontrol
|
||||
pinta
|
||||
pipewire-alsa
|
||||
pipewire-pulse
|
||||
plymouth
|
||||
polkit-kde-agent
|
||||
power-profiles-daemon
|
||||
powertop
|
||||
python-build
|
||||
python-installer
|
||||
python-pipx
|
||||
qemu-full
|
||||
qt5-graphicaleffects
|
||||
qt5-quickcontrols2
|
||||
qt5-svg
|
||||
qt5-wayland
|
||||
qt6-5compat
|
||||
qt6-wayland
|
||||
refind
|
||||
refind-theme-catppuccin-git
|
||||
rofi
|
||||
rustdesk-bin
|
||||
sane-airscan
|
||||
sddm
|
||||
sddm-theme-catppuccin-git
|
||||
seahorse
|
||||
signal-desktop
|
||||
slurp
|
||||
sof-firmware
|
||||
steam
|
||||
swaybg
|
||||
syncthing
|
||||
system-config-printer
|
||||
texinfo
|
||||
thermald
|
||||
throttled
|
||||
thunar
|
||||
thunar-archive-plugin
|
||||
thunderbird
|
||||
timeshift
|
||||
tree
|
||||
ttf-jetbrains-mono-nerd
|
||||
tumbler
|
||||
ungoogled-chromium-bin
|
||||
unzip
|
||||
ventoy-bin
|
||||
vesktop-bin
|
||||
viewnior
|
||||
virt-manager
|
||||
vscodium-bin
|
||||
vulkan-intel
|
||||
waybar
|
||||
websocat
|
||||
wget
|
||||
wine
|
||||
wine-gecko
|
||||
wine-mono
|
||||
wireguard-tools
|
||||
wl-clipboard
|
||||
wlogout
|
||||
woff2-font-awesome
|
||||
wol
|
||||
xdg-desktop-portal-hyprland
|
||||
yay
|
||||
ydotool
|
||||
yt-dlp
|
||||
zram-generator
|
||||
zsh
|
||||
zsh-theme-powerlevel10k-git
|
||||
35
scripts/clean.sh
Executable file
35
scripts/clean.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "==> Suppression téléchargements partiels..."
|
||||
sudo rm -f /var/cache/pacman/pkg/download-* 2>/dev/null || true
|
||||
|
||||
echo "==> Nettoyage cache pacman..."
|
||||
sudo paccache -r -k1 -q 2>/dev/null || true
|
||||
|
||||
echo "==> Nettoyage orphelins yay..."
|
||||
yay -Yc --noconfirm 2>/dev/null || true
|
||||
|
||||
echo "==> Rotation journaux systemd..."
|
||||
sudo journalctl --vacuum-time=2weeks 2>/dev/null || true
|
||||
|
||||
echo "==> Suppression paquets orphelins..."
|
||||
orphans=$(pacman -Qdtq 2>/dev/null) || true
|
||||
if [ -n "$orphans" ]; then
|
||||
sudo pacman -Rns $orphans --noconfirm || true
|
||||
else
|
||||
echo " Aucun orphelin."
|
||||
fi
|
||||
|
||||
echo "==> Nettoyage cache utilisateur..."
|
||||
find ~/.cache -type f -delete 2>/dev/null || true
|
||||
find ~/.cache -type d -empty -delete 2>/dev/null || true
|
||||
|
||||
echo "==> Nettoyage npm..."
|
||||
npm cache clean --force 2>/dev/null || true
|
||||
|
||||
echo "==> Nettoyage historiques..."
|
||||
> ~/.lesshst
|
||||
> ~/.wget-hsts
|
||||
|
||||
echo "==> Terminé."
|
||||
2
scripts/display-manager.sh
Executable file
2
scripts/display-manager.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
alacritty -e hyprdynamicmonitors tui
|
||||
9
scripts/download-youtube-mp4.sh
Executable file
9
scripts/download-youtube-mp4.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
# Usage: ./download-youtube 'URL'
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Erreur : donne une URL YouTube en argument."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]" -o "%(title)s.%(ext)s" "$1"
|
||||
129
scripts/download-youtube-xjadeo.sh
Executable file
129
scripts/download-youtube-xjadeo.sh
Executable file
@@ -0,0 +1,129 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Script de téléchargement et conversion pour xjadeo
|
||||
# Dépendances : yt-dlp, ffmpeg
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Couleurs pour l'affichage
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
# Fonction d'affichage
|
||||
info() { echo -e "${BLUE}[INFO]${NC} $1"; }
|
||||
success() { echo -e "${GREEN}[OK]${NC} $1"; }
|
||||
error() { echo -e "${RED}[ERREUR]${NC} $1" >&2; }
|
||||
warn() { echo -e "${YELLOW}[ATTENTION]${NC} $1"; }
|
||||
|
||||
# Vérification des dépendances
|
||||
check_deps() {
|
||||
local missing=()
|
||||
if ! command -v yt-dlp &> /dev/null; then
|
||||
missing+=("yt-dlp")
|
||||
fi
|
||||
if ! command -v ffmpeg &> /dev/null; then
|
||||
missing+=("ffmpeg")
|
||||
fi
|
||||
if [ ${#missing[@]} -ne 0 ]; then
|
||||
error "Dépendances manquantes : ${missing[*]}"
|
||||
error "Installe-les avec : sudo pacman -S yt-dlp ffmpeg (Arch) ou sudo apt install yt-dlp ffmpeg (Debian/Ubuntu)"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Demande de l'URL
|
||||
get_url() {
|
||||
if [ $# -eq 1 ]; then
|
||||
URL="$1"
|
||||
info "URL fournie en argument : $URL"
|
||||
else
|
||||
read -rp "URL YouTube : " URL
|
||||
fi
|
||||
if [[ -z "$URL" ]]; then
|
||||
error "Aucune URL saisie."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Demande du nom de fichier
|
||||
get_filename() {
|
||||
# Essaie d'extraire un titre temporaire avec yt-dlp --get-title
|
||||
local suggested=""
|
||||
if command -v yt-dlp &> /dev/null; then
|
||||
suggested=$(yt-dlp --get-title "$URL" 2>/dev/null | sed 's/[^a-zA-Z0-9._-]/_/g' | head -c 80)
|
||||
fi
|
||||
if [ -z "$suggested" ]; then
|
||||
suggested="video"
|
||||
fi
|
||||
read -rp "Nom du fichier (sans extension) [$suggested] : " input_name
|
||||
FILENAME="${input_name:-$suggested}"
|
||||
}
|
||||
|
||||
# Téléchargement
|
||||
download_video() {
|
||||
info "Téléchargement de la vidéo depuis $URL..."
|
||||
# Télécharge la meilleure qualité vidéo+audio et fusionne en MKV
|
||||
yt-dlp -f "bestvideo+bestaudio" --merge-output-format mkv -o "${FILENAME}.%(ext)s" "$URL"
|
||||
# Recherche le fichier produit (peut être .mkv ou .webm)
|
||||
SOURCE_FILE=$(find . -maxdepth 1 -name "${FILENAME}.*" -type f | head -1)
|
||||
if [ -z "$SOURCE_FILE" ]; then
|
||||
error "Fichier téléchargé introuvable."
|
||||
exit 1
|
||||
fi
|
||||
success "Téléchargement terminé : $SOURCE_FILE"
|
||||
}
|
||||
|
||||
# Proposer la conversion
|
||||
ask_conversion() {
|
||||
echo ""
|
||||
read -rp "Souhaites-tu convertir cette vidéo au format MJPEG/AVI pour xjadeo ? (o/N) " convert_choice
|
||||
case "$convert_choice" in
|
||||
o|O|oui|Oui|y|Y|yes|Yes) CONVERT="yes" ;;
|
||||
*) CONVERT="no" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Conversion
|
||||
convert_video() {
|
||||
local output_file="${FILENAME}_xjadeo.avi"
|
||||
info "Conversion en cours vers $output_file..."
|
||||
# Qualité vidéo : on demande un paramètre
|
||||
read -rp "Qualité vidéo MJPEG (q:v de 2 à 31, 2=meilleure) [2] : " qv
|
||||
qv="${qv:-2}"
|
||||
if ! [[ "$qv" =~ ^[0-9]+$ ]] || [ "$qv" -lt 2 ] || [ "$qv" -gt 31 ]; then
|
||||
warn "Valeur invalide, utilisation de 2"
|
||||
qv=2
|
||||
fi
|
||||
ffmpeg -i "$SOURCE_FILE" -c:v mjpeg -q:v "$qv" -c:a pcm_s16le -fflags +genpts "$output_file"
|
||||
if [ $? -eq 0 ]; then
|
||||
success "Conversion terminée : $output_file"
|
||||
read -rp "Supprimer le fichier source ($SOURCE_FILE) ? (o/N) " del_choice
|
||||
case "$del_choice" in
|
||||
o|O|oui|Oui|y|Y|yes|Yes) rm -v "$SOURCE_FILE" ;;
|
||||
*) info "Fichier source conservé." ;;
|
||||
esac
|
||||
else
|
||||
error "La conversion a échoué."
|
||||
fi
|
||||
}
|
||||
|
||||
# Fonction principale
|
||||
main() {
|
||||
check_deps
|
||||
get_url "$@"
|
||||
get_filename
|
||||
download_video
|
||||
ask_conversion
|
||||
if [ "$CONVERT" = "yes" ]; then
|
||||
convert_video
|
||||
else
|
||||
info "Aucune conversion demandée. Le fichier source est $SOURCE_FILE"
|
||||
fi
|
||||
info "Terminé."
|
||||
}
|
||||
|
||||
# Exécution
|
||||
main "$@"
|
||||
6
scripts/hdm-config-select.sh
Executable file
6
scripts/hdm-config-select.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
if grep -q "eco_mode=1" /proc/cmdline; then
|
||||
ln -sf "$HOME/.config/hyprdynamicmonitors/config-eco.toml" "$HOME/.config/hyprdynamicmonitors/config.toml"
|
||||
else
|
||||
ln -sf "$HOME/.config/hyprdynamicmonitors/config-power.toml" "$HOME/.config/hyprdynamicmonitors/config.toml"
|
||||
fi
|
||||
@@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
sudo mkinitcpio -c /etc/mkinitcpio-eco.conf -g /boot/initramfs-linux-eco.img
|
||||
87
scripts/network-hotspot.sh
Executable file
87
scripts/network-hotspot.sh
Executable file
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Réinitialise le hotspot "2Limited" sur la carte WiFi disponible.
|
||||
# Utilisation : sudo ./reset_hotspot.sh
|
||||
#
|
||||
|
||||
set -e # stop en cas d'erreur
|
||||
|
||||
# --- Configuration ---
|
||||
SSID="2Limited"
|
||||
PASS="calais62"
|
||||
CHANNEL=6
|
||||
CONN_NAME="2Limited"
|
||||
|
||||
# --- Détection de l'interface WiFi ---
|
||||
detect_wifi() {
|
||||
# Liste des interfaces WiFi gérées par NetworkManager (hors loopback, ethernet, etc.)
|
||||
local iface=$(nmcli -t -f TYPE,DEVICE device | grep -E '^wifi:' | head -1 | cut -d: -f2)
|
||||
if [ -z "$iface" ]; then
|
||||
echo "❌ Aucune interface WiFi détectée."
|
||||
exit 1
|
||||
fi
|
||||
echo "$iface"
|
||||
}
|
||||
|
||||
# --- Nettoyage de l'ancienne connexion ---
|
||||
clean_connection() {
|
||||
if nmcli con show "$CONN_NAME" &>/dev/null; then
|
||||
echo "🔁 Suppression de l'ancienne connexion '$CONN_NAME'..."
|
||||
sudo nmcli con delete "$CONN_NAME" >/dev/null 2>&1 || true
|
||||
fi
|
||||
}
|
||||
|
||||
# --- Création du hotspot ---
|
||||
create_hotspot() {
|
||||
local iface="$1"
|
||||
echo "📡 Création du hotspot sur $iface..."
|
||||
sudo nmcli con add type wifi ifname "$iface" mode ap con-name "$CONN_NAME" ssid "$SSID" >/dev/null
|
||||
|
||||
sudo nmcli con mod "$CONN_NAME" 802-11-wireless.mode ap
|
||||
sudo nmcli con mod "$CONN_NAME" 802-11-wireless.band bg
|
||||
sudo nmcli con mod "$CONN_NAME" 802-11-wireless.channel "$CHANNEL"
|
||||
sudo nmcli con mod "$CONN_NAME" wifi-sec.key-mgmt wpa-psk
|
||||
sudo nmcli con mod "$CONN_NAME" wifi-sec.psk "$PASS"
|
||||
sudo nmcli con mod "$CONN_NAME" 802-11-wireless.powersave 2
|
||||
sudo nmcli con mod "$CONN_NAME" ipv4.method shared
|
||||
sudo nmcli con mod "$CONN_NAME" connection.autoconnect yes
|
||||
}
|
||||
|
||||
# --- Démarrage du hotspot ---
|
||||
start_hotspot() {
|
||||
echo "▶️ Démarrage du hotspot..."
|
||||
sudo nmcli con up "$CONN_NAME" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "✅ Hotspot '$SSID' actif."
|
||||
# Afficher l'IP de la passerelle (le PC)
|
||||
local gateway=$(ip -4 addr show "$(nmcli -t -f DEVICE device status | grep -E '^wlan' | cut -d: -f1)" | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)
|
||||
echo "🌐 IP du PC (passerelle) : $gateway"
|
||||
echo "🔑 Mot de passe : $PASS"
|
||||
echo "📶 Canal : $CHANNEL"
|
||||
else
|
||||
echo "❌ Échec du démarrage du hotspot."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# --- Exécution ---
|
||||
main() {
|
||||
echo "🔄 Réinitialisation du hotspot '$SSID'..."
|
||||
WIFI_IFACE=$(detect_wifi)
|
||||
echo "🔌 Interface détectée : $WIFI_IFACE"
|
||||
|
||||
clean_connection
|
||||
create_hotspot "$WIFI_IFACE"
|
||||
start_hotspot
|
||||
|
||||
echo ""
|
||||
echo "✨ Prêt ! L'ESP peut maintenant se connecter à '$SSID'."
|
||||
}
|
||||
|
||||
# Vérification des droits
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "⚠️ Ce script nécessite les droits root. Relance avec sudo."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
main
|
||||
2
scripts/network-switch-local.sh
Executable file
2
scripts/network-switch-local.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
sudo nmcli connection up "Switch-Local"
|
||||
sudo systemctl start dnsmasq
|
||||
@@ -12,30 +12,35 @@ cnrdrvcups-lb-bin
|
||||
collabora-office
|
||||
dell-command-configure
|
||||
dupeguru
|
||||
electron40-bin
|
||||
electron37
|
||||
gimp-plugin-resynthesizer
|
||||
glava
|
||||
google-chrome
|
||||
grimblast-git
|
||||
gtk2
|
||||
hyprdynamicmonitors-bin
|
||||
hyprgraphics-git
|
||||
hyprlang-git
|
||||
hyprutils-git
|
||||
hyprwayland-scanner-git
|
||||
kdeconnect-git
|
||||
libjpeg6-turbo
|
||||
log2ram
|
||||
networkmanager-dmenu-git
|
||||
obs-advanced-masks
|
||||
obs-move-transition
|
||||
onlyoffice-bin
|
||||
openssl-1.1
|
||||
orca-slicer-bin
|
||||
pinta
|
||||
python-yattag
|
||||
refind-theme-catppuccin-git
|
||||
rsgain
|
||||
rtpmidid-bin
|
||||
rustdesk-bin
|
||||
sddm-theme-catppuccin-git
|
||||
spotify
|
||||
ungoogled-chromium-bin
|
||||
ventoy-bin
|
||||
vesktop-bin
|
||||
vibe-audio-visualizer-git
|
||||
vscodium-bin
|
||||
wlogout
|
||||
xwaylandvideobridge
|
||||
yay
|
||||
zsh-theme-powerlevel10k-git
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
adwaita-qt5-git
|
||||
adwaita-qt6-git
|
||||
aegisub
|
||||
alacritty
|
||||
alsa-firmware
|
||||
alsa-utils
|
||||
android-studio
|
||||
android-tools
|
||||
android-udev
|
||||
appimagelauncher
|
||||
audacity
|
||||
balena-etcher
|
||||
@@ -18,6 +23,7 @@ bolt
|
||||
brightnessctl
|
||||
btop
|
||||
catppuccin-gtk-theme-mocha
|
||||
cdrtools
|
||||
chirp-next
|
||||
chromium-widevine
|
||||
cliphist
|
||||
@@ -30,11 +36,13 @@ dex
|
||||
dnsmasq
|
||||
drawio-desktop
|
||||
dupeguru
|
||||
etckeeper
|
||||
exfat-utils
|
||||
eza
|
||||
f3d
|
||||
file-roller
|
||||
firefox
|
||||
firefox-i18n-fr
|
||||
flatpak
|
||||
fwupd
|
||||
gamemode
|
||||
@@ -44,6 +52,7 @@ gimp-plugin-gmic
|
||||
gimp-plugin-resynthesizer
|
||||
git
|
||||
github-cli
|
||||
glava
|
||||
gnome-calculator
|
||||
gnome-characters
|
||||
gnome-keyring
|
||||
@@ -51,6 +60,7 @@ godot
|
||||
google-chrome
|
||||
gptfdisk
|
||||
grim
|
||||
grimblast-git
|
||||
gst-plugin-pipewire
|
||||
gvfs
|
||||
gvfs-afc
|
||||
@@ -66,6 +76,8 @@ intel-gpu-tools
|
||||
intel-media-driver
|
||||
intel-ucode
|
||||
iwd
|
||||
jack2
|
||||
jdk17-openjdk
|
||||
jq
|
||||
kasts
|
||||
kdeconnect-git
|
||||
@@ -83,6 +95,7 @@ mako
|
||||
man-db
|
||||
man-pages
|
||||
mesa-utils
|
||||
meson
|
||||
mixxx
|
||||
mpv
|
||||
mtools
|
||||
@@ -97,19 +110,25 @@ nextcloud-client
|
||||
nm-connection-editor
|
||||
nmap
|
||||
noto-fonts-cjk
|
||||
ntfs-3g
|
||||
ntfsprogs
|
||||
nvidia-open-dkms
|
||||
nvidia-settings
|
||||
nvidia-utils
|
||||
nvtop
|
||||
nwg-look
|
||||
obs-advanced-masks
|
||||
obs-move-transition
|
||||
obs-studio
|
||||
obsidian
|
||||
onlyoffice-bin
|
||||
openrct2
|
||||
orca-slicer-bin
|
||||
pacman-contrib
|
||||
pamixer
|
||||
papirus-icon-theme
|
||||
pavucontrol
|
||||
perl-image-exiftool
|
||||
pinta
|
||||
pipewire-alsa
|
||||
pipewire-pulse
|
||||
@@ -117,6 +136,7 @@ plymouth
|
||||
polkit-kde-agent
|
||||
power-profiles-daemon
|
||||
powertop
|
||||
projectm
|
||||
python-build
|
||||
python-installer
|
||||
python-pipx
|
||||
@@ -130,18 +150,24 @@ qt6-wayland
|
||||
refind
|
||||
refind-theme-catppuccin-git
|
||||
rofi
|
||||
rsgain
|
||||
rtpmidid-bin
|
||||
rustdesk-bin
|
||||
sane-airscan
|
||||
sbctl
|
||||
sddm
|
||||
sddm-theme-catppuccin-git
|
||||
seahorse
|
||||
signal-desktop
|
||||
slurp
|
||||
sof-firmware
|
||||
spotify
|
||||
sqlcipher
|
||||
steam
|
||||
swaybg
|
||||
syncthing
|
||||
system-config-printer
|
||||
tcpdump
|
||||
texinfo
|
||||
thermald
|
||||
throttled
|
||||
@@ -156,6 +182,7 @@ ungoogled-chromium-bin
|
||||
unzip
|
||||
ventoy-bin
|
||||
vesktop-bin
|
||||
vibe-audio-visualizer-git
|
||||
viewnior
|
||||
virt-manager
|
||||
vscodium-bin
|
||||
@@ -163,6 +190,7 @@ vulkan-intel
|
||||
waybar
|
||||
websocat
|
||||
wget
|
||||
whois
|
||||
wine
|
||||
wine-gecko
|
||||
wine-mono
|
||||
@@ -172,6 +200,8 @@ wlogout
|
||||
woff2-font-awesome
|
||||
wol
|
||||
xdg-desktop-portal-hyprland
|
||||
xjadeo
|
||||
xwaylandvideobridge
|
||||
yay
|
||||
ydotool
|
||||
yt-dlp
|
||||
|
||||
Reference in New Issue
Block a user