From b35727ce5a431d318df9b855bb715b5e066ad0de Mon Sep 17 00:00:00 2001 From: Dunestorm Date: Sun, 27 Dec 2020 17:35:32 +0000 Subject: [PATCH] [DSiR v0.92.0.0] - Migrated from i3status-rs to polybar. --- config/i3/config | 43 +- config/polybar/launch.sh | 81 ++ config/polybar/shapes/bars.ini | 522 ++++++++ config/polybar/shapes/colors.ini | 29 + config/polybar/shapes/config.ini | 294 +++++ config/polybar/shapes/glyphs.ini | 79 ++ config/polybar/shapes/launch.sh | 14 + config/polybar/shapes/modules.ini | 1109 +++++++++++++++++ config/polybar/shapes/preview.ini | 315 +++++ config/polybar/shapes/preview.sh | 14 + config/polybar/shapes/scripts/checkupdates | 117 ++ config/polybar/shapes/scripts/color-switch.sh | 55 + config/polybar/shapes/scripts/colors-dark.sh | 124 ++ config/polybar/shapes/scripts/colors-light.sh | 125 ++ config/polybar/shapes/scripts/launcher.sh | 3 + config/polybar/shapes/scripts/powermenu.sh | 94 ++ config/polybar/shapes/scripts/pywal.sh | 71 ++ config/polybar/shapes/scripts/random.sh | 84 ++ .../polybar/shapes/scripts/rofi/colors.rasi | 10 + .../polybar/shapes/scripts/rofi/confirm.rasi | 24 + .../polybar/shapes/scripts/rofi/launcher.rasi | 115 ++ .../polybar/shapes/scripts/rofi/message.rasi | 24 + .../shapes/scripts/rofi/networkmenu.rasi | 124 ++ .../shapes/scripts/rofi/powermenu.rasi | 124 ++ .../polybar/shapes/scripts/rofi/styles.rasi | 124 ++ config/polybar/shapes/scripts/run.sh | 84 ++ config/polybar/shapes/scripts/style-switch.sh | 32 + config/polybar/shapes/scripts/updates.sh | 45 + .../polybar/shapes/scripts/window-switcher.sh | 85 ++ config/polybar/shapes/user_modules.ini | 247 ++++ 30 files changed, 4182 insertions(+), 29 deletions(-) create mode 100755 config/polybar/launch.sh create mode 100644 config/polybar/shapes/bars.ini create mode 100644 config/polybar/shapes/colors.ini create mode 100644 config/polybar/shapes/config.ini create mode 100644 config/polybar/shapes/glyphs.ini create mode 100755 config/polybar/shapes/launch.sh create mode 100644 config/polybar/shapes/modules.ini create mode 100644 config/polybar/shapes/preview.ini create mode 100755 config/polybar/shapes/preview.sh create mode 100755 config/polybar/shapes/scripts/checkupdates create mode 100755 config/polybar/shapes/scripts/color-switch.sh create mode 100755 config/polybar/shapes/scripts/colors-dark.sh create mode 100755 config/polybar/shapes/scripts/colors-light.sh create mode 100755 config/polybar/shapes/scripts/launcher.sh create mode 100755 config/polybar/shapes/scripts/powermenu.sh create mode 100755 config/polybar/shapes/scripts/pywal.sh create mode 100755 config/polybar/shapes/scripts/random.sh create mode 100644 config/polybar/shapes/scripts/rofi/colors.rasi create mode 100644 config/polybar/shapes/scripts/rofi/confirm.rasi create mode 100644 config/polybar/shapes/scripts/rofi/launcher.rasi create mode 100644 config/polybar/shapes/scripts/rofi/message.rasi create mode 100644 config/polybar/shapes/scripts/rofi/networkmenu.rasi create mode 100644 config/polybar/shapes/scripts/rofi/powermenu.rasi create mode 100644 config/polybar/shapes/scripts/rofi/styles.rasi create mode 100755 config/polybar/shapes/scripts/run.sh create mode 100755 config/polybar/shapes/scripts/style-switch.sh create mode 100755 config/polybar/shapes/scripts/updates.sh create mode 100755 config/polybar/shapes/scripts/window-switcher.sh create mode 100644 config/polybar/shapes/user_modules.ini diff --git a/config/i3/config b/config/i3/config index 6391f0b..41da767 100644 --- a/config/i3/config +++ b/config/i3/config @@ -11,9 +11,10 @@ exec_always --no-startup-id setxkbmap -layout gb #exec --no-startup-id vmware-user exec --no-startup-id xfce-power-manager & exec_always --no-startup-id nitrogen --restore -exec_always --no-startup-id picom --backend glx --experimental-backends -b +exec_always --no-startup-id picom --backend glx -b exec --no-startup-id deadd-notification-center exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork +exec_always ~/.config/polybar/launch.sh --shapes & #exec --no-startup-id xiccd & ############################################################################## @@ -104,11 +105,11 @@ bindsym $mod+Shift+q kill ########################## Launcher Shortcuts ############################## # start rofi (launch commands) -bindsym $mod+r exec rofi -show run +bindsym $mod+r exec ~/.config/polybar/shapes/scripts/run.sh # start rofi (launch apps) -bindsym $mod+d exec rofi -modi drun -show drun -show-icons -icon-theme Pop +bindsym $mod+d exec ~/.config/polybar/shapes/scripts/launcher.sh # start rofi (window selector) -bindsym $mod+x exec rofi -show window -show-icons -icon-theme Pop +bindsym $mod+x exec ~/.config/polybar/shapes/scripts/window-switcher.sh ########################################################################### # There also is the (new) i3-dmenu-desktop which only displays applications @@ -168,16 +169,16 @@ bindsym $mod+a focus parent # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. -set $ws1 "1: " +set $ws1 "1" set $ws2 "2" set $ws3 "3" set $ws4 "4" set $ws5 "5" set $ws6 "6" -set $ws7 "7: " -set $ws8 "8: " -set $ws9 "9: " -set $ws10 "10: " +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" # switch to workspace bindsym $mod+1 workspace number $ws1 @@ -204,34 +205,18 @@ bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 # assign programs to specific workspaces -assign [class="firefox"] $ws8 -assign [class="nemo"] $ws9 -assign [class="youtube-music-desktop-app"] $ws10 +assign [class="firefox"] $ws2 +assign [class="nemo"] $ws3 +assign [class="youtube-music-desktop-app"] $ws4 # reload the configuration file bindsym $mod+Shift+c reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) bindsym $mod+Shift+r restart -bindsym $mod+Shift+e exec ~/.config/rofi/scripts/powermenu.sh +bindsym $mod+Shift+e exec /home/dunestorm/.config/polybar/shapes/scripts/powermenu.sh bindsym $mod+Mod1+Left resize shrink width 10 px or 10 ppt bindsym $mod+Mod1+Down resize grow height 10 px or 10 ppt bindsym $mod+Mod1+Up resize shrink height 10 px or 10 ppt bindsym $mod+Mod1+Right resize grow width 10 px or 10 ppt - -bar { - font pango:DejaVu Sans Mono, FontAwesome 11 - position top - status_command i3status-rs ~/.config/i3status-rust/config.toml - tray_output none - colors { - separator #666666 - background #222222 - statusline #dddddd - focused_workspace #FE7E29 #FE7E29 #ffffff - active_workspace #333333 #333333 #ffffff - inactive_workspace #333333 #333333 #888888 - urgent_workspace #2f343a #900000 #ffffff - } -} diff --git a/config/polybar/launch.sh b/config/polybar/launch.sh new file mode 100755 index 0000000..c2da5b7 --- /dev/null +++ b/config/polybar/launch.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +dir="$HOME/.config/polybar" +themes=(`ls --hide="launch.sh" $dir`) + +launch_bar() { + # Terminate already running bar instances + killall -q polybar + + # Wait until the processes have been shut down + while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + + # Launch the bar + if [[ "$style" == "hack" || "$style" == "cuts" ]]; then + polybar -q top -c "$dir/$style/config.ini" & + polybar -q bottom -c "$dir/$style/config.ini" & + elif [[ "$style" == "pwidgets" ]]; then + bash "$dir"/pwidgets/launch.sh --main + else + polybar -q main -c "$dir/$style/config.ini" & + fi +} + +if [[ "$1" == "--material" ]]; then + style="material" + launch_bar + +elif [[ "$1" == "--shades" ]]; then + style="shades" + launch_bar + +elif [[ "$1" == "--hack" ]]; then + style="hack" + launch_bar + +elif [[ "$1" == "--docky" ]]; then + style="docky" + launch_bar + +elif [[ "$1" == "--cuts" ]]; then + style="cuts" + launch_bar + +elif [[ "$1" == "--shapes" ]]; then + style="shapes" + launch_bar + +elif [[ "$1" == "--grayblocks" ]]; then + style="grayblocks" + launch_bar + +elif [[ "$1" == "--blocks" ]]; then + style="blocks" + launch_bar + +elif [[ "$1" == "--colorblocks" ]]; then + style="colorblocks" + launch_bar + +elif [[ "$1" == "--forest" ]]; then + style="forest" + launch_bar + +elif [[ "$1" == "--pwidgets" ]]; then + style="pwidgets" + launch_bar + +elif [[ "$1" == "--panels" ]]; then + style="panels" + launch_bar + +else + cat <<- EOF + Usage : launch.sh --theme + + Available Themes : + --blocks --colorblocks --cuts --docky + --forest --grayblocks --hack --material + --panels --pwidgets --shades --shapes + EOF +fi diff --git a/config/polybar/shapes/bars.ini b/config/polybar/shapes/bars.ini new file mode 100644 index 0000000..8c4e21a --- /dev/null +++ b/config/polybar/shapes/bars.ini @@ -0,0 +1,522 @@ +;; ┌────────────────────────────────────────────────────┐ +;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│ +;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│ +;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│ +;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│ +;; └────────────────────────────────────────────────────┘ + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[bar] +fill =  +empty =  +indicator = ⏽ +; Nerd font :   ,  ⏽,  樂 籠 錄 , 雷 絛 + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/volume] +type = internal/alsa + +; Soundcard to be used +; Usually in the format hw:# where # is the card number +; You can find the different card numbers in `/proc/asound/cards` +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default + +; Name of the master, speaker and headphone mixers +; Use the following command to list available mixer controls: +; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" +; If master, speaker or headphone-soundcard isn't the default, +; use `amixer -c # scontrols` instead where # is the number +; of the master, speaker or headphone soundcard respectively +; +; Default: Master +master-mixer = Master + +; Optionally define speaker and headphone mixers +; Default: none +;;speaker-mixer = Speaker +; Default: none +;;headphone-mixer = Headphone + +; NOTE: This is required if headphone_mixer is defined +; Use the following command to list available device controls +; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort +; You may also need to use `amixer -c # controls` as above for the mixer names +; Default: none +;;headphone-id = 9 + +; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear +; Default: false +;;mapped = true + +; Interval for volume increase/decrease (in percent points) +; Default: 5 +interval = 5 + +; Available tags: +; (default) +; +; +format-volume = +format-volume-background = ${color.shade1} +format-volume-padding = 2 + +; Available tags: +; (default) +; +; +format-muted = +format-muted-prefix = 婢 +format-muted-background = ${color.shade1} +format-muted-padding = 2 + +; Available tokens: +; %percentage% (default) +label-volume = %percentage%% + +; Available tokens: +; %percentage% (default +label-muted = " Muted" +label-muted-foreground = ${color.foreground} + +; Only applies if is used +ramp-volume-0 = 奄 +ramp-volume-1 = 奔 +ramp-volume-2 = 墳 + +; Only applies if is used +bar-volume-width = 10 +bar-volume-gradient = false + +bar-volume-indicator = ${bar.indicator} +bar-volume-indicator-foreground = ${color.foreground} + +bar-volume-fill = ${bar.fill} +bar-volume-foreground-0 = ${color.foreground} +bar-volume-foreground-1 = ${color.foreground} +bar-volume-foreground-2 = ${color.foreground} + +bar-volume-empty = ${bar.empty} +bar-volume-empty-foreground = ${color.foreground} + +; If defined, it will replace when +; headphones are plugged in to `headphone_control_numid` +; If undefined, will be used for both +; Only applies if is used +ramp-headphones-0 =  + +;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ + +[module/brightness] +;type = internal/xbacklight +type = internal/backlight + +; Use the following command to list available cards: +; $ ls -1 /sys/class/backlight/ +;card = intel_backlight +card = amdgpu_bl0 + +; Available tags: +;