Package: powerline-status-i3
PowerlineThis is a fork of Kim Silkebækken's (kim.silkebaekken+vim@gmail.com) powerline
(https://github.com/powerline/powerline).Powerline is a statusline plugin for vim, and provides statuslines and
prompts for several other applications, including zsh, bash, tmux, IPython,
Awesome, i3 and Qtile. However, this fork is designed to be used in particular
as a replacement for i3's i3bar.FeaturesFor general features, consult the documentation. These are
the features that were added in this fork.List all workspaces,and icons of applications currently running on a workspace (using FontAwesome)More multi-monitor options for the workspace segment.Enhanced battery segment, having the same features as the i3bar one. Further, this segment
now works with multiple batteries.Enhanced wifi segment to match i3bar's.Added a NetworkManager segment based onnmcliAdded a Bluetooth segment usingdbusandBluezAdded a volume segment.Added GPMDP support in the player segment.Merged and improvedZyX-I's revinfo branch, replacing the VCS segment.Added an auto-rotate segment (currently only works under X).Added a vi-mode segment and corresponding mode support for ipython ≥ 7.0.0Click support (see documentation below)Simplified gradients: specify start and end colors (and optionally intermediate colors) as hex values, values in-between colors (and corresponding cterm colors) will be generated automatically.Support for global menusChanges requiring documentationThis fork extends the files used by the powerline to configure the color scheme in various ways:attrsis now optional, i.e., it can be omittedclickis a new optional field to configure the behavior of a highlight group on a click.
Whereclickis a dictionary mapping the valuesleft,right,middle,scroll uporscroll downto a string to be executed by a shell. (Currently only the lemonbar binding supports this. You can disable clicks via theno_clicksflag.)
Further, the string to be executed may contain a placeholder for the segment's content. This placeholder uses python'sstring.formatsyntax. You may also pass some special commands to the bar/to specific segments directly via special bar commands starting with#bar;.You may pass analt_outputflag topowerline-lemonbar, then it uses the-Oflag for setting the output for the bar.The colors infgandbgcan be specified directly through hex values using0xas a prefix (0xRRGGBBor0xAARRGGBB). These hex values will be translated back into xterm color indices whenever possible.The bar has an additionalcenterregion where segments may be placed. The center region uses pipes (|) as separators per default.Theactive_window_titlesegment includes optional functionality for global menus. Consult the section below for details on the required configuration.ExamplesA configuration to let the workspace segment act like the i3bar's (workspace_nameis a special value that gets set to the correct workspace name by the workspace segment.):"workspace": { "fg": "0xe4e4e4", "bg": "0x0087af", "click": { "left": "i3-msg workspace {workspace_name}", "right": "i3-msg move to workspace {workspace_name}" } },
  "workspace:urgent": { "bg": "0x0087af", "fg": "0xffaf00", "click": { "left": "i3-msg workspace {workspace_name}", "right": "i3-msg move to workspace {workspace_name}" } },A handy configuration of the volume segment:"volume_gradient": { "fg": "green_yellow_red", "bg": "0x005f87", "click": { "scroll up": "pactl set-sink-volume 0 +1%", "scroll down": "pactl set-sink-volume 0 -1%"} },Note that thelemonbarallows for only a fixed number of clickable areas, which has to be specified as an argument (via-a).InstallationThis fork is available from the AUR (powerline-i3-git).
Alternatively, you may usepipfor the installation:pip install git+https://github.com/PH111P/powerline.git@developNote that using this fork (or the powerline in general) requires some additional packages to be installed,
namely:powerline-fontsttf-font-awesome-4(Version 5 relocated some symbols)i3 or i3-gapslemonbar-clicks-git(Lemonbarsupporting fontconfig fonts)python-xlibi3ipc-python-git(workspace segment, available from AUR)Optionally, the following packages should be installed if you want to use the corresponding segments.nmcli (NetworkManager segment)python-iwlib (wifi segment)python-pyalsaaudio (volume segment, available from AUR)xorg-xinput (screen rotation segment, used to map input devices to outputs)python-google-api-python-client (Google Calendar segment; this segment also requires a valid dev key to work)python-psutil (cpu load segment)python-pygit2 (better performance of the vcs segment)appmenu-qt4 (global menu support in qt4 apps)appmenu-qt5 (global menu support in qt5 apps)appmenu-gtk-module-git (global menu support in gtk apps)libdbusmenu-glib (global menu support for chrome/chromium)libdbusmenu-gtk3 (global menu support for chrome/chromium)libdbusmenu-gtk2 (global menu support for chrome/chromium)pygtk (global menu support)python-gobject (global menu support)To actuallyusethe powerline in your i3 setup, replace the following lines in your.config/i3/configbar {
      status_command i3status
  }with this line (you may want to adjust the height and the font size):exec "powerline-lemonbar --height 16 -- -b -f 'DejaVu Sans Mono-11' -f 'PowerlineSymbols-12' -f 'FontAwesome-11'"Note thatFont Awesomeis used to display some icons, thus changing it to some other font will likely break these icons.Attention:-f 'PowerlineSymbols-12'is required if you have the non-git version of the powerline-fonts package installed. If you have the git version of that package installed (from the AUR), use-f 'DejaVu Sans Mono for Powerline-11'instead.To use global menus in the bar, also start thepowerline-globmenuscript at startup.
Further, add the following to your.bashrc:if [ -n "$GTK_MODULES" ]; then
    GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module"
else
    GTK_MODULES="appmenu-gtk-module"
fi

if [ -z "$UBUNTU_MENUPROXY" ]; then
    UBUNTU_MENUPROXY=1
fi

export GTK_MODULES
export UBUNTU_MENUPROXYConsult theglobal_menudefault theme on how to configure theactive_window_titlesegment.ConfigurationBasic powerline configuration is done viaJSONfiles located at.config/powerline/. It is a good idea to start by copying the default configuration located atpowerline_root/powerline/config_files/to.config/powerline/.
If you installed the powerline from the AUR or via pip,powerline_rootshould be/usr/lib/python3.6/site-packages/or something similar, depending on your python version.This should yield you the following directory structure:.config/powerline/
├── colorschemes
│   ├── ...
│   └── wm
|       └── default.json  // Your configuration goes here
├── colors.json
├── config.json
└── themes
    ├── ...
    └── wm
        └── default.json  // Your configuration goes hereThe files in the subdirectories ofthemesare used to specify which segments shall be shown; the files in subdirectories ofcolorschemesare used to specify which colors (as defined incolors.json) shall be used to display a segment.Note that your local configuration only overrides the global configuration, it does not replace it, i.e. if you don't configure something locally, the global default will be used instead.Consult thedocumentationfor more details. See also thesegment referencefor available segments and their configuration.Some screensSome big, blue, beautiful powerlines.This is as far as it could get. However, this is a rare use case.