1
0
Fork 0
forked from ahurac/dotfiles

Ajout de la configuration de Hyprland et d'une Waybar

This commit is contained in:
Hippolyte Chauvin 2023-04-13 00:14:04 +02:00
parent 046867e47b
commit 7179c7d98f
8 changed files with 634 additions and 0 deletions

93
config/hypr/hyprland.conf Normal file
View file

@ -0,0 +1,93 @@
# Monitor
monitor = , highrr, auto, 1
# Input
input {
kb_layout = fr
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
numlock_by_default = yes
repeat_rate = 40
repeat_delay = 300
accel_profile = flat
}
# General
general {
gaps_in = 5
gaps_out = 10
border_size = 2
col.active_border = rgba(df80ffff) rgba(cc33ffff) 90deg
col.inactive_border = rgba(886c9322)
layout = dwindle
}
# Decoration
decoration {
rounding = 5
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
inactive_opacity = 0.9
}
# Animations
animations {
enabled = yes
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 = fade, 1, 7, default
animation = workspaces, 1, 3, default
}
# Dwindle
dwindle {
pseudotile = yes
preserve_split = yes
}
# Master
master {
new_is_master = true
}
# Gestures
gestures {
workspace_swipe = off
}
# Per-device config
device:epic mouse V1 {
sensitivity = -0.5
}
# Modular sourcing
$confDir = ~/.config/hypr/hyprland.conf.d
source = $confDir/bindings.conf
source = $confDir/windowrules.conf
source = $confDir/startup.conf
source = $confDir/environment.conf

View file

@ -0,0 +1,103 @@
# Bindings
# Main mod
$mainMod = SUPER
# Hyprland control
bind = $mainMod SHIFT, A, killactive,
bind = $mainMod SHIFT, E, exit,
# Windows controls
# Layout
bind = $mainMod, C, togglefloating,
bind = $mainMod, P, pseudo,
bind = $mainMod, E, togglesplit,
bind = $mainMod, S, togglegroup,
# Focus
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, H, movefocus, l
bind = $mainMod, L, movefocus, r
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Moving
bind = $mainMod SHIFT, left, movewindow, l
bind = $mainMod SHIFT, right, movewindow, r
bind = $mainMod SHIFT, up, movewindow, u
bind = $mainMod SHIFT, down, movewindow, d
bind = $mainMod SHIFT, H, movewindow, l
bind = $mainMod SHIFT, L, movewindow, r
bind = $mainMod SHIFT, K, movewindow, u
bind = $mainMod SHIFT, J, movewindow, d
# Workspaces
bind = $mainMod, 10, workspace, 1
bind = $mainMod, 11, workspace, 2
bind = $mainMod, 12, workspace, 3
bind = $mainMod, 13, workspace, 4
bind = $mainMod, 14, workspace, 5
bind = $mainMod, 15, workspace, 6
bind = $mainMod, 16, workspace, 7
bind = $mainMod, 17, workspace, 8
bind = $mainMod, 18, workspace, 9
bind = $mainMod, 19, workspace, 10
# Moving to workspaces
bind = $mainMod SHIFT, 10, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 11, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 12, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 13, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 14, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 15, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 16, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 17, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 18, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 19, movetoworkspacesilent, 10
# Scrolling through workspaces
bind = $mainMod, mouse_down, workspace, e-1
bind = $mainMod, mouse_up, workspace, e+1
# Moving and resizing windows with mouse
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Screenshots
bind = , Print, exec, glurp full clip
bind = SHIFT, Print, exec, glurp area clip
bind = ALT, Print, exec, glurp full file
bind = SHIFT ALT, Print, exec, glurp area file
# Launchers
bind = $mainMod, D, exec, rofi -show drun
bind = $mainMod, 36, exec, kitty
bind = $mainMod, F1, exec, sensible-browser
bind = $mainMod, F2, exec, joplin-desktop
bind = $mainMod, F3, exec, webcord
bind = $mainMod ALT, L, exec, swaylock
# Resize mode
bind = $mainMod, R, submap, resize
submap = resize
binde = , right, resizeactive, 50 0
binde = , left, resizeactive, -50 0
binde = , up, resizeactive, 0 -50
binde = , down, resizeactive, 0 50
binde = , H, resizeactive, -50 0
binde = , J, resizeactive, 0 50
binde = , K, resizeactive, 0 -50
binde = , L, resizeactive, 50 0
bind= , escape, submap, reset
bind= $mainMod, r, submap, reset
submap = reset
# Fullscreen
bind = $mainMod, F, fullscreen

View file

@ -0,0 +1,22 @@
# Backend
env = GDK_BACKEND, wayland,x11
env = SDL_VIDEODRIVER, wayland
env = CLUTTER_BACKEND, wayland
env = _JAVA_AWT_WM_NONREPARENTING=1
# XDG
env = XDG_CURRENT_DESKTOP, Hyprland
env = XDG_SESSION_TYPE, wayland
env = XDG_SESSION_DESKTOP, Hyprland
# Qt
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
env = QT_QPA_PLATFORM, wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
env = QT_QPA_PLATFORMTHEME, qt6ct
# Theming
env = GTK_THEME, Dracula
env = XCURSOR_THEME, Afterglow-cursors
env = XCURSOR_SIZE, 24

View file

@ -0,0 +1,12 @@
# Startup
exec-once = swaync
exec-once = waybar
exec-once = hyprpaper
exec-once = artix-pipewire-loader
exec-once = /usr/lib/xdg-desktop-portal-hyprland
exec-once = mpd --no-daemon
exec-once = swayosd
exec-once = kitty & kitty sudo -i
exec-once = webcord
exec-once = joplin-desktop

View file

@ -0,0 +1,7 @@
# Window rules
windowrule = workspace 4 silent, ^(WebCord)$
windowrule = workspace 4 silent, ^(Joplin)$
windowrule = workspace 4 silent, ^(whatsapp-nativefier-.*)$
windowrule = workspace 4 silent, ^(Deezer)$
windowrule = float, ^(pavucontrol)$

View file

@ -0,0 +1,6 @@
# Preload
preload = ~/.local/share/backgrounds/virtual_riot_save_yourself_2-1920x1080.jpg
# Definition
wallpaper = , ~/.local/share/backgrounds/virtual_riot_save_yourself_2-1920x1080.jpg

173
config/waybar-1/config Normal file
View file

@ -0,0 +1,173 @@
{
"layer": "top",
"position": "bottom",
"margin-bottom": 10,
"margin-left": 10,
"margin-right": 10,
"modules-left": ["wlr/workspaces", "hyprland/language", "keyboard-state", "hyprland/submap", "mpd", "hyprland/window"],
"modules-center": ["tray", "custom/notifications", "clock"],
"modules-right": ["network", "pulseaudio#output", "pulseaudio#input", "temperature", "cpu", "memory"],
"wlr/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon} {name}",
"format-icons": {
"1": "",
"3": "",
"4": "",
"5": "󰖺",
"urgent": "",
"focused": "",
"default": ""
},
"on-scroll-up": "hyprctl dispatch workspace e-1",
"on-scroll-down": "hyprctl dispatch workspace e+1",
"on-click": "activate",
"sort-by-number": true
},
"mpd": {
"tooltip": false,
"format": "{stateIcon} {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})",
"format-disconnected": "ﳌ",
"format-stopped": "",
"state-icons": {
"playing": "",
"paused": ""
}
},
"hyprland/submap": {
"format": " {}"
},
"hyprland/window": {
"separate-out puts": true,
"format": " {}"
},
"tray": {
"spacing": 8
},
"custom/notifications": {
"tooltip": false,
"format": "{icon} {}",
"format-icons": {
"notification": "<span foreground='magenta'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='magenta'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='magenta'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"pulseaudio#output": {
"format": "{icon} {volume}%",
"format-bluetooth": " {volume}%",
"format-bluetooth-muted": "󰂲 {volume}%",
"format-muted": " {volume}%",
"format-icons": {
"headphone": " ",
"hands-free": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": ["", "", ""]
},
"on-click": "pavucontrol -t 3",
"on-scroll-up": "swayosd --output-volume=raise",
"on-scroll-down": "swayosd --output-volume=lower"
},
"pulseaudio#input": {
"format": "{format_source}",
"format-source": " {volume}%",
"format-source-muted": " {volume}%",
"format-icons": {
"headphone": " ",
"hands-free": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": ["", "", ""]
},
"on-click": "pavucontrol -t 4",
"on-scroll-up": "swayosd --input-volume=raise",
"on-scroll-down": "swayosd --input-volume=lower"
},
"temperature": {
"thermal-zone": 2,
"hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input",
"critical-threshold": 80,
"format-critical": "{icon}  {temperatureC}°C",
"format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""]
},
"network": {
"interface": "eth1", // (Optional) To force the use of this interface
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": "󰈀 {ipaddr}/{cidr}",
"tooltip-format": "󰱔 {ifname} via {gwaddr}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": " Disconnected",
"format-alt": "󰱔 {ifname}: {ipaddr}/{cidr}"
},
"cpu": {
"tooltip": false,
"format": " {}%"
},
"memory": {
"tooltip": false,
"format": " {}%"
},
"clock": {
"format": " {:%Y-%m-%d | %H:%M:%S}",
"interval": 1,
"tooltip-format": "<tt><small>{calendar}</small></tt>",
"calendar": {
"mode" : "year",
"mode-mon-col" : 3,
"weeks-pos" : "right",
"on-scroll" : 1,
"on-click-right": "mode",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
},
"actions": {
"on-click-right": "mode",
"on-click-forward": "tz_up",
"on-click-backward": "tz_down",
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
}
},
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": {
"capslock": "C {icon} ",
"numlock": "N {icon} "
},
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"hyprland/language": {
"format": "󰌌 {}",
"format-fr": "FR"
}
}
// vim: set ft=json

218
config/waybar-1/style.css Normal file
View file

@ -0,0 +1,218 @@
/*
********************************************
**
**
**
**
**
********************************************
*/
* {
border: none;
border-radius: 0;
font-family: Hack Nerd Font;
font-weight: bold;
font-size: 14px;
min-height: 24px;
}
window#waybar {
background: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.termite #window,
window#waybar.Firefox #window,
window#waybar.Navigator #window,
window#waybar.PCSX2 #window {
color: #4d4d4d;
background: #e6e6e6;
}
#workspaces {
/* margin-top: 8px; */
/* margin-left: 12px; */
/* margin-bottom: 0; */
padding-right: 3px;
border-radius: 26px;
background: #282a36;
transition: none;
}
#workspaces button {
transition: none;
color: #f8f8f2;
background: transparent;
font-size: 16px;
}
#workspaces button.active {
color: #9aedfe;
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: #ff79c6;
}
#mpd {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
background: #282a36;
transition: none;
color: #4d4d4d;
background: #5af78e;
}
#mpd.disconnected,
#mpd.stopped {
color: #f8f8f2;
background: #282a36;
}
#submap {
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
background: #ffb3ff;
color: #282a36;
border-radius: 26px;
}
#window, #custom-notifications {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
/* border-radius: 26px; */
/* transition: none; */
/*
color: #f8f8f2;
background: #282a36;
*/
/* color: transparent; */
/* background: transparent; */
background: #282a36;
border-radius: 26px;
}
#tray {
padding-right: 16px;
padding-left: 16px;
background: #282a36;
border-radius: 26px;
}
#network {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
transition: none;
color: #4d4d4d;
background: #bd93f9;
}
#pulseaudio {
/* margin-top: 8px; */
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: #4d4d4d;
background: #9aedfe;
}
#pulseaudio.output {
margin-left: 8px;
border-radius: 26px 4px 4px 26px;
}
#pulseaudio.input {
margin-left: 2px;
border-radius: 4px 26px 26px 4px;
}
#temperature {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
transition: none;
color: #4d4d4d;
background: #5af78e;
}
#cpu {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
transition: none;
color: #4d4d4d;
background: #f1fa8c;
}
#memory {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
transition: none;
color: #4d4d4d;
background: #ff6e67;
}
#clock {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px;
transition: none;
color: #f8f8f2;
background: #282a36;
}
#language {
/* margin-top: 8px; */
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 26px 4px 4px 26px;
transition: none;
color: #f8f8f2;
background: #282a36;
}
#keyboard-state {
/* margin-top: 8px; */
margin-left: 2px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
border-radius: 4px 26px 26px 4px;
transition: none;
color: #f8f8f2;
background: #282a36;
}