[[https://hyprland.org/][Hyprland]] is a dynamic wayland compositor which provides autotiling and
beautiful animations out of the box.
** Environment variables
This part will be very short, but I first need to set some environment variables.
#+begin_src conf
env = XCURSOR_SIZE,24
env = SDL_VIDEODRIVER,wayland
#+end_src
** Hardware configuration
The first configuration I want to set is my keyboard and touchpad
configuration. My keyboard uses the AFNOR standard for the [[https://bépo.fr][bépo]]
layout, and I do not use the caps lock key which is replaced by the
control key.
#+begin_src conf
input {
kb_layout = fr
kb_variant = bepo_afnor
kb_model =
kb_options = caps:ctrl_modifier
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
#+end_src
We can then set the monitors used. If =HDMI-A-1= is not found when
Hyprland launches, it will simply ignore it. And at worst, I can use
[[https://github.com/artizirk/wdisplays][wdisplays]] to manually set the position of my screens.
#+begin_src conf
monitor = HDMI-A-1, 2560x1080, 0x0, 1
monitor = eDP-1, 1920x1080, 2560x0, 1
#+end_src
** Visual configuration
Now, onto the visual configuration. I like my gaps, and I feel keeping
my windows relatively tight together but with a greater gap around
them looks nice. I also like the Nord palette which I use here for my
window border colours. Active windows get a gradient from nord9 to
nord14, while inactive windows get a nord3 border. Lastly, I use the
dwindle layout as I find it nicer to use than the master layout.
#+begin_src conf
general {
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgb(81a1c1) rgb(a3be8c) 45deg
col.inactive_border = rgb(4c566a)
layout = dwindle
}
#+end_src
I may one day use the [[https://github.com/hyprland-community/pyprland][=layout_center=]] layout from [[https://github.com/hyprland-community/pyprland][pyprland]], but I
haven’t got around to do that yet.
This section is specific to touchpads, but I like to use it to switch
between workspaces quickly. Note that I only want to swipe between
existing workspaces, not to create new ones.
#+begin_src conf
gestures {
workspace_swipe = true
workspace_swipe_numbered = true
}
#+end_src
Decorations are just a nice thing to make things look pretty. I like
some slight rounding on my windows with a nice though light shadow.
Again, the colour comes from the Nord palette with nord0.
#+begin_src conf
decoration {
rounding = 5
blur {
enabled = true
size = 9
passes = 1
}
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(2e3440aa)
}
#+end_src
Animations are fun! I mostly kept the default animations from the
example config of Hyprland.
#+begin_src conf
animations {
enabled = true
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
#+end_src
Now, we can take care of the configuration of the layouts. The only
notable thing here is that I prefer to have no gaps when there is only
one window in the dwindle layout. Not much is done with the master
layout, as I don’t use it.
#+begin_src conf
dwindle {
pseudotile = true
preserve_split = true
no_gaps_when_only = 1
}
master {
new_is_master = true
}
#+end_src
** Autolaunch of programs
The =exec-once= directive of Hyprland allows the user to launch the
associated command only when Hyprland starts in order to avoid
launching multiple instances of some programs.
First, I’ll import some environment variables into Hyprland. These may
These are basically a rehash of what you can find in the [[file:./hyprland.md#windows][windows submap]] but with a few missing keybindings and other extras.
Something I really appreciate with window managers in Linux is the able to really easily move and resize windows. The keybinds below allow the user to press down the super key and perform an action on the window:
- with a left click, move the window around
- with a right click, resize the window
#+name: top-windows-actions
| Modifiers | Key | Action |
|-----------+-----------+--------------|
| SUPER | mouse:272 | movewindow |
| SUPER | mouse:273 | resizewindow |
**** Workspace movements
Due to the bépo layout, the number row does not give immediate access to numbers, but to punctuation symbols. You can find below a table of equivalence of the characters’ name and the actual character, as well as the number that sits on the same key when pressing shift.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.