tint2, bspwm, Polybar: Better bar, purge the forgotten

This commit is contained in:
Salt 2018-11-16 23:49:26 -06:00
parent acd4e33526
commit 0089618d31
5 changed files with 268 additions and 453 deletions

View File

@ -1,75 +0,0 @@
#!/usr/bin/env bash
# Copyright (c) 2017 rehashedsalt/vintagesalt
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# Load session startup script
dtfscript="$HOME/.concession/conspiracy"
if [ -x "$dtfscript" ]; then
("$dtfscript"; pkill bspwm)& >/dev/null 2>&1
exit 0
fi
unset dtfscript
## Behavior
# Tiling behavior
bspc config split_ratio 0.50
bspc config remove_disabled_monitors false
bspc config remove_unplugged_monitors true
# Pointer behavior
bspc config click_to_focus any
bspc config pointer_follows_focus false
bspc config pointer_follows_monitor true
bspc config pointer_modifier mod1
bspc config pointer_action1 move #LMB
bspc config pointer_action2 resize_corner #RMB
## Looks
# Padding
bspc config border_width 2
bspc config window_gap 0
bspc config single_monocle false
bspc config borderless_monocle false
bspc config gapless_monocle true
# Colors
bspc config normal_border_color "#3c3836" #Unfocused
bspc config active_border_color "#458588" #Focused, but current monitor isn't
bspc config focused_border_color "#83a598" #Focused completely
bspc config presel_feedback_color "#9b9b9b" #???
## Rules
bspc rule -r '*'
bspc rule -a Firefox desktop=1
bspc rule -a Firefox-esr desktop=1
bspc rule -a Waterfox desktop=1
bspc rule -a Liferea desktop=6
bspc rule -a discord desktop=7
bspc rule -a spotify desktop=8
bspc rule -a 'Minecraft 1.7.10' state=fullscreen
# For fullscreen Wine
bspc rule -a explorer.exe state=fullscreen
# Plasma rules
bspc rule -a plasmashell state=floating sticky=on border=off
bspc rule -a krunner state=floating layer=above sticky=on border=off
# Widgets
bspc rule -a Conky state=floating layer=below sticky=on
bspc rule -a pavucontrol-qt state=floating layer=above sticky=on

View File

@ -1,361 +0,0 @@
#==================================================
#
# INFO: https://github.com/jaagr/polybar
#
#===================================================
#========================================
# RESOURCES
#========================================
[res/colors]
primary = ${xrdb:color12}
secondary = ${xrdb:color4}
alert = ${xrdb:color3}
warning = ${xrdb:color1}
mod-battery = ${xrdb:color10}
mod-cpu = ${xrdb:color12}
mod-date = ${self.primary}
mod-fs = ${xrdb:color11}
mod-memory = ${xrdb:color13}
mod-tor = ${xrdb:color13}
mod-volume = ${self.primary}
mod-network = ${xrdb:color14}
mod-wm = ${xrdb:color12}
mod-xbacklight = ${self.primary}
notif-package = ${self.foreground-dark}
background = ${xrdb:background}
background-alt = ${xrdb:bg2}
foreground = ${xrdb:color15}
foreground-dark = ${xrdb:color8}
border = #3c3836
bar-empty = ${self.border}
[res/config]
padding = 2
padding-bar = 3
[res/fonts]
font-0 = "Inconsolata:style=Regular:size=10;2"
font-1 = "Inconsolata:style=Bold:size=10;2"
font-2 = "Inconsolata:style=Light:size=10;2"
font-3 = "Inconsolata:size=10;2"
font-4 = "Material Design Icons:size=11;3"
#========================================
# BARS
#========================================
# TEMPLATE
#====================
[template/bar]
# General ordering
bottom = true
wm-restack = ${env:PB_WM_RESTACK:i3}
offset-y = 2
# Tray settings
tray-maxsize = 16
# Colors
background = ${res/colors.background}
foreground = ${res/colors.foreground}
border-color = ${res/colors.background-alt}
# Whitespace
height = 36
padding = ${res/config.padding-bar}
overline-size = 6
underline-size = 6
# Module whitespace
module-margin = 2
# Module fonts
font-0 = ${res/fonts.font-0}
font-1 = ${res/fonts.font-1}
font-2 = ${res/fonts.font-2}
font-3 = ${res/fonts.font-3}
font-4 = ${res/fonts.font-4}
# BARS
#====================
[bar/primary]
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
modules-left = ${env:PB_BAR_PRIMARY_MODULES_LEFT:battery cpu memory}
modules-center = ${env:PB_BAR_PRIMARY_MODULES_CENTER:i3 bspwm}
modules-right = ${env:PB_BAR_PRIMARY_MODULES_RIGHT:tor xbacklight volume wlan eth date}
[bar/primary-2]
monitor = ${env:PB_MONITOR:eDP-1}
inherit = template/bar
bottom = false
border-top-size = 0
border-bottom-size = ${env:PB_BAR_BORDER_SIZE:2}
modules-left = ${env:PB_BAR_PRIMARY_2_MODULES_LEFT: }
modules-center = ${env:PB_BAR_PRIMARY_2_MODULES_CENTER: }
modules-right = ${env:PB_BAR_PRIMARY_2_MODULES_RIGHT: }
[bar/secondary]
monitor = ${env:PB_MONITOR}
inherit = template/bar
modules-left = ${env:PB_BAR_SECONDARY_MODULES_LEFT:uname hostname}
modules-center = ${env:PB_BAR_SECONDARY_MODULES_CENTER:i3 bspwm}
modules-right = ${env:PB_BAR_SECONDARY_MODULES_RIGHT:date}
[bar/secondary-2]
monitor = ${env:PB_MONITOR}
inherit = template/bar
bottom = false
border-top-size = 0
border-bottom-size = ${env:PB_BAR_BORDER_SIZE:2}
modules-left = ${env:PB_BAR_SECONDARY_2_MODULES_LEFT: }
modules-center = ${env:PB_BAR_SECONDARY_2_MODULES_CENTER: }
modules-right = ${env:PB_BAR_SECONDARY_2_MODULES_RIGHT: }
#========================================
# MODULES
#========================================
# BORDERS and WHITESPACE
#====================
[module/|]
type = custom/text
content = "|"
content-foreground = ${res/colors.background-alt}
[module/||]
type = custom/text
content = " "
content-background = ${res/colors.border}
[module/nothing]
type = custom/text
content = " "
# NOTIFICATION
#====================
[module/dpkg]
type = custom/script
format = <label>
format-foreground = ${res/colors.notif-package}
interval = 1
exec = printf "DPKG\n"
exec-if = [ -f /var/lib/dpkg/lock ]
# OTHER
#====================
[module/battery]
type = internal/battery
format-charging = <label-charging>
format-charging-prefix = "CHR: "
format-charging-prefix-foreground = ${res/colors.mod-battery}
format-discharging = <label-discharging>
format-discharging-prefix = "BAT: "
format-discharging-prefix-foreground = ${res/colors.mod-battery}
format-full = <label-full>
format-full-prefix = "BAT: "
format-full-prefix-foreground = ${res/colors.mod-battery}
time-format = %H:%M
full-at = 100
interval = 15
label-charging = %percentage:3%%
label-discharging = %percentage:3%%
label-full = %percentage:3%%
[module/bspwm]
type = internal/bspwm
format = <label-state>
enable-scroll = false
pin-workspaces = true
label-focused = %name%
label-focused-padding = ${res/config.padding}
label-focused-foreground = ${res/colors.mod-wm}
label-focused-font = 2
label-dimmed-overline = ${res/colors.background}
label-dimmed-underline = ${self.label-dimmed-overline}
label-occupied = ${self.label-focused}
label-occupied-padding = ${res/config.padding}
label-occupied-font = 2
label-urgent = ${self.label-focused}
label-urgent-padding = ${res/config.padding}
label-urgent-foreground = ${res/colors.alert}
label-urgent-font = 2
label-empty = ${self.label-focused}
label-empty-padding = ${res/config.padding}
label-empty-foreground = ${res/colors.foreground-dark}
label-empty-font = 3
[module/cpu]
type = internal/cpu
format = <label>
format-prefix = "CPU: "
format-prefix-foreground = ${res/colors.mod-cpu}
interval = 1
label = %percentage:3%%
[module/date]
type = internal/date
format = <label>
format-prefix =
format-prefix-foreground = ${res/colors.mod-date}
date = %a
time = %I:%M %p
interval = 30
label = %date% %time%
[module/eth]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "ETH: "
format-connected-prefix-foreground = ${res/colors.mod-network}
format-disconnected = ETH
format-disconnected-foreground = ${res/colors.foreground-dark}
interface = ${env:PB_MODULE_ETH_INTERFACE:enp0s31f6}
label-connected = %local_ip%
label-disconnected = None
label-disconnected-foreground = ${res/colors.foreground-dark}
[module/fs-home]
type = internal/fs
format-mounted = <bar-used> <label-mounted>
format-mounted-prefix = "HOME: "
format-mounted-prefix-foreground = ${res/colors.mod-fs}
mount-0 = /home
label-mounted = %free:5% free
[module/hostname]
type = custom/script
format-foreground = ${res/colors.foreground-dark}
interval = 3600
exec = hostname
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
enable-scroll = false
pin-workspaces = true
label-focused = %name%
label-focused-padding = ${res/config.padding}
label-focused-foreground = ${res/colors.mod-wm}
label-focused-font = 2
label-unfocused = ${self.label-focused}
label-unfocused-padding = ${res/config.padding}
label-unfocused-font = 2
label-visible = ${self.label-focused}
label-visible-foreground = ${res/colors.foreground-dark}
label-visible-padding = ${res/config.padding}
label-visible-font = 2
label-urgent = ${self.label-focused}
label-urgent-padding = ${res/config.padding}
label-urgent-foreground = ${res/colors.alert}
label-urgent-font = 2
label-mode = %mode%
[module/memory]
type = internal/memory
format = <label>
format-prefix = "MEM: "
format-prefix-foreground = ${res/colors.mod-memory}
interval = 1
label = %percentage_used:3%%
[module/monitor]
type = custom/text
content = ${env:PB_MONITOR:eDP-1}
content-foreground = ${res/colors.background-alt}
[module/swap]
type = internal/memory
format = <label>
format-prefix = "SWP: "
format-prefix-foreground = ${res/colors.mod-memory}
interval = 1
label = %percentage_swap_used:3%%
[module/tor]
type = custom/script
format-prefix = "TOR: "
format-prefix-foreground = ${res/colors.mod-tor}
interval = 10
exec = if systemctl is-failed --quiet tor; then echo FAIL; elif ! systemctl is-enabled --quiet tor; then echo DISB; else echo INAC; fi
exec-if = ! systemctl is-active tor
[module/uname]
type = custom/script
format-foreground = ${res/colors.foreground-dark}
interval = 3600
exec = uname -sr
[module/volume]
type = internal/volume
format-volume = <label-volume>
format-volume-prefix = "VOL: "
format-volume-prefix-foreground = ${res/colors.mod-volume}
format-muted = <label-muted>
format-muted-prefix = "VOL: "
format-muted-prefix-foreground = ${res/colors.foreground-dark}
label-volume = %percentage:3%%
label-muted = %percentage:3%%
label-muted-foreground = ${res/colors.foreground-dark}
[module/wlan]
type = internal/network
format-connected = <label-connected>
format-connected-prefix = "WLAN: "
format-connected-prefix-foreground = ${res/colors.mod-network}
format-disconnected = WLAN
format-disconnected-foreground = ${res/colors.foreground-dark}
interface = ${env:PB_MODULE_WLAN_INTERFACE:wlp1s0}
label-connected = %local_ip%
label-disconnected = None
label-disconnected-foreground = ${res/colors.foreground-dark}
[module/xbacklight]
type = internal/xbacklight
format = <label>
format-prefix = "BRI: "
format-prefix-foreground = ${res/colors.mod-xbacklight}
label = %percentage:3%%
[module/xwindow]
type = internal/xwindow
format = <label>
label = %title:0:75:...%
# vim:ft=dosini

View File

@ -33,15 +33,16 @@ configuration {
}
#window {
location: north;
anchor: north;
location: southwest;
anchor: southwest;
border-color: @background;
background-color: @background;
border: 4px;
height: 40%;
height: 60%;
width: 520px;
y-offset: -36px;
}
#inputbar {

View File

@ -0,0 +1,218 @@
#---- Generated by tint2conf ee95 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
#-------------------------------------
# Backgrounds
# Background 1: Inactive desktop name, Panel, Systray
rounded = 0
border_width = 0
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #282828 100
border_color = #000000 0
background_color_hover = #282828 100
border_color_hover = #000000 0
background_color_pressed = #282828 100
border_color_pressed = #000000 0
# Background 2: Active desktop name, Active task
rounded = 0
border_width = 0
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #83a598 100
border_color = #000000 0
background_color_hover = #282828 100
border_color_hover = #000000 0
background_color_pressed = #282828 100
border_color_pressed = #000000 0
# Background 3: Active taskbar, Button, Tooltip
rounded = 0
border_width = 0
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #3c3836 100
border_color = #000000 0
background_color_hover = #282828 100
border_color_hover = #000000 0
background_color_pressed = #282828 100
border_color_pressed = #000000 0
#-------------------------------------
# Panel
panel_items = PTSBCP
panel_size = 100% 36
panel_margin = 0 0
panel_padding = 0 0 0
panel_background_id = 1
wm_menu = 0
panel_dock = 0
panel_position = bottom center horizontal
panel_layer = top
panel_monitor = all
panel_shrink = 0
autohide = 0
autohide_show_timeout = 0
autohide_hide_timeout = 0
autohide_height = 1
strut_policy = follow_size
panel_window_name = tint2
disable_transparency = 0
mouse_effects = 0
font_shadow = 0
mouse_hover_icon_asb = 100 0 10
mouse_pressed_icon_asb = 100 0 0
scale_relative_to_dpi = 0
scale_relative_to_screen_height = 0
#-------------------------------------
# Taskbar
taskbar_mode = multi_desktop
taskbar_hide_if_empty = 0
taskbar_padding = 0 0 10
taskbar_background_id = 0
taskbar_active_background_id = 3
taskbar_name = 1
taskbar_hide_inactive_tasks = 0
taskbar_hide_different_monitor = 1
taskbar_hide_different_desktop = 0
taskbar_always_show_all_desktop_tasks = 0
taskbar_name_padding = 24 0
taskbar_name_background_id = 1
taskbar_name_active_background_id = 2
taskbar_name_font = Inconsolata 10
taskbar_name_font_color = #ebdbb2 100
taskbar_name_active_font_color = #282828 100
taskbar_distribute_size = 0
taskbar_sort_order = center
task_align = left
#-------------------------------------
# Task
task_text = 0
task_icon = 1
task_centered = 0
urgent_nb_of_blink = 0
task_maximum_size = 36 36
task_padding = 10 10 4
task_font = Inconsolata Medium 10
task_tooltip = 0
task_thumbnail = 0
task_thumbnail_size = 480
task_font_color = #ebdbb2 100
task_active_font_color = #282828 100
task_urgent_font_color = #fabd2f 100
task_active_background_id = 2
mouse_left = none
mouse_middle = none
mouse_right = none
mouse_scroll_up = none
mouse_scroll_down = none
#-------------------------------------
# System tray (notification area)
systray_padding = 10 10 10
systray_background_id = 1
systray_sort = ascending
systray_icon_size = 16
systray_icon_asb = 100 0 0
systray_monitor = primary
systray_name_filter =
#-------------------------------------
# Launcher
launcher_padding = 0 0 0
launcher_background_id = 0
launcher_icon_background_id = 0
launcher_icon_size = 0
launcher_icon_asb = 100 0 0
launcher_icon_theme_override = 0
startup_notifications = 0
launcher_tooltip = 0
#-------------------------------------
# Clock
time1_format = %a %I:%M %p
time2_format =
time1_font = Inconsolata 10
time1_timezone =
time2_timezone =
clock_font_color = #ebdbb2 100
clock_padding = 10 0
clock_background_id = 0
clock_tooltip =
clock_tooltip_timezone =
clock_lclick_command =
clock_rclick_command =
clock_mclick_command =
clock_uwheel_command =
clock_dwheel_command =
#-------------------------------------
# Battery
battery_tooltip = 0
battery_low_status = 20
battery_low_cmd =
battery_full_cmd =
bat1_font = Inconsolata 10
battery_font_color = #b8bb26 100
bat1_format = %p
bat2_format =
battery_padding = 10 0
battery_background_id = 0
battery_hide = 101
battery_lclick_command =
battery_rclick_command =
battery_mclick_command =
battery_uwheel_command =
battery_dwheel_command =
ac_connected_cmd =
ac_disconnected_cmd =
#-------------------------------------
# Button 1
button = new
button_text = Apps
button_lclick_command = rofi -show drun
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font = Inconsolata Medium 10
button_font_color = #ebdbb2 100
button_padding = 16 0
button_background_id = 3
button_centered = 1
button_max_icon_size = 0
#-------------------------------------
# Button 2
button = new
button_text = Leave
button_lclick_command = kill "$DSK_PID"
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font = Inconsolata Medium 10
button_font_color = #ebdbb2 100
button_padding = 16 0
button_background_id = 3
button_centered = 0
button_max_icon_size = 0
#-------------------------------------
# Tooltip
tooltip_show_timeout = 0
tooltip_hide_timeout = 0
tooltip_padding = 4 4
tooltip_background_id = 3
tooltip_font_color = #ebdbb2 100
tooltip_font = Noto Sans 10

View File

@ -1,11 +1,11 @@
#---- Generated by tint2conf 8e60 ----
#---- Generated by tint2conf ee95 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Gradients
#-------------------------------------
# Backgrounds
# Background 1: Inactive desktop name, Panel
# Background 1: Inactive desktop name, Panel, Systray
rounded = 0
border_width = 0
border_sides = TBLR
@ -31,7 +31,7 @@ border_color_hover = #000000 0
background_color_pressed = #282828 100
border_color_pressed = #000000 0
# Background 3: Active taskbar, Tooltip
# Background 3: Active taskbar, Button, Tooltip
rounded = 0
border_width = 0
border_sides = TBLR
@ -46,10 +46,10 @@ border_color_pressed = #000000 0
#-------------------------------------
# Panel
panel_items = TBC
panel_items = PTSBCP
panel_size = 100% 36
panel_margin = 0 0
panel_padding = 0 0 8
panel_padding = 0 0 0
panel_background_id = 1
wm_menu = 0
panel_dock = 0
@ -76,7 +76,7 @@ scale_relative_to_screen_height = 0
taskbar_mode = multi_desktop
taskbar_hide_if_empty = 0
taskbar_padding = 0 0 10
taskbar_background_id = -1
taskbar_background_id = 0
taskbar_active_background_id = 3
taskbar_name = 1
taskbar_hide_inactive_tasks = 0
@ -117,10 +117,10 @@ mouse_scroll_down = none
#-------------------------------------
# System tray (notification area)
systray_padding = 0 0 0
systray_background_id = -1
systray_padding = 10 10 10
systray_background_id = 1
systray_sort = ascending
systray_icon_size = 0
systray_icon_size = 16
systray_icon_asb = 100 0 0
systray_monitor = primary
systray_name_filter =
@ -128,8 +128,8 @@ systray_name_filter =
#-------------------------------------
# Launcher
launcher_padding = 0 0 0
launcher_background_id = -1
launcher_icon_background_id = -1
launcher_background_id = 0
launcher_icon_background_id = 0
launcher_icon_size = 0
launcher_icon_asb = 100 0 0
launcher_icon_theme_override = 0
@ -144,7 +144,7 @@ time1_font = Inconsolata 10
time1_timezone =
time2_timezone =
clock_font_color = #ebdbb2 100
clock_padding = 16 0
clock_padding = 10 0
clock_background_id = 0
clock_tooltip =
clock_tooltip_timezone =
@ -164,9 +164,9 @@ bat1_font = Inconsolata 10
battery_font_color = #b8bb26 100
bat1_format = %p
bat2_format =
battery_padding = 0 0
battery_padding = 10 0
battery_background_id = 0
battery_hide = 0
battery_hide = 101
battery_lclick_command =
battery_rclick_command =
battery_mclick_command =
@ -175,6 +175,38 @@ battery_dwheel_command =
ac_connected_cmd =
ac_disconnected_cmd =
#-------------------------------------
# Button 1
button = new
button_text = Apps
button_lclick_command = rofi -show drun
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font = Inconsolata Medium 10
button_font_color = #ebdbb2 100
button_padding = 16 0
button_background_id = 3
button_centered = 1
button_max_icon_size = 0
#-------------------------------------
# Button 2
button = new
button_text = Leave
button_lclick_command = kill "$DSK_PID"
button_rclick_command =
button_mclick_command =
button_uwheel_command =
button_dwheel_command =
button_font = Inconsolata Medium 10
button_font_color = #ebdbb2 100
button_padding = 16 0
button_background_id = 3
button_centered = 0
button_max_icon_size = 0
#-------------------------------------
# Tooltip
tooltip_show_timeout = 0