hyprland config

This commit is contained in:
Matthieu Fortin [CPC/CCP] 2024-10-22 23:21:36 -04:00
parent 5cc03749d9
commit 4072f5f198
9 changed files with 159 additions and 113 deletions

View file

@ -13,6 +13,11 @@ export HISTFILESIZE=10000
export HISTSIZE=500
export HISTCONTROL=erasedups:ignoredups:ignorespace
set -o vi
bind 'set show-mode-in-prompt on'
set vi-ins-mode-string \1\e[6 q\2
set vi-cmd-mode-string \1\e[2 q\2
shopt -s checkwinsize
shopt -s histappend
PROMPT_COMMAND='history -a'

View file

@ -1,35 +1,16 @@
# __ __ __
# / / __ _____ ____/ /__ ____ ___/ /
# / _ \/ // / _ \/ __/ / _ `/ _ \/ _ /
# /_//_/\_, / .__/_/ /_/\_,_/_//_/\_,_/
# /___/_/
# #######################################################################################
# AUTOGENERATED HYPR CONFIG.
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
# #######################################################################################
# autogenerated = 1 # remove this line to remove the warning
# This is an example Hyprland config file.
# Refer to the wiki for more information.
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
# Please note not all available settings / options are set here.
# For a full list, see the wiki
# You can split this configuration into multiple files
# Create your files separately and then link them to this file like this:
# source = ~/.config/hypr/myColors.conf
################
### MONITORS ###
################
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
@ -44,37 +25,28 @@ $editor-alt = nvim
$colorPicker = hyprpicker
#################
### AUTOSTART ###
#################
# Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this:
# exec-once = $terminal
# exec-once = nm-applet &
# exec-once = waybar & hyprpaper & firefox
exec-once=wl-paste --type text --watch cliphist store # clipboard
exec-once=wl-paste --type image --watch cliphist store
exec-once=swaync
##exec-once=systemctl --user start plasma-polkit-agent
exec-once=/usr/lib/polkit-kde-authentication-agent-1
#exec-once=/usr/lib/polkit-kde-authentication-agent-1
#exec-once=/usr/lib/xfce-polkit/xfce-polkit
exec-once = systemctl --user start hyprpolkitagent
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once=hypridle
exec-once=waybar
exec-once=./xdg-desktop-portal.sh
##exec-once=nwg-dock-hyprland -i 32 -w 5 -mb 10 -ml 10 -mr 10 -x -c "tofi-drun --drun-launch=true" -lp start -f -a start
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
env = XDG_MENU_PREFIX,arch-
# Firefox
# env = MOZ_ENABLE_WAYLAND,1
env = MOZ_ENABLE_WAYLAND,1
# Nvidia
env = LIBVA_DRIVER_NAME,nvidia
@ -89,7 +61,7 @@ env = QT_QPA_PLATFORM,wayland
env = QT_QPA_PLATFORMTHEME,qt5ct
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = QT_STYLE_OVERRIDE,kvantum
#env = QT_STYLE_OVERRIDE,kvantum
# Toolkit Backend Variables
env = GDK_BACKEND,wayland,x11,*
@ -101,46 +73,31 @@ env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 5
border_size = 2
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
# Set to true enable resizing windows by clicking and dragging on borders and gaps
resize_on_border = true
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
#layout = dwindle
layout = master
}
# https://wiki.hyprland.org/Configuring/Variables/#decoration
decoration {
rounding = 10
# Change transparency of focused and unfocused windows
active_opacity = 1.0
inactive_opacity = 1.0
inactive_opacity = 0.9
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
# https://wiki.hyprland.org/Configuring/Variables/#blur
blur {
enabled = true
size = 3
@ -151,12 +108,9 @@ decoration {
}
}
# https://wiki.hyprland.org/Configuring/Variables/#animations
animations {
enabled = true
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
@ -167,29 +121,23 @@ animations {
animation = workspaces, 1, 6, default
}
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle {
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # You probably want this
}
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
master {
new_status = master
}
# https://wiki.hyprland.org/Configuring/Variables/#misc
misc {
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
}
#############
### INPUT ###
#############
# https://wiki.hyprland.org/Configuring/Variables/#input
input {
kb_layout = us
kb_variant =
@ -206,24 +154,18 @@ input {
}
}
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
}
###################
### KEYBINDINGS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
$mainMod = SUPER # Sets "Windows" key as main modifier
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
@ -236,50 +178,52 @@ bindd = $mainMod, M, Exit Hyprland, exit,
bindd = $mainMod, E, Launch the file manager, exec, $fileManager
bindd = $mainMod, W, Toggle floating, togglefloating,
bindd = $mainMod, space, Launch menu, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bindd = $mainMod, S, Launch menu to modify/create script, exec, autoscriptmenu
bindd = $mainMod, period, Launch the Emoji Picker, exec, jome -d | wl-copy #Emojipicker + clipboard copy
bindd = $mainMod, V, Clipboard History, exec, cliphist list | tofi -c ~/.config/tofi/configV | cliphist decode | wl-copy
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
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, 10
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, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
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 SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
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
# Example special workspace (scratchpad)
#bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
#bind = $mainMod, S, togglespecialworkspace, magic
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow

View file

@ -1,6 +1,7 @@
background {
monitor =
path = ~/.config/assets/backgrounds/cat_leaves_blurred.png # only png supported for now
# path = ~/.config/assets/backgrounds/cat_leaves_blurred.png # only png supported for now
path = ~/.cache/images/blurred_wallpaper.png
}
input-field {
@ -36,9 +37,9 @@ input-field {
label {
monitor =
text = cmd[update:1000] echo "$TIME"
color = rgba(a6adc8)
color = rgba(200, 200, 200, 1.0)
font_size = 55
font_family = Fira Semibold
font_family = Noto Sans Semibold
position = -100, 40
halign = right
valign = bottom
@ -48,10 +49,10 @@ label {
label {
monitor =
text = Hello
color = rgba(a6adc8)
text = $USER
color = rgba(200, 200, 200, 1.0)
font_size = 20
font_family = Fira Semibold
font_family = Noto Sans Semibold
position = -100, 160
halign = right
valign = bottom
@ -61,11 +62,12 @@ label {
image {
monitor =
path = ~/.config/assets/backgrounds/cat_pacman.png
#path = ~/.config/assets/backgrounds/cat_pacman.png
path = ~/.cache/images/square_wallpaper.png
size = 280 # lesser side if not 1:1 ratio
rounding = -1 # negative values mean circle
border_size = 4
border_color = rgb(a6adc8)
border_color = rgb(200, 200, 200, 1.0)
rotate = 0 # degrees, counter-clockwise
reload_time = -1 # seconds between reloading, 0 to reload with SIGUSR2
# reload_cmd = # command to get new path. if empty, old path will be used. don't run "follow" commands like tail -F

View file

@ -0,0 +1,33 @@
#!/bin/bash
# ___ __ _ __ __
# ____/ (_)__ / / (_)__ / /_ ___ / /
# / __/ / / _ \/ _ \/ (_-</ __/ (_-</ _ \
# \__/_/_/ .__/_//_/_/___/\__(_)___/_//_/
# /_/
set -euo pipefail
if [[ $# -eq 0 ]]; then
echo "Usage: ${0##*/} [d|w|*]"
echo "d: Delete the selected entry from the clipboard history."
echo "w: Wipe the clipboard history."
echo "*: Decode the selected entry and copy it to the clipboard."
exit 1
fi
case $1 in
d) cliphist list | rofi -dmenu -replace | cliphist delete
notify-send "Selected entry deleted from history"
;;
w) if [ "$(echo -e "Clear\nCancel" | rofi -dmenu)" == "Clear" ]; then
cliphist wipe
notify-send "Clipboard history cleared"
fi
;;
*) cliphist list | rofi -dmenu -replace | cliphist decode | wl-copy
notify-send "Selected entry copy to clipboard"
;;
esac

View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
sleep 1
killall -e xdg-desktop-portal-hyprland
killall xdg-desktop-portal
/usr/lib/xdg-desktop-portal-hyprland &
sleep 2
/usr/lib/xdg-desktop-portal &

View file

@ -0,0 +1,43 @@
window {
/*background: #36364f;*/
background: none;
border-radius: 10px;
border-style: none;
border-width: 1px;
border-color: rgba(156, 142, 122, 0.7)
}
#box {
/* Define attributes of the box surrounding icons here */
padding: 10px
}
#active {
/* This is to underline the button representing the currently active window */
border-bottom: solid 0px;
border-color: rgba(255, 255, 255, 0.3);
}
button, image {
background: none;
border-style: none;
box-shadow: none;
color: #999
}
button {
padding: 4px;
margin-left: 4px;
margin-right: 4px;
color: #eee;
font-size: 12px
}
button:hover {
background-color: rgba(255, 255, 255, 0.15);
border-radius: 2px;
}
button:focus {
box-shadow: none
}

View file

@ -18,6 +18,7 @@
"network",
// "battery",
// "backlight",
"idle_inhibitor",
"pulseaudio",
"pulseaudio#microphone"
// "wireplumber",
@ -145,6 +146,16 @@
]
},
"idle_inhibitor" : {
"format": "{icon}",
"tooltip": true,
"format-icons":{
"activated":"󰈈 ",
"deactivated":"󰈉 "
},
"on-click-right":"hyprlock"
},
"network": {
"tooltip": true,
"format-wifi": " {essid}",

View file

@ -45,6 +45,7 @@ window#waybar {
#battery,
#pulseaudio,
#network,
#idle_inhibitor,
#cpu,
#memory,
#workspaces,

View file

@ -20,7 +20,7 @@ click_interval 0.5
select_by_word_characters :@-./_~?&=%+#
mouse_hide_wait 0.0
enabled_layouts *
remember_window_size n
remember_window_size y
repaint_delay 10
input_delay 3
visual_bell_duration 0.0