From 172809495bfd5e490a9809b119df2cd50f5dde3a Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Thu, 6 Apr 2023 14:30:10 +0200 Subject: [PATCH] Updates Polybar --- picom/picom.conf | 8 ++++---- polybar/config.ini | 25 ++++++++++++++++--------- polybar/launch.sh | 7 +++++++ qtile/autostart.sh | 2 +- qtile/config.py | 2 +- rofi/config.rasi | 16 +++++++++------- scripts/applauncher.sh | 12 ++++++++++++ scripts/powermenu.sh | 2 +- 8 files changed, 51 insertions(+), 23 deletions(-) create mode 100755 polybar/launch.sh create mode 100755 scripts/applauncher.sh diff --git a/picom/picom.conf b/picom/picom.conf index c894c23..da21fee 100644 --- a/picom/picom.conf +++ b/picom/picom.conf @@ -187,10 +187,10 @@ shadow-radius = 12; shadow-opacity = .75 # The left offset for shadows, in pixels. (defaults to -15) -shadow-offset-x = -7; +shadow-offset-x = -15; # The top offset for shadows, in pixels. (defaults to -15) -shadow-offset-y = -7; +shadow-offset-y = -15; # Red color value of shadow (0.0 - 1.0, defaults to 0). shadow-red = 0 @@ -263,7 +263,7 @@ inactive-dim-fixed = 1.0 # opacity-rule = [ "80:class_g = 'URxvt'" ]; # opacity-rule = [ - "90:class_g = 'Alacritty' && focused", + "90:class_g = 'Alacritty' && focused", "70:class_g = 'Alacritty' && !focused", "70:class_g = 'Rofi'" ] @@ -282,7 +282,7 @@ rounded-corners-exclude = [ "window_type = 'dock'", "window_type = 'desktop'", # "class_g = 'Dunst'", - "class_g = 'Rofi'", + # "class_g = 'Rofi'", "QTILE_INTERNAL:32c = 1" ]; diff --git a/polybar/config.ini b/polybar/config.ini index 7e84c05..0b2e93d 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -29,11 +29,11 @@ padding-right = 1 module-margin = 2 separator = "" separator-foreground = ${colors.disabled} -font-0 = "Fira Sans SemiBold:size=11;1" +font-0 = "Fira Sans SemiBold:size=11;2" font-1 = "Font Awesome 6 Free Solid:pixelsize=11;2" -modules-left = mymenu xworkspaces +modules-left = xworkspaces mymenu modules-center = xwindow -modules-right = filesystem pulseaudio xkeyboard memory cpu date myexit +modules-right = xkeyboard mysystem filesystem pulseaudio memory cpu date myexit cursor-click = pointer cursor-scroll = ns-resize enable-ipc = true @@ -42,13 +42,13 @@ enable-ipc = true [module/mymenu] type = custom/text content-foreground = ${colors.primary} -content = " " -click-left = "rofi -show drun -icon-theme 'Papirus' -show-icons" +content = "" +click-left = "~/dotfiles/scripts/applauncher.sh" [module/myexit] type = custom/text content-foreground = ${colors.primary} -content = " " +content = " " click-left = "~/dotfiles/scripts/powermenu.sh" [module/xworkspaces] @@ -78,6 +78,12 @@ format-prefix = " " format-prefix-foreground = ${colors.primary} format-foreground = #FFFFFF +[module/mysystem] +type = custom/text +content-foreground = ${colors.primary} +content = " " +click-left = "alacritty -e htop" + [module/filesystem] type = internal/fs interval = 25 @@ -90,7 +96,7 @@ label-unmounted-foreground = #FFFFFF [module/pulseaudio] type = internal/pulseaudio -format-volume-prefix = "VOL " +format-volume-prefix = " " format-volume-prefix-foreground = ${colors.primary} format-volume = format-volume-foreground = #FFFFFF @@ -111,7 +117,7 @@ label-indicator-background = ${colors.secondary} [module/memory] type = internal/memory interval = 2 -format-prefix = "RAM " +format-prefix = " " format-prefix-foreground = ${colors.primary} format-foreground = #FFFFFF label = %percentage_used:2%% @@ -119,10 +125,11 @@ label = %percentage_used:2%% [module/cpu] type = internal/cpu interval = 2 -format-prefix = "CPU " +format-prefix = " " format-prefix-foreground = ${colors.primary} format-foreground = #FFFFFF label = %percentage:2%% +click = "htop" [network-base] type = internal/network diff --git a/polybar/launch.sh b/polybar/launch.sh new file mode 100755 index 0000000..74686b4 --- /dev/null +++ b/polybar/launch.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +polybar-msg cmd quit +# killall -q polybar +polybar -r mybar + +echo "Bars launched..." diff --git a/qtile/autostart.sh b/qtile/autostart.sh index 671975f..b97857d 100755 --- a/qtile/autostart.sh +++ b/qtile/autostart.sh @@ -5,6 +5,6 @@ setxkbmap de picom & xfce4-power-manager & dunst & -polybar -r mybar & +~/dotfiles/polybar/launch.sh & ~/dotfiles/scripts/updatewal.sh spotifyd diff --git a/qtile/config.py b/qtile/config.py index f573bb4..ca79aff 100644 --- a/qtile/config.py +++ b/qtile/config.py @@ -133,7 +133,7 @@ keys = [ # Apps Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"), - Key([mod, "control"], "Return", lazy.spawn("rofi -show drun -icon-theme 'Papirus' -show-icons"), desc="Launch Rofi"), + Key([mod, "control"], "Return", lazy.spawn(home + "/dotfiles/scripts/applauncher.sh"), desc="Launch Rofi"), Key([mod], "b", lazy.spawn(browser), desc="Launch Browser"), Key([mod, "control"], "b", lazy.spawn(home + "/dotfiles/scripts/bravebookmarks.sh"), desc="Rofi Brave Bookmarks"), Key([mod], "v", lazy.spawn(home + "/dotfiles/scripts/looking-glass.sh"), desc="Start Looking Glass Client"), diff --git a/rofi/config.rasi b/rofi/config.rasi index d773a9b..aae4217 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -10,12 +10,11 @@ */ configuration { - display-drun: "Applications:"; - display-window: "Windows:"; + display-drun: "Applications"; + display-window: "Windows"; drun-display-format: "{name}"; - font: "Fira Sans 11"; + font: "Fira Sans SemiBold 11"; modi: "window,run,drun"; - lines: 10; } /* Dark theme. */ @@ -25,9 +24,12 @@ configuration { width:700px; } -#window { - border:2px; - border-color:@foreground; +element { + padding:6; +} + +element-text selected { + text-color:@background; } /* vim: ft=sass diff --git a/scripts/applauncher.sh b/scripts/applauncher.sh new file mode 100755 index 0000000..9d0e36d --- /dev/null +++ b/scripts/applauncher.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# _ _ _ +# / \ _ __ _ __ | | __ _ _ _ _ __ ___| |__ ___ _ __ +# / _ \ | '_ \| '_ \ | | / _` | | | | '_ \ / __| '_ \ / _ \ '__| +# / ___ \| |_) | |_) | | |__| (_| | |_| | | | | (__| | | | __/ | +# /_/ \_\ .__/| .__/ |_____\__,_|\__,_|_| |_|\___|_| |_|\___|_| +# |_| |_| +# +# by Stephan Raabe (2023) +# ----------------------------------------------------- + +rofi -show drun -icon-theme "Papirus" -show-icons -l 10 diff --git a/scripts/powermenu.sh b/scripts/powermenu.sh index 38c3dcf..e98d89e 100755 --- a/scripts/powermenu.sh +++ b/scripts/powermenu.sh @@ -18,7 +18,7 @@ options="$option1\n" options="$options$option2\n" options="$options$option3\n$option4" -choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -lines 4 -width 30 -p "Powermenu") +choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Powermenu") case $choice in $option1)