├── .gitignore ├── LICENSE ├── README.md ├── bars.ini ├── colors.ini ├── config ├── config.ini ├── images ├── polybar-example-1.jpg ├── polybar-example-2.jpg └── polybar-example-3-awesomewm.jpg ├── launch.sh ├── modules.ini ├── preview.ini ├── preview.sh ├── scripts ├── check-all-updates.sh ├── checkupdates ├── get_mpris_status.sh ├── get_spotify_status.sh ├── launcher.sh ├── pavolume.sh ├── polywins.sh ├── powermenu.sh ├── rofi │ ├── colors.rasi │ ├── confirm.rasi │ ├── launcher.rasi │ ├── message.rasi │ ├── networkmenu.rasi │ ├── powermenu.rasi │ └── styles.rasi ├── scroll_mpris_status.sh ├── style-switch.sh ├── styles.sh ├── updates.sh └── weather.py └── user_modules.ini /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Antonin Fischer (raven2cz) 4 | https://fishlive.org 5 | https://github.com/raven2cz 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Advanced Polybar Module Configuration (MX-Linux/Debian and Arch Distros) 2 | 3 | Polybar configuration with patched and improved modules for Awesome, i3 and XFCE4. Base design fits to **MX-Linux (Debian Stable) and Arch Distros**. 4 | 5 | ## Inherited and extended sources 6 | 7 | This project configures and extend github polybar sources from 8 | 9 | * **polybar-themes (adi1090x)** - forest theme - https://github.com/adi1090x/polybar-themes 10 | * **polywins (alnj)** - https://github.com/alnj/polywins 11 | * **polybar-mpris (0jdxt)** - https://github.com/0jdxt/polybar-mpris 12 | * **polybar-scripts** - https://github.com/polybar/polybar-scripts 13 | * **dotfiles by Derek Taylor (DT)** - https://gitlab.com/dwt1/dotfiles 14 | * **My personal scripts** and modifications for several modules 15 | 16 | *NOTE:* If you love this polybar - please add **git stars to listed projects!** 17 | 18 | ## Screenshots 19 | 20 | ##### Polybar Forest/Default in AwesomeWM 21 | ![Polybar Forest/Gruvbox FXCE4 with MPRIS (Spotify) Example](images/polybar-example-3-awesomewm.jpg) 22 | 23 | ##### Polybar Forest/Gruvbox FXCE4 with MPRIS - Spotify, Netflix, Youtube, text cycling and improved controls Example 24 | ![Polybar Forest/Gruvbox FXCE4 with MPRIS (Spotify) Example](images/polybar-example-2.jpg) 25 | 26 | ##### Polybar Forest/Default i3 Configured Modules Example 27 | ![Polybar Forest/Default i3 Configured Modules Example](images/polybar-example-1.jpg) 28 | 29 | ## MAIN GOALs 30 | 31 | The main goal of this project is complete and enhanced configuration of polybar modules for MX-Linux and Arch systems. 32 | 33 | Inherited actual theme is **Forest** with few styles colormaps from: 34 | 35 | https://github.com/adi1090x/polybar-themes/tree/master/simple/forest 36 | 37 | Supported all modules already included in the polybar-themes project. 38 | 39 | ### Added Enhanced Modules 40 | 41 | * **Weather Module** for Open Weather site with Nerd Fonts. 42 | * **MPRIS Module** - with scrolling and activity icon - support all players Spotify, MPD, Youtube, Netflix,... 43 | * **Polywins Module** - Opened application administration support 44 | * **Network Improved Modules** 45 | * **AMD Ryzen and new AMD GPUs Temperatures Modules** 46 | * **Workspaces Enhanced Module** 47 | * **Update Module** - for MX-Linux and Arch Distros 48 | * **System Module** - for MX-Linux and Arch Distros changed 49 | 50 | ## Dependencies 51 | 52 | Install following programs on your system before you use these themes. 53 | 54 | * **Polybar** : Ofcourse, the bar itself 55 | * **Rofi** : App launcher, network, power and style menus 56 | * **networkmanager_dmenu** : network modules (debian only) 57 | * **mpris** and **playerctl** : Spotify and other music services 58 | * **zscroll** : Text cycling library for music player (zscroll-git from AUR or compile it directly from git for Debian) 59 | * **wmctrl** : polywins service library 60 | 61 | ### Fonts 62 | 63 | Here's a list of all fonts used by these themes. 64 | 65 | **`Text Fonts`** 66 | 67 | - Iosevka Nerd Font 68 | - Noto Sans 69 | - Droid Sans 70 | - Terminus 71 | 72 | **`Icon Fonts`** 73 | 74 | - Iosevka Nerd Font 75 | - Icomoon Feather 76 | 77 | I strictly recommend to call `setup.sh` script from `polybar-themes` git repo, because it is installed all necessary fonts from here: 78 | https://github.com/adi1090x/polybar-themes/tree/master/fonts 79 | 80 | ### Installation 81 | 82 | Follow the steps below to install polybar on your system. 83 | 84 | - First, Clone this repository - 85 | ``` 86 | $ git clone https://github.com/raven2cz/polybar-config 87 | ``` 88 | 89 | - Change to cloned directory and make setup.sh executable - 90 | ``` 91 | $ cd polybar-config 92 | $ chmod +x scripts/* 93 | ``` 94 | 95 | - Backup your polybar settings (if you already have). 96 | - Copy dir polybar dir `.` to your `~/.config/polybar` user directory. 97 | - **That's it, This polybar is now installed on your system.** 98 | 99 | ### Polybar Configuration 100 | 101 | - Set correct network interfaces 102 | 103 | ``` 104 | In user_modules.ini: 105 | module/networkspeedup 106 | module/networkspeeddown 107 | module/wired-network 108 | 109 | # set correct interface parameter 110 | interface = enp38s0 111 | ``` 112 | 113 | - Set correct sensors for your CPU and GPUs 114 | 115 | ``` 116 | In modules.ini: 117 | temp-gpu and temp-cpu modules 118 | call: 119 | for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done 120 | and copy required sensors values to the fields. 121 | ``` 122 | 123 | - Set your free/paid OpenWeather API ID and City in script `weather.py`. 124 | 125 | **NOTE:** For **AwesomeWM** only, set `modules.ini` module workspaces: `pin-workspaces = false` and `config.ini`: `override-redirect = true` 126 | In addition, there is necessary to make trick - create empty wibar with same length and insert it to same position with polybar. 127 | 128 | - **That's it, the polybar is fully configured now.** 129 | 130 | ### Launch the bar 131 | 132 | To launch the bar with the selected theme, Just... 133 | 134 | - Open the terminal and enter the following command - 135 | ``` 136 | $ bash ~/.config/polybar/launch.sh 137 | ``` 138 | 139 | - You can add the same command to your WM *autostart file* to launch the bar on login. For example, to launch the bar at startup on openbox, add following lines in **`$HOME/.config/openbox/autostart`** This polybar is optimized for fce4, i3 and partially for awesomewm. But it can be used for many others VMs with little modifications. 140 | 141 | ``` 142 | ## Launch Polybar 143 | bash ~/.config/polybar/launch.sh 144 | ``` 145 | 146 | ### Change Colormap of Themes 147 | 148 | `Right-Click` to launcher button (left side first button with rofi) starts the **selector of color maps**. Select Look and Feel. 149 | -------------------------------------------------------------------------------- /bars.ini: -------------------------------------------------------------------------------- 1 | ;; ┌────────────────────────────────────────────────────┐ 2 | ;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│ 3 | ;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│ 4 | ;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│ 5 | ;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│ 6 | ;; └────────────────────────────────────────────────────┘ 7 | 8 | ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ 9 | 10 | [bar] 11 | fill = ⏽ 12 | empty = ⏽ 13 | indicator = 14 | ; Nerd font :   ,  ⏽,  樂 籠 錄 , 雷 絛 15 | 16 | [module/volume] 17 | type = internal/alsa 18 | 19 | ; Soundcard to be used 20 | ; Usually in the format hw:# where # is the card number 21 | ; You can find the different card numbers in `/proc/asound/cards` 22 | master-soundcard = default 23 | speaker-soundcard = default 24 | headphone-soundcard = default 25 | 26 | ; Name of the master, speaker and headphone mixers 27 | ; Use the following command to list available mixer controls: 28 | ; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p" 29 | ; If master, speaker or headphone-soundcard isn't the default, 30 | ; use `amixer -c # scontrols` instead where # is the number 31 | ; of the master, speaker or headphone soundcard respectively 32 | ; 33 | ; Default: Master 34 | master-mixer = Master 35 | 36 | ; Optionally define speaker and headphone mixers 37 | ; Default: none 38 | ;;speaker-mixer = Speaker 39 | ; Default: none 40 | ;;headphone-mixer = Headphone 41 | 42 | ; NOTE: This is required if headphone_mixer is defined 43 | ; Use the following command to list available device controls 44 | ; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort 45 | ; You may also need to use `amixer -c # controls` as above for the mixer names 46 | ; Default: none 47 | ;;headphone-id = 9 48 | 49 | ; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear 50 | ; Default: false 51 | ;;mapped = true 52 | 53 | ; Interval for volume increase/decrease (in percent points) 54 | ; Default: 5 55 | interval = 5 56 | 57 | ; Available tags: 58 | ; (default) 59 | ; 60 | ; 61 | format-volume = 62 | 63 | ; Available tags: 64 | ; (default) 65 | ; 66 | ; 67 | format-muted = 68 | format-muted-prefix =  69 | format-muted-prefix-foreground = ${color.red} 70 | 71 | ; Available tokens: 72 | ; %percentage% (default) 73 | label-volume = %percentage%% 74 | 75 | ; Available tokens: 76 | ; %percentage% (default 77 | label-muted = " Muted" 78 | label-muted-foreground = ${color.sep} 79 | 80 | ; Only applies if is used 81 | ramp-volume-0 =  82 | ramp-volume-1 =  83 | ramp-volume-2 =  84 | ramp-volume-foreground = ${color.blue} 85 | 86 | ; Only applies if is used 87 | bar-volume-format = "%fill%%indicator%%empty%" 88 | bar-volume-width = 11 89 | bar-volume-gradient = false 90 | 91 | bar-volume-indicator = ${bar.indicator} 92 | bar-volume-indicator-foreground = ${color.foreground} 93 | bar-volume-indicator-font = 2 94 | 95 | bar-volume-fill = ${bar.fill} 96 | bar-volume-fill-font = 2 97 | bar-volume-foreground-0 = ${color.green} 98 | bar-volume-foreground-1 = ${color.green} 99 | bar-volume-foreground-2 = ${color.yellow} 100 | bar-volume-foreground-3 = ${color.yellow} 101 | bar-volume-foreground-4 = ${color.red} 102 | 103 | bar-volume-empty = ${bar.empty} 104 | bar-volume-empty-font = 2 105 | bar-volume-empty-foreground = ${color.sep} 106 | 107 | ; If defined, it will replace when 108 | ; headphones are plugged in to `headphone_control_numid` 109 | ; If undefined, will be used for both 110 | ; Only applies if is used 111 | ramp-headphones-0 =  112 | 113 | ;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ 114 | 115 | [module/brightness] 116 | ;type = internal/xbacklight 117 | type = internal/backlight 118 | 119 | ; Use the following command to list available cards: 120 | ; $ ls -1 /sys/class/backlight/ 121 | ;card = intel_backlight 122 | card = amdgpu_bl0 123 | 124 | ; Available tags: 125 | ;