diff --git a/README.md b/README.md index 6c1b59d..4880934 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,17 @@ And run `setup.sh` ./setup.sh ``` -That said I suggest you to give a look to the packages that will be installed on your system as it's important to know how things will work or to disable some things you wouldn't necessarely want. +Then just follow the instructions and you should be good to go ! +If you encounter any error or bug, don't hesitate to open an issue on this repo. + +## Configuration + +I suggest you to give a look to the packages that will be installed on your system as it's important to know how things will work or to disable some things you wouldn't necessarely want. I particularly think of helix which is used as the default text editor but may not suit some people needs. +Note that the default keyboard layout is QWERTY (us-fr). You can switch with the AZERTY layout by using `Mod+Ctrl+Space`. That said, the default layout already has french accents if you need them. +If you need to modify the layout, go to `~/.config/hypr/config/default/kb_layouts`. + ### Defaults I'm working on a system to easily change the default programs. I don't know yet if it will result into anything but it's worth trying. diff --git a/config/.config/hypr/application-style.conf b/config/.config/hypr/application-style.conf deleted file mode 100644 index e69de29..0000000 diff --git a/config/.config/hypr/config/default/appearance.conf b/config/.config/hypr/config/default/appearance.conf index 5534445..50f50da 100644 --- a/config/.config/hypr/config/default/appearance.conf +++ b/config/.config/hypr/config/default/appearance.conf @@ -3,14 +3,12 @@ ##################### # Refer to https://wiki.hyprland.org/Configuring/Variables/ - -$active_color = rgba(98C1D9FF) -$inactive_color = rgba(595959aa) +source = ~/.config/hypr/config/colors.conf # https://wiki.hyprland.org/Configuring/Variables/#general general { gaps_in = 1 - gaps_out = 0 + gaps_out = 1 border_size = 1 @@ -46,15 +44,52 @@ decoration { blur { enabled = true size = 6 - passes = 3 + passes = 4 vibrancy = 0.1696 } } -# Apply blur to waybar -layerrule = blur,waybar +# Layer rules + +layerrule { + name = side-panel + blur = on + ignore_alpha = 0.2 + animation = slide right + dim_around = on + match:namespace = ^(swaync-control-center)$ +} + +layerrule { + name = launcher + blur = off + animation = popin 90% + match:namespace = ^(rofi)$ +} + +layerrule { + name = status-bar + blur = off + animation = slide up + match:namespace = ^(waybar)$ +} + +layerrule { + name = screenshot-selection + blur = off + animation = fade + match:namespace = ^(selection)$ +} + +## Old +# layerrule = blur, swaync-control-center +# layerrule = blur, swaync-notification-window +# layerrule = ignorezero, swaync-control-center +# layerrule = ignorezero, swaync-notification-window +# layerrule = ignorealpha 0.5, swaync-control-center +# layerrule = ignorealpha 0.5, swaync-notification-window # https://wiki.hyprland.org/Configuring/Variables/#animations @@ -74,7 +109,7 @@ animations { # Animations animation = global, 1, 10, default - animation = border, 1, 5.39, easeOutQuint + animation = border, 1, 4, easeOutQuint animation = windows, 1, 3.79, easeOutQuint animation = windowsIn, 1, 3.1, easeOutQuint, popin 87% @@ -85,17 +120,17 @@ animations { 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 = layersIn, 1, 3, easeOutQuint, popin 85% + animation = layersOut, 1, 3, linear, popin + # animation = fadeLayersIn, 1, 1.79, almostLinear + # animation = fadeLayersOut, 1, 1.39, almostLinear - animation = workspaces, 1, 1.94, almostLinear, fade + animation = workspaces, 1, 2.2 , easeOutQuint, slidefadevert animation = workspacesIn, 1, 3, easeOutQuint, slide animation = workspacesOut, 1, 3, easeOutQuint, slide - #animation = workspacesIn, 1, 3, easeOutQuint, slidefade - #animation = workspacesOut, 1, 5, easeOutQuint, slidefade + # animation = workspacesIn, 1, 3, easeOutQuint, slidefade + # animation = workspacesOut, 1, 5, easeOutQuint, slidefade } # Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/ @@ -135,32 +170,107 @@ misc { # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules -# Example windowrule v1 -# windowrule = float, ^(kitty)$ - -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - # Ignore maximize requests from apps. You'll probably like this. -windowrule = suppressevent maximize, class:.* +windowrule { + name = suppress-maximize-events + suppress_event = maximize + match:class = .* +} # Fix some dragging issues with XWayland -windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0 +windowrule { + name = fix-xwayland-drags + match:class = ^$ + match:title = ^$ + match:xwayland = true + match:float = true + match:fullscreen = false + match:pin = false + + no_focus = true +} # Albert -windowrule=noborder,class:^(albert)$ -windowrule=noblur,class:^(albert)$ -windowrule=noshadow,class:^(albert)$ -windowrule=float,class:^(albert)$ -windowrule=stayfocused,class:^(albert)$ -windowrule=nodim,class:^(albert)$ +windowrule { + name = albert + border_size = 0 + no_blur = on + no_shadow = on + float = on + stay_focused = on + no_dim = on + match:class = ^(albert)$ +} # Prism Launcher -windowrule=pseudo, class:(org.prismlauncher.PrismLauncher) -windowrule=size 65% 70%, class:(org.prismlauncher.PrismLauncher), title:^(Prism Launcher .*)$ +windowrule { + name = prismlauncher-all + pseudo = on + match:class = (org.prismlauncher.PrismLauncher) +} +windowrule { + name = prismlauncher-main + size = (monitor_w*0.65) (monitor_h*0.7) + match:class = (org.prismlauncher.PrismLauncher) + match:title = ^(Prism Launcher .*)$ +} + +# Nautilus +windowrule { + name = nautilus-main + pseudo = on + size = (monitor_w*0.65) (monitor_h*0.7) + match:class = (org.gnome.Nautilus) # initialTitle:^(Loading…)$ +} + +# GTK file picker +windowrule { + name = gtk-file-picker + float = on + size = (monitor_w*0.65) (monitor_h*0.7) + match:class = (xdg-desktop-portal-gtk) +} + +# Vivado +## Loading screen +windowrule { + name = vivado-loading-screen + float = on + center = on + match:class = (ui-PlanAhead) +} +windowrule { + name = vivado-loading-screen-2 + size = 397 295 + match:class = (ui-PlanAhead) title:^(win0)$ +} +## Main window +windowrule { + name = vivado-main + tile = on + match:class = (Vivado) +} + +# Kdenlive +windowrule { + name = kdenlive-all + pseudo = on + match:class = (org.kde.kdenlive) +} +windowrule { + name = kdenlive-welcome + size = (512) (544) + match:class = (org.kde.kdenlive) # initialTitle:^(Kdenlive)$ +} + # TODO Automatically fullscreen single apps # - Seems impossible for now (try mixing with workspace rules) +# Default size for floating windows +## TODO +#windowrulev2 = size 100 100,floating:1 + # Increase gaps for single apps -workspace=w[t1], gapsout:2 +## Usless since I changed the default gap but may be useful if you decide to reset it to 0 +#workspace=w[t1], gapsout:2 diff --git a/config/.config/hypr/config/default/colors.conf b/config/.config/hypr/config/default/colors.conf new file mode 120000 index 0000000..413c779 --- /dev/null +++ b/config/.config/hypr/config/default/colors.conf @@ -0,0 +1 @@ +../../../colors/hyprland.conf \ No newline at end of file diff --git a/config/.config/hypr/config/default/environment.conf b/config/.config/hypr/config/default/environment.conf index fc79cac..c3493bd 100644 --- a/config/.config/hypr/config/default/environment.conf +++ b/config/.config/hypr/config/default/environment.conf @@ -5,10 +5,10 @@ # See https://wiki.hyprland.org/Configuring/Keywords/ # Set programs that you use -$terminal = kitty -$fileManager = cosmic-files -$menu = albert toggle -$notificationsManager = fnott +$terminal = foot +$fileManager = nautilus +$menu = rofi -show drun +$notificationManager = swaync-client -t ################# diff --git a/config/.config/hypr/config/default/input.conf b/config/.config/hypr/config/default/input.conf index 0f2463f..0c076c1 100644 --- a/config/.config/hypr/config/default/input.conf +++ b/config/.config/hypr/config/default/input.conf @@ -18,9 +18,7 @@ input { } # https://wiki.hyprland.org/Configuring/Variables/#gestures -gestures { - workspace_swipe = true -} +gesture = 3, horizontal, workspace # Example per-device config # See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more @@ -46,14 +44,17 @@ bind = $mainMod, D, exec, $menu # Legacy menu shortcut bind = $mainMod, L, exec, hyprlock # Lockscreen bind = $mainMod, B, exec, ~/.config/hypr/scripts/toggle-waybar.sh # Toggle sidebar bind = $mainMod SHIFT, R, exec, ~/.config/hypr/scripts/reload.sh # Reload desktop -bind = $mainMod, F11, exec, ~/.config/hypr/scripts/gamemode.sh # Gamemode +bind = $mainMod, F11, exec, ~/.config/hypr/scripts/game-mode.sh # Gamemode +bind = $mainMod, F10, exec, ~/.config/hypr/scripts/sharp-mode.sh # Sharp mode bind = $mainMod SHIFT, M, exit, # Exit desktop session # Shortcuts bind = $mainMod, RETURN, exec, $terminal +bind = $mainMod, X, exec, $terminal # Absolutely not because I dislocated my arm bind = $mainMod, SPACE, exec, $menu bind = $mainMod, E, exec, $fileManager -bindel = , XF86Launch1, exec, kitty vim ~/.config/hypr/config +bind = $mainMod, A, exec, $notificationManager +bindel = , XF86Launch1, exec, $terminal hx ~/.config/hypr/config # Replace by default editor # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l @@ -61,6 +62,12 @@ bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d +# Move windows with mainMod + shift + arrow keys +bind = $mainMod SHIFT, left, movewindow, l +bind = $mainMod SHIFT, right, movewindow, r +bind = $mainMod SHIFT, up, movewindow, u +bind = $mainMod SHIFT, down, movewindow, d + # Layout bind = $mainMod, F, fullscreen, bind = $mainMod, V, togglesplit, # Horizontal/vertical split @@ -134,6 +141,10 @@ bindl = , XF86AudioPrev, exec, playerctl previous ## Screenshot bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh +bind = SHIFT, Print, exec, ~/.config/hypr/scripts/screenshot.sh --fullscreen + +# Color picker +bind = $mainMod SHIFT, C, exec, hyprpicker -a ## Touchpad toggle ### On galaxy books, pressing the disable touchpad key also triggers SUPER and @@ -143,4 +154,10 @@ bind = SUPER CONTROL, XF86TouchpadToggle, exec, ~/.config/hypr/scripts/toggle-to ## Keyboard layout toggle ### Only works between AZERTY and QWERTY because of differences in the numbers row ### that prevent using the default way provided by hyprland -bind = $mainMod CONTROL, SPACE, exec, ~/.config/hypr/scripts/change-kb-layout.sh \ No newline at end of file +bind = $mainMod CONTROL, SPACE, exec, ~/.config/hypr/scripts/change-kb-layout.sh + +# Lock laptop on lid close +bindl=,switch:off:Lid Switch, exec, hyprlock --immediate + +## Overview plugin +#bind = $mainMod, TAB, overview:toggle, toggle diff --git a/config/.config/hypr/config/default/kb_layouts/us.conf b/config/.config/hypr/config/default/kb_layouts/us.conf index 2f6a2e5..8fe85bc 100644 --- a/config/.config/hypr/config/default/kb_layouts/us.conf +++ b/config/.config/hypr/config/default/kb_layouts/us.conf @@ -1,8 +1,8 @@ ## Overrides inputs for QWERTY layout input { - kb_layout = us - kb_variant = + kb_layout = fr + kb_variant = us kb_model = kb_options = kb_rules = @@ -30,4 +30,4 @@ 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 \ No newline at end of file +bind = $mainMod SHIFT, 0, movetoworkspace, 10 diff --git a/config/.config/hypr/config/default/plugins.conf b/config/.config/hypr/config/default/plugins.conf index 75cabb6..b281ebb 100644 --- a/config/.config/hypr/config/default/plugins.conf +++ b/config/.config/hypr/config/default/plugins.conf @@ -10,6 +10,3 @@ plugin { gapsOut = 20 } } - -# Toggle overview (Read plugins section in wiki before decommenting) -# bind = $mainMod, TAB, overview:toggle, toggle \ No newline at end of file diff --git a/config/.config/hypr/config/monitors/default.conf b/config/.config/hypr/config/monitors/default.conf new file mode 100644 index 0000000..12f4f83 --- /dev/null +++ b/config/.config/hypr/config/monitors/default.conf @@ -0,0 +1,21 @@ +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ + +# All screens +monitorv2 { + output = + mode = preferred + position = auto-up + scale = auto +} + +# Laptop screen +monitorv2 { + output = eDP-1 + mode = preferred + position = auto-down + scale = 1 +} diff --git a/config/.config/hypr/config/monitors/mirror.conf b/config/.config/hypr/config/monitors/mirror.conf new file mode 100644 index 0000000..5c095ea --- /dev/null +++ b/config/.config/hypr/config/monitors/mirror.conf @@ -0,0 +1,23 @@ +################ +### MONITORS ### +################ + +# See https://wiki.hyprland.org/Configuring/Monitors/ + +# Laptop screen +monitorv2 { + output = eDP-1 # <- You may need to change that + mode = preferred + position = 0x0 + scale = 1 +} + +# Other monitors (mirror laptop screen) +monitorv2 { + output = * + mode = preferred + position = auto + scale = 1 + mirror = eDP-1 # <- Also don't forget this one +} + diff --git a/config/.config/hypr/hyprlock.conf b/config/.config/hypr/hyprlock.conf index c322c9c..d79c7bc 100644 --- a/config/.config/hypr/hyprlock.conf +++ b/config/.config/hypr/hyprlock.conf @@ -1,12 +1,14 @@ # BACKGROUND background { monitor = - path = ~/.config/hypr/images/lockscreen.jpg - blur_passes = 0 - #contrast = 0.8916 - #brightness = 0.8172 - #vibrancy = 0.1696 - #vibrancy_darkness = 0.0 + path = ~/.config/hypr/images/wallpaper.jpg + blur_passes = 3 + blur_size = 4 + noise = 0.0 + contrast = 0.7 + brightness = 0.8172 + vibrancy = 0.2 + vibrancy_darkness = 0.0 } # GENERAL @@ -26,12 +28,12 @@ input-field { dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 dots_spacing = 0.2 # Scale of dots' absolute size, 0.0 - 1.0 dots_center = true - outer_color = rgba(200, 200, 200, 1) + outer_color = rgba(200, 200, 200, 0.4) inner_color = rgba(100, 114, 125, 1) font_color = rgb(200, 200, 200) fade_on_empty = false font_family = DejaVu Sans - placeholder_text = Enter Pass + placeholder_text = Enter password hide_input = false position = 0, -350 halign = center @@ -41,7 +43,6 @@ input-field { # Time label { monitor = - #text = cmd[update:1000] echo "$(date +"%H:%M")" text = $TIME color = rgba(216, 222, 233, 1) font_size = 130 @@ -49,9 +50,6 @@ label { position = 0, 280 halign = center valign = center - # TODO make shadowing work - #shadow_passes = 10 - #shadow_size = 3 } # Day-Month-Date @@ -83,16 +81,40 @@ label { #} # USER -#label { -# monitor = -# text = Hi, $USER -# color = rgba(216, 222, 233, 0.70) -# font_size = 20 -# font_family = DejaVu Sans -# position = 0, -200 -# halign = center -# valign = center -#} +label { + monitor = + text = $USER + color = rgba(216, 222, 233, 0.70) + font_size = 20 + font_family = JetbrainsMonoNL NF + position = 0, -200 + halign = center + valign = center +} + +# Timer +label { + monitor = + text = cmd[update:0] echo "Locked since $TIME" + color = rgba(216, 222, 233, 0.40) + font_size = 20 + font_family = JetbrainsMonoNL NF + position = 0, -250 + halign = center + valign = center +} + +# # Failed login attempts +# label { +# monitor = +# text = cmd[update:1000] echo "$ATTEMPTS Failed attempts" +# color = rgba(216, 222, 233, 0.40) +# font_size = 20 +# font_family = JetbrainsMonoNL NF +# position = 0, -250 +# halign = center +# valign = center +# } # CURRENT SONG label { @@ -100,7 +122,7 @@ label { text = cmd[update:1000] echo "$(~/.config/hypr/scripts/songdetails.sh)" color = rgba(255, 255, 255, 0.7) font_size = 16 - font_family = DejaVu Sans + font_family = JetbrainsMonoNL NF position = 0, 20 halign = center valign = bottom diff --git a/config/.config/hypr/hyprpaper.conf b/config/.config/hypr/hyprpaper.conf index 52de529..de0333e 100644 --- a/config/.config/hypr/hyprpaper.conf +++ b/config/.config/hypr/hyprpaper.conf @@ -1,2 +1,6 @@ -preload = ~/.config/hypr/images/wallpaper.png -wallpaper = , ~/.config/hypr/images/wallpaper.png +wallpaper { + monitor = + path = ~/.config/hypr/images/wallpaper.jpg +} + +splash = false diff --git a/config/.config/hypr/hyprsunset.conf b/config/.config/hypr/hyprsunset.conf new file mode 100644 index 0000000..1df1c7a --- /dev/null +++ b/config/.config/hypr/hyprsunset.conf @@ -0,0 +1,12 @@ +max-gamma = 150 + +profile { + time = 8:00 + identity = true +} + +profile { + time = 21:00 + temperature = 5500 + gamma = 0.8 +} diff --git a/config/.config/hypr/images/lockscreen.jpg b/config/.config/hypr/images/lockscreen.jpg deleted file mode 100644 index c9c6b41..0000000 Binary files a/config/.config/hypr/images/lockscreen.jpg and /dev/null differ diff --git a/config/.config/hypr/images/wallpaper.jpg b/config/.config/hypr/images/wallpaper.jpg new file mode 100644 index 0000000..4167f89 Binary files /dev/null and b/config/.config/hypr/images/wallpaper.jpg differ diff --git a/config/.config/hypr/images/wallpaper.png b/config/.config/hypr/images/wallpaper.png deleted file mode 100755 index 7b13daf..0000000 Binary files a/config/.config/hypr/images/wallpaper.png and /dev/null differ diff --git a/config/.config/hypr/scripts/autostart.sh b/config/.config/hypr/scripts/autostart.sh index 9c5e18a..29b5c28 100755 --- a/config/.config/hypr/scripts/autostart.sh +++ b/config/.config/hypr/scripts/autostart.sh @@ -5,8 +5,8 @@ # If you want to add your own applications you may rather want to use exec-once in the environment.conf file hyprpaper & -hyprpm reload -nn & -albert & -# mako & +# Enable this if you want to use plugins +# hyprpm reload & +swaync & systemctl --user start hyprpolkitagent & ~/.config/hypr/scripts/restore-waybar.sh diff --git a/config/.config/hypr/scripts/change-kb-layout.sh b/config/.config/hypr/scripts/change-kb-layout.sh index 5509aa7..7261fc5 100755 --- a/config/.config/hypr/scripts/change-kb-layout.sh +++ b/config/.config/hypr/scripts/change-kb-layout.sh @@ -21,13 +21,12 @@ en_to_fr() { } if ! [ -f "${status_file}" ]; then - hyprctl notify 3 3000 0 "Status file missing" hyprctl notify 2 6000 0 "Use Mod + Ctrl + Space to change keyboard layout" - en_to_fr + fr_to_en else if [ $(cat "${status_file}") = "fr" ]; then fr_to_en elif [ $(cat "${status_file}") = "en" ]; then en_to_fr fi -fi \ No newline at end of file +fi diff --git a/config/.config/hypr/scripts/gamemode.sh b/config/.config/hypr/scripts/game-mode.sh similarity index 100% rename from config/.config/hypr/scripts/gamemode.sh rename to config/.config/hypr/scripts/game-mode.sh diff --git a/config/.config/hypr/scripts/reload.sh b/config/.config/hypr/scripts/reload.sh index d323893..c06ebaa 100755 --- a/config/.config/hypr/scripts/reload.sh +++ b/config/.config/hypr/scripts/reload.sh @@ -1,6 +1,6 @@ -killall albert killall hyprpaper killall waybar +killall swaync hyprctl reload diff --git a/config/.config/hypr/scripts/screenshot.sh b/config/.config/hypr/scripts/screenshot.sh index 741ecf2..50efb72 100755 --- a/config/.config/hypr/scripts/screenshot.sh +++ b/config/.config/hypr/scripts/screenshot.sh @@ -1 +1,13 @@ -grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%F_%T.png') && hyprctl notify 1 2000 0 Screenshot saved! +save_path=$HOME/Pictures/Screenshots/$(date +'%F_%T.png') + +if [ $# -eq 0 ]; then + grim -g "$(slurp)" $save_path && hyprctl notify 1 2000 0 "Screenshot saved!" + +elif [ $# -eq 1 ]; then + + if [[ $1 == "--fullscreen" ]]; then + grim $save_path && hyprctl notify 1 2000 0 Screenshot saved! + fi +fi + +exit 0 diff --git a/config/.config/hypr/scripts/sharp-mode.sh b/config/.config/hypr/scripts/sharp-mode.sh new file mode 100755 index 0000000..0a237ea --- /dev/null +++ b/config/.config/hypr/scripts/sharp-mode.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh + +# Disables animations accros the desktop (as well as some other tweaks) +# Similar to game mode but with the goal to enhance productivity +# From Hyprland documentation - https://wiki.hyprland.org/0.41.2/Configuring/Uncommon-tips--tricks/#toggle-animationsbluretc-hotkey + +HYPRSHARPMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') +if [ "$HYPRSHARPMODE" = 1 ] ; then + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0" + hyprctl notify 1 2000 0 "Enabled Sharp mode" + exit +fi + +hyprctl reload +# ~/.config/hypr/scripts/restore-waybar.sh +hyprctl notify 1 2000 0 "Disabled Sharp mode" diff --git a/config/.config/hypr/status/kb_layout b/config/.config/hypr/status/kb_layout index 717280a..2c4c454 100644 --- a/config/.config/hypr/status/kb_layout +++ b/config/.config/hypr/status/kb_layout @@ -1 +1 @@ -fr \ No newline at end of file +en \ No newline at end of file diff --git a/packages/fonts.pkgs b/packages/fonts.pkgs index 050dfda..7674f62 100644 --- a/packages/fonts.pkgs +++ b/packages/fonts.pkgs @@ -1,3 +1,4 @@ +ttf-dejavu ttf-jetbrains-mono-nerd noto-fonts noto-fonts-emoji