asdf
16
.Xresources
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
rofi.lines: 5
|
||||||
|
rofi.eh: 2
|
||||||
|
rofi.padding: 200
|
||||||
|
rofi.fullscreen: true
|
||||||
|
rofi.bw: 0
|
||||||
|
rofi.separator-style: none
|
||||||
|
rofi.hide-scrollbar: true
|
||||||
|
rofi.color-enabled: true
|
||||||
|
|
||||||
|
! 'background', 'border', 'separator'
|
||||||
|
rofi.color-window: argb:c82d303b, #7c8389, #1d1f21
|
||||||
|
! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg'
|
||||||
|
rofi.color-normal: argb:031d1f21, #f3f4f5, argb:031d1f21, argb:031d1f21, #9575cd
|
||||||
|
rofi.color-urgent: argb:031d1f21, #f3f4f5, argb:bc303541, argb:031d1f21, #9575cd
|
||||||
|
rofi.color-active: argb:031d1f21, #f3f4f5, argb:031d1f21, argb:031d1f21, #9575cd
|
||||||
|
rofi.font: System San Francisco Display 18
|
3
.config/coc/extensions/db.json
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"lastUpdate": 1584601643868
|
||||||
|
}
|
1
.config/coc/extensions/package.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{"dependencies":{}}
|
1
.config/coc/memos.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
4
.config/configstore/update-notifier-npm.json
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{
|
||||||
|
"optOut": false,
|
||||||
|
"lastUpdateCheck": 1584559499307
|
||||||
|
}
|
18
.config/gtk-3.0/settings.ini
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[settings]
|
||||||
|
gtk-theme-name="Arc-Darker"
|
||||||
|
|
||||||
|
[Settings]
|
||||||
|
gtk-theme-name=Adwaita-dark
|
||||||
|
gtk-icon-theme-name=Arc-X-P
|
||||||
|
gtk-font-name=Cantarell 11
|
||||||
|
gtk-cursor-theme-name=capitaine-cursors-light
|
||||||
|
gtk-cursor-theme-size=0
|
||||||
|
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||||
|
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||||
|
gtk-button-images=1
|
||||||
|
gtk-menu-images=1
|
||||||
|
gtk-enable-event-sounds=1
|
||||||
|
gtk-enable-input-feedback-sounds=1
|
||||||
|
gtk-xft-antialias=1
|
||||||
|
gtk-xft-hinting=1
|
||||||
|
gtk-xft-hintstyle=hintfull
|
26
.config/htop/htoprc
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Beware! This file is rewritten by htop when settings are changed in the interface.
|
||||||
|
# The parser is also very primitive, and not human-friendly.
|
||||||
|
fields=0 48 17 18 38 39 40 2 46 47 49 1
|
||||||
|
sort_key=46
|
||||||
|
sort_direction=1
|
||||||
|
hide_threads=0
|
||||||
|
hide_kernel_threads=1
|
||||||
|
hide_userland_threads=0
|
||||||
|
shadow_other_users=0
|
||||||
|
show_thread_names=0
|
||||||
|
show_program_path=1
|
||||||
|
highlight_base_name=0
|
||||||
|
highlight_megabytes=1
|
||||||
|
highlight_threads=1
|
||||||
|
tree_view=0
|
||||||
|
header_margin=1
|
||||||
|
detailed_cpu_time=0
|
||||||
|
cpu_count_from_zero=0
|
||||||
|
update_process_names=0
|
||||||
|
account_guest_in_cpu_meter=0
|
||||||
|
color_scheme=0
|
||||||
|
delay=15
|
||||||
|
left_meters=AllCPUs Memory Swap
|
||||||
|
left_meter_modes=1 1 1
|
||||||
|
right_meters=Tasks LoadAverage Uptime
|
||||||
|
right_meter_modes=2 2 2
|
1
.config/kitty/kitty-themes
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit fca3335489bdbab4cce150cb440d3559ff5400e2
|
16
.config/kitty/kitty.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
include ./theme.conf
|
||||||
|
|
||||||
|
# font_family Iosevka Medium
|
||||||
|
font_family monospace
|
||||||
|
font_size 12
|
||||||
|
|
||||||
|
enable_audio_bell no
|
||||||
|
|
||||||
|
window_padding_width 0
|
||||||
|
tab_bar_style powerline
|
||||||
|
|
||||||
|
|
||||||
|
map ctrl+shift+plus change_font_size all +2.0
|
||||||
|
|
||||||
|
|
||||||
|
clipboard_control write-clipboard write-primary read-primary read-clipboard
|
1
.config/kitty/theme.conf
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/home/leon/.config/kitty/kitty-themes/themes/gruvbox_dark.conf
|
19
.config/menus/applications-merged/user-chrome-apps.menu
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||||
|
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
|
||||||
|
<!-- Do not edit manually - generated and managed by xdg-desktop-menu -->
|
||||||
|
<Menu>
|
||||||
|
<Name>Applications</Name>
|
||||||
|
<Menu>
|
||||||
|
<Name>chrome-apps</Name>
|
||||||
|
<Directory>chrome-apps.directory</Directory>
|
||||||
|
<Include>
|
||||||
|
<Filename>chrome-jjphmlaoffndcnecccgemfdaaoighkel-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-ooiklbnjmhbcgemelgfhaeaocllobloj-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-njhehnieenekbompacofnhlljnobgcga-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-hmjkmjkepdijhoojdojkdfohbdgmmhki-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-mjcnijlhddpbdemagnpefmlkjdagkogk-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-gbchcmhmhahfdphkhkmpfmihenigjmpp-Default.desktop</Filename>
|
||||||
|
<Filename>chrome-hnpfjngllnobngcgfapefoaidbinmjnm-Default.desktop</Filename>
|
||||||
|
</Include>
|
||||||
|
</Menu>
|
||||||
|
</Menu>
|
154
.config/picom.conf
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
# Thank you code_nomad: http://9m.no/ꪯ鵞
|
||||||
|
# and Arch Wiki contributors: https://wiki.archlinux.org/index.php/Compton
|
||||||
|
|
||||||
|
# Backend --------------------- {{{
|
||||||
|
|
||||||
|
# Backend to use: "xrender" or "glx".
|
||||||
|
# GLX backend is typically much faster but depends on a sane driver.
|
||||||
|
backend = "glx";
|
||||||
|
|
||||||
|
glx-no-stencil = true;
|
||||||
|
glx-copy-from-front = false;
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
# Shadows -------------------------------- {{{
|
||||||
|
shadow = true;
|
||||||
|
shadow-radius = 20;
|
||||||
|
shadow-offset-x = -20;
|
||||||
|
shadow-offset-y = -20;
|
||||||
|
shadow-opacity = 0.6;
|
||||||
|
# shadow-red = 0.0;
|
||||||
|
# shadow-green = 0.0;
|
||||||
|
# shadow-blue = 0.0;
|
||||||
|
|
||||||
|
shadow-exclude = [
|
||||||
|
"! name~=''",
|
||||||
|
"!focused",
|
||||||
|
"name = 'Notification'",
|
||||||
|
"name = 'Plank'",
|
||||||
|
"name = 'Docky'",
|
||||||
|
"name = 'Kupfer'",
|
||||||
|
"name = 'xfce4-notifyd'",
|
||||||
|
"name *= 'VLC'",
|
||||||
|
"name *= 'compton'",
|
||||||
|
"name *= 'picom'",
|
||||||
|
"class_g = 'Conky'",
|
||||||
|
"class_g = 'Kupfer'",
|
||||||
|
"class_g = 'Synapse'",
|
||||||
|
"class_g ?= 'Notify-osd'",
|
||||||
|
"class_g ?= 'Cairo-dock'",
|
||||||
|
"class_g ?= 'Xfce4-notifyd'",
|
||||||
|
"class_g ?= 'Xfce4-power-manager'",
|
||||||
|
"_GTK_FRAME_EXTENTS@:c",
|
||||||
|
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||||
|
];
|
||||||
|
# Avoid drawing shadow on all shaped windows (see also: --detect-rounded-corners)
|
||||||
|
shadow-ignore-shaped = false;
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
# Opacity ------------------------------------- {{{
|
||||||
|
|
||||||
|
inactive-opacity = 1;
|
||||||
|
active-opacity = 1;
|
||||||
|
frame-opacity = 1;
|
||||||
|
inactive-opacity-override = false;
|
||||||
|
|
||||||
|
# Dim inactive windows. (0.0 - 1.0)
|
||||||
|
# inactive-dim = 0.2;
|
||||||
|
# Do not let dimness adjust based on window opacity.
|
||||||
|
# inactive-dim-fixed = true;
|
||||||
|
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||||
|
blur-background = false;
|
||||||
|
#blur-method = "gaussian";
|
||||||
|
#blur-strength = 20;
|
||||||
|
#blur-size = 20;
|
||||||
|
# Blur background of opaque windows with transparent frames as well.
|
||||||
|
# blur-background-frame = true;
|
||||||
|
# Do not let blur radius adjust based on window opacity.
|
||||||
|
blur-background-fixed = false;
|
||||||
|
blur-background-exclude = [
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'"
|
||||||
|
];
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
# Fading ---------------------------------- {{{
|
||||||
|
|
||||||
|
# Fade windows during opacity changes.
|
||||||
|
fading = true;
|
||||||
|
# The time between steps in a fade in milliseconds. (default 10).
|
||||||
|
fade-delta = 4;
|
||||||
|
# Opacity change between steps while fading in. (default 0.028).
|
||||||
|
fade-in-step = 0.03;
|
||||||
|
# Opacity change between steps while fading out. (default 0.03).
|
||||||
|
fade-out-step = 0.03;
|
||||||
|
# Fade windows in/out when opening/closing
|
||||||
|
no-fading-openclose = false;
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should not be faded.
|
||||||
|
fade-exclude = [ ];
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
# Other ---------------------------------- {{{
|
||||||
|
|
||||||
|
# Try to detect WM windows and mark them as active.
|
||||||
|
mark-wmwin-focused = true;
|
||||||
|
# Mark all non-WM but override-redirect windows active (e.g. menus).
|
||||||
|
mark-ovredir-focused = true;
|
||||||
|
# Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused instead of using FocusIn/Out events.
|
||||||
|
# Usually more reliable but depends on a EWMH-compliant WM.
|
||||||
|
use-ewmh-active-win = true;
|
||||||
|
# Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
||||||
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
|
# Detect _NET_WM_OPACITY on client windows, useful for window managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
||||||
|
# This prevents opacity being ignored for some apps.
|
||||||
|
# For example without this enabled my xfce4-notifyd is 100% opacity no matter what.
|
||||||
|
detect-client-opacity = true;
|
||||||
|
|
||||||
|
vsync = true;
|
||||||
|
# Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. Reported to have no effect, though.
|
||||||
|
dbe = false;
|
||||||
|
|
||||||
|
# Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows, like games.
|
||||||
|
# Known to cause flickering when redirecting/unredirecting windows.
|
||||||
|
unredir-if-possible = false;
|
||||||
|
|
||||||
|
# Specify a list of conditions of windows that should always be considered focused.
|
||||||
|
focus-exclude = [ ];
|
||||||
|
|
||||||
|
# Use WM_TRANSIENT_FOR to group windows, and consider windows in the same group focused at the same time.
|
||||||
|
detect-transient = true;
|
||||||
|
# Use WM_CLIENT_LEADER to group windows, and consider windows in the same group focused at the same time.
|
||||||
|
# WM_TRANSIENT_FOR has higher priority if --detect-transient is enabled, too.
|
||||||
|
detect-client-leader = true;
|
||||||
|
|
||||||
|
# }}}
|
||||||
|
# Window type settings ---------------------------------- {{{
|
||||||
|
|
||||||
|
wintypes:
|
||||||
|
{
|
||||||
|
menu = {
|
||||||
|
opacity = 1;
|
||||||
|
shadow = true;
|
||||||
|
fade = true;
|
||||||
|
full-shadow = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
dropdown_menu = {
|
||||||
|
opacity = 1;
|
||||||
|
shadow = true;
|
||||||
|
fade = true;
|
||||||
|
full-shadow = true;
|
||||||
|
};
|
||||||
|
tooltip = {
|
||||||
|
fade = true;
|
||||||
|
shadow = true;
|
||||||
|
opacity = 0.85;
|
||||||
|
focus = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
xrender-sync-fence = true;
|
||||||
|
|
||||||
|
# }}}
|
429
.config/polybar/config.bak
Normal file
|
@ -0,0 +1,429 @@
|
||||||
|
;==========================================================
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||||
|
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||||
|
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||||
|
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||||
|
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||||
|
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; To learn more about how to configure Polybar
|
||||||
|
; go to https://github.com/polybar/polybar
|
||||||
|
;
|
||||||
|
; The README contains a lot of information
|
||||||
|
;
|
||||||
|
;==========================================================
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
;background = ${xrdb:color0:#222}
|
||||||
|
background = #222
|
||||||
|
background-alt = #444
|
||||||
|
;foreground = ${xrdb:color7:#222}
|
||||||
|
foreground = #dfdfdf
|
||||||
|
foreground-alt = #555
|
||||||
|
primary = #ffb52a
|
||||||
|
secondary = #e60053
|
||||||
|
alert = #bd2c40
|
||||||
|
|
||||||
|
[bar/example]
|
||||||
|
;monitor = ${env:MONITOR:HDMI-1}
|
||||||
|
width = 100%
|
||||||
|
height = 27
|
||||||
|
;offset-x = 1%
|
||||||
|
;offset-y = 1%
|
||||||
|
radius = 6.0
|
||||||
|
fixed-center = false
|
||||||
|
|
||||||
|
background = ${colors.background}
|
||||||
|
foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
line-size = 3
|
||||||
|
line-color = #f00
|
||||||
|
|
||||||
|
border-size = 4
|
||||||
|
border-color = #00000000
|
||||||
|
|
||||||
|
padding-left = 0
|
||||||
|
padding-right = 2
|
||||||
|
|
||||||
|
module-margin-left = 1
|
||||||
|
module-margin-right = 2
|
||||||
|
|
||||||
|
font-0 = fixed:pixelsize=10;1
|
||||||
|
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||||
|
font-2 = siji:pixelsize=10;1
|
||||||
|
|
||||||
|
modules-left = xmonad
|
||||||
|
modules-center = mpd
|
||||||
|
modules-right = filesystem xbacklight alsa pulseaudio xkeyboard memory cpu wlan eth battery temperature date powermenu
|
||||||
|
|
||||||
|
tray-position = right
|
||||||
|
tray-padding = 2
|
||||||
|
;tray-background = #0063ff
|
||||||
|
|
||||||
|
;wm-restack = bspwm
|
||||||
|
;wm-restack = i3
|
||||||
|
|
||||||
|
;override-redirect = true
|
||||||
|
|
||||||
|
;scroll-up = bspwm-desknext
|
||||||
|
;scroll-down = bspwm-deskprev
|
||||||
|
|
||||||
|
;scroll-up = i3wm-wsnext
|
||||||
|
;scroll-down = i3wm-wsprev
|
||||||
|
|
||||||
|
cursor-click = pointer
|
||||||
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
[module/xwindow]
|
||||||
|
type = internal/xwindow
|
||||||
|
label = %title:0:30:...%
|
||||||
|
|
||||||
|
[module/xkeyboard]
|
||||||
|
type = internal/xkeyboard
|
||||||
|
blacklist-0 = num lock
|
||||||
|
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-prefix-underline = ${colors.secondary}
|
||||||
|
|
||||||
|
label-layout = %layout%
|
||||||
|
label-layout-underline = ${colors.secondary}
|
||||||
|
|
||||||
|
label-indicator-padding = 2
|
||||||
|
label-indicator-margin = 1
|
||||||
|
label-indicator-background = ${colors.secondary}
|
||||||
|
label-indicator-underline = ${colors.secondary}
|
||||||
|
|
||||||
|
[module/filesystem]
|
||||||
|
type = internal/fs
|
||||||
|
interval = 25
|
||||||
|
|
||||||
|
mount-0 = /
|
||||||
|
|
||||||
|
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||||
|
label-unmounted = %mountpoint% not mounted
|
||||||
|
label-unmounted-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/bspwm]
|
||||||
|
type = internal/bspwm
|
||||||
|
|
||||||
|
label-focused = %index%
|
||||||
|
label-focused-background = ${colors.background-alt}
|
||||||
|
label-focused-underline= ${colors.primary}
|
||||||
|
label-focused-padding = 2
|
||||||
|
|
||||||
|
label-occupied = %index%
|
||||||
|
label-occupied-padding = 2
|
||||||
|
|
||||||
|
label-urgent = %index%!
|
||||||
|
label-urgent-background = ${colors.alert}
|
||||||
|
label-urgent-padding = 2
|
||||||
|
|
||||||
|
label-empty = %index%
|
||||||
|
label-empty-foreground = ${colors.foreground-alt}
|
||||||
|
label-empty-padding = 2
|
||||||
|
|
||||||
|
; Separator in between workspaces
|
||||||
|
; label-separator = |
|
||||||
|
|
||||||
|
[module/i3]
|
||||||
|
type = internal/i3
|
||||||
|
format = <label-state> <label-mode>
|
||||||
|
index-sort = true
|
||||||
|
wrapping-scroll = false
|
||||||
|
|
||||||
|
; Only show workspaces on the same output as the bar
|
||||||
|
;pin-workspaces = true
|
||||||
|
|
||||||
|
label-mode-padding = 2
|
||||||
|
label-mode-foreground = #000
|
||||||
|
label-mode-background = ${colors.primary}
|
||||||
|
|
||||||
|
; focused = Active workspace on focused monitor
|
||||||
|
label-focused = %index%
|
||||||
|
label-focused-background = ${colors.background-alt}
|
||||||
|
label-focused-underline= ${colors.primary}
|
||||||
|
label-focused-padding = 2
|
||||||
|
|
||||||
|
; unfocused = Inactive workspace on any monitor
|
||||||
|
label-unfocused = %index%
|
||||||
|
label-unfocused-padding = 2
|
||||||
|
|
||||||
|
; visible = Active workspace on unfocused monitor
|
||||||
|
label-visible = %index%
|
||||||
|
label-visible-background = ${self.label-focused-background}
|
||||||
|
label-visible-underline = ${self.label-focused-underline}
|
||||||
|
label-visible-padding = ${self.label-focused-padding}
|
||||||
|
|
||||||
|
; urgent = Workspace with urgency hint set
|
||||||
|
label-urgent = %index%
|
||||||
|
label-urgent-background = ${colors.alert}
|
||||||
|
label-urgent-padding = 2
|
||||||
|
|
||||||
|
; Separator in between workspaces
|
||||||
|
; label-separator = |
|
||||||
|
|
||||||
|
|
||||||
|
[module/mpd]
|
||||||
|
type = internal/mpd
|
||||||
|
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||||
|
|
||||||
|
icon-prev =
|
||||||
|
icon-stop =
|
||||||
|
icon-play =
|
||||||
|
icon-pause =
|
||||||
|
icon-next =
|
||||||
|
|
||||||
|
label-song-maxlen = 25
|
||||||
|
label-song-ellipsis = true
|
||||||
|
|
||||||
|
[module/xbacklight]
|
||||||
|
type = internal/xbacklight
|
||||||
|
|
||||||
|
format = <label> <bar>
|
||||||
|
label = BL
|
||||||
|
|
||||||
|
bar-width = 10
|
||||||
|
bar-indicator = |
|
||||||
|
bar-indicator-foreground = #fff
|
||||||
|
bar-indicator-font = 2
|
||||||
|
bar-fill = ─
|
||||||
|
bar-fill-font = 2
|
||||||
|
bar-fill-foreground = #9f78e1
|
||||||
|
bar-empty = ─
|
||||||
|
bar-empty-font = 2
|
||||||
|
bar-empty-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/backlight-acpi]
|
||||||
|
inherit = module/xbacklight
|
||||||
|
type = internal/backlight
|
||||||
|
card = intel_backlight
|
||||||
|
|
||||||
|
[module/cpu]
|
||||||
|
type = internal/cpu
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #f90000
|
||||||
|
label = %percentage:2%%
|
||||||
|
|
||||||
|
[module/memory]
|
||||||
|
type = internal/memory
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #4bffdc
|
||||||
|
label = %percentage_used%%
|
||||||
|
|
||||||
|
[module/wlan]
|
||||||
|
type = internal/network
|
||||||
|
interface = net1
|
||||||
|
interval = 3.0
|
||||||
|
|
||||||
|
format-connected = <ramp-signal> <label-connected>
|
||||||
|
format-connected-underline = #9f78e1
|
||||||
|
label-connected = %essid%
|
||||||
|
|
||||||
|
format-disconnected =
|
||||||
|
;format-disconnected = <label-disconnected>
|
||||||
|
;format-disconnected-underline = ${self.format-connected-underline}
|
||||||
|
;label-disconnected = %ifname% disconnected
|
||||||
|
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
ramp-signal-0 =
|
||||||
|
ramp-signal-1 =
|
||||||
|
ramp-signal-2 =
|
||||||
|
ramp-signal-3 =
|
||||||
|
ramp-signal-4 =
|
||||||
|
ramp-signal-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/eth]
|
||||||
|
type = internal/network
|
||||||
|
interface = enp0s3
|
||||||
|
interval = 3.0
|
||||||
|
|
||||||
|
format-connected-underline = #55aa55
|
||||||
|
format-connected-prefix = " "
|
||||||
|
format-connected-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
label-connected = %local_ip%
|
||||||
|
|
||||||
|
format-disconnected =
|
||||||
|
;format-disconnected = <label-disconnected>
|
||||||
|
;format-disconnected-underline = ${self.format-connected-underline}
|
||||||
|
;label-disconnected = %ifname% disconnected
|
||||||
|
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/date]
|
||||||
|
type = internal/date
|
||||||
|
interval = 5
|
||||||
|
|
||||||
|
date =
|
||||||
|
date-alt = " %Y-%m-%d"
|
||||||
|
|
||||||
|
time = %H:%M
|
||||||
|
time-alt = %H:%M:%S
|
||||||
|
|
||||||
|
format-prefix =
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #0a6cf5
|
||||||
|
|
||||||
|
label = %date% %time%
|
||||||
|
|
||||||
|
[module/pulseaudio]
|
||||||
|
type = internal/pulseaudio
|
||||||
|
|
||||||
|
format-volume = <label-volume> <bar-volume>
|
||||||
|
label-volume = VOL %percentage%%
|
||||||
|
label-volume-foreground = ${root.foreground}
|
||||||
|
|
||||||
|
label-muted = 🔇 muted
|
||||||
|
label-muted-foreground = #666
|
||||||
|
|
||||||
|
bar-volume-width = 10
|
||||||
|
bar-volume-foreground-0 = #55aa55
|
||||||
|
bar-volume-foreground-1 = #55aa55
|
||||||
|
bar-volume-foreground-2 = #55aa55
|
||||||
|
bar-volume-foreground-3 = #55aa55
|
||||||
|
bar-volume-foreground-4 = #55aa55
|
||||||
|
bar-volume-foreground-5 = #f5a70a
|
||||||
|
bar-volume-foreground-6 = #ff5555
|
||||||
|
bar-volume-gradient = false
|
||||||
|
bar-volume-indicator = |
|
||||||
|
bar-volume-indicator-font = 2
|
||||||
|
bar-volume-fill = ─
|
||||||
|
bar-volume-fill-font = 2
|
||||||
|
bar-volume-empty = ─
|
||||||
|
bar-volume-empty-font = 2
|
||||||
|
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/alsa]
|
||||||
|
type = internal/alsa
|
||||||
|
|
||||||
|
format-volume = <label-volume> <bar-volume>
|
||||||
|
label-volume = VOL
|
||||||
|
label-volume-foreground = ${root.foreground}
|
||||||
|
|
||||||
|
format-muted-prefix = " "
|
||||||
|
format-muted-foreground = ${colors.foreground-alt}
|
||||||
|
label-muted = sound muted
|
||||||
|
|
||||||
|
bar-volume-width = 10
|
||||||
|
bar-volume-foreground-0 = #55aa55
|
||||||
|
bar-volume-foreground-1 = #55aa55
|
||||||
|
bar-volume-foreground-2 = #55aa55
|
||||||
|
bar-volume-foreground-3 = #55aa55
|
||||||
|
bar-volume-foreground-4 = #55aa55
|
||||||
|
bar-volume-foreground-5 = #f5a70a
|
||||||
|
bar-volume-foreground-6 = #ff5555
|
||||||
|
bar-volume-gradient = false
|
||||||
|
bar-volume-indicator = |
|
||||||
|
bar-volume-indicator-font = 2
|
||||||
|
bar-volume-fill = ─
|
||||||
|
bar-volume-fill-font = 2
|
||||||
|
bar-volume-empty = ─
|
||||||
|
bar-volume-empty-font = 2
|
||||||
|
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
battery = BAT0
|
||||||
|
adapter = AC
|
||||||
|
full-at = 98
|
||||||
|
|
||||||
|
format-charging = <animation-charging> <label-charging>
|
||||||
|
format-charging-underline = #ffb52a
|
||||||
|
|
||||||
|
format-discharging = <animation-discharging> <label-discharging>
|
||||||
|
format-discharging-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
|
format-full-prefix = " "
|
||||||
|
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-full-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
|
ramp-capacity-0 =
|
||||||
|
ramp-capacity-1 =
|
||||||
|
ramp-capacity-2 =
|
||||||
|
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
animation-charging-0 =
|
||||||
|
animation-charging-1 =
|
||||||
|
animation-charging-2 =
|
||||||
|
animation-charging-foreground = ${colors.foreground-alt}
|
||||||
|
animation-charging-framerate = 750
|
||||||
|
|
||||||
|
animation-discharging-0 =
|
||||||
|
animation-discharging-1 =
|
||||||
|
animation-discharging-2 =
|
||||||
|
animation-discharging-foreground = ${colors.foreground-alt}
|
||||||
|
animation-discharging-framerate = 750
|
||||||
|
|
||||||
|
[module/temperature]
|
||||||
|
type = internal/temperature
|
||||||
|
thermal-zone = 0
|
||||||
|
warn-temperature = 60
|
||||||
|
|
||||||
|
format = <ramp> <label>
|
||||||
|
format-underline = #f50a4d
|
||||||
|
format-warn = <ramp> <label-warn>
|
||||||
|
format-warn-underline = ${self.format-underline}
|
||||||
|
|
||||||
|
label = %temperature-c%
|
||||||
|
label-warn = %temperature-c%
|
||||||
|
label-warn-foreground = ${colors.secondary}
|
||||||
|
|
||||||
|
ramp-0 =
|
||||||
|
ramp-1 =
|
||||||
|
ramp-2 =
|
||||||
|
ramp-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/powermenu]
|
||||||
|
type = custom/menu
|
||||||
|
|
||||||
|
expand-right = true
|
||||||
|
|
||||||
|
format-spacing = 1
|
||||||
|
|
||||||
|
label-open =
|
||||||
|
label-open-foreground = ${colors.secondary}
|
||||||
|
label-close = cancel
|
||||||
|
label-close-foreground = ${colors.secondary}
|
||||||
|
label-separator = |
|
||||||
|
label-separator-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
menu-0-0 = reboot
|
||||||
|
menu-0-0-exec = menu-open-1
|
||||||
|
menu-0-1 = power off
|
||||||
|
menu-0-1-exec = menu-open-2
|
||||||
|
|
||||||
|
menu-1-0 = cancel
|
||||||
|
menu-1-0-exec = menu-open-0
|
||||||
|
menu-1-1 = reboot
|
||||||
|
menu-1-1-exec = sudo reboot
|
||||||
|
|
||||||
|
menu-2-0 = power off
|
||||||
|
menu-2-0-exec = sudo poweroff
|
||||||
|
menu-2-1 = cancel
|
||||||
|
menu-2-1-exec = menu-open-0
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
screenchange-reload = true
|
||||||
|
;compositing-background = xor
|
||||||
|
;compositing-background = screen
|
||||||
|
;compositing-foreground = source
|
||||||
|
;compositing-border = over
|
||||||
|
;pseudo-transparency = false
|
||||||
|
|
||||||
|
[global/wm]
|
||||||
|
margin-top = 5
|
||||||
|
margin-bottom = 5
|
||||||
|
|
||||||
|
; vim:ft=dosini
|
||||||
|
|
||||||
|
[module/xmonad]
|
||||||
|
type = custom/script
|
||||||
|
exec = xmonad-log
|
||||||
|
|
||||||
|
tail = true
|
186
.config/polybar/config.ini
Normal file
|
@ -0,0 +1,186 @@
|
||||||
|
;==========================================================
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||||
|
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||||
|
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||||
|
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||||
|
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||||
|
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; To learn more about how to configure Polybar
|
||||||
|
; go to https://github.com/polybar/polybar
|
||||||
|
;
|
||||||
|
; The README contains a lot of information
|
||||||
|
;
|
||||||
|
;==========================================================
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
;background = ${xrdb:color0:#222}
|
||||||
|
background = #bb282828
|
||||||
|
;background = #222
|
||||||
|
background-alt = #444
|
||||||
|
;foreground = ${xrdb:color7:#222}
|
||||||
|
foreground = #dfdfdf
|
||||||
|
foreground-alt = #888
|
||||||
|
primary = #ffb52a
|
||||||
|
secondary = #e60053
|
||||||
|
alert = #bd2c40
|
||||||
|
|
||||||
|
[bar/main]
|
||||||
|
width = 100%
|
||||||
|
height = 27
|
||||||
|
radius = 0.0
|
||||||
|
fixed-center = false
|
||||||
|
enable-ipc = true
|
||||||
|
padding = 0
|
||||||
|
|
||||||
|
background = ${colors.background}
|
||||||
|
foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
line-size = 3
|
||||||
|
line-color = #f00
|
||||||
|
|
||||||
|
border-size = 0
|
||||||
|
border-color = #00000000
|
||||||
|
|
||||||
|
padding-left = 0
|
||||||
|
padding-right = 2
|
||||||
|
|
||||||
|
module-margin-left = 1
|
||||||
|
module-margin-right = 2
|
||||||
|
|
||||||
|
font-0 = fixed:pixelsize=10;1
|
||||||
|
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||||
|
font-2 = siji:pixelsize=10;1
|
||||||
|
|
||||||
|
modules-left = xmonad test
|
||||||
|
modules-center = mpd gitlab-pipeline player-mpv-tail
|
||||||
|
modules-right = info-pingrtt pulseaudio filesystem memory cpu date
|
||||||
|
|
||||||
|
tray-position = right
|
||||||
|
tray-padding = 2
|
||||||
|
tray-maxsize = 16
|
||||||
|
tray-background = ${colors.background}
|
||||||
|
;tray-background = #0063ff
|
||||||
|
|
||||||
|
cursor-click = pointer
|
||||||
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
; show's currently focussed window, already contained in xmonad module
|
||||||
|
[module/xwindow]
|
||||||
|
type = internal/xwindow
|
||||||
|
label = %title:0:30:...%
|
||||||
|
|
||||||
|
[module/filesystem]
|
||||||
|
type = internal/fs
|
||||||
|
interval = 25
|
||||||
|
|
||||||
|
mount-0 = /
|
||||||
|
format-mounted = <label-mounted>
|
||||||
|
format-mounted-prefix = "disk: "
|
||||||
|
format-mounted-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-mounted-underline = #0fca42
|
||||||
|
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||||
|
label-unmounted = %mountpoint% not mounted
|
||||||
|
label-unmounted-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
|
||||||
|
[module/mpd]
|
||||||
|
type = internal/mpd
|
||||||
|
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||||
|
|
||||||
|
icon-prev =
|
||||||
|
icon-stop =
|
||||||
|
icon-play =
|
||||||
|
icon-pause =
|
||||||
|
icon-next =
|
||||||
|
|
||||||
|
label-song-maxlen = 25
|
||||||
|
label-song-ellipsis = true
|
||||||
|
|
||||||
|
|
||||||
|
[module/cpu]
|
||||||
|
type = internal/cpu
|
||||||
|
interval = 2
|
||||||
|
format-prefix = "cpu: "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #f9a000
|
||||||
|
label = %percentage:2%%
|
||||||
|
|
||||||
|
[module/memory]
|
||||||
|
type = internal/memory
|
||||||
|
interval = 2
|
||||||
|
format-prefix = "mem: "
|
||||||
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #4bffdc
|
||||||
|
label = %percentage_used%%
|
||||||
|
|
||||||
|
[module/date]
|
||||||
|
type = internal/date
|
||||||
|
interval = 5
|
||||||
|
date = %a %d-%m-%y
|
||||||
|
date-alt = %d-%m-%Y
|
||||||
|
time = %H:%M
|
||||||
|
time-alt = %H:%M:%S
|
||||||
|
|
||||||
|
;format-prefix =
|
||||||
|
;format-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-underline = #0a6cf5
|
||||||
|
|
||||||
|
label = %time% | %date%
|
||||||
|
|
||||||
|
[module/pulseaudio]
|
||||||
|
type = internal/pulseaudio
|
||||||
|
|
||||||
|
format-volume-prefix = "vol: "
|
||||||
|
format-volume-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
format-volume-underline = #f0f040
|
||||||
|
format-volume = <label-volume>
|
||||||
|
label-volume = %percentage%%
|
||||||
|
label-volume-foreground = ${root.foreground}
|
||||||
|
|
||||||
|
label-muted = 🔇 muted
|
||||||
|
label-muted-foreground = #666
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
screenchange-reload = true
|
||||||
|
;compositing-background = xor
|
||||||
|
;compositing-background = screen
|
||||||
|
;compositing-foreground = source
|
||||||
|
;compositing-border = over
|
||||||
|
pseudo-transparency = true
|
||||||
|
|
||||||
|
[global/wm]
|
||||||
|
margin-top = 5
|
||||||
|
margin-bottom = 5
|
||||||
|
|
||||||
|
; vim:ft=dosini
|
||||||
|
|
||||||
|
[module/xmonad]
|
||||||
|
type = custom/script
|
||||||
|
exec = xmonad-log
|
||||||
|
|
||||||
|
tail = true
|
||||||
|
|
||||||
|
;[module/gitlab-pipeline]
|
||||||
|
;type = custom/script
|
||||||
|
;exec = ~/scripts/fetch-running-pipelines.sh
|
||||||
|
;interval = 10
|
||||||
|
|
||||||
|
[module/info-pingrtt]
|
||||||
|
type = custom/script
|
||||||
|
exec = ~/.config/polybar/polybar-scripts/info-pingrtt.sh
|
||||||
|
interval = 10
|
||||||
|
|
||||||
|
|
||||||
|
[module/player-mpv-tail]
|
||||||
|
type = custom/script
|
||||||
|
exec = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -t 42 -c '#abb2bf'
|
||||||
|
tail = true
|
||||||
|
click-left = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -p pause
|
||||||
|
click-middle = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -p playlist-pos -1
|
||||||
|
click-right = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -p playlist-pos +1
|
||||||
|
scroll-up = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -p time-pos -10
|
||||||
|
scroll-down = ~/.config/polybar/polybar-scripts/player-mpv-tail.py -p time-pos +10
|
5
.config/polybar/launch.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
killall -q polybar
|
||||||
|
echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log
|
||||||
|
polybar --config=/home/leon/.config/polybar/config.ini main >>/tmp/polybar1.log 2>&1 &
|
19
.config/polybar/polybar-scripts/info-pingrtt.sh
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
HOST="google.de"
|
||||||
|
|
||||||
|
if ! ping=$(ping -n -c 1 -W 1 $HOST); then
|
||||||
|
echo "# ping failed"
|
||||||
|
else
|
||||||
|
rtt=$(echo "$ping" | sed -rn 's/.*time=([0-9]{1,})\.?[0-9]{0,} ms.*/\1/p')
|
||||||
|
|
||||||
|
if [ "$rtt" -lt 50 ]; then
|
||||||
|
icon="%{F#3cb703}#%{F-}"
|
||||||
|
elif [ "$rtt" -lt 150 ]; then
|
||||||
|
icon="%{F#f9dd04}#%{F-}"
|
||||||
|
else
|
||||||
|
icon="%{F#d60606}#%{F-}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$icon $rtt ms"
|
||||||
|
fi
|
148
.config/polybar/polybar-scripts/player-mpv-tail.py
Executable file
|
@ -0,0 +1,148 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import socket
|
||||||
|
import json
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
def get_property_cmd(property, request_id=None):
|
||||||
|
cmd = {'command': ['get_property', property]}
|
||||||
|
if isinstance(request_id, int):
|
||||||
|
cmd['request_id'] = request_id
|
||||||
|
return (json.dumps(cmd) + '\n').encode('utf-8')
|
||||||
|
|
||||||
|
def update_property(property, get_new_value):
|
||||||
|
client.send(get_property_cmd(property))
|
||||||
|
msg = client.recv(BUFSIZE).decode('utf-8')
|
||||||
|
value = get_new_value(msg)
|
||||||
|
cmd = {'command': ['set_property', property, value]}
|
||||||
|
client.send((json.dumps(cmd) + '\n').encode('utf-8'))
|
||||||
|
|
||||||
|
MPV_SOCKET = '/tmp/mpvsocket'
|
||||||
|
BUFSIZE = 1024
|
||||||
|
METADATA_CMD = get_property_cmd('filtered-metadata', 1)
|
||||||
|
OBSERVE_METADATA_CMD = b'{ "command": ["observe_property", 1, "filtered-metadata"] }\n'
|
||||||
|
MEDIA_TITLE_CMD = get_property_cmd('media-title', 2)
|
||||||
|
PERCENT_POS_CMD = get_property_cmd('percent-pos', 3)
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
parser.add_argument('-t', '--truncate', metavar='N', type=int, help='truncate output to N characters')
|
||||||
|
parser.add_argument('-c', '--color', default='#fff', metavar='C', help='set color of underline (progress bar)')
|
||||||
|
parser.add_argument('-p', '--property', choices=['pause', 'time-pos', 'playlist-pos'], help='update mpv property and exit')
|
||||||
|
parser.add_argument('args', nargs=argparse.REMAINDER)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if args.property:
|
||||||
|
try:
|
||||||
|
client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
|
client.connect(MPV_SOCKET)
|
||||||
|
except (FileNotFoundError, ConnectionRefusedError):
|
||||||
|
raise RuntimeError('Failed connecting to mpv socket.')
|
||||||
|
|
||||||
|
if args.property == 'pause':
|
||||||
|
update_property('pause', lambda msg: not json.loads(msg)['data'])
|
||||||
|
elif args.property in ['time-pos', 'playlist-pos']:
|
||||||
|
update_property(args.property, lambda msg: json.loads(msg)['data'] + int(args.args[0]))
|
||||||
|
|
||||||
|
client.close()
|
||||||
|
exit()
|
||||||
|
|
||||||
|
import time
|
||||||
|
import sys
|
||||||
|
from threading import Thread
|
||||||
|
|
||||||
|
def first_value(data, keys):
|
||||||
|
for key in keys:
|
||||||
|
value = data.get(key)
|
||||||
|
if value:
|
||||||
|
return value
|
||||||
|
|
||||||
|
def maybe_truncate(text):
|
||||||
|
limit = args.truncate
|
||||||
|
return (text[:limit - 1] + '…') if limit and len(text) > limit else text
|
||||||
|
|
||||||
|
def puts(output='', pos=0):
|
||||||
|
if pos > 0:
|
||||||
|
output = f'%{{u{args.color}}}%{{+u}}{output[0:pos]}%{{-u}}{output[pos:len(output)]}'
|
||||||
|
sys.stdout.write(output + '\n')
|
||||||
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
def create_client():
|
||||||
|
client = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
|
||||||
|
while True:
|
||||||
|
try:
|
||||||
|
client.connect(MPV_SOCKET)
|
||||||
|
client.send(METADATA_CMD)
|
||||||
|
client.send(OBSERVE_METADATA_CMD)
|
||||||
|
Thread(target=percent_pos_sender, args=[client]).start()
|
||||||
|
break
|
||||||
|
except (FileNotFoundError, ConnectionRefusedError):
|
||||||
|
time.sleep(1)
|
||||||
|
return client
|
||||||
|
|
||||||
|
def parse_msg(msg):
|
||||||
|
messages = msg.decode('utf-8').split('\n')
|
||||||
|
not_empty = filter(lambda s: s, messages)
|
||||||
|
parsed = map(lambda m: json.loads(m), not_empty)
|
||||||
|
return list(parsed)
|
||||||
|
|
||||||
|
def format_data(data):
|
||||||
|
artist = first_value(data, ['Artist', 'Album_Artist']) or ''
|
||||||
|
title = first_value(data, ['Title', 'icy-title']) or ''
|
||||||
|
not_empty = filter(lambda d: d, [artist.strip(), title.strip()])
|
||||||
|
return ' - '.join(not_empty)
|
||||||
|
|
||||||
|
def percent_pos_sender(client):
|
||||||
|
try:
|
||||||
|
while True:
|
||||||
|
time.sleep(1)
|
||||||
|
client.send(PERCENT_POS_CMD)
|
||||||
|
except BrokenPipeError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
client = create_client()
|
||||||
|
current_output = ''
|
||||||
|
current_pos = 0
|
||||||
|
while True:
|
||||||
|
msg = client.recv(BUFSIZE)
|
||||||
|
|
||||||
|
# If connection is broken
|
||||||
|
if len(msg) == 0:
|
||||||
|
current_output = ''
|
||||||
|
current_pos = 0
|
||||||
|
puts()
|
||||||
|
time.sleep(1)
|
||||||
|
client = create_client()
|
||||||
|
continue
|
||||||
|
|
||||||
|
for m in parse_msg(msg):
|
||||||
|
data = m.get('data')
|
||||||
|
|
||||||
|
if m.get('event') == 'seek':
|
||||||
|
client.send(PERCENT_POS_CMD)
|
||||||
|
|
||||||
|
# 'filtered-metadata' event or response
|
||||||
|
elif (m.get('id') == 1 or m.get('request_id') == 1) and isinstance(data, dict):
|
||||||
|
text = format_data(data)
|
||||||
|
if text:
|
||||||
|
output = maybe_truncate(text)
|
||||||
|
if output != current_output:
|
||||||
|
current_output = output
|
||||||
|
puts(output)
|
||||||
|
client.send(PERCENT_POS_CMD)
|
||||||
|
else:
|
||||||
|
client.send(MEDIA_TITLE_CMD)
|
||||||
|
|
||||||
|
# 'media-title' response
|
||||||
|
elif m.get('request_id') == 2:
|
||||||
|
current_output = maybe_truncate(data)
|
||||||
|
puts(current_output)
|
||||||
|
client.send(PERCENT_POS_CMD)
|
||||||
|
|
||||||
|
# 'percent-pos' response
|
||||||
|
elif m.get('request_id') == 3 and isinstance(data, float):
|
||||||
|
length = len(current_output)
|
||||||
|
pos = round(length / 100 * data)
|
||||||
|
if pos != current_pos:
|
||||||
|
current_pos = pos
|
||||||
|
puts(current_output, pos)
|
||||||
|
|
BIN
.config/pulse/76e22e4bdd404335994ef4a184f822aa-card-database.tdb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
alsa_output.usb-Native_Instruments_Komplete_Audio_6_77316682-00.analog-surround-21
|
|
@ -0,0 +1 @@
|
||||||
|
alsa_input.usb-Native_Instruments_Komplete_Audio_6_77316682-00.multichannel-input
|
BIN
.config/pulse/cookie
Normal file
44
.config/termite/config
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
[options]
|
||||||
|
font = Iosevka Medium 14
|
||||||
|
# font = monospace 13
|
||||||
|
|
||||||
|
[colors]
|
||||||
|
# hard contrast: background = #1d2021
|
||||||
|
background = rgba(40, 40, 40, 0.95)
|
||||||
|
# soft contrast: background = #32302f
|
||||||
|
foreground = #ebdbb2
|
||||||
|
foreground_bold = #ebdbb2
|
||||||
|
|
||||||
|
# dark0 + gray
|
||||||
|
color0 = #282828
|
||||||
|
color8 = #928374
|
||||||
|
|
||||||
|
# neutral_red + bright_red
|
||||||
|
color1 = #cc241d
|
||||||
|
color9 = #fb4934
|
||||||
|
|
||||||
|
# neutral_green + bright_green
|
||||||
|
color2 = #98971a
|
||||||
|
color10 = #b8bb26
|
||||||
|
|
||||||
|
# neutral_yellow + bright_yellow
|
||||||
|
color3 = #d79921
|
||||||
|
color11 = #fabd2f
|
||||||
|
|
||||||
|
# neutral_blue + bright_blue
|
||||||
|
color4 = #458588
|
||||||
|
color12 = #83a598
|
||||||
|
|
||||||
|
# neutral_purple + bright_purple
|
||||||
|
color5 = #b16286
|
||||||
|
color13 = #d3869b
|
||||||
|
|
||||||
|
# neutral_aqua + faded_aqua
|
||||||
|
color6 = #689d6a
|
||||||
|
color14 = #8ec07c
|
||||||
|
|
||||||
|
# light4 + light1
|
||||||
|
color7 = #a89984
|
||||||
|
color15 = #ebdbb2
|
||||||
|
|
||||||
|
# vim: ft=dosini cms=#%s
|
16
.gitignore
vendored
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
BAZECOR
|
||||||
|
chromium
|
||||||
|
dconf
|
||||||
|
discord
|
||||||
|
EOS-arch-news.conf
|
||||||
|
EOS-arch-news-for-you.conf
|
||||||
|
EOS-greeter.conf
|
||||||
|
EOS-initial-wallpaper.XFCE
|
||||||
|
pavucontrol.ini
|
||||||
|
ristretto
|
||||||
|
systemd
|
||||||
|
Thunar
|
||||||
|
user-dirs.dirs
|
||||||
|
user-dirs.locale
|
||||||
|
xfce4
|
||||||
|
yay
|
69
.surf/cache/WebKitCache/Version 16/Blobs/007597A8508452A1023F10C37F90F5878A0742FB
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/07D04F5B85538C3758F10C842D8055CBC6928296
vendored
Normal file
After Width: | Height: | Size: 44 KiB |
38
.surf/cache/WebKitCache/Version 16/Blobs/19797E4508F9F71D01574A4D26C72669EB676AFA
vendored
Normal file
1271
.surf/cache/WebKitCache/Version 16/Blobs/1C265EC625E9284B2924D79F57E378593AA87E6F
vendored
Normal file
31
.surf/cache/WebKitCache/Version 16/Blobs/3380B74261D81F9950759D16C3C2236F0E5A6AD6
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/431644E77C4C52C1DB8996BDB7EB70CA1A134472
vendored
Normal file
After Width: | Height: | Size: 42 KiB |
85
.surf/cache/WebKitCache/Version 16/Blobs/4E717D81BB880C30E966E57B2C35459E905A81F6
vendored
Normal file
306
.surf/cache/WebKitCache/Version 16/Blobs/50CA35D8E8E580B26EA7F0AC283E413FBA8A9F8E
vendored
Normal file
115
.surf/cache/WebKitCache/Version 16/Blobs/56B7C0689768043850EA3488E2164AFD97E2F549
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/5753E04EF1EB2A73F7F7F05DDC2D3B627F094475
vendored
Normal file
After Width: | Height: | Size: 101 KiB |
38
.surf/cache/WebKitCache/Version 16/Blobs/5ADC68640A1B2EDDA5023DFB13F8C734AB6782A4
vendored
Normal file
47
.surf/cache/WebKitCache/Version 16/Blobs/5C2572291752A70689A3A0BB827BD442A3AF14D7
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/60A04CDF8FA7AD38EADE379BCB80AEF8046DA75A
vendored
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/67E8E23DD4C8E1DD9BB31992F79D97FD5F615FEC
vendored
Normal file
After Width: | Height: | Size: 42 KiB |
1
.surf/cache/WebKitCache/Version 16/Blobs/6950E92A7F7A0E2B3708BA3D2955F243CE001740
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/7AC893E3D5E50C5584C4A7186D512B50E73FA27A
vendored
Normal file
After Width: | Height: | Size: 37 KiB |
1
.surf/cache/WebKitCache/Version 16/Blobs/8680E37722435FECFE53130305D429340BD4ABA5
vendored
Normal file
6
.surf/cache/WebKitCache/Version 16/Blobs/89E1E18AF0AAE43B3F4BF488E610C6933DCDCE1A
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/905A8F62DF8330B1B36231B22616E49FEEA2F89D
vendored
Normal file
After Width: | Height: | Size: 37 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/956D030B022562CB30B6206DC5DD30AED7A1B43B
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
2
.surf/cache/WebKitCache/Version 16/Blobs/96E2E25F6A20AE4409A200E76846ACC0005CBA28
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/9BCD798AFECD9B349C0DE2BF83F819EB52E5BB27
vendored
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/B0243676A47BB11BEC86000FF51DD4E953171403
vendored
Normal file
After Width: | Height: | Size: 42 KiB |
31
.surf/cache/WebKitCache/Version 16/Blobs/B8E6F1CD0A9747116067CD837C9F9C986700E503
vendored
Normal file
58
.surf/cache/WebKitCache/Version 16/Blobs/BA501AA4E7F3E43E7C3EC1BB2B9FB5E8C53F827D
vendored
Normal file
2
.surf/cache/WebKitCache/Version 16/Blobs/BF14C876DFB90C32B18C4D165C2348FEBE957226
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/CF107DBE0E7AFD61A48967D1249B8960CC3389D5
vendored
Normal file
After Width: | Height: | Size: 43 KiB |
76
.surf/cache/WebKitCache/Version 16/Blobs/D2EA8A1391D1F74F87B3EB70C8CCF64B4DBF2FDB
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/D354E7A87F2978DD480A90F010144C53600968C8
vendored
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/D3670BBDCE4421DDEBEA67524E560FD13CBA16EF
vendored
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/DE50D4F9B3BCF3B158E453FCA5E59479794F6B58
vendored
Normal file
After Width: | Height: | Size: 85 KiB |
1
.surf/cache/WebKitCache/Version 16/Blobs/E93263979E7D6F02B2614D0066A41BCF2FA5664B
vendored
Normal file
2
.surf/cache/WebKitCache/Version 16/Blobs/EB012A9C9CBA14B0DFD6737265DFDD52C3149A0C
vendored
Normal file
38
.surf/cache/WebKitCache/Version 16/Blobs/EB03720781B0BD04DF6933347BD4863733253566
vendored
Normal file
BIN
.surf/cache/WebKitCache/Version 16/Blobs/ED49A1B0A25D613D0AC369B0C0F273BA3748DCCA
vendored
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/F1AA2545D2A2F11BB252119630E3C3B7B2447FF9
vendored
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/F2F2C3DE93CD0E61EBB9D047D91410F19AD91C4B
vendored
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
.surf/cache/WebKitCache/Version 16/Blobs/F7AAEDA752AF4CA302E7A865009E91188F0479FB
vendored
Normal file
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 19 KiB |