mirror of
https://github.com/arthur-pbty/archinstallscript.git
synced 2026-08-01 20:28:08 +02:00
Amélioration de l'installation et de la configuration : ajout de nouveaux paquets, mise à jour de la configuration de Hyprland et automatisation de la connexion TTY avec demande de mot de passe.
This commit is contained in:
+325
-162
@@ -93,13 +93,15 @@ mkdir -p /mnt/boot
|
|||||||
mount "$PART_EFI" /mnt/boot
|
mount "$PART_EFI" /mnt/boot
|
||||||
|
|
||||||
# 6. Installation du système strict minimum et optimisé
|
# 6. Installation du système strict minimum et optimisé
|
||||||
echo "[INFO] Installation des paquets (Noyau ZEN, Hyprland, Wayland, Opti Laptop)..."
|
echo "[INFO] Installation des paquets (Noyau ZEN, Hyprland, Wayland, Opti Laptop, TUI)..."
|
||||||
pacstrap /mnt base base-devel linux-zen linux-zen-headers linux-firmware btrfs-progs \
|
pacstrap /mnt base base-devel linux-zen linux-zen-headers linux-firmware btrfs-progs \
|
||||||
networkmanager sudo git neovim \
|
networkmanager sudo git neovim \
|
||||||
$MICROCODE power-profiles-daemon thermald acpi acpid brightnessctl \
|
$MICROCODE power-profiles-daemon thermald acpi acpid brightnessctl \
|
||||||
pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber \
|
pipewire pipewire-pulse pipewire-alsa pipewire-jack wireplumber \
|
||||||
mesa wayland xdg-desktop-portal xdg-desktop-portal-hyprland \
|
mesa wayland xdg-desktop-portal xdg-desktop-portal-hyprland \
|
||||||
hyprland wofi waybar swaybg ttf-jetbrains-mono-nerd
|
hyprland wofi waybar swaybg ttf-jetbrains-mono-nerd \
|
||||||
|
bluez bluez-utils thunar playerctl \
|
||||||
|
fastfetch btop htop ncdu yazi lazygit
|
||||||
|
|
||||||
# 7. Génération fstab optimisée
|
# 7. Génération fstab optimisée
|
||||||
echo "[INFO] Génération du fstab..."
|
echo "[INFO] Génération du fstab..."
|
||||||
@@ -172,200 +174,361 @@ systemctl enable NetworkManager
|
|||||||
systemctl enable power-profiles-daemon
|
systemctl enable power-profiles-daemon
|
||||||
systemctl enable thermald
|
systemctl enable thermald
|
||||||
systemctl enable acpid
|
systemctl enable acpid
|
||||||
|
systemctl enable bluetooth
|
||||||
|
|
||||||
# Installation de Ghostty via AUR (yay)
|
# Connexion TTY automatique (demande juste le mot de passe)
|
||||||
echo "[INFO] Installation de yay et ghostty..."
|
mkdir -p /etc/systemd/system/getty@tty1.service.d
|
||||||
sudo -u $USERNAME bash -c "cd /tmp && git clone https://aur.archlinux.org/yay.git && cd yay && makepkg -si --noconfirm"
|
cat << GETTYCONF > /etc/systemd/system/getty@tty1.service.d/override.conf
|
||||||
sudo -u $USERNAME bash -c "yay -S --noconfirm ghostty-git || yay -S --noconfirm ghostty || true"
|
[Service]
|
||||||
|
ExecStart=
|
||||||
|
ExecStart=-/usr/bin/agetty --autologin $USERNAME --noclear %I \$TERM
|
||||||
|
GETTYCONF
|
||||||
|
|
||||||
# Configuration Hyprland & Login TTY
|
# Configuration AUR (paru) et mots de passe automatisés
|
||||||
|
echo "[INFO] Configuration de sudo sans mot de passe temporaire pour l'installation AUR..."
|
||||||
|
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/temp
|
||||||
|
chmod 0440 /etc/sudoers.d/temp
|
||||||
|
|
||||||
|
echo "[INFO] Installation de paru et ghostty..."
|
||||||
|
sudo -u $USERNAME bash -c "cd /tmp && git clone https://aur.archlinux.org/paru.git && cd paru && makepkg -si --noconfirm"
|
||||||
|
sudo -u $USERNAME bash -c "paru -S --noconfirm ghostty-git bluetui || true"
|
||||||
|
|
||||||
|
echo "[INFO] Restauration de la sécurité sudo..."
|
||||||
|
rm -f /etc/sudoers.d/temp
|
||||||
|
|
||||||
|
# Configuration Hyprland, Waybar & Login TTY
|
||||||
USER_HOME="/home/$USERNAME"
|
USER_HOME="/home/$USERNAME"
|
||||||
mkdir -p \$USER_HOME/.config/hypr
|
mkdir -p \$USER_HOME/.config/hypr
|
||||||
mkdir -p \$USER_HOME/.config/waybar
|
mkdir -p \$USER_HOME/.config/waybar
|
||||||
|
|
||||||
# Suppression de l'ancien fichier lua s'il existe
|
# Suppression de l'ancien fichier si existe
|
||||||
rm -f \$USER_HOME/.config/hypr/hyprland.lua
|
rm -f \$USER_HOME/.config/hypr/hyprland.conf
|
||||||
|
|
||||||
cp -r /etc/xdg/waybar/* \$USER_HOME/.config/waybar/ 2>/dev/null || true
|
# Création de la configuration Waybar (Verticale gauche, fond noir)
|
||||||
|
cat << 'WAYBARCONF' > \$USER_HOME/.config/waybar/config
|
||||||
# Création de la configuration Hyprland (Syntaxe Hyprland standard)
|
{
|
||||||
cat << 'HYPRCONF' > \$USER_HOME/.config/hypr/hyprland.conf
|
"layer": "top",
|
||||||
# Configuration de base Hyprland
|
"position": "left",
|
||||||
monitor=,preferred,auto,1
|
"width": 30,
|
||||||
|
"height": "auto",
|
||||||
$terminal = ghostty
|
"spacing": 4,
|
||||||
$fileManager = thunar
|
"modules-left": ["wlr/workspaces"],
|
||||||
$menu = wofi --show drun
|
"modules-center": ["pulseaudio", "network", "bluetooth", "battery"],
|
||||||
|
"modules-right": ["clock"],
|
||||||
# Autostart
|
"wlr/workspaces": {
|
||||||
exec-once = waybar
|
"format": "{icon}",
|
||||||
exec-once = swaybg -c '#000000'
|
"on-click": "activate"
|
||||||
|
},
|
||||||
# Environment variables
|
"clock": {
|
||||||
env = XCURSOR_SIZE,24
|
"format": "{:%H\n%M\n%d\n%m}",
|
||||||
env = HYPRCURSOR_SIZE,24
|
"tooltip-format": "<tt>{calendar}</tt>"
|
||||||
|
},
|
||||||
# Look and Feel
|
"pulseaudio": {
|
||||||
general {
|
"format": "{volume}%\n{icon}",
|
||||||
gaps_in = 5
|
"format-muted": "MUTE",
|
||||||
gaps_out = 20
|
"format-icons": {
|
||||||
border_size = 2
|
"default": ["VOL"]
|
||||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
}
|
||||||
col.inactive_border = rgba(595959aa)
|
},
|
||||||
resize_on_border = false
|
"network": {
|
||||||
allow_tearing = false
|
"format-wifi": "WIFI\n{essid}",
|
||||||
layout = dwindle
|
"format-ethernet": "ETH",
|
||||||
}
|
"format-disconnected": "DISC"
|
||||||
|
},
|
||||||
decoration {
|
"bluetooth": {
|
||||||
rounding = 10
|
"format": "BT\n{status}",
|
||||||
rounding_power = 2
|
"format-connected": "BT\n{device_alias}",
|
||||||
active_opacity = 1.0
|
"format-off": "BT OFF"
|
||||||
inactive_opacity = 1.0
|
},
|
||||||
shadow {
|
"battery": {
|
||||||
enabled = true
|
"format": "{capacity}%\n{icon}",
|
||||||
range = 4
|
"format-icons": ["BAT"]
|
||||||
render_power = 3
|
|
||||||
color = 0xee1a1a1a
|
|
||||||
}
|
|
||||||
blur {
|
|
||||||
enabled = true
|
|
||||||
size = 3
|
|
||||||
passes = 1
|
|
||||||
vibrancy = 0.1696
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
WAYBARCONF
|
||||||
|
|
||||||
animations {
|
cat << 'WAYBARCSS' > \$USER_HOME/.config/waybar/style.css
|
||||||
enabled = true
|
* {
|
||||||
bezier = easeOutQuint,0.23,1,0.32,1
|
font-family: "JetBrainsMono Nerd Font", monospace;
|
||||||
bezier = easeInOutCubic,0.65,0.05,0.36,1
|
font-size: 14px;
|
||||||
bezier = linear,0,0,1,1
|
color: #ffffff;
|
||||||
bezier = almostLinear,0.5,0.5,0.75,1
|
|
||||||
bezier = quick,0.15,0,0.1,1
|
|
||||||
bezier = easy,1,238.1191,24.21279333
|
|
||||||
animation = global,1,10,default
|
|
||||||
animation = border,1,5.39,easeOutQuint
|
|
||||||
animation = windows,1,4.79,easy
|
|
||||||
animation = windowsIn,1,4.1,easy,popin 87%
|
|
||||||
animation = windowsOut,1,1.49,linear,popin 87%
|
|
||||||
animation = fadeIn,1,1.73,almostLinear
|
|
||||||
animation = fadeOut,1,1.46,almostLinear
|
|
||||||
animation = fade,1,3.03,quick
|
|
||||||
animation = layers,1,3.81,easeOutQuint
|
|
||||||
animation = layersIn,1,4,easeOutQuint,fade
|
|
||||||
animation = layersOut,1,1.5,linear,fade
|
|
||||||
animation = fadeLayersIn,1,1.79,almostLinear
|
|
||||||
animation = fadeLayersOut,1,1.39,almostLinear
|
|
||||||
animation = workspaces,1,1.94,almostLinear,fade
|
|
||||||
animation = workspacesIn,1,1.21,almostLinear,fade
|
|
||||||
animation = workspacesOut,1,1.94,almostLinear,fade
|
|
||||||
animation = zoomFactor,1,7,quick
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dwindle {
|
window#waybar {
|
||||||
preserve_split = true
|
background-color: rgba(0, 0, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
master {
|
#workspaces button {
|
||||||
new_status = master
|
padding: 5px 0px;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
misc {
|
#workspaces button.active {
|
||||||
force_default_wallpaper = -1
|
color: #00ff99;
|
||||||
disable_hyprland_logo = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Input
|
#clock, #pulseaudio, #network, #bluetooth, #battery {
|
||||||
input {
|
padding: 5px 0px;
|
||||||
kb_layout = fr
|
margin: 2px 0px;
|
||||||
kb_variant =
|
|
||||||
kb_model =
|
|
||||||
kb_options =
|
|
||||||
kb_rules =
|
|
||||||
follow_mouse = 1
|
|
||||||
sensitivity = 0
|
|
||||||
touchpad {
|
|
||||||
natural_scroll = true
|
|
||||||
tap-to-click = true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
WAYBARCSS
|
||||||
|
|
||||||
gestures {
|
# Création de la configuration Hyprland (Format Lua)
|
||||||
workspace_swipe = true
|
cat << 'HYPRCONF' > \$USER_HOME/.config/hypr/hyprland.lua
|
||||||
}
|
-- This is an example Hyprland Lua config file.
|
||||||
|
-- Refer to the wiki for more information.
|
||||||
|
-- https://wiki.hypr.land/Configuring/Start/
|
||||||
|
|
||||||
# Keybindings
|
------------------
|
||||||
$mainMod = SUPER
|
---- MONITORS ----
|
||||||
|
------------------
|
||||||
|
|
||||||
bind = $mainMod, Return, exec, $terminal
|
hl.monitor({
|
||||||
bind = $mainMod, W, killactive,
|
output = "",
|
||||||
bind = $mainMod, M, exit,
|
mode = "preferred",
|
||||||
bind = $mainMod, E, exec, $fileManager
|
position = "auto",
|
||||||
bind = $mainMod, V, togglefloating,
|
scale = "auto",
|
||||||
bind = $mainMod, Space, exec, $menu
|
})
|
||||||
bind = $mainMod, P, pseudo,
|
|
||||||
bind = $mainMod, J, togglesplit,
|
|
||||||
|
|
||||||
bind = $mainMod, left, movefocus, l
|
---------------------
|
||||||
bind = $mainMod, right, movefocus, r
|
---- MY PROGRAMS ----
|
||||||
bind = $mainMod, up, movefocus, u
|
---------------------
|
||||||
bind = $mainMod, down, movefocus, d
|
|
||||||
|
|
||||||
bind = $mainMod, 1, workspace, 1
|
local terminal = "ghostty"
|
||||||
bind = $mainMod, 2, workspace, 2
|
local fileManager = "thunar"
|
||||||
bind = $mainMod, 3, workspace, 3
|
local menu = "wofi --show drun"
|
||||||
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, 10
|
|
||||||
|
|
||||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
-------------------
|
||||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
---- AUTOSTART ----
|
||||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
-------------------
|
||||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
|
||||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
|
||||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
|
||||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
|
||||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
|
||||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
|
||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
|
||||||
|
|
||||||
bind = $mainMod, S, togglespecialworkspace, magic
|
hl.on("hyprland.start", function ()
|
||||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
hl.exec_cmd("waybar")
|
||||||
|
hl.exec_cmd("swaybg -c '#000000'")
|
||||||
|
end)
|
||||||
|
|
||||||
bind = $mainMod, mouse_down, workspace, e+1
|
-------------------------------
|
||||||
bind = $mainMod, mouse_up, workspace, e-1
|
---- ENVIRONMENT VARIABLES ----
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
bindm = $mainMod, mouse:272, movewindow
|
hl.env("XCURSOR_SIZE", "24")
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
hl.env("HYPRCURSOR_SIZE", "24")
|
||||||
|
|
||||||
# Laptop multimedia keys
|
-----------------------
|
||||||
bindle = , XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
----- PERMISSIONS -----
|
||||||
bindle = , XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
-----------------------
|
||||||
bindle = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
||||||
bindle = , XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
|
||||||
bindle = , XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
|
||||||
bindle = , XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
|
||||||
|
|
||||||
bindl = , XF86AudioNext, exec, playerctl next
|
-----------------------
|
||||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
---- LOOK AND FEEL ----
|
||||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
-----------------------
|
||||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
|
||||||
|
|
||||||
# Windows and workspaces rules
|
hl.config({
|
||||||
windowrule = suppressmaximizeevents, class:.*
|
general = {
|
||||||
windowrule = nofocus, class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
gaps_in = 5,
|
||||||
windowrule = move 20 monitor_h-120, class:hyprland-run
|
gaps_out = 20,
|
||||||
|
border_size = 2,
|
||||||
|
col = {
|
||||||
|
active_border = { colors = {"rgba(33ccffee)", "rgba(00ff99ee)"}, angle = 45 },
|
||||||
|
inactive_border = "rgba(595959aa)",
|
||||||
|
},
|
||||||
|
resize_on_border = false,
|
||||||
|
allow_tearing = false,
|
||||||
|
layout = "dwindle",
|
||||||
|
},
|
||||||
|
decoration = {
|
||||||
|
rounding = 10,
|
||||||
|
rounding_power = 2,
|
||||||
|
active_opacity = 1.0,
|
||||||
|
inactive_opacity = 1.0,
|
||||||
|
shadow = {
|
||||||
|
enabled = true,
|
||||||
|
range = 4,
|
||||||
|
render_power = 3,
|
||||||
|
color = 0xee1a1a1a,
|
||||||
|
},
|
||||||
|
blur = {
|
||||||
|
enabled = true,
|
||||||
|
size = 3,
|
||||||
|
passes = 1,
|
||||||
|
vibrancy = 0.1696,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
animations = {
|
||||||
|
enabled = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.curve("easeOutQuint", { type = "bezier", points = { {0.23, 1}, {0.32, 1} } })
|
||||||
|
hl.curve("easeInOutCubic", { type = "bezier", points = { {0.65, 0.05}, {0.36, 1} } })
|
||||||
|
hl.curve("linear", { type = "bezier", points = { {0, 0}, {1, 1} } })
|
||||||
|
hl.curve("almostLinear", { type = "bezier", points = { {0.5, 0.5}, {0.75, 1} } })
|
||||||
|
hl.curve("quick", { type = "bezier", points = { {0.15, 0}, {0.1, 1} } })
|
||||||
|
hl.curve("easy", { type = "spring", mass = 1, stiffness = 238.1191, dampening = 24.21279333 })
|
||||||
|
|
||||||
|
hl.animation({ leaf = "global", enabled = true, speed = 10, bezier = "default" })
|
||||||
|
hl.animation({ leaf = "border", enabled = true, speed = 5.39, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "windows", enabled = true, speed = 4.79, spring = "easy" })
|
||||||
|
hl.animation({ leaf = "windowsIn", enabled = true, speed = 4.1, spring = "easy", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "windowsOut", enabled = true, speed = 1.49, bezier = "linear", style = "popin 87%" })
|
||||||
|
hl.animation({ leaf = "fadeIn", enabled = true, speed = 1.73, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeOut", enabled = true, speed = 1.46, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fade", enabled = true, speed = 3.03, bezier = "quick" })
|
||||||
|
hl.animation({ leaf = "layers", enabled = true, speed = 3.81, bezier = "easeOutQuint" })
|
||||||
|
hl.animation({ leaf = "layersIn", enabled = true, speed = 4, bezier = "easeOutQuint", style = "fade" })
|
||||||
|
hl.animation({ leaf = "layersOut", enabled = true, speed = 1.5, bezier = "linear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "fadeLayersIn", enabled = true, speed = 1.79, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "fadeLayersOut", enabled = true, speed = 1.39, bezier = "almostLinear" })
|
||||||
|
hl.animation({ leaf = "workspaces", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesIn", enabled = true, speed = 1.21, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "workspacesOut", enabled = true, speed = 1.94, bezier = "almostLinear", style = "fade" })
|
||||||
|
hl.animation({ leaf = "zoomFactor", enabled = true, speed = 7, bezier = "quick" })
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
dwindle = {
|
||||||
|
preserve_split = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
master = {
|
||||||
|
new_status = "master",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
scrolling = {
|
||||||
|
fullscreen_on_one_column = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
----------------
|
||||||
|
---- MISC ----
|
||||||
|
----------------
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = -1,
|
||||||
|
disable_hyprland_logo = true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
---------------
|
||||||
|
---- INPUT ----
|
||||||
|
---------------
|
||||||
|
|
||||||
|
hl.config({
|
||||||
|
input = {
|
||||||
|
kb_layout = "fr",
|
||||||
|
kb_variant = "",
|
||||||
|
kb_model = "",
|
||||||
|
kb_options = "",
|
||||||
|
kb_rules = "",
|
||||||
|
follow_mouse = 1,
|
||||||
|
sensitivity = 0,
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true,
|
||||||
|
tap-to-click = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.gesture({
|
||||||
|
fingers = 3,
|
||||||
|
direction = "horizontal",
|
||||||
|
action = "workspace"
|
||||||
|
})
|
||||||
|
|
||||||
|
---------------------
|
||||||
|
---- KEYBINDINGS ----
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
local mainMod = "SUPER"
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + Return", hl.dsp.exec_cmd(terminal))
|
||||||
|
local closeWindowBind = hl.bind(mainMod .. " + W", hl.dsp.window.close())
|
||||||
|
hl.bind(mainMod .. " + M", hl.dsp.exec_cmd("hyprctl dispatch exit"))
|
||||||
|
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd(fileManager))
|
||||||
|
hl.bind(mainMod .. " + V", hl.dsp.window.float({ action = "toggle" }))
|
||||||
|
hl.bind(mainMod .. " + Space", hl.dsp.exec_cmd(menu))
|
||||||
|
hl.bind(mainMod .. " + P", hl.dsp.window.pseudo())
|
||||||
|
hl.bind(mainMod .. " + J", hl.dsp.layout("togglesplit"))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + left", hl.dsp.focus({ direction = "left" }))
|
||||||
|
hl.bind(mainMod .. " + right", hl.dsp.focus({ direction = "right" }))
|
||||||
|
hl.bind(mainMod .. " + up", hl.dsp.focus({ direction = "up" }))
|
||||||
|
hl.bind(mainMod .. " + down", hl.dsp.focus({ direction = "down" }))
|
||||||
|
|
||||||
|
for i = 1, 10 do
|
||||||
|
local key = i % 10
|
||||||
|
hl.bind(mainMod .. " + " .. key, hl.dsp.focus({ workspace = i}))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + " .. key, hl.dsp.window.move({ workspace = i }))
|
||||||
|
end
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + S", hl.dsp.workspace.toggle_special("magic"))
|
||||||
|
hl.bind(mainMod .. " + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" }))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + mouse_down", hl.dsp.focus({ workspace = "e+1" }))
|
||||||
|
hl.bind(mainMod .. " + mouse_up", hl.dsp.focus({ workspace = "e-1" }))
|
||||||
|
|
||||||
|
hl.bind(mainMod .. " + mouse:272", hl.dsp.window.drag(), { mouse = true })
|
||||||
|
hl.bind(mainMod .. " + mouse:273", hl.dsp.window.resize(), { mouse = true })
|
||||||
|
|
||||||
|
hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true })
|
||||||
|
hl.bind("XF86MonBrightnessDown",hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true })
|
||||||
|
|
||||||
|
hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true })
|
||||||
|
hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true })
|
||||||
|
|
||||||
|
--------------------------------
|
||||||
|
---- WINDOWS AND WORKSPACES ----
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "suppress-maximize-events",
|
||||||
|
match = { class = ".*" },
|
||||||
|
suppress_event = "maximize",
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "fix-xwayland-drags",
|
||||||
|
match = {
|
||||||
|
class = "^$",
|
||||||
|
title = "^$",
|
||||||
|
xwayland = true,
|
||||||
|
float = true,
|
||||||
|
fullscreen = false,
|
||||||
|
pin = false,
|
||||||
|
},
|
||||||
|
no_focus = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
hl.window_rule({
|
||||||
|
name = "move-hyprland-run",
|
||||||
|
match = { class = "hyprland-run" },
|
||||||
|
move = "20 monitor_h-120",
|
||||||
|
float = true,
|
||||||
|
})
|
||||||
HYPRCONF
|
HYPRCONF
|
||||||
|
|
||||||
# Lancement auto de Hyprland sur TTY1
|
# Lancement auto de Hyprland sur TTY1 (demande le mot de passe avant)
|
||||||
cat << BASHPROFILE > \$USER_HOME/.bash_profile
|
cat << 'BASHPROFILE' > \$USER_HOME/.bash_profile
|
||||||
if [ -z "\${WAYLAND_DISPLAY}" ] && [ "\${XDG_VTNR}" -eq 1 ]; then
|
if [ -z "\${WAYLAND_DISPLAY}" ] && [ "\${XDG_VTNR}" -eq 1 ]; then
|
||||||
exec Hyprland
|
while true; do
|
||||||
|
read -s -p "Entrez votre mot de passe pour demarrer Hyprland: " PASS
|
||||||
|
echo ""
|
||||||
|
if echo "\$PASS" | sudo -S true 2>/dev/null; then
|
||||||
|
exec Hyprland
|
||||||
|
break
|
||||||
|
else
|
||||||
|
echo "Mot de passe incorrect."
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
BASHPROFILE
|
BASHPROFILE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user