add hyprland config

Adds hyprland, hyprpaper, ironbar config
This commit is contained in:
Philipp 2024-10-11 17:51:48 +02:00
parent 5fabdedefc
commit a830b625a5
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750
7 changed files with 595 additions and 5 deletions

View file

@ -3,15 +3,16 @@
> All needed Dotfiles to get my system back to a usable state
## Install
### Requirements
You will need atleast following packages for it to work
`paru -S neovim alacritty plasma-meta zsh fzf stow tmux git pipewire fd ripgrep go`
`paru -S neovim kitty plasma-meta zsh fzf stow tmux git pipewire fd ripgrep go hyprland hyprpaper ironbar-git swaync`
### Getting started
If you wanna use my zsh config, you have to properly prepare the ZDOTDIR enviornment, for this use the *init-dotfiles* provided. **CAUTION: This does need root!**
If you wanna use my zsh config, you have to properly prepare the ZDOTDIR enviornment, for this use the _init-dotfiles_ provided. **CAUTION: This does need root!**
`sudo ./init-dotfiles`
@ -19,11 +20,10 @@ For stow to restore the old state you have to run following command.
`git clone https://git.snrd.eu/Spaenny/dotfiles.git && cd dotfiles`
`stow alacritty nvim plasma zsh tmux git pipewire stylua`
`stow alacritty nvim plasma zsh tmux git pipewire stylua hyprland`
If you just wanna restore one application config you can do so by executing it via package name.
`stow nvim`
This would just restore the nvim config files.
#### WARNING: This will instantly apply my Dotfiles to your machine, for further information how todo this step by step checkout.

View file

@ -0,0 +1,266 @@
# 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 = DP-1, highrr, auto, 1
monitor = DP-2, highres, auto-up, 1
monitor = HDMI-A-2, highres, auto-left, 1, transform, 3
###################
### MY PROGRAMS ###
###################
# See https://wiki.hyprland.org/Configuring/Keywords/
# Set programs that you use
$terminal = kitty
$fileManager = dolphin
$menu = wofi --show drun
$browser = flatpak run io.github.zen_browser.zen
$runelite = flatpak run net.runelite.RuneLite
#################
### 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 = tmux setenv -g HYPRLAND_INSTANCE_SIGNATURE "$HYPRLAND_INSTANCE_SIGNATURE"
exec-once = hyprpm reload -n
exec-once = ironbar & hyprpaper & $browser & $terminal & swaync &
#############################
### ENVIRONMENT VARIABLES ###
#############################
# See https://wiki.hyprland.org/Configuring/Environment-variables/
env = XCURSOR_SIZE,24
env = HYPRCURSOR_SIZE,24
#####################
### LOOK AND FEEL ###
#####################
# Refer to https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general
general {
gaps_in = 5
gaps_out = 20
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 = false
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
allow_tearing = false
layout = dwindle
}
# 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
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
passes = 1
vibrancy = 0.1696
}
}
# 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
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
}
# 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 = de
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
touchpad {
natural_scroll = false
}
}
# 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
bind = $mainMod, RETURN, exec, $terminal
bind = $mainMod SHIFT, Q, killactive,
bind = $mainMod SHIFT, M, exit,
bind = $mainMod, E, exec, $fileManager
bind = $mainMod, F, exec, $browser
bind = $mainMod, O, exec, $runelite
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod SHIFT, C, exec, hyprctl reload && pkill ironbar && ironbar &
# 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
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, vdesk, 1
bind = $mainMod, 2, vdesk, 2
bind = $mainMod, 3, vdesk, 3
bind = $mainMod, 4, vdesk, 4
bind = $mainMod, 5, vdesk, 5
bind = $mainMod, 6, vdesk, 6
bind = $mainMod, 7, vdesk, 7
bind = $mainMod, 8, vdesk, 8
bind = $mainMod, 9, vdesk, 9
bind = $mainMod, 0, vdesk, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetodesk, 1
bind = $mainMod SHIFT, 2, movetodesk, 2
bind = $mainMod SHIFT, 3, movetodesk, 3
bind = $mainMod SHIFT, 4, movetodesk, 4
bind = $mainMod SHIFT, 5, movetodesk, 5
bind = $mainMod SHIFT, 6, movetodesk, 6
bind = $mainMod SHIFT, 7, movetodesk, 7
bind = $mainMod SHIFT, 8, movetodesk, 8
bind = $mainMod SHIFT, 9, movetodesk, 9
bind = $mainMod SHIFT, 0, movetodesk, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, nextdesk
bind = $mainMod, mouse_up, prevdesk
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Laptop multimedia keys for volume and LCD brightness
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
# Requires playerctl
bindl = , XF86AudioNext, exec, playerctl next
bindl = , XF86AudioPause, exec, playerctl play-pause
bindl = , XF86AudioPlay, exec, playerctl play-pause
bindl = , XF86AudioPrev, exec, playerctl previous
##############################
### WINDOWS AND WORKSPACES ###
##############################
# 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.
windowrulev2 = suppressevent maximize, class:.*
# Fix some dragging issues with XWayland
windowrulev2 = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0

View file

@ -0,0 +1,6 @@
preload = $HOME/Pictures/Wallpapers/bg.png
wallpaper = DP-1,$HOME/Pictures/Wallpapers/bg.png
wallpaper = DP-2,$HOME/Pictures/Wallpapers/bg.png
wallpaper = HDMI-A-2,$HOME/Pictures/Wallpapers/bg.png
ipc = off

View file

@ -0,0 +1,87 @@
let {
$workspaces = {
type = "workspaces"
}
$launcher = {
type = "launcher"
favorites = ["dolphin" "io.github.zen_browser.zen" "in.cinny.Cinny"]
}
$notifications = {
type = "notifications"
show_count = true
icons.closed_none = "󰂜"
icons.closed_some = "󰂜"
icons.closed_dnd = "󰪓"
icons.open_none = "󰂚"
icons.open_some = "󰂚"
icons.open_dnd = "󰂠"
}
$tray = {
type = "tray"
direction = "left_to_right"
icon_size = 20
}
$clock = {
type = "clock"
format = "%H:%M"
}
$volume = {
type = "volume"
format = "{icon} {percentage}%"
max_volume = 100
icons.volume_high = ""
icons.volume_medium = ""
icons.volume_low = ""
icons.muted = ""
}
$button = { type = "button" name="power-button" label = "<span font-size='20pt'>󰐥</span>" on_click = "popup:toggle" }
$popup = {
type = "box"
orientation = "horizontal"
widgets = [
{
type = "box"
widgets = [
{ type = "button" class="power-button" label = "<span font-size='20pt'>󰐥</span>" on_click = "!loginctl poweroff" }
{ type = "button" class="power-button" label = "<span font-size='20pt'>󰜉</span>" on_click = "!loginctl reboot" }
{ type = "button" class="power-button" label = "<span font-size='20pt'>󰤄</span>" on_clock = "!loginctl suspend" }
]
}
]
}
$power_menu = {
type = "custom"
class = "power-menu"
bar = [ $button ]
popup = [ $popup ]
}
}
in {
monitors.DP-1.anchor_to_edges = true
monitors.DP-1.position = "top"
monitors.DP-1.margin.left = 20
monitors.DP-1.margin.right = 20
monitors.DP-1.margin.top = 5
monitors.DP-1.margin.bottom = -10
monitors.DP-1.start = [ $power_menu $workspaces ]
monitors.DP-1.center = [ $launcher ]
monitors.DP-1.end = [ $tray $volume $clock $notifications ]
monitors.DP-2.margin.top = -15
monitors.DP-2.margin.bottom = 5
monitors.DP-2.anchor_to_edges = false
monitors.DP-2.center = [ $clock ]
monitors.DP-2.exclusive_zone = false
}

View file

@ -0,0 +1,26 @@
@define-color rosewater #f5e0dc;
@define-color flamingo #f2cdcd;
@define-color pink #f5c2e7;
@define-color mauve #cba6f7;
@define-color red #f38ba8;
@define-color maroon #eba0ac;
@define-color peach #fab387;
@define-color yellow #f9e2af;
@define-color green #a6e3a1;
@define-color teal #94e2d5;
@define-color sky #89dceb;
@define-color sapphire #74c7ec;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color text #cdd6f4;
@define-color subtext1 #bac2de;
@define-color subtext0 #a6adc8;
@define-color overlay2 #9399b2;
@define-color overlay1 #7f849c;
@define-color overlay0 #6c7086;
@define-color surface2 #585b70;
@define-color surface1 #45475a;
@define-color surface0 #313244;
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;

View file

@ -0,0 +1,205 @@
@import "mocha.css";
/* -- general configuration -- */
* {
font-family: "Hack Nerd Font Mono";
font-size: 16px;
border: none;
border-radius: 18px;
}
.background {
opacity: 0.8;
}
#bar {
border-top: 1px solid @surface0;
}
box,
menubar,
button {
background-image: none;
box-shadow: none;
}
box,
menubar {
background-color: @base;
}
button {
background-color: @surface0;
padding: 0 15px;
}
button,
label {
color: @text;
}
button:hover {
background-color: @surface2;
}
.popup {
padding: 1em;
border: 1px solid @surface0;
}
/* -- workspaces configuration */
.workspaces {
background-color: @surface0;
margin-left: 5px;
}
.workspaces .item {
background-color: @surface0;
border-radius: 100%;
}
.workspaces .item:not(:first-child) {
margin-left: 4px;
}
.workspaces .item.focused {
background-color: @surface1;
}
.workspaces .item:hover {
background-color: @surface2;
}
/* -- launcher configuration -- */
.launcher {
margin-left: 5px;
}
.launcher .item {
background-color: @base;
padding: 0 5px;
border-radius: 100%;
}
.launcher .item:not(:first-child) {
margin-left: 4px;
}
.launcher :hover {
background-color: @surface2;
}
.launcher .open {
background-color: @surface1;
}
.launcher .focused {
background-color: @surface2;
}
.launcher .urgent {
background-color: @red;
}
.popup-launcher {
padding: 5px;
}
.popup-launcher .popup-item:not(:first-child) {
margin-top: 5px;
}
/* -- clock configuration -- */
.clock {
font-weight: bold;
margin-left: 5px;
margin-right: 5px;
}
.popup-clock .calendar-clock {
color: @text;
font-size: 2.5em;
margin-bottom: 5px;
padding-left: 5px;
padding-right: 5px;
background-color: @surface0;
}
.popup-clock .calendar {
background-color: @surface0;
color: @text;
}
.popup-clock .calendar .header {
font-size: 1.5em;
}
.popup-clock .calendar:selected {
background-color: @rosewater;
color: @base;
}
/* -- notifications configuration -- */
.notifications {
border-radius: 100%;
}
.notifications .count {
font-size: 0.6rem;
background-color: @text;
color: @crust;
border-radius: 100%;
margin-right: 3px;
margin-top: 3px;
padding-left: 4px;
padding-right: 4px;
opacity: 0.7;
}
/* -- tray configuration -- */
.tray {
background-color: @base;
}
.tray .item:hover {
background-color: @surface2;
}
.tray .item:not(:first-child) {
margin-left: 4px;
}
/* -- volume configuration -- */
.volume {
margin-left: 5px;
}
.popup-volume .device-box .device-selector {
background-color: @surface0;
}
.popup-volume .device-box .slider {
background-color: @surface0;
}
/* -- powermenu configuration -- */
.power-menu #power-button {
padding: 0 13px;
border-radius: 100%;
}
.popup-power-menu {
padding: 5px;
}
.popup-power-menu .power-button {
padding: 0 10px;
border-radius: 100%;
margin: 0 2.5px;
}

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Setup .zshrc folder in .config for zsh to work
echo 'ZDOTDIR=$XDG_CONFIG_HOME/zsh/' >> /etc/zsh/zshenv
echo 'ZDOTDIR=$HOME/.config/zsh/' >> /etc/zsh/zshenv
# Create folder for history
mkdir -p $(dirname "$HISTFILE")