From 34e6f503f06440af8dcfd70330093d5ac81eaf5d Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Mon, 28 Aug 2023 13:33:53 +0200 Subject: [PATCH] Updates --- .bashrc | 6 +- 1-install.sh | 2 + hypr/hyprland.conf | 4 +- scripts/launchvm.sh | 2 +- scripts/updatewal-swww.sh | 2 +- scripts/wallpaper-swww.sh | 2 +- waybar/colors-waybar.css | 30 ++--- waybar/config | 6 + waybar/launch.sh | 24 ++++ waybar/myconfig | 225 ++++++++++++++++++++++++++++++++++++++ waybar/reload.sh | 2 - waybar/style.css | 1 + 12 files changed, 283 insertions(+), 23 deletions(-) create mode 100755 waybar/launch.sh create mode 100644 waybar/myconfig delete mode 100755 waybar/reload.sh diff --git a/.bashrc b/.bashrc index fc4766f..69312d5 100644 --- a/.bashrc +++ b/.bashrc @@ -17,7 +17,6 @@ PS1='[\u@\h \W]\$ ' # ALIASES # ----------------------------------------------------- -alias Qtile='startx' alias c='clear' alias nf='neofetch' alias pf='pfetch' @@ -36,6 +35,11 @@ alias wifi='nmtui' alias od='~/private/onedrive.sh' alias rw='~/dotfiles/waybar/reload.sh' +# Window Managers + +alias Qtile='startx' +# alias Hyprland="~/dotfiles/hypr/starthypr.sh" + # GIT alias gs="git status" diff --git a/1-install.sh b/1-install.sh index c62740b..4727a87 100755 --- a/1-install.sh +++ b/1-install.sh @@ -85,6 +85,8 @@ else yay --noconfirm -S pywal fi +clear + # ------------------------------------------------------ # Create .config folder # ------------------------------------------------------ diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 2f66bec..a6dfe5b 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -19,7 +19,7 @@ monitor=,2560x1440@120,auto,1 # ----------------------------------------------------- # Autostart # ----------------------------------------------------- -exec-once = waybar +exec-once = ~/dotfiles/waybar/launch.sh exec-once = swww init exec-once = ~/dotfiles/scripts/updatewal-swww.sh exec-once = dunst @@ -150,7 +150,7 @@ bind = $mainMod CTRL, Q, exec, ~/dotfiles/scripts/powermenu-hypr.sh bind = $mainMod SHIFT, W, exec, ~/dotfiles/scripts/updatewal-swww.sh bind = $mainMod CTRL, W, exec, ~/dotfiles/scripts/wallpaper-swww.sh bind = $mainMod CTRL, RETURN, exec, ~/dotfiles/scripts/applauncher.sh -bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/reload.sh +bind = $mainMod SHIFT, B, exec, ~/dotfiles/waybar/launch.sh bind = $mainMod, 1, workspace, 1 bind = $mainMod, 2, workspace, 2 diff --git a/scripts/launchvm.sh b/scripts/launchvm.sh index 78219ae..304ce93 100755 --- a/scripts/launchvm.sh +++ b/scripts/launchvm.sh @@ -17,7 +17,7 @@ then exit else echo "Starting xfreerdp now..." - xfreerdp -grab-keyboard /v:192.168.122.42 /size:100% /cert-ignore /u:raabe /p:SECRET /d: /dynamic-resolution /gfx-h264:avc444 +gfx-progressive & + xfreerdp -grab-keyboard /v:192.168.122.44 /size:100% /cert-ignore /u:raabe /p:SECRET /d: /dynamic-resolution /gfx-h264:avc444 +gfx-progressive & exit fi diff --git a/scripts/updatewal-swww.sh b/scripts/updatewal-swww.sh index 0ade2d2..81c3d7d 100755 --- a/scripts/updatewal-swww.sh +++ b/scripts/updatewal-swww.sh @@ -33,7 +33,7 @@ newwall=$(echo $wallpaper | sed "s|$HOME/wallpaper/||g") # Set the new wallpaper # ----------------------------------------------------- swww img $wallpaper --transition-step 20 --transition-fps=20 -~/dotfiles/waybar/reload.sh +~/dotfiles/waybar/launch.sh # ----------------------------------------------------- # Send notification diff --git a/scripts/wallpaper-swww.sh b/scripts/wallpaper-swww.sh index d929ec1..0fe648a 100755 --- a/scripts/wallpaper-swww.sh +++ b/scripts/wallpaper-swww.sh @@ -38,7 +38,7 @@ if [ "$selected" ]; then # Set the new wallpaper # ----------------------------------------------------- swww img $wallpaper --transition-step 20 --transition-fps=20 - ~/dotfiles/waybar/reload.sh + ~/dotfiles/waybar/launch.sh # ----------------------------------------------------- # Send notification diff --git a/waybar/colors-waybar.css b/waybar/colors-waybar.css index 72b6285..2a27d52 100644 --- a/waybar/colors-waybar.css +++ b/waybar/colors-waybar.css @@ -1,20 +1,20 @@ @define-color foreground #bfbfc0; -@define-color background #010103; +@define-color background #000204; @define-color cursor #bfbfc0; -@define-color color0 #010103; -@define-color color1 #533148; -@define-color color2 #6E4A64; -@define-color color3 #8E443B; -@define-color color4 #A05C59; -@define-color color5 #C87854; -@define-color color6 #EE9C39; +@define-color color0 #000204; +@define-color color1 #26506F; +@define-color color2 #496773; +@define-color color3 #0F588A; +@define-color color4 #186DA7; +@define-color color5 #157DBF; +@define-color color6 #2597DB; @define-color color7 #bfbfc0; -@define-color color8 #404042; -@define-color color9 #533148; -@define-color color10 #6E4A64; -@define-color color11 #8E443B; -@define-color color12 #A05C59; -@define-color color13 #C87854; -@define-color color14 #EE9C39; +@define-color color8 #3f4142; +@define-color color9 #26506F; +@define-color color10 #496773; +@define-color color11 #0F588A; +@define-color color12 #186DA7; +@define-color color13 #157DBF; +@define-color color14 #2597DB; @define-color color15 #bfbfc0; diff --git a/waybar/config b/waybar/config index 2bb0704..d275c05 100644 --- a/waybar/config +++ b/waybar/config @@ -42,6 +42,12 @@ "sort-by-number": true } }, + "custom/youtube": { + "format": "YT: {}", + "exec": "python ~/private/youtube.py", + "interval": "300", + "on-click": "brave https://studio.youtube.com" + }, "custom/outlook": { "format": "", "on-click": "brave --app=https://outlook.office.com/mail/" diff --git a/waybar/launch.sh b/waybar/launch.sh new file mode 100755 index 0000000..dedd9e2 --- /dev/null +++ b/waybar/launch.sh @@ -0,0 +1,24 @@ +#!/bin/sh +# ____ _ _ __ __ _ +# / ___|| |_ __ _ _ __| |_ \ \ / /_ _ _ _| |__ __ _ _ __ +# \___ \| __/ _` | '__| __| \ \ /\ / / _` | | | | '_ \ / _` | '__| +# ___) | || (_| | | | |_ \ V V / (_| | |_| | |_) | (_| | | +# |____/ \__\__,_|_| \__| \_/\_/ \__,_|\__, |_.__/ \__,_|_| +# |___/ +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +# ----------------------------------------------------- +# Quit running waybar instances +# ----------------------------------------------------- +killall waybar + +# ----------------------------------------------------- +# Loading the configuration based on the username +# ----------------------------------------------------- +if [[ $USER = "raabe" ]] +then + waybar -c ~/dotfiles/waybar/myconfig & +else + waybar & +fi diff --git a/waybar/myconfig b/waybar/myconfig new file mode 100644 index 0000000..da88825 --- /dev/null +++ b/waybar/myconfig @@ -0,0 +1,225 @@ +{ + "layer": "top", // Waybar at top layer + "height": 30, // Waybar height (to be removed for auto height) + "spacing": 4, // Gaps between modules (4px) + "margin-top": 0, + "margin-left": 0, + "margin-right": 0, + "modules-left": [ + "custom/appmenu", + // "custom/brave", + "custom/outlook", + "custom/teams", + // "custom/calculator", + "custom/chatgpt", + "custom/lookingglass" + // "hyprland/window" + ], + "modules-center": [ + "wlr/workspaces", + ], + "modules-right": [ + // "hyprland/language", + "custom/youtube", + "keyboard-state", + "pulseaudio", + "disk", + "cpu", + "memory", + "battery", + "clock", + "custom/exit", + "tray" + ], + "wlr/workspaces" : { + "on-click": "activate", + "active-only": false, + "all-outputs": true, + "format": "{icon}", + "format-icons": { + "urgent": "", + "active": "", + "default": "", + "sort-by-number": true + } + }, + "custom/youtube": { + "format": "YT: {}", + "exec": "python ~/private/youtube.py", + "interval": "300", + "on-click": "brave https://studio.youtube.com" + }, + "custom/outlook": { + "format": "", + "on-click": "brave --app=https://outlook.office.com/mail/" + }, + "custom/teams": { + "format": "", + "on-click": "brave --app=https://teams.microsoft.com/go" + }, + "custom/brave": { + "format": "", + "on-click": "brave" + }, + "custom/chatgpt": { + "format": "", + "on-click": "brave --app=https://chat.openai.com" + }, + "custom/calculator": { + "format": "", + "on-click": "~/dotfiles/scripts/calculator.sh" + }, + "custom/lookingglass": { + "format": "", + "on-click": "~/dotfiles/scripts/looking-glass.sh" + }, + "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": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + // "timezone": "America/New_York", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": " {usage}%", + "tooltip": false + }, + "memory": { + "format": " {}%" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "disk": { + "interval": 30, + "format": " {percentage_used}%", + "path": "/" + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{icon} {volume}%", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", " ", " "] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} + diff --git a/waybar/reload.sh b/waybar/reload.sh deleted file mode 100755 index 457f3f7..0000000 --- a/waybar/reload.sh +++ /dev/null @@ -1,2 +0,0 @@ -killall waybar -waybar & diff --git a/waybar/style.css b/waybar/style.css index d1fc1a7..e811f7f 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -76,6 +76,7 @@ button { #idle_inhibitor, #scratchpad, #language, +#custom-youtube, #mpd { margin: 6px 10px 6px 0px; padding: 0 0px;