Added new configs for kitty and polybar. Small changes in i3 config.

This commit is contained in:
2019-11-23 22:23:09 +03:00
parent c7477b365e
commit 323fa549b3
11 changed files with 1563 additions and 298 deletions
+275
View File
@@ -0,0 +1,275 @@
; ==================================================================================
; Bar definition
; ==================================================================================
; https://github.com/polybar/polybar/wiki/Configuration#bar-settings
[bar/primary]
monitor = DP-4
width = 100%
height = 25
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 2
padding-left = 0
padding-right = 1
module-margin-left = 2
module-margin-right = 1
font-0 = "Cascadia Code:size=9;1"
font-1 = "Font Awesome 5 Free:style=Solid:size=9;1"
font-2 = "Font Awesome 5 Brands:size=9;1"
font-3 = "Weather Icons:size=9;1"
modules-left = i3 mpd
modules-center = date weather
modules-right = cpu-min temperature memory-min filesystem-min wired-down wired-up github updates-count keyboard pulseaudio
cursor-click = pointer
; ==================================================================================
; 'i3' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-i3
[module/i3]
type = internal/i3
index-sort = true
strip-wsnumbers = true
enable-scroll = false
ws-icon-0 = 1:www;
ws-icon-1 = 2:msgr;
ws-icon-2 = 3:code;
ws-icon-3 = 4:term;
ws-icon-4 = 5:music;
ws-icon-5 = 6:steam;
ws-icon-default = 
label-focused = %icon%
label-focused-underline = ${colors.underline_focused}
label-focused-padding = 1
label-unfocused = %icon%
label-unfocused-padding = 1
label-visible = %icon%
label-visible-padding = 1
label-urgent = %icon%
label-urgent-underline = ${colors.underline_urgent}
label-urgent-padding = 1
; ==================================================================================
; 'mpd' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-mpd
[module/mpd]
type = internal/mpd
; Host where mpd is running (either ip or domain name)
; Can also be the full path to a unix socket where mpd is running.
host = 127.0.0.1
port = 6600
password =
format-online = <icon-play> <icon-pause> <label-song> [<label-time>]
icon-play = 
icon-pause = 
label-offline = 🎜 mpd is offline
; ==================================================================================
; 'date' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-date
[module/date]
type = internal/date
interval = 1
date = %{F#d8d8d8d}%{F-} %a %d %b %Y
time = %{O10}%{F#d8d8d8d}%{F-} %H:%M:%S
label = %date% %time%
; ==================================================================================
; 'weather' module definition
; ==================================================================================
[module/weather]
type = custom/script
exec = ~/.config/polybar/custom-scripts/weather/weather.sh
interval = 600
label-font = 4
; ==================================================================================
; 'cpu-min' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-cpu
[module/cpu-min]
type = internal/cpu
interval = 1
label = %{F#50bcff}%{F-} %percentage:2%%
; ==================================================================================
; 'temperature' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-temperature
[module/temperature]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 1
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon0/temp1_input
warn-temperature = 70
units = true
format = <label>
format-warn = <label-warn>
label = %{F#ff3333}%{F-} %temperature-c%
; ==================================================================================
; 'memory-min' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-memory
[module/memory-min]
type = internal/memory
interval = 1
label = %{F#0ae440}%{F-} %percentage_used:2%%
; ==================================================================================
; 'filesystem-min' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-filesystem
[module/filesystem-min]
type = internal/fs
interval = 25
mount-0 = /
label-mounted = %{F#fdffe8}%{F-} %percentage_used:2%%
; ==================================================================================
; 'wired-down' module definition
; ==================================================================================
; https://github.com/polybar/polybar/wiki/Module:-network
[module/wired-down]
type = internal/network
interface = enp7s0
interval = 1.0
label-connected = %{F#6AFFF3}%{F-} %downspeed:8%
label-disconnected = 
; ==================================================================================
; 'wired-up' module definition
; ==================================================================================
; https://github.com/polybar/polybar/wiki/Module:-network
[module/wired-up]
type = internal/network
interface = enp7s0
interval = 1.0
label-connected = %{F#B56CF3}%{F-} %upspeed:8%
label-disconnected = 
; ==================================================================================
; 'github' module definition
; ==================================================================================
; https://github.com/polybar/polybar/wiki/Module:-github
[module/github]
type = internal/github
; Accessing an access token stored in file
token = ${file:/home/prominence/.config/polybar/github.token}
; Whether empty notifications should be displayed or not
empty-notifications = false
; Number of seconds in between requests
interval = 10
; Github API URL (unreleased)
; Default: https://api.github.com/
; api-url = https://hub.example.org/api/v3/
; Available tags:
; <label> (default)
format = <label>
; Available tokens:
; %notifications% (default)
; Default: Notifications: %notifications%
label =  %{F#e7903c}%notifications%%{F-}
; ==================================================================================
; 'updates-count' module definition
; ==================================================================================
[module/updates-count]
type = custom/script
exec = ~/.config/polybar/custom-scripts/updates/updates.sh
interval = 600
; ==================================================================================
; 'xkeyboard' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-xkeyboard
[module/keyboard]
type = internal/xkeyboard
; List of indicators to ignore
blacklist-0 = num lock
blacklist-1 = scroll lock
blacklist-2 = caps lock
; ==================================================================================
; 'pulseaudio' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-pulseaudio
[module/pulseaudio]
type = internal/pulseaudio
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
format-volume = <ramp-volume> <label-volume>
; Available tokens:
; %percentage% (default)
label-volume = %percentage%%
; Available tokens:
; %percentage% (default)
;label-muted = Volume: muted
;label-muted-foreground = ${colors.foreground}
label-muted =  muted
label-muted-foreground = #999
; Only applies if <ramp-volume> is used
ramp-volume-0 = 
ramp-volume-1 = 
ramp-volume-2 = 
+116
View File
@@ -0,0 +1,116 @@
; ==================================================================================
; Bar definition
; ==================================================================================
; https://github.com/polybar/polybar/wiki/Configuration#bar-settings
[bar/secondary]
monitor = HDMI-0
bottom = true
width = 100%
height = 20
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = "Cascadia Code:size=8;1"
tray-position = left
modules-left =
modules-center = filesystem
modules-right = memory cpu temperature-secondary
; ==================================================================================
; 'filesystem' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-filesystem
[module/filesystem]
type = internal/fs
; Mountpoints to display
mount-0 = /
mount-1 = /home
mount-2 = /home/prominence/Storage
; Display fixed precision values
fixed-values = true
; Spacing between entries
; Default: 2
spacing = 4
label-mounted = %mountpoint%: %used% of %total%(%percentage_used%%)
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = ${colors.urgent}
; ==================================================================================
; 'memory' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-memory
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 3
format = <label>
label = RAM %gb_used%/%gb_total%
; ==================================================================================
; 'cpu' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-cpu
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 0.5
format = <label> <ramp-coreload>
label = CPU %percentage:3%%
; Spacing between individual per-core ramps
ramp-coreload-spacing = 1
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
; ==================================================================================
; 'temperature-secondary' module definition
; ==================================================================================
; https://github.com/jaagr/polybar/wiki/Module:-temperature
[module/temperature-secondary]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 0.5
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon0/temp1_input
warn-temperature = 70
units = true
format = <label>
format-warn = <label-warn>
label = %temperature-c:3%
+42 -251
View File
@@ -1,257 +1,48 @@
; Configuration guide: https://github.com/jaagr/polybar/wiki/Configuration
[settings]
screenchange-reload = true
; ==================================================================================
; Global WM settings
; ==================================================================================
[global/wm]
margin-top = 0
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
[colors]
background = #00ffffff
foreground = #ffffffff
underline = #ffffffff
urgent = #ff993333
[bar/main]
monitor = DP-4
width = 100%
height = 25
radius = 0
fixed-center = false
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
line-color =
border-size = 0
border-color =
padding-left = 0
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = "Source Code Pro Semibold:size=10;1"
font-1 = "Font Awesome 5 Free:style=Solid:size=10;1"
font-2 = "Font Awesome 5 Brands:size=10;1"
font-3 = "Material Icons:size=10;-1"
modules-left = i3
modules-center =
modules-right = mpd pulseaudio keyboard date
tray-position = center
;tray-padding =
cursor-click = pointer
cursor-scroll = ns-resize
; https://github.com/jaagr/polybar/wiki/Module:-i3
[module/i3]
type = internal/i3
index-sort = true
strip-wsnumbers = true
enable-scroll = false
ws-icon-0 = 1:www;
ws-icon-1 = 2:msgr;
ws-icon-2 = 3:code;
ws-icon-3 = 4:term;
ws-icon-4 = 5:music;
ws-icon-5 = 6:steam;
ws-icon-default = 
label-focused = %icon%
label-focused-underline = ${colors.underline}
label-focused-padding = 2
label-unfocused = %icon%
label-unfocused-padding = 2
label-visible = %icon%
label-visible-padding = 2
label-urgent = %icon%
label-urgent-underline = ${colors.urgent}
label-urgent-padding = 2
; https://github.com/jaagr/polybar/wiki/Module:-xkeyboard
[module/keyboard]
type = internal/xkeyboard
; List of indicators to ignore
blacklist-0 = num lock
blacklist-1 = scroll lock
blacklist-2 = caps lock
; https://github.com/jaagr/polybar/wiki/Module:-mpd
[module/mpd]
type = internal/mpd
; Host where mpd is running (either ip or domain name)
; Can also be the full path to a unix socket where mpd is running.
host = 127.0.0.1
port = 6600
password =
format-online = <label-song> <bar-progress> <label-time>
label-offline = mpd is offline
; Only applies if <bar-progress> is used
bar-progress-width = 30
bar-progress-indicator = |
bar-progress-fill = ─
bar-progress-empty = ─
; https://github.com/jaagr/polybar/wiki/Module:-pulseaudio
[module/pulseaudio]
type = internal/pulseaudio
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
; Available tokens:
; %percentage% (default)
label-volume = Volume: %percentage%%
; Available tokens:
; %percentage% (default)
label-muted = Volume: muted
label-muted-foreground = ${colors.foreground}
; https://github.com/jaagr/polybar/wiki/Module:-date
[module/date]
type = internal/date
interval = 1
date =
date-alt = %d %B, %Y
time = %H:%M:%S
time-alt = %H:%M:%S
format-padding = 0
label = %date% %time%
[bar/systeminfo]
monitor = HDMI-0
bottom = true
width = 100%
height = 25
fixed-center = true
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3
padding-left = 2
padding-right = 2
module-margin-left = 1
module-margin-right = 2
font-0 = "Source Code Pro Semibold:size=8;1"
font-1 = "Symbol Nerd Font:size=8;1"
font-2 = "Material Icons:size=8;-1"
modules-left = network memory
modules-center = filesystem
modules-right = cpu temperature
; https://github.com/jaagr/polybar/wiki/Module:-cpu
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 0.5
format = <label> <ramp-coreload>
label = CPU %percentage%%
; Spacing between individual per-core ramps
ramp-coreload-spacing = 1
ramp-coreload-0 = ▁
ramp-coreload-1 = ▂
ramp-coreload-2 = ▃
ramp-coreload-3 = ▄
ramp-coreload-4 = ▅
ramp-coreload-5 = ▆
ramp-coreload-6 = ▇
ramp-coreload-7 = █
; https://github.com/jaagr/polybar/wiki/Module:-memory
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 3
format = <label>
label = RAM %gb_used%/%gb_total%
; https://github.com/jaagr/polybar/wiki/Module:-temperature
[module/temperature]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 0.5
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon0/temp1_input
warn-temperature = 70
units = true
format = <label>
format-warn = <label-warn>
label = %temperature-c%
; https://github.com/jaagr/polybar/wiki/Module:-network
[module/network]
type = internal/network
interface = enp7s0
unknown-as-up = true
label-connected = %ifname% %upspeed:9%(up) %downspeed:9%(down)
label-disconnected = not connected
label-disconnected-foreground = ${colors.urgent}
; https://github.com/jaagr/polybar/wiki/Module:-filesystem
[module/filesystem]
type = internal/fs
; Mountpoints to display
mount-0 = /
mount-1 = /home
mount-2 = /home/prominence/Storage
; Display fixed precision values
fixed-values = true
; Spacing between entries
; Default: 2
spacing = 4
label-mounted = %mountpoint%: %used% of %total%(%percentage_used%%)
label-unmounted = %mountpoint%: not mounted
label-unmounted-foreground = ${colors.urgent}
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
; ==================================================================================
; Application settings
; ==================================================================================
[settings]
; The throttle settings lets the eventloop swallow up til X events
; if they happen within Y millisecond after first event was received.
; This is done to prevent flood of update event.
;
; For example if 5 modules emit an update event at the same time, we really
; just care about the last one. But if we wait too long for events to swallow
; the bar would appear sluggish so we continue if timeout
; expires or limit is reached.
throttle-output = 5
throttle-output-for = 10
; Time in milliseconds that the input handler will wait between processing events
throttle-input-for = 30
; Reload upon receiving XCB_RANDR_SCREEN_CHANGE_NOTIFY events
screenchange-reload = false
; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = false
; ==================================================================================
; Imports
; ==================================================================================
include-file = /home/prominence/.config/polybar/variables
include-file = /home/prominence/.config/polybar/bars/primary
include-file = /home/prominence/.config/polybar/bars/secondary
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
if ! updates_aur=$(yay -Qum 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "$updates"
else
echo " 0"
fi
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env groovy
@Grab(group='com.github.prominence', module='openweathermap-api', version='1.2')
import com.github.prominence.openweathermap.api.OpenWeatherMapManager
import com.github.prominence.openweathermap.api.WeatherRequester
import com.github.prominence.openweathermap.api.model.response.Weather
import com.github.prominence.openweathermap.api.constants.Unit
import com.github.prominence.openweathermap.api.constants.Language
import com.github.prominence.openweathermap.api.constants.Accuracy
final String API_TOKEN_FILE = '/home/prominence/.config/polybar/custom-scripts/weather/openweathermap.token'
final String API_TOKEN = new File(API_TOKEN_FILE).text?.trim()
OpenWeatherMapManager openWeatherManager = new OpenWeatherMapManager(API_TOKEN)
WeatherRequester weatherRequester = openWeatherManager.getWeatherRequester()
Weather weather = weatherRequester
.setLanguage(Language.ENGLISH)
.setUnitSystem(Unit.METRIC_SYSTEM)
.setAccuracy(Accuracy.ACCURATE)
.getByCityName("Minsk")
println "${getWeatherIcon(weather)} ${weather.weatherDescription} ${weather.temperature}°C"
String getWeatherIcon(Weather weather) {
final String iconId = weather.weatherStates[0].iconId
switch(iconId) {
case '01d': return ''
case '01n': return ''
case '02d': return ''
case '02n': return ''
case ~/^03*$/: return ''
case ~/^04*$/: return ''
case '09d': return ''
case '09n': return ''
case '10d': return ''
case '10n': return ''
case '11d': return ''
case '11n': return ''
case '13d': return ''
case '13n': return ''
case '50d': return ''
case '50n': return ''
default: return ''
}
}
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
source ~/.config/polybar/env.sh &> /dev/null && ~/.config/polybar/custom-scripts/weather/weather.groovy
Executable
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
export PATH="$PATH:/home/prominence/.sdkman/candidates/java/current/bin:/home/prominence/.sdkman/candidates/groovy/current/bin"
@@ -12,5 +12,5 @@ sleep 1;
# polybar i3wmthemer_bar &
# fi
polybar main &
polybar systeminfo &
polybar -r primary &
polybar -r secondary &
+6
View File
@@ -0,0 +1,6 @@
[colors]
background = #2b303b
foreground = #ffffff
urgent = #d4533b
underline_focused = #e4f1fe
underline_urgent = #d4533b