From 738e20458a67cc30867a20fee8580f2e286d34c2 Mon Sep 17 00:00:00 2001 From: lorenzhohermuth Date: Tue, 26 Nov 2024 14:05:31 +0100 Subject: [PATCH] changes --- .config/hypr/hyprland.conf | 59 ++++++++++--- .config/hypr/hyprlock.conf | 2 +- .config/hypr/toggle-media.sh | 2 + .config/kanshi/config | 6 +- .config/rofi/config.rasi | 6 +- .config/waybar/config | 49 ++++++++--- .config/waybar/macchiato.css | 26 ++++++ .config/waybar/power_menu.xml | 28 ++++++ .config/waybar/style.css | 160 +++++++++++----------------------- .zshrc | 1 + 10 files changed, 196 insertions(+), 143 deletions(-) create mode 100755 .config/hypr/toggle-media.sh create mode 100644 .config/waybar/macchiato.css create mode 100644 .config/waybar/power_menu.xml diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index d6b8b86..e6f6119 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -11,11 +11,9 @@ # 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 - ################### ### MY PROGRAMS ### ################### @@ -25,7 +23,7 @@ # Set programs that you use $terminal = kitty -e tmux $fileManager = pcmanfm -$menu = wofi --show drun +$menu = rofi -modi drun,run -show drun ################# @@ -36,11 +34,16 @@ $menu = wofi --show drun # Or execute your favorite apps at launch like this: exec-once = $terminal +exec = kanshi +exec = hyprpaper exec-once = nm-applet & exec-once = waybar exec-once = copyq -exec = kanshi -exec = hyprpaper +exec-once = brave +exec-once = spotify +exec-once = blueman-manager +exec-once = obsidian +#exec = $XDG_CONFIG_HOME/hypr/set_workspace.sh ############################# ### ENVIRONMENT VARIABLES ### @@ -50,7 +53,9 @@ exec = hyprpaper env = XCURSOR_SIZE,24 env = HYPRCURSOR_SIZE,24 - +env = XDG_CURRENT_DESKTOP,Hyprland +env = XDG_SESSION_TYPE,wayland +env = XDG_SESSION_DESKTOP,Hyprland ##################### ### LOOK AND FEEL ### @@ -86,11 +91,6 @@ decoration { 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 @@ -176,6 +176,10 @@ device { # See https://wiki.hyprland.org/Configuring/Keywords/ $mainMod = SUPER # Sets "Windows" key as main modifier +#airpods controll +bind = , XF86AudioPlay, exec, bash /home/lorenz/.config/hypr/toggle-media.sh +bind = , F8, exec, bash /home/lorenz/.config/hypr/toggle-media.sh + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, $terminal bind = SUPER_SHIFT, Q, killactive, @@ -186,6 +190,8 @@ bind = $mainMod, D, exec, $menu bind = $mainMod, P, exec, kanshi bind = $mainMod, S, togglesplit, # dwindle +#bind = $mainMod, O, moveworkspacetomonitor, 1, DP-7 , moveworkspacetomonitor, 2, DP-7 + # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r @@ -197,6 +203,11 @@ bind = $mainMod, l, movefocus, r bind = $mainMod, k, movefocus, u bind = $mainMod, j, movefocus, 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 + # Switch workspaces with mainMod + [0-9] bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 @@ -218,8 +229,7 @@ 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, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 0, movetoworkspace, 10 # Example special workspace (scratchpad) bind = $mainMod, S, togglespecialworkspace, magic @@ -234,7 +244,9 @@ bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bind = ALT_L, L, exec, hyprlock +#bind = ALT_L $mainmod, L, exec, hyprlock & systemctl suspend +bind = , Print, exec, hyprshot -m window -z -o ~/pictures/screenshots ############################## ### WINDOWS AND WORKSPACES ### ############################## @@ -248,4 +260,23 @@ bind = ALT_L, L, exec, hyprlock # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ -windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. +# windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. + +windowrulev2 = noanim, class:(rofi)$ + +windowrulev2 = workspace 1, class:^(kitty)$ +windowrulev2 = workspace 2, class:^(Brave-browser)$ +windowrulev2 = workspace 3, class:^(obsidian)$ +windowrulev2 = workspace 10, class:^(Spotify)$ +windowrulev2 = workspace 10, class:^(.*blueman.*)$ + +workspace = 1, monitor:DP-5 +workspace = 2, monitor:DP-7 +workspace = 3, monitor:DP-5 +workspace = 4, monitor:DP-7 +workspace = 5, monitor:DP-5 +workspace = 6, monitor:DP-7 +workspace = 7, monitor:DP-5 +workspace = 8, monitor:DP-7 +workspace = 9, monitor:DP-5 +workspace = 10, monitor:DP-7 diff --git a/.config/hypr/hyprlock.conf b/.config/hypr/hyprlock.conf index 22c62af..e2c4ef0 100644 --- a/.config/hypr/hyprlock.conf +++ b/.config/hypr/hyprlock.conf @@ -1,5 +1,5 @@ source = $HOME/.config/hypr/macchiato.conf -$mainMonitor = DP-5 +$mainMonitor = $accent = $mauve $accentAlpha = $mauveAlpha diff --git a/.config/hypr/toggle-media.sh b/.config/hypr/toggle-media.sh new file mode 100755 index 0000000..2690322 --- /dev/null +++ b/.config/hypr/toggle-media.sh @@ -0,0 +1,2 @@ +#!/bin/bash +qdbus org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause diff --git a/.config/kanshi/config b/.config/kanshi/config index 6158c5e..a13d312 100644 --- a/.config/kanshi/config +++ b/.config/kanshi/config @@ -1,9 +1,9 @@ -profile { +profile home { output eDP-1 disable output DP-5 mode 1920x1080 position 0,0 output DP-7 mode 1920x1080 position 1920,0 } -profile { - output eDP-1 mode 1280x720 position 0,0 +profile laptop { + output eDP-1 mode 1920x1080 position 0,0 scale 1 } diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index a8be91b..390df0f 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -15,9 +15,9 @@ configuration { @theme "/dev/null" * { - bg: #1e1e2e66; - bg-alt: #585b7066; - bg-selected: #31324466; + bg: #1e1e2e; + bg-alt: #585b70; + bg-selected: #313244; fg: #cdd6f4; fg-alt: #7f849c; diff --git a/.config/waybar/config b/.config/waybar/config index 1b81ec5..4687b49 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,14 +1,14 @@ { "layer": "top", "position": "top", - "height": 24, + "height": 28, "spacing": 4, "modules-left": [ "hyprland/workspaces", "hyprland/submap", ], "modules-center": [ - "sway/window" + "hyprland/window" ], "modules-right": [ "pulseaudio", @@ -17,7 +17,7 @@ "battery", "clock", "tray", - "custom/power" + "custom/power", ], "hyprland/workspaces": { "all-outputs": false, @@ -25,6 +25,28 @@ }, "hyprland/submap": { "format": "{}" + }, + "cava": { + "cava_config": "$XDG_CONFIG_HOME/cava/cava.conf", + "framerate": 30, + "autosens": 1, + "sensitivity": 100, + "bars": 14, + "lower_cutoff_freq": 50, + "higher_cutoff_freq": 10000, + "method": "pulse", + "source": "auto", + "stereo": true, + "reverse": false, + "bar_delimiter": 0, + "monstercat": false, + "waves": false, + "noise_reduction": 0.77, + "input_delay": 2, + "format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ], + "actions": { + "on-click-right": "mode" + } }, "clock": { "tooltip-format": "{:%Y %B}\n{calendar}", @@ -49,7 +71,6 @@ "format-plugged": "{capacity}% ", "format-icons": ["", "", "", "", ""] }, - }, "pulseaudio": { "format": "{volume}% {icon} {format_source}", "format-muted": "󰝟 {format_source}", @@ -64,15 +85,15 @@ "on-click": "pavucontrol" }, "custom/power": { - "format" : "⏻ ", - "tooltip": false, - "menu": "on-click", - "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder - "menu-actions": { - "shutdown": "shutdown", - "reboot": "reboot", - "suspend": "systemctl suspend", - "hibernate": "systemctl hibernate" - } + "format" : "⏻ ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "systemctl poweroff", + "reboot": "reboot", + "suspend": "hyprlock & systemctl suspend", + "hibernate": "hyprlock & systemctl hibernate" + } } } diff --git a/.config/waybar/macchiato.css b/.config/waybar/macchiato.css new file mode 100644 index 0000000..0b9c43c --- /dev/null +++ b/.config/waybar/macchiato.css @@ -0,0 +1,26 @@ +@define-color rosewater #f4dbd6; +@define-color flamingo #f0c6c6; +@define-color pink #f5bde6; +@define-color mauve #c6a0f6; +@define-color red #ed8796; +@define-color maroon #ee99a0; +@define-color peach #f5a97f; +@define-color yellow #eed49f; +@define-color green #a6da95; +@define-color teal #8bd5ca; +@define-color sky #91d7e3; +@define-color sapphire #7dc4e4; +@define-color blue #8aadf4; +@define-color lavender #b7bdf8; +@define-color text #cad3f5; +@define-color subtext1 #b8c0e0; +@define-color subtext0 #a5adcb; +@define-color overlay2 #939ab7; +@define-color overlay1 #8087a2; +@define-color overlay0 #6e738d; +@define-color surface2 #5b6078; +@define-color surface1 #494d64; +@define-color surface0 #363a4f; +@define-color base #24273a; +@define-color mantle #1e2030; +@define-color crust #181926; diff --git a/.config/waybar/power_menu.xml b/.config/waybar/power_menu.xml new file mode 100644 index 0000000..aa2a42c --- /dev/null +++ b/.config/waybar/power_menu.xml @@ -0,0 +1,28 @@ + + + + + + Suspend + + + + + Hibernate + + + + + Shutdown + + + + + + + + Reboot + + + + diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 6812b23..cdc7b67 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -1,3 +1,4 @@ +@import "macchiato.css"; * { /* `otf-font-awesome` is required to be installed for icons */ font-family: NerdFont, Roboto, Helvetica, Arial, sans-serif; @@ -5,9 +6,9 @@ } window#waybar { - background-color: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); - color: #ffffff; + background-color: alpha(@base, 0); + border-bottom: 3px solid alpha(@surface2 , 0); + color: @text; transition-property: background-color; transition-duration: .5s; } @@ -25,8 +26,15 @@ } */ -window#waybar.termite { - background-color: #3F3F3F; +.modules-center { + color: @crust; +} + +.modules-right{ + margin: 2px +} + +window#waybar.termite { background-color: @surface0; } window#waybar.chromium { @@ -45,7 +53,7 @@ button { /* 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; + box-shadow: inset 0 -3px @lavender; } /* you can set a style on hover for any module like this */ @@ -53,10 +61,15 @@ button:hover { background-color: #a37800; } +#workspaces { + background-color: alpha(@base, 0.5); + box-shadow: inset 0 -3px alpha(@surface1, 0.5); +} + #workspaces button { - padding: 0 5px; + padding: 0 3px; background-color: transparent; - color: #ffffff; + color: @text; } #workspaces button:hover { @@ -64,8 +77,8 @@ button:hover { } #workspaces button.active { - background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; + background-color: alpha(@crust, 0.5); + box-shadow: inset 0 -3px @lavender; } #workspaces button.urgent { @@ -74,7 +87,7 @@ button:hover { #mode { background-color: #64727D; - box-shadow: inset 0 -3px #ffffff; + box-shadow: inset 0 -3px @lavender; } #clock, @@ -88,14 +101,27 @@ button:hover { #pulseaudio, #wireplumber, #custom-media, +#custom-power, #tray, #mode, #idle_inhibitor, #scratchpad, #power-profiles-daemon, #mpd { + background-color: @base; padding: 0 10px; - color: #ffffff; + margin: 2px; + color: @text; + border-radius: 10px; +} + +.modules-right widget { + background-image: linear-gradient(-45deg, #6A00DF, #C90E6F); + border-radius: 12px; +} + +.module widget { + background-image: none; } #window, @@ -113,20 +139,6 @@ button:hover { 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; @@ -134,10 +146,12 @@ button:hover { } } +#custom-power { + padding: 0px 8px 0px 12px; +} + /* Using steps() instead of linear as a timing function to limit cpu usage */ #battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; animation-name: blink; animation-duration: 0.5s; animation-timing-function: steps(12); @@ -149,93 +163,37 @@ button:hover { padding-right: 15px; } -#power-profiles-daemon.performance { - background-color: #f53c3c; - color: #ffffff; -} - -#power-profiles-daemon.balanced { - background-color: #2980b9; - color: #ffffff; -} - -#power-profiles-daemon.power-saver { - background-color: #2ecc71; - color: #000000; -} - 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; + background-color: @blue; } #pulseaudio.muted { - background-color: #90b1b1; + background-color: @blue; color: #2a5c45; } -#wireplumber { - background-color: #fff0f5; - color: #000000; -} - #wireplumber.muted { - background-color: #f53c3c; + background-color: @blue; } #custom-media { - background-color: #66cc99; - color: #2a5c45; min-width: 100px; } #custom-media.custom-spotify { - background-color: #66cc99; + background-color: @green; } #custom-media.custom-vlc { - background-color: #ffa000; -} - -#temperature { - background-color: #f0932b; + background-color: @blue; } #temperature.critical { - background-color: #eb4d4b; -} - -#tray { - background-color: #2980b9; + background-color: @red; } #tray > .passive { @@ -247,43 +205,29 @@ label:focus { background-color: #eb4d4b; } -#idle_inhibitor { - background-color: #2d3436; -} - #idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; -} - -#mpd { - background-color: #66cc99; - color: #2a5c45; + background-color: @red; } #mpd.disconnected { - background-color: #f53c3c; + background-color: @blue; } #mpd.stopped { - background-color: #90b1b1; + background-color: @red; } #mpd.paused { - background-color: #51a37a; + background-color: @green; } #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; diff --git a/.zshrc b/.zshrc index b6429db..bee158d 100644 --- a/.zshrc +++ b/.zshrc @@ -87,6 +87,7 @@ export PATH=$PATH:"$GOPATH/bin:$HOME/scripts:$HOME/bin:/usr/local/lib/sts/cmd:/u export GOPATH=$HOME/go export XDG_CONFIG_HOME="$HOME/.config" +export MANPAGER="nvim +Man!" export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm