This commit is contained in:
Stephan Raabe 2023-08-20 11:46:46 +02:00
parent 7fb836bfbb
commit 585834d31d
12 changed files with 205 additions and 88 deletions

View File

@ -17,6 +17,7 @@ PS1='[\u@\h \W]\$ '
# ALIASES # ALIASES
# ----------------------------------------------------- # -----------------------------------------------------
alias Qtile='startx'
alias c='clear' alias c='clear'
alias nf='neofetch' alias nf='neofetch'
alias pf='pfetch' alias pf='pfetch'

View File

@ -98,6 +98,15 @@ else
echo ".config folder created." echo ".config folder created."
fi fi
# ------------------------------------------------------
# Remove pywal folder from .config
# ------------------------------------------------------
echo ""
if [ -d ~/.config/wal/ ]; then
rm -r ~/.config/wal/
echo "~/.config/wal/ removed."
fi
# ------------------------------------------------------ # ------------------------------------------------------
# Create symbolic links # Create symbolic links
# ------------------------------------------------------ # ------------------------------------------------------
@ -110,6 +119,7 @@ _installSymLink ~/.config/rofi ~/dotfiles/rofi/ ~/.config
_installSymLink ~/.config/vim ~/dotfiles/vim/ ~/.config _installSymLink ~/.config/vim ~/dotfiles/vim/ ~/.config
_installSymLink ~/.config/nvim ~/dotfiles/nvim/ ~/.config _installSymLink ~/.config/nvim ~/dotfiles/nvim/ ~/.config
_installSymLink ~/.config/dunst ~/dotfiles/dunst/ ~/.config _installSymLink ~/.config/dunst ~/dotfiles/dunst/ ~/.config
_installSymLink ~/.config/wal ~/dotfiles/wal/ ~/.config
_installSymLink ~/.config/starship.toml ~/dotfiles/starship/starship.toml ~/.config/starship.toml _installSymLink ~/.config/starship.toml ~/dotfiles/starship/starship.toml ~/.config/starship.toml
# ------------------------------------------------------ # ------------------------------------------------------

View File

@ -131,7 +131,7 @@ font:
family: FiraCode Nerd Font family: FiraCode Nerd Font
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular style: Regular
# Bold font face # Bold font face
#bold: #bold:
@ -167,7 +167,7 @@ font:
#style: Bold Italic #style: Bold Italic
# Point size # Point size
size: 9.0 size: 11.0
# Offset is the extra space around each character. `offset.y` can be thought # Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter # of as modifying the line spacing, and `offset.x` as modifying the letter

View File

@ -323,21 +323,21 @@
[urgency_low] [urgency_low]
# IMPORTANT: colors have to be defined in quotation marks. # IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment. # Otherwise the "#" and following would be interpreted as a comment.
background = "#000000" background = "#00000070"
foreground = "#888888" foreground = "#888888"
timeout = 6 timeout = 6
# Icon for notifications with low urgency, uncomment to enable # Icon for notifications with low urgency, uncomment to enable
#default_icon = /path/to/icon #default_icon = /path/to/icon
[urgency_normal] [urgency_normal]
background = "#000000" background = "#00000070"
foreground = "#ffffff" foreground = "#ffffff"
timeout = 6 timeout = 6
# Icon for notifications with normal urgency, uncomment to enable # Icon for notifications with normal urgency, uncomment to enable
#default_icon = /path/to/icon #default_icon = /path/to/icon
[urgency_critical] [urgency_critical]
background = "#900000" background = "#90000070"
foreground = "#ffffff" foreground = "#ffffff"
frame_color = "#ffffff" frame_color = "#ffffff"
timeout = 6 timeout = 6

View File

@ -8,73 +8,83 @@
# by Stephan Raabe (2023) # by Stephan Raabe (2023)
# ----------------------------------------------------- # -----------------------------------------------------
# -----------------------------------------------------
# Monitor Setup
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
# -----------------------------------------------------
monitor=,preferred,auto,auto monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # -----------------------------------------------------
# Autostart
# -----------------------------------------------------
exec-once = waybar
exec-once = swww init
exec-once = ~/dotfiles/scripts/updatewal-swww.sh
exec-once = dunst
# Execute your favorite apps at launch # -----------------------------------------------------
exec-once = waybar & swww init & ~/dotfiles/scripts/updatewal-swww.sh # Load pywal color file
# -----------------------------------------------------
source = /home/raabe/.cache/wal/colors-hyprland.conf
# Source a file (multi-file configs) # -----------------------------------------------------
# source = ~/.config/hypr/myColors.conf # Env vars
# -----------------------------------------------------
# Some default env vars.
env = XCURSOR_SIZE,24 env = XCURSOR_SIZE,24
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ # -----------------------------------------------------
# Keyboard layout and mouse
# -----------------------------------------------------
input { input {
kb_layout = de kb_layout = de
kb_variant = kb_variant =
kb_model = kb_model =
kb_options = kb_options =
kb_rules = kb_rules =
follow_mouse = 1 follow_mouse = 1
touchpad { touchpad {
natural_scroll = false natural_scroll = false
} }
sensitivity = 0 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
} }
# -----------------------------------------------------
# General window layout and colors
# -----------------------------------------------------
general { general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 10 gaps_in = 10
gaps_out = 20 gaps_out = 20
border_size = 3 border_size = 3
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg # Single Color for active window
col.inactive_border = rgba(595959aa) col.active_border = $color11
# Color Gradient for active window
# col.active_border = $color11 $background $background $color14 45deg
col.inactive_border = rgba(ffffffee)
layout = dwindle layout = dwindle
} }
# -----------------------------------------------------
# General window decoration
# -----------------------------------------------------
decoration { decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10 rounding = 10
blur { blur {
enabled = true enabled = true
size = 3 size = 3
passes = 1 passes = 1
} }
drop_shadow = true drop_shadow = true
shadow_range = 4 shadow_range = 4
shadow_render_power = 3 shadow_render_power = 3
col.shadow = rgba(1a1a1aee) col.shadow = rgba(1a1a1aee)
} }
# -----------------------------------------------------
# Animations
# -----------------------------------------------------
animations { animations {
enabled = true enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05 bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80% animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default animation = border, 1, 10, default
@ -83,6 +93,9 @@ animations {
animation = workspaces, 1, 6, default animation = workspaces, 1, 6, default
} }
# -----------------------------------------------------
# Layouts
# -----------------------------------------------------
dwindle { dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
@ -105,22 +118,19 @@ device:epic-mouse-v1 {
sensitivity = -0.5 sensitivity = -0.5
} }
# Example windowrule v1 # -----------------------------------------------------
# Window rules
# -----------------------------------------------------
windowrule = tile,title:^(Outlook)(.*)$ windowrule = tile,title:^(Outlook)(.*)$
windowrule = tile,title:^(Teams)(.*)$ windowrule = tile,title:^(Microsoft)(.*)$
# windowrule = tile, ^(brave)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# -----------------------------------------------------
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # Key bindings
# -----------------------------------------------------
$mainMod = SUPER $mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, RETURN, exec, alacritty bind = $mainMod, RETURN, exec, alacritty
bind = $mainMod, Q, killactive bind = $mainMod, Q, killactive
bind = $mainMod CTRL, Q, exit, bind = $mainMod CTRL, Q, exec, ~/dotfiles/scripts/powermenu-hypr.sh
bind = $mainMod, E, exec, dolphin bind = $mainMod, E, exec, dolphin
bind = $mainMod, T, togglefloating bind = $mainMod, T, togglefloating
bind = $mainMod SHIFT, W, exec, ~/dotfiles/scripts/updatewal-swww.sh bind = $mainMod SHIFT, W, exec, ~/dotfiles/scripts/updatewal-swww.sh
@ -128,14 +138,11 @@ bind = $mainMod, B, exec, brave
bind = $mainMod CTRL, RETURN, exec, ~/dotfiles/scripts/applauncher.sh bind = $mainMod CTRL, RETURN, exec, ~/dotfiles/scripts/applauncher.sh
bind = $mainMod, P, pseudo # dwindle bind = $mainMod, P, pseudo # dwindle
bind = $mainMod, J, togglesplit # dwindle bind = $mainMod, J, togglesplit # dwindle
bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/reload.sh
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1 bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2 bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3 bind = $mainMod, 3, workspace, 3
@ -146,8 +153,6 @@ bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8 bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9 bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10 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, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2 bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3 bind = $mainMod SHIFT, 3, movetoworkspace, 3
@ -158,11 +163,15 @@ bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8 bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9 bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10 bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1 bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow bindm = $mainMod, mouse:273, resizewindow
# -----------------------------------------------------
# Misc settings
# -----------------------------------------------------
misc {
disable_hyprland_logo = true
disable_splash_rendering = true
}

View File

@ -17,7 +17,6 @@ polybar-msg cmd quit
# ----------------------------------------------------- # -----------------------------------------------------
# Loading the configuration based on the username # Loading the configuration based on the username
# ----------------------------------------------------- # -----------------------------------------------------
if [[ $USER = "raabe" ]] if [[ $USER = "raabe" ]]
then then
polybar -r mypolybar polybar -r mypolybar

33
scripts/powermenu-hypr.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
# ____
# | _ \ _____ _____ _ __ _ __ ___ ___ _ __ _ _
# | |_) / _ \ \ /\ / / _ \ '__| '_ ` _ \ / _ \ '_ \| | | |
# | __/ (_) \ V V / __/ | | | | | | | __/ | | | |_| |
# |_| \___/ \_/\_/ \___|_| |_| |_| |_|\___|_| |_|\__,_|
#
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
option1=" lock"
option2=" logout"
option3=" reboot"
option4=" power off"
options="$option1\n"
options="$options$option2\n"
options="$options$option3\n$option4"
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Powermenu")
case $choice in
$option1)
slock ;;
$option2)
hyprctl dispatch exit ;;
$option3)
systemctl reboot ;;
$option4)
systemctl poweroff ;;
esac

View File

@ -19,6 +19,11 @@ wal -q -i ~/wallpaper/
# ----------------------------------------------------- # -----------------------------------------------------
source "$HOME/.cache/wal/colors.sh" source "$HOME/.cache/wal/colors.sh"
# -----------------------------------------------------
# Copy color file to waybar folder
# -----------------------------------------------------
cp ~/.cache/wal/colors-waybar.css ~/dotfiles/waybar/
# ----------------------------------------------------- # -----------------------------------------------------
# get wallpaper iamge name # get wallpaper iamge name
# ----------------------------------------------------- # -----------------------------------------------------
@ -28,4 +33,11 @@ newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
# Set the new wallpaper # Set the new wallpaper
# ----------------------------------------------------- # -----------------------------------------------------
swww img $wallpaper --transition-step 20 --transition-fps=20 swww img $wallpaper --transition-step 20 --transition-fps=20
~/dotfiles/waybar/reload.sh
# -----------------------------------------------------
# Send notification
# -----------------------------------------------------
notify-send "Theme and Wallpaper updated" "With image $newwall"
echo "DONE!"

View File

@ -11,22 +11,30 @@
echo "Changing theme..." echo "Changing theme..."
# -----------------------------------------------------
# Update Wallpaper with pywal # Update Wallpaper with pywal
# -----------------------------------------------------
wal -q -i ~/wallpaper/ wal -q -i ~/wallpaper/
# -----------------------------------------------------
# Wait for 1 sec # Wait for 1 sec
# -----------------------------------------------------
sleep 1 sleep 1
# -----------------------------------------------------
# Reload qtile to color bar # Reload qtile to color bar
# -----------------------------------------------------
qtile cmd-obj -o cmd -f reload_config qtile cmd-obj -o cmd -f reload_config
# -----------------------------------------------------
# Get new theme # Get new theme
# -----------------------------------------------------
source "$HOME/.cache/wal/colors.sh" source "$HOME/.cache/wal/colors.sh"
newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g")
# -----------------------------------------------------
# Send notification # Send notification
# -----------------------------------------------------
notify-send "Theme and Wallpaper updated" "With image $newwall" notify-send "Theme and Wallpaper updated" "With image $newwall"
echo "Done." echo "Done."

20
waybar/colors-waybar.css Normal file
View File

@ -0,0 +1,20 @@
@define-color foreground #bfc0c0;
@define-color background #010304;
@define-color cursor #bfc0c0;
@define-color color0 #010304;
@define-color color1 #325A65;
@define-color color2 #24636E;
@define-color color3 #466D76;
@define-color color4 #35817E;
@define-color color5 #347985;
@define-color color6 #4CAFB5;
@define-color color7 #bfc0c0;
@define-color color8 #404242;
@define-color color9 #325A65;
@define-color color10 #24636E;
@define-color color11 #466D76;
@define-color color12 #35817E;
@define-color color13 #347985;
@define-color color14 #4CAFB5;
@define-color color15 #bfc0c0;

View File

@ -2,9 +2,12 @@
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
"height": 30, // Waybar height (to be removed for auto height) "height": 30, // Waybar height (to be removed for auto height)
"spacing": 4, // Gaps between modules (4px) "spacing": 4, // Gaps between modules (4px)
"modules-left": ["hyprland/workspaces", "sway/mode", "sway/scratchpad", "custom/media"], "modules-left": ["custom/appmenu", "wlr/workspaces"],
"modules-center": ["hyprland/window"], "modules-center": ["hyprland/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "cpu", "memory", "keyboard-state", "hyprland/language", "battery", "battery#bat2", "clock", "tray"], "modules-right": ["hyprland/language", "keyboard-state", "pulseaudio", "cpu", "memory", "battery", "clock", "custom/exit", "tray"],
"wlr/workspaces" : {
"on-click": "activate"
},
//"hyprland/workspaces": { //"hyprland/workspaces": {
// "disable-scroll": true, // "disable-scroll": true,
// "all-outputs": true, // "all-outputs": true,
@ -21,6 +24,21 @@
// "default": "" // "default": ""
// } // }
//}, //},
"custom/appmenu": {
"format": " ",
"on-click": "~/dotfiles/scripts/applauncher.sh"
},
"custom/exit": {
"format": "",
"on-click": "~/dotfiles/scripts/powermenu-hypr.sh"
},
"custom/reload": {
"format": "Reload",
"on-click": "~/dotfiles/waybar/reload.sh"
},
"hyprland/language": {
"format": "{short}"
},
"keyboard-state": { "keyboard-state": {
"numlock": true, "numlock": true,
"capslock": true, "capslock": true,
@ -73,11 +91,11 @@
"format-alt": "{:%Y-%m-%d}" "format-alt": "{:%Y-%m-%d}"
}, },
"cpu": { "cpu": {
"format": "{usage}%", "format": "{usage}%",
"tooltip": false "tooltip": false
}, },
"memory": { "memory": {
"format": "{}%" "format": "{}%"
}, },
"temperature": { "temperature": {
// "thermal-zone": 2, // "thermal-zone": 2,
@ -120,7 +138,7 @@
}, },
"pulseaudio": { "pulseaudio": {
// "scroll-step": 1, // %, can be a float // "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}", "format": "{icon} {volume}%",
"format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}", "format-muted": " {format_source}",

View File

@ -1,30 +1,24 @@
@import 'colors-waybar.css';
* { * {
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif; font-family: "Fira Sans Semibold", FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px; font-size: 14px;
border-radius: 4px;
} }
window#waybar { window#waybar {
background-color: rgba(43, 48, 59, 0.8); background-color: rgba(0,0,0,0.3);
border-bottom: 3px solid rgba(100, 114, 125, 0.5); /* border-bottom: 3px solid rgba(100, 114, 125, 0.5); */
color: #ffffff; color: #FFFFFF;
transition-property: background-color; transition-property: background-color;
transition-duration: .5s; transition-duration: .5s;
border-radius: 0;
} }
window#waybar.hidden { window#waybar.hidden {
opacity: 0.2; opacity: 0.2;
} }
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite { window#waybar.termite {
background-color: #3F3F3F; background-color: #3F3F3F;
} }
@ -35,32 +29,33 @@ window#waybar.chromium {
} }
button { button {
/* Use box-shadow instead of border so the text isn't offset */ /* box-shadow: inset 0 -3px transparent; */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none; border: none;
border-radius: 0; border-radius: 0;
} }
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover { button:hover {
background: inherit; background: inherit;
box-shadow: inset 0 -3px #ffffff; box-shadow: inset 0 0px @foreground;
} }
#workspaces button { #workspaces button {
padding: 0 5px; padding: 0 5px;
background-color: transparent;
color: #ffffff; color: #ffffff;
} }
#workspaces button:hover { #workspaces button:hover {
background: rgba(0, 0, 0, 0.2); background-color: @foreground;
color: @background;
}
#workspaces button.active {
background-color: @color11;
color: #FFFFFF;
} }
#workspaces button.focused { #workspaces button.focused {
background-color: #64727D; background-color: @foreground;
box-shadow: inset 0 -3px #ffffff;
} }
#workspaces button.urgent { #workspaces button.urgent {
@ -88,6 +83,7 @@ button:hover {
#idle_inhibitor, #idle_inhibitor,
#scratchpad, #scratchpad,
#mpd { #mpd {
margin: 6px 6px;
padding: 0 10px; padding: 0 10px;
color: #ffffff; color: #ffffff;
} }
@ -97,18 +93,24 @@ button:hover {
margin: 0 4px; margin: 0 4px;
} }
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0; margin-left: 0;
} }
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces { .modules-right > widget:last-child > #workspaces {
margin-right: 0; margin-right: 0;
} }
#custom-appmenu {
margin-left:10;
}
#custom-exit {
margin-right: 10px;
}
#clock { #clock {
background-color: #64727D; background-color: @color11;
} }
#battery { #battery {
@ -143,12 +145,13 @@ label:focus {
} }
#cpu { #cpu {
background-color: #2ecc71; background-color: @foreground;
color: #000000; color: #000000;
} }
#memory { #memory {
background-color: #9b59b6; background-color: @foreground;
color:#000000;
} }
#disk { #disk {
@ -168,13 +171,15 @@ label:focus {
} }
#pulseaudio { #pulseaudio {
background-color: #f1c40f; background-color: @foreground;
color: #000000; color: #000000;
} }
#pulseaudio.muted { #pulseaudio.muted {
/*
background-color: #90b1b1; background-color: #90b1b1;
color: #2a5c45; color: #2a5c45;
*/
} }
#wireplumber { #wireplumber {
@ -248,11 +253,13 @@ label:focus {
} }
#language { #language {
/*
background: #00b093; background: #00b093;
color: #740864; color: #740864;
padding: 0 5px; padding: 0 5px;
margin: 0 5px; margin: 0 5px;
min-width: 16px; min-width: 16px;
*/
} }
#keyboard-state { #keyboard-state {