some hyprland related stuff

This commit is contained in:
LordMZTE 2023-08-27 17:01:31 +02:00
parent 74d14fef07
commit 947b6b925d
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
7 changed files with 225 additions and 304 deletions

View file

@ -1,6 +1,6 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
#monitor=,preferred,auto,auto
<% opt.getDeviceConf "hyprland.conf" %>
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -18,10 +18,10 @@ input {
kb_layout = de
kb_variant =
kb_model =
kb_options = caps:swapescape
kb_options =
kb_rules =
follow_mouse = 0
follow_mouse = 2
touchpad {
natural_scroll = no
@ -48,7 +48,7 @@ decoration {
rounding = 0
blur {
enabled = false # borked on legacyrender
enabled = true
size = 3
passes = 1
}
@ -107,15 +107,16 @@ device:epic-mouse-v1 {
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, foot
bind = $mainMod + SHIFT, Q, killactive,
bind = $mainMod + SHIFT, E, exit,
bind = $mainMod + CTRL, E, exec, thunar
bind = $mainMod, RETURN, exec, foot # need to hard-code foot here, because WezTerm is currently too incompetent for WL
bind = $mainMod + SHIFT, Q, killactive,
bind = $mainMod + SHIFT, E, exit,
bind = $mainMod + CTRL, E, exec, <% opt.commands.file_manager %>
bind = $mainMod + SHIFT, SPACE, togglefloating,
bind = ALT, SPACE, exec, wofi --show drun
bind = $mainMod + CTRL, B, exec, firefox
bind = $mainMod + CTRL, B, exec, <% opt.commands.browser %>
bind = $mainMod + SHIFT, P, pseudo, # dwindle
bind = $mainMod + SHIFT, R, togglesplit, # dwindle
bind = $mainMod, F, fullscreen,
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
@ -140,6 +141,7 @@ bind = $mainMod + SHIFT, H, movewindow, l
bind = $mainMod + SHIFT, L, movewindow, r
bind = $mainMod + SHIFT, K, movewindow, u
bind = $mainMod + SHIFT, J, movewindow, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
@ -153,17 +155,16 @@ 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, movetoworkspacesilent, 1
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
@ -173,6 +174,15 @@ bind = $mainMod, mouse_up, workspace, e-1
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
env = XDG_SESSION_TYPE, wayland
<! if opt.nvidia then -- nvidia workarounds !>
env = LIBVA_DRIVER_NAME, nvidia
env = GBM_BACKEND, nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME, nvidia
env = WLR_NO_HARDWARE_CURSORS, 1
<! end !>
exec-once = waybar
exec-once = swaybg -i ~/.local/share/backgrounds/mzte.png
exec-once = hyprctl setcursor <% opt.cursor.theme %> <% opt.cursor.size %>

View file

@ -2,19 +2,23 @@
{
// "layer": "top", // Waybar at top layer
// "position": "bottom", // Waybar position (top|bottom|left|right)
"height": 25, // Waybar height (to be removed for auto height)
"height": 16, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
"layer": "top",
//<! if opt.wayland_compositor == "river" then !>
"modules-left": ["river/tags"],
"modules-center": ["river/window"],
//<! elseif opt.wayland_compositor == "hyprland" then !>
"modules-left": ["wlr/workspaces"],
"modules-center": ["wlr/taskbar"],
"modules-left": ["hyprland/workspaces", "hyprland/window"],
//<! end !>
"modules-right": ["cpu", "memory", "pulseaudio", "temperature", "battery", "battery#bat2", "clock", "tray"],
"hyprland/workspaces": {},
"tray": {
// "icon-size": 21,
"spacing": 10

37
.config/waybar/mocha.css Normal file
View file

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

View file

@ -1,280 +0,0 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
*/
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
#tags button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#tags button:hover {
background: rgba(0, 0, 0, 0.2);
}
#tags button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#tags button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#tags {
margin: 0 4px;
}
/* If tags is the leftmost module, omit left margin */
.modules-left > widget:first-child > #tags {
margin-left: 0;
}
/* If tags is the rightmost module, omit right margin */
.modules-right > widget:last-child > #tags {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}

View file

@ -0,0 +1,146 @@
@import "mocha.css";
* {
border: none;
border-radius: 0;
font-family: "<% opt.font %>";
font-size: 14px;
min-height: 16px;
}
window#waybar {
background: transparent;
}
window#waybar.hidden {
opacity: 0.2;
}
#window {
margin-top: 8px;
padding-left: 16px;
padding-right: 16px;
transition: none;
color: transparent;
background: transparent;
}
window#waybar.termite #window,
window#waybar.Firefox #window,
window#waybar.Navigator #window,
window#waybar.PCSX2 #window {
color: @text;
background: @surface0;
}
#workspaces {
margin-top: 8px;
margin-left: 12px;
margin-bottom: 0;
background: @base;
transition: none;
}
#workspaces button {
transition: none;
color: @text;
background: @crust;
font-size: 16px;
}
#workspaces button.active {
color: @lavender;
background: @base;
}
#workspaces button:hover {
transition: none;
box-shadow: inherit;
text-shadow: inherit;
color: @maroon;
}
#pulseaudio {
margin-top: 8px;
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @base;
background: @teal;
}
#temperature {
margin-top: 8px;
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @base;
background: @green;
}
#cpu {
margin-top: 8px;
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @base;
background: @mauve;
}
#memory {
margin-top: 8px;
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @base;
background: @yellow;
}
#clock {
margin-top: 8px;
margin-left: 8px;
margin-right: 12px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @text;
background: @mantle;
}
#tray {
margin-top: 8px;
margin-left: 8px;
margin-right: 12px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
background: @crust;
}
window#waybar.empty #window {
padding: 0px;
margin: 0px;
border: 0px;
background-color: transparent;
}
#window {
margin-top: 8px;
margin-left: 8px;
padding-left: 16px;
padding-right: 16px;
margin-bottom: 0;
transition: none;
color: @text;
background: @base;
}

View file

@ -107,4 +107,5 @@
;; user error while compromising the experience of advanced users.
;; See https://github.com/wez/wezterm/issues/4168
:set_environment_variables {:SHELL "<% shell %>"}
:enable_wayland false ;; WL is completely broken
: keys}

View file

@ -4,6 +4,9 @@ local opts = {}
-- streamlink use low-latency mode.
opts.good_internet = true
-- Enable if stuck on garbage hardware. Enables wayland-related workarounds.
opts.nvidia = false
opts.font = "Iosevka Nerd Font"
opts.term_font = "IosevkaTerm Nerd Font Mono"