Add files via upload

amogus
This commit is contained in:
Zoey 2022-04-03 01:11:04 +02:00 committed by GitHub
parent 5318c8f32e
commit d40e1c6be6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
80 changed files with 24064 additions and 0 deletions

View file

@ -0,0 +1,35 @@
#! /bin/sh
pgrep -x sxhkd > /dev/null || sxhkd &
bspc config focus_follows_pointer true
bspc monitor HDMI-0 -d 'I' 'IV' 'VII'
bspc monitor DP-1 -d 'II' 'V' 'VIII'
bspc monitor DP-2 -d 'III' 'VI' 'IX'
bspc config border_width 6
bspc config focused_border_color "#cc4738"
bspc config window_gap 8 #12
bspc config split_ratio 0.5
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config single_monocle false
bspc rule -a Gimp desktop=^8
bspc rule -a virt-manager desktop=^7
bspc rule -a lazarus state=floating
bspc rule -a Lazarus state=floating
bspc rule -a android-studio state=floating border=off follow=on
picom -b -f &
nitrogen --restore &
/usr/bin/polkit-dumb-agent &
sxhkd -c $HOME/.config/sxhkd/sxhkdrc &
xsetroot -cursor_name left_ptr &
$HOME/.config/polybar/launch.sh &
wmname LG3D &
setxkbmap -option caps:swapescape &
sudo sh /home/zoey/Documents/vendorreset.sh

View file

@ -0,0 +1,216 @@
set aaa_mode=artist
set altformat_current= %F
set altformat_playlist= %f%= %d
set altformat_title=%f
set altformat_trackwin= %f%= %d
set auto_expand_albums_follow=true
set auto_expand_albums_search=true
set auto_expand_albums_selcur=true
set auto_reshuffle=true
set buffer_seconds=10
set color_cmdline_attr=default
set color_cmdline_bg=default
set color_cmdline_fg=252
set color_cur_sel_attr=default
set color_error=196
set color_info=220
set color_separator=234
set color_statusline_attr=default
set color_statusline_bg=234
set color_statusline_fg=168
set color_titleline_attr=default
set color_titleline_bg=default
set color_titleline_fg=204
set color_trackwin_album_attr=bold
set color_trackwin_album_bg=default
set color_trackwin_album_fg=default
set color_win_attr=default
set color_win_bg=default
set color_win_cur=204
set color_win_cur_attr=default
set color_win_cur_sel_attr=default
set color_win_cur_sel_bg=235
set color_win_cur_sel_fg=204
set color_win_dir=250
set color_win_fg=252
set color_win_inactive_cur_sel_attr=default
set color_win_inactive_cur_sel_bg=233
set color_win_inactive_cur_sel_fg=204
set color_win_inactive_sel_attr=default
set color_win_inactive_sel_bg=234
set color_win_inactive_sel_fg=204
set color_win_sel_attr=default
set color_win_sel_bg=235
set color_win_sel_fg=168
set color_win_title_attr=default
set color_win_title_bg=234
set color_win_title_fg=168
set confirm_run=true
set continue=true
set continue_album=true
set device=/dev/cdrom
set display_artist_sort_name=false
set dsp.alsa.device=
set dsp.jack.resampling_quality=2
set dsp.jack.server_name=
set dsp.oss.device=
set follow=true
set format_current= %a - %l -%3n. %t%= %y
set format_playlist= %-21%a %3n. %t%= %y %d %{?X!=0?%3X ? }
set format_playlist_va= %-21%A %3n. %t (%a)%= %y %d %{?X!=0?%3X ? }
set format_statusline= %{status} %{?show_playback_position?%{position} %{?duration?/ %{duration} }?%{?duration?%{duration} }}- %{total} %{?bpm>0?at %{bpm} BPM }%{?volume>=0?vol: %{?lvolume!=rvolume?%{lvolume},%{rvolume} ?%{volume} }}%{?stream?buf: %{buffer} }%{?show_current_bitrate & bitrate>=0? %{bitrate} kbps }%=%{?repeat_current?repeat current?%{?play_library?%{playlist_mode} from %{?play_sorted?sorted }library?playlist}} | %1{continue}%1{follow}%1{repeat}%1{shuffle}
set format_title=%a - %l - %t (%y)
set format_trackwin=%3n. %t%= %y %d
set format_trackwin_album= %l %= %{albumduration}
set format_trackwin_va=%3n. %t (%a)%= %y %d
set format_treewin= %l
set format_treewin_artist=%a
set icecast_default_charset=ISO-8859-1
set id3_default_charset=ISO-8859-1
set input.aac.priority=50
set input.cdio.cddb_url=freedb.freedb.org:8880
set input.cdio.priority=50
set input.cue.priority=50
set input.ffmpeg.priority=30
set input.flac.priority=50
set input.mad.priority=55
set input.modplug.priority=50
set input.opus.priority=50
set input.vorbis.priority=50
set input.wav.priority=50
set input.wavpack.priority=50
set lib_add_filter=
set lib_sort=albumartist date album discnumber tracknumber title filename play_count
set mixer.alsa.channel=
set mixer.alsa.device=
set mixer.oss.channel=PCM
set mixer.oss.device=
set mixer.pulse.restore_volume=1
set mouse=false
set mpris=true
set output_plugin=pulse
set passwd=
set pl_sort=
set play_library=true
set play_sorted=true
set repeat=false
set repeat_current=false
set replaygain=disabled
set replaygain_limit=true
set replaygain_preamp=0.000000
set resume=false
set rewind_offset=5
set scroll_offset=2
set set_term_title=true
set show_all_tracks=true
set show_current_bitrate=false
set show_hidden=false
set show_playback_position=true
set show_remaining_time=true
set shuffle=false
set skip_track_info=false
set smart_artist_sort=true
set softvol=true
set softvol_state=90 90
set start_view=tree
set status_display_program=
set stop_after_queue=false
set time_show_leading_zero=true
set tree_width_max=0
set tree_width_percent=33
set wrap_search=true
bind browser backspace browser-up
bind browser i toggle show_hidden
bind browser space win-activate
bind browser u win-update
bind common ! push shell
bind common + vol +10%
bind common , seek -1m
bind common - vol -10%
bind common . seek +1m
bind common / search-start
bind common 1 view tree
bind common 2 view sorted
bind common 3 view playlist
bind common 4 view queue
bind common 5 view browser
bind common 6 view filters
bind common 7 view settings
bind common = vol +10%
bind common ? search-b-start
bind common C toggle continue
bind common D win-remove
bind common E win-add-Q
bind common F push filter
bind common G win-bottom
bind common I echo {}
bind common L push live-filter
bind common M toggle play_library
bind common N search-prev
bind common P win-mv-before
bind common U win-update-cache
bind common [ vol +1% +0
bind common ] vol +0 +1%
bind common ^B win-page-up
bind common ^C echo Type :quit<enter> to exit cmus.
bind common ^D win-half-page-down
bind common ^E win-scroll-down
bind common ^F win-page-down
bind common ^L refresh
bind common ^R toggle repeat_current
bind common ^U win-half-page-up
bind common ^Y win-scroll-up
bind common a win-add-l
bind common b player-next
bind common c player-pause
bind common delete win-remove
bind common down win-down
bind common e win-add-q
bind common end win-bottom
bind common enter win-activate
bind common f toggle follow
bind common g win-top
bind common h seek -5
bind common home win-top
bind common i win-sel-cur
bind common j win-down
bind common k win-up
bind common l seek +5
bind common left seek -5
bind common m toggle aaa_mode
bind common mlb_click_bar player-pause
bind common mlb_click_selected win-activate
bind common mouse_scroll_down win-down
bind common mouse_scroll_down_bar seek -5
bind common mouse_scroll_down_title right-view
bind common mouse_scroll_up win-up
bind common mouse_scroll_up_bar seek +5
bind common mouse_scroll_up_title left-view
bind common n search-next
bind common o toggle play_sorted
bind common p win-mv-after
bind common page_down win-page-down
bind common page_up win-page-up
bind common q quit -i
bind common r toggle repeat
bind common right seek +5
bind common s toggle shuffle
bind common space win-toggle
bind common t toggle show_remaining_time
bind common tab win-next
bind common u shell /mnt/Usagichan/Scripts/cmusrefresh.sh
bind common up win-up
bind common v player-stop
bind common x player-play
bind common y win-add-p
bind common z player-prev
bind common { vol -1% -0
bind common } vol -0 -1%
fset 90s=date>=1990&date<2000
fset classical=genre="Classical"
fset missing-tag=!stream&(artist=""|album=""|title=""|tracknumber=-1|date=-1)
fset mp3=filename="*.mp3"
fset ogg=filename="*.ogg"
fset ogg-or-mp3=ogg|mp3
fset unheard=play_count=0
factivate

Binary file not shown.

View file

@ -0,0 +1,29 @@
set softvol=true
colorscheme nightzoop
colorscheme night
q
colorscheme
ColorTheme
ColorScheme
theme
help
bind -f common u shell /mnt/Usagichan/Scripts/cmusrefresh.sh
add /mnt/Pyon/Music
update-cache
updatecache
filter
filter genre="drumnbass"
filter genre="drumandbass"
filter genre="dnb"
filter genre="drum n bass"
refreshcache
update
colorscheme default
bind common <key> colorscheme
colorscheme octa256
colorscheme octa256.theme
colorscheme night.theme
live-filter
colourscheme night.theme
colourscheme night
colortheme night

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1 @@
/mnt/Pyon/Music/Rage Against the Machine Studio Albums/Rage Against the Machine/07 Rage Against the Machine - Wake UpWake UpRage Against the MachineWake UpRage Against the MachineMetal.flac

View file

@ -0,0 +1,100 @@
yorushika
donda 2
kanye
daughter
ex:re
feed me
strokes
bowie
infected mus
infected
bjork
mushroom
flamingo
sauce
sungazer
lorde
igorrr
infected mushroom
jack
good kid
breakbot
plastic love
lord of
celldweller
the qemists
the prodi
join
join the
timeless
faithless
radiohead
avec
le
stromae
jackal
Ex:re
Hozier
Mariya Take
andy lau
l'enfer
boa
ghost
Ghost
DEATH
death
opeth
metal
blackstar
haibane
sleeping dogs
technorch
rammstein
gorillaz
NF
humanoid
new york
kosheen
madu
rudimental
makoto
panic at the
evange
golden disco
rammste
queenstons
dnb
king gnu
haji
everyone
to the moon
everone you know
psycho
psycho pass
kimi
death devil
CLOUDS
eminem
drum
techno
kda
daoko
soothsayer
ningen
chet
blue flow
refrain
aoi inori
renmei
soundtrack
xxxtent
xxxtentacion
xxx
lucas
cyberpuh
the drive---------------
everyone you know
red velvet
holcicka
黑蝙蝠中队
fleetwood

View file

@ -0,0 +1,5 @@
--ignore-gpu-blocklist
--enable-gpu-rasterization
--enable-zero-copy
--enable-features=VaapiVideoDecoder
--use-gl=desktop

View file

@ -0,0 +1,3 @@
feh -B black \
-Z \
-.

View file

@ -0,0 +1,7 @@
foreground #0ABDC6
#background #000B1E
cursor #eab9e0
background #0d0d0d
color2 #d300c4
color10 #d300c4

View file

@ -0,0 +1,58 @@
" Autorun
set number
syntax on
filetype plugin indent on
" indents
set smartindent
set autoindent
" always show status bar
set laststatus=2
" 256 colours
set t_Co=256
set t_ut=
" code like tab/stab
nmap <Tab> >>
imap <S-Tab> <Esc><<i
nmap <S-tab> <<
" Plugins
call plug#begin()
" Discord presence
Plug 'andweeb/presence.nvim'
Plug 'honza/vim-snippets'
Plug 'preservim/nerdtree'
" Status bar
Plug 'itchyny/lightline.vim'
" Intellisense
Plug 'neoclide/coc.nvim', {'branch': 'release'}
" Terminal
Plug 'akinsho/toggleterm.nvim'
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-r> :NERDTreeFocus<CR>
" set
let g:toggleterm_terminal_mapping = '<C-t>'
" or manually...
autocmd TermEnter term://*toggleterm#*
\ tnoremap <silent><c-e> <Cmd>exe v:count1 . "ToggleTerm"<CR>
" By applying the mappings this way you can pass a count to your
" mapping to open a specific window.
" For example: 2<C-t> will open terminal 2
nnoremap <silent><c-e> <Cmd>exe v:count1 . "ToggleTerm"<CR>
inoremap <silent><c-e> <Esc><Cmd>exe v:count1 . "ToggleTerm"<CR>
call plug#end()

View file

@ -0,0 +1,425 @@
#################################
# Corners #
#################################
# requires: https://github.com/sdhand/compton
corner-radius = 6;
rounded-corners-exclude = [
#"window_type = 'normal'",
"class_g = 'Polybar'",
"class_g = 'Dunst'",
"window_type = 'tooltip'"
];
round-borders = 5;
round-borders-exclude = [];
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 12;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
shadow-opacity = 0.4
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -5;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -5;
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue)
shadow-color = "#000000"
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [];
# Specify a list of conditions of windows that should have no shadow painted over, such as a dock window.
# clip-shadow-above = []
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = false;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
##fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
##fade-out-step = 0.03;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
##fade-delta = 5
# Specify a list of conditions of windows that should not be faded.
# don't need this, we disable fading for all normal windows with wintypes: {}
##fade-exclude = [];
# Do not fade on window open/close.
#no-fading-openclose = true
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
#no-fading-destroyed-argb = true
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
inactive-opacity = 1.0;
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
#frame-opacity = 0.7;
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0
# inactive-opacity-override = true
inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should always be considered focused.
focus-exclude = [
"class_g = 'zoom'"
];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
opacity-rule = [
"80:class_g = 'i3lock'",
"90:class_g = 'Alacritty'",
"90:class_g = 'kitty'",
"80:class_g = 'yad'"
];
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = true;
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false;
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false;
blur: {
method = "kawase";
kern = "11x11gaussian";
strength = 5;
background = false;
background-frame = false;
background-fixed = false;
}
blur-background-exclude = [
#"!focused",
"class_g = 'slop'",
"class_g = 'Dunst'",
"class_g = 'Escrotum'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
#experimental-backends = true;
backend = "glx";
#backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true;
#dbe = false
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
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.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 60
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with
# vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#
sw-opti = true;
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
use-ewmh-active-win = true
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows. paint-on-overlay may make the flickering less obvious.
#
unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
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 = false
detect-client-leader = true
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
glx-no-stencil = true
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ''
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "info";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '/path/to/your/log/file'
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = false; shadow = false; opacity = 0.75; focus = true; full-shadow = false; };
tooltip = { fade = false; shadow = false; opacity = 0.75; focus = true; full-shadow = false; };
popup_menu = { opacity = 0.8; }
dropdown_menu = { opacity = 0.8; }
};

View file

@ -0,0 +1,3 @@
#!/bin/sh
checkupdates | wc -l

View file

@ -0,0 +1,510 @@
[fonts]
opensansreg = DroidSans:Regular:size=8
opensanssemibold = DroidSans:SemiBold:size=8
opensansbold = DroidSans:Bold:size=8
opensansboldhigh = DroidSans:Bold:size=11
opensansital = DroidSans:Italic:size=9
xos = xos4\ Terminus:size=14;0
nerd = TerminessTTF Nerd Font:size=12;0
nerdsym = Symbols Nerd Font:size=12
[colors]
light-red = #D95B5B
light-green = #249824
light-purple = #A44BA0
menucol-yellow = #F7F272
menucol-blue = #1771F1
menucol-orange = #FFAF60
menucol-red = #F85C50
menucol-green = #77BD8B
menucol-sealine = #00CF91
menucol-purple = #9A76B3
menucol-pink = #FF77BF
menucol-deepblue = #6560FF
menucol-lightblue = #60FFF7
menucol-peagreen = #30C154
menucol-eth = #ADD8E6
orangebby = #ddcc4738
fav-purple = #6633FF
uwu-purple = #000B1E
uwutp-purple = #dd000B1E
blackbaby = #dd0f0f0f
dark = #111
dark-red = #311
dark-green = #131
dark-purple = #201134
light = #eee
gray = #999
dark-gray = #333
[bar/main]
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 20 ;px
background = ${colors.blackbaby}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 3
;separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
;tray-position = right
modules-left = bspwm
modules-center = mediaplayer media
modules-right = crypto updates layout temperature memory memoryswap cpu popup-calendar sound
[bar/secondary]
monitor = ${env:MONITOR:DP-1}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 20 ;px
background = ${colors.blackbaby}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 3
;separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
;tray-position = right
modules-left = bspwm
modules-center = mediaplayer media
modules-right =
[bar/third]
monitor = ${env:MONITOR:DP-2}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 20 ;px
background = ${colors.blackbaby}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 3
;separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
tray-position = left
modules-left = bspwm
modules-center =
modules-right =
;Date correction
[module/date]
type = internal/date
time = %H:%M
date = %A, %B %d
date-alt = %A, %B %d, %Y
time-alt = %H:%M:%S
format-prefix = " "
format-padding = 2
format-underline = ${colors.menucol-orange}
format-foreground = ${colors.menucol-orange}
interval = 20
label = %date%, %time%
label-font = 2
label-foreground = ${colors.light}
;Checkupdates
[module/updates]
type = custom/script
format = <label>
exec = ~/.config/polybar/checkupdates.sh
interval = 600
label-font = 3
label-foreground = ${colors.light}
label-layout-foreground = ${colors.light}
format-padding = 2
format-prefix = " "
format-foreground = ${colors.menucol-peagreen}
format-underline = ${colors.menucol-peagreen}
;Workspaces
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
;strip-wsnumbers = true
index-sort = true
format = <label-state> <label-mode>
label-dimmed-underline = ${colors.background}
;On editing mode (resize for ex)
label-mode = %mode%
label-mode-background = ${colors.dark-purple}
label-mode-underline = ${colors.fav-purple}
label-mode-padding = 5
label-mode-font = 3
; the %name% were %index%
label-focused = %name%
label-focused-background = ${colors.dark-green}
label-focused-underline = ${colors.light-green}
label-focused-padding = 2
label-focused-font = 3
label-unfocused = %name%
label-unfocused-foreground = ${colors.gray}
label-unfocused-padding = 2
label-unfocused-font = 3
label-visible = %name%
label-visible-background = ${colors.dark-purple}
label-visible-underline = ${colors.light-purple}
label-visible-padding = 2
label-visible-font = 3
label-urgent = %name%
label-urgent-background = ${colors.dark-red}
label-urgent-underline = ${colors.light-red}
label-urgent-padding = 2
label-urgent-font = 3
;Media Player
[module/mediaplayer]
type = custom/script
format = <label>
format-padding = 2
exec = ~/.config/polybar/player.sh
exec-if = playerctl status
interval = 0.5
label-font = 3
click-middle = playerctl play-pause
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
[module/popup-calendar]
type = custom/script
exec = ~/.config/polybar/popup-calendar.sh
label-font = 3
label-foreground = ${colors.light}
format-prefix = " "
format-padding = 2
format-underline = ${colors.menucol-orange}
format-foreground = ${colors.menucol-orange}
interval = 5
click-left = ~/.config/polybar/popup-calendar.sh --popup &
[module/crypto]
type = custom/script
exec = sh ~/.config/polybar/eth.sh
label-font = 3
label-foreground = ${colors.light}
format-prefix = " "
format-padding = 3
format-underline = ${colors.menucol-eth}
;format-foreground = ${colors.menucol-eth}
interval = 600
[module/settings]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sh ~/.config/i3/settings.sh
[module/appfilemanager]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = "thunar > /dev/null 2>&1 &"
[module/xkillapp]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sleep 0.5 && xkill > /dev/null 2>&1 &
;Network
[module/wifi]
type = internal/network
interface = wlp3s0
format-connected =  <ramp-signal>
format-connected-padding = 2
format-connected-foreground = ${colors.menucol-green}
format-connected-underline = ${colors.menucol-green}
format-disconnected = " "
format-disconnected-font = 7
format-disconnected-padding = 2
format-disconnected-foreground = ${colors.menucol-yellow}
format-disconnected-underline = ${colors.menucol-yellow}
ramp-signal-0 = " "
ramp-signal-1 = "▂"
ramp-signal-2 = "▄"
ramp-signal-3 = "▅"
ramp-signal-4 = "▇"
ramp-signal-font = 7
ramp-signal-foreground = ${colors.light}
;Sound
[module/sound]
type = internal/alsa
format-volume = <ramp-volume> <label-volume>
format-volume-padding = 2
format-volume-underline = ${colors.menucol-sealine}
label-volume = %percentage%
label-volume-font = 3
label-muted =  %percentage%
label-muted-font = 3
label-muted-padding = 2
label-muted-foreground = ${colors.gray}
label-muted-underline = ${colors.gray}
ramp-volume-0 = " "
ramp-volume-1 = " "
ramp-volume-2 = " "
ramp-volume-font = 7
ramp-volume-foreground = ${colors.menucol-sealine}
;Brightness
[module/brightness]
type = internal/xbacklight
format = <label>
format-padding = 2
format-prefix = " "
format-underline = ${colors.menucol-yellow}
format-prefix-foreground = ${colors.menucol-yellow}
label = " %percentage%"
label-font = 3
;Keyboard Layout
[module/layout]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = caps lock
blacklist-2 = scroll lock
format-prefix = ""
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
format-padding = 3
label-layout = %layout%
label-layout-font = 2
label-layout-foreground = ${colors.light}
;Keyboard lock states by xkeyboard
[module/xkbstates]
type = internal/xkeyboard
format = <label-indicator>
;format-underline = ${colors.menucol-green}
format-padding = 4
label-indicator-on-capslock = "%{F#743791} "
label-indicator-off-capslock = "%{F#333} "
label-indicator-on-numlock = "%{F#743791} "
label-indicator-off-numlock = "%{F#333} "
label-indicator-on-scrolllock = "%{F#743791}"
label-indicator-off-scrolllock = "%{F#333}"
;Keyboard lock states
[module/kbstates]
type = custom/script
format = <label>
format-underline = ${colors.menucol-green}
format-padding = 2
exec = $HOME/.config/polybar/kblocks.py
interval = 0.5
label-font = 7
label-foreground = ${colors.menucol-green}
;Custom Exit Button
[module/powermenu]
type = custom/text
content = ⏻
content-font = 7
content-padding = 2
content-foreground = ${colors.menucol-lightblue}
content-underline = ${colors.menucol-lightblue}
click-left = sh ~/.config/i3/powermenu.sh
;Battery Indicator
[module/battery]
type = internal/battery
battery = BAT1
full-at = 100
format-charging = <animation-charging> <label-charging>
format-charging-padding = 2
format-charging-underline = ${colors.menucol-orange}
format-discharging = <animation-discharging> <label-discharging>
format-discharging-padding = 2
format-discharging-underline = ${colors.menucol-orange}
label-charging = %percentage%
label-charging-font = 3
label-discharging = %percentage%
label-discharging-font = 3
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750
animation-charging-foreground = ${colors.menucol-orange}
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
animation-discharging-5 = 
animation-discharging-6 = 
animation-discharging-7 = 
animation-discharging-8 = 
animation-discharging-9 = 
animation-discharging-framerate = 750
animation-discharging-foreground = ${colors.menucol-orange}
[module/cpu]
type = internal/cpu
interval = 3
format = <label>%
format-padding = 2
format-underline = ${colors.menucol-red}
format-prefix = " "
format-prefix-foreground = ${colors.menucol-red}
label = " %percentage%"
label-font = 3
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-purple}
format-prefix = " "
format-prefix-foreground = ${colors.menucol-purple}
label = " %gb_used%"
label-font = 3
[module/memoryswap]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-pink}
format-prefix = " "
format-prefix-foreground = ${colors.menucol-pink}
label = " %gb_swap_used%"
label-font = 3
[module/temperature]
type = internal/temperature
interval = 0.5
format = <ramp> <label>
format-padding = 2
format-underline = ${colors.menucol-deepblue}
format-warn = <ramp> <label-warn>
label = %temperature-c%
label-font = 3
label-warn = "%temperature-c% "
label-warn-font = 3
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-font = 7
ramp-foreground = ${colors.menucol-deepblue}

View file

@ -0,0 +1,478 @@
[fonts]
opensansreg = DroidSans:Regular:size=8
opensanssemibold = DroidSans:SemiBold:size=8
opensansbold = DroidSans:Bold:size=8
opensansboldhigh = DroidSans:Bold:size=11
opensansital = DroidSans:Italic:size=9
xos = xos4\ Terminus:size=14;0
nerd = TerminessTTF Nerd Font:size=12;0
[colors]
light-red = #D95B5B
light-green = #249824
light-purple = #A44BA0
menucol-yellow = #F7F272
menucol-blue = #1771F1
menucol-orange = #FFAF60
menucol-red = #F85C50
menucol-green = #77BD8B
menucol-sealine = #00CF91
menucol-purple = #9A76B3
menucol-pink = #FF77BF
menucol-deepblue = #6560FF
menucol-lightblue = #60FFF7
fav-purple = #6633FF
uwu-purple = #000B1E
dark = #111
dark-red = #311
dark-green = #131
dark-purple = #201134
light = #eee
gray = #999
dark-gray = #333
[bar/main]
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwu-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = i3
tray-position = right
modules-left = workspaces xkbstates xkillapp appfilemanager
modules-center = mediaplayer media
modules-right = updates-aurpac layout temperature memory memoryswap cpu date sound
[bar/secondary]
monitor = ${env:MONITOR:DP-1}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwu-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = i3
tray-position = right
modules-left = workspaces xkbstates xkillapp appfilemanager
modules-center = mediaplayer media
modules-right =
[bar/third]
monitor = ${env:MONITOR:DP-2}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwu-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = i3
tray-position = left
modules-left = workspaces xkbstates xkillapp appfilemanager
modules-center =
modules-right =
;Date correction
[module/date]
type = internal/date
time = %H:%M
date = %A, %B %d
date-alt = %A, %B %d, %Y
time-alt = %H:%M:%S
format-prefix = " "
format-padding = 2
format-underline = ${colors.menucol-orange}
format-foreground = ${colors.menucol-orange}
interval = 20
label = %date%, %time%
label-font = 2
label-foreground = ${colors.light}
;Workspaces
[module/workspaces]
type = internal/i3
pin-workspaces = true
;strip-wsnumbers = true
index-sort = true
format = <label-state> <label-mode>
label-dimmed-underline = ${colors.background}
;On editing mode (resize for ex)
label-mode = %mode%
label-mode-background = ${colors.dark-purple}
label-mode-underline = ${colors.fav-purple}
label-mode-padding = 2
label-mode-font = 3
; the %name% were %index%
label-focused = %name%
label-focused-background = ${colors.dark-green}
label-focused-underline = ${colors.light-green}
label-focused-padding = 3
label-focused-font = 3
label-unfocused = %name%
label-unfocused-foreground = ${colors.gray}
label-unfocused-padding = 3
label-unfocused-font = 3
label-visible = %name%
label-visible-background = ${colors.dark-purple}
label-visible-underline = ${colors.light-purple}
label-visible-padding = 3
label-visible-font = 3
label-urgent = %name%
label-urgent-background = ${colors.dark-red}
label-urgent-underline = ${colors.light-red}
label-urgent-padding = 3
label-urgent-font = 3
;Media Player
[module/mediaplayer]
type = custom/script
format = <label>
format-padding = 2
exec = ~/.config/polybar/player.sh
exec-if = playerctl status
interval = 0.5
label-font = 3
click-middle = playerctl play-pause
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
;AUR updates
[module/aurupdates]
type = custom/script
format = <label>
format-padding = 2
exec = ~/.config/polybar/updates-aur.sh
interval = 10
label-font = 3
[module/updates-pacman-aurhelper]
type = custom/script
exec = ~/.config/polybar/updates-aurpac.sh
interval = 600
[module/settings]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sh ~/.config/i3/settings.sh
[module/appfilemanager]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = "nautilus > /dev/null 2>&1 &"
[module/xkillapp]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sleep 0.5 && xkill > /dev/null 2>&1 &
;Network
[module/wifi]
type = internal/network
interface = wlp3s0
format-connected =  <ramp-signal>
format-connected-padding = 2
format-connected-foreground = ${colors.menucol-green}
format-connected-underline = ${colors.menucol-green}
format-disconnected = " "
format-disconnected-font = 7
format-disconnected-padding = 2
format-disconnected-foreground = ${colors.menucol-yellow}
format-disconnected-underline = ${colors.menucol-yellow}
ramp-signal-0 = " "
ramp-signal-1 = "▂"
ramp-signal-2 = "▄"
ramp-signal-3 = "▅"
ramp-signal-4 = "▇"
ramp-signal-font = 7
ramp-signal-foreground = ${colors.light}
;Sound
[module/sound]
type = internal/alsa
format-volume = <ramp-volume> <label-volume>
format-volume-padding = 2
format-volume-underline = ${colors.menucol-sealine}
label-volume = %percentage%
label-volume-font = 3
label-muted =  %percentage%
label-muted-font = 3
label-muted-padding = 2
label-muted-foreground = ${colors.gray}
label-muted-underline = ${colors.gray}
ramp-volume-0 = " "
ramp-volume-1 = " "
ramp-volume-2 = " "
ramp-volume-font = 7
ramp-volume-foreground = ${colors.menucol-sealine}
;Brightness
[module/brightness]
type = internal/xbacklight
format = <label>
format-padding = 2
format-prefix = ' '
format-underline = ${colors.menucol-yellow}
format-prefix-foreground = ${colors.menucol-yellow}
label = " %percentage%"
label-font = 3
;Keyboard Layout
[module/layout]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = caps lock
blacklist-2 = scroll lock
format-prefix = " "
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
format-padding = 3
label-layout = %layout%
label-layout-font = 2
label-layout-foreground = ${colors.light}
;Keyboard lock states by xkeyboard
[module/xkbstates]
type = internal/xkeyboard
format = <label-indicator>
format-underline = ${colors.menucol-green}
format-padding = 2
label-indicator-on-capslock = "%{F#743791} "
label-indicator-off-capslock = "%{F#333} "
label-indicator-on-numlock = "%{F#743791} "
label-indicator-off-numlock = "%{F#333} "
label-indicator-on-scrolllock = "%{F#743791}"
label-indicator-off-scrolllock = "%{F#333}"
;Keyboard lock states
[module/kbstates]
type = custom/script
format = <label>
format-underline = ${colors.menucol-green}
format-padding = 2
exec = $HOME/.config/polybar/kblocks.py
interval = 0.5
label-font = 7
label-foreground = ${colors.menucol-green}
;Custom Exit Button
[module/powermenu]
type = custom/text
content = ⏻
content-font = 7
content-padding = 2
content-foreground = ${colors.menucol-lightblue}
content-underline = ${colors.menucol-lightblue}
click-left = sh ~/.config/i3/powermenu.sh
;Battery Indicator
[module/battery]
type = internal/battery
battery = BAT1
full-at = 100
format-charging = <animation-charging> <label-charging>
format-charging-padding = 2
format-charging-underline = ${colors.menucol-orange}
format-discharging = <animation-discharging> <label-discharging>
format-discharging-padding = 2
format-discharging-underline = ${colors.menucol-orange}
label-charging = %percentage%
label-charging-font = 3
label-discharging = %percentage%
label-discharging-font = 3
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750
animation-charging-foreground = ${colors.menucol-orange}
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
animation-discharging-5 = 
animation-discharging-6 = 
animation-discharging-7 = 
animation-discharging-8 = 
animation-discharging-9 = 
animation-discharging-framerate = 750
animation-discharging-foreground = ${colors.menucol-orange}
[module/cpu]
type = internal/cpu
interval = 3
format = <label>%
format-padding = 2
format-underline = ${colors.menucol-red}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-red}
label = " %percentage%"
label-font = 3
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-purple}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-purple}
label = " %gb_used%"
label-font = 3
[module/memoryswap]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-pink}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-pink}
label = " %gb_swap_used%"
label-font = 3
[module/temperature]
type = internal/temperature
interval = 0.5
format = <ramp> <label>
format-padding = 2
format-underline = ${colors.menucol-deepblue}
format-warn = <ramp> <label-warn>
label = %temperature-c%
label-font = 3
label-warn = "%temperature-c% "
label-warn-font = 3
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-font = 7
ramp-foreground = ${colors.menucol-deepblue}

View file

@ -0,0 +1,507 @@
[fonts]
opensansreg = DroidSans:Regular:size=8
opensanssemibold = DroidSans:SemiBold:size=8
opensansbold = DroidSans:Bold:size=8
opensansboldhigh = DroidSans:Bold:size=11
opensansital = DroidSans:Italic:size=9
xos = xos4\ Terminus:size=14;0
nerd = TerminessTTF Nerd Font:size=12;0
[colors]
light-red = #D95B5B
light-green = #249824
light-purple = #A44BA0
menucol-yellow = #F7F272
menucol-blue = #1771F1
menucol-orange = #FFAF60
menucol-red = #F85C50
menucol-green = #77BD8B
menucol-sealine = #00CF91
menucol-purple = #9A76B3
menucol-pink = #FF77BF
menucol-deepblue = #6560FF
menucol-lightblue = #60FFF7
fav-purple = #6633FF
uwu-purple = #000B1E
uwutp-purple = #dd000B1E
blackbaby = #dd0f0f0f
dark = #111
dark-red = #311
dark-green = #131
dark-purple = #201134
light = #eee
gray = #999
dark-gray = #333
[bar/main]
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwutp-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
tray-position = right
modules-left = bspwm xkbstates xkillapp appfilemanager
modules-center = mediaplayer media
modules-right = updates layout temperature memory memoryswap cpu popup-calendar sound
[bar/secondary]
monitor = ${env:MONITOR:DP-1}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwutp-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
tray-position = right
modules-left = bspwm xkbstates xkillapp appfilemanager
modules-center = mediaplayer media
modules-right =
[bar/third]
monitor = ${env:MONITOR:DP-2}
enable-ipc = true
override-redirect = false
bottom = false
width = 100%
height = 22 ;px
background = ${colors.uwutp-purple}
foreground = ${colors.light}
line-color = ${colors.light-purple}
line-size = 2
separator = " | "
;List of fonts
font-0 = ${fonts.opensansreg}
font-1 = ${fonts.opensanssemibold}
font-2 = ${fonts.opensansbold}
font-3 = ${fonts.opensansital}
font-4 = ${fonts.xos}
font-5 = ${fonts.nerd}
font-6 = ${fonts.opensansboldhigh}
wm-restack = bspwm
tray-position = left
modules-left = bspwm xkbstates xkillapp appfilemanager
modules-center =
modules-right =
;Date correction
[module/date]
type = internal/date
time = %H:%M
date = %A, %B %d
date-alt = %A, %B %d, %Y
time-alt = %H:%M:%S
format-prefix = " "
format-padding = 2
format-underline = ${colors.menucol-orange}
format-foreground = ${colors.menucol-orange}
interval = 20
label = %date%, %time%
label-font = 2
label-foreground = ${colors.light}
;Checkupdates
[module/updates]
type = custom/script
;format = <label>
exec = ~/.config/polybar/checkupdates.sh
interval = 600
label-font = 3
label-layout-foreground = ${colors.light}
format-underline = ${colors.menucol-blue}
;format-foreground = ${colors.menucol-blue}
format-padding = 2
format-prefix = " "
format-foreground = ${colors.menucol-orange}
;Workspaces
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
;strip-wsnumbers = true
index-sort = true
format = <label-state> <label-mode>
label-dimmed-underline = ${colors.background}
;On editing mode (resize for ex)
label-mode = %mode%
label-mode-background = ${colors.dark-purple}
label-mode-underline = ${colors.fav-purple}
label-mode-padding = 3
label-mode-font = 3
; the %name% were %index%
label-focused = %name%
label-focused-background = ${colors.dark-green}
label-focused-underline = ${colors.light-green}
label-focused-padding = 4
label-focused-font = 3
label-unfocused = %name%
label-unfocused-foreground = ${colors.gray}
label-unfocused-padding = 5
label-unfocused-font = 3
label-visible = %name%
label-visible-background = ${colors.dark-purple}
label-visible-underline = ${colors.light-purple}
label-visible-padding = 4
label-visible-font = 3
label-urgent = %name%
label-urgent-background = ${colors.dark-red}
label-urgent-underline = ${colors.light-red}
label-urgent-padding = 4
label-urgent-font = 3
;Media Player
[module/mediaplayer]
type = custom/script
format = <label>
format-padding = 2
exec = ~/.config/polybar/player.sh
exec-if = playerctl status
interval = 0.5
label-font = 3
click-middle = playerctl play-pause
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
[module/popup-calendar]
type = custom/script
exec = ~/.config/polybar/popup-calendar.sh
label-font = 3
format-prefix = " "
format-padding = 2
format-underline = ${colors.menucol-orange}
format-foreground = ${colors.menucol-orange}
interval = 5
click-left = ~/.config/polybar/popup-calendar.sh --popup &
;AUR updates
[module/aurupdates]
type = custom/script
format = <label>
format-padding = 2
exec = ~/.config/polybar/updates-aur.sh
interval = 10
label-font = 3
[module/updates-pacman-aurhelper]
type = custom/script
exec = ~/.config/polybar/updates-aurpac.sh
interval = 600
[module/settings]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sh ~/.config/i3/settings.sh
[module/appfilemanager]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = "thunar > /dev/null 2>&1 &"
[module/xkillapp]
type = custom/text
content = 
content-font = 7
content-padding = 2
click-left = sleep 0.5 && xkill > /dev/null 2>&1 &
;Network
[module/wifi]
type = internal/network
interface = wlp3s0
format-connected =  <ramp-signal>
format-connected-padding = 2
format-connected-foreground = ${colors.menucol-green}
format-connected-underline = ${colors.menucol-green}
format-disconnected = " "
format-disconnected-font = 7
format-disconnected-padding = 2
format-disconnected-foreground = ${colors.menucol-yellow}
format-disconnected-underline = ${colors.menucol-yellow}
ramp-signal-0 = " "
ramp-signal-1 = "▂"
ramp-signal-2 = "▄"
ramp-signal-3 = "▅"
ramp-signal-4 = "▇"
ramp-signal-font = 7
ramp-signal-foreground = ${colors.light}
;Sound
[module/sound]
type = internal/alsa
format-volume = <ramp-volume> <label-volume>
format-volume-padding = 2
format-volume-underline = ${colors.menucol-sealine}
label-volume = %percentage%
label-volume-font = 3
label-muted =  %percentage%
label-muted-font = 3
label-muted-padding = 2
label-muted-foreground = ${colors.gray}
label-muted-underline = ${colors.gray}
ramp-volume-0 = " "
ramp-volume-1 = " "
ramp-volume-2 = " "
ramp-volume-font = 7
ramp-volume-foreground = ${colors.menucol-sealine}
;Brightness
[module/brightness]
type = internal/xbacklight
format = <label>
format-padding = 2
format-prefix = ' '
format-underline = ${colors.menucol-yellow}
format-prefix-foreground = ${colors.menucol-yellow}
label = " %percentage%"
label-font = 3
;Keyboard Layout
[module/layout]
type = internal/xkeyboard
blacklist-0 = num lock
blacklist-1 = caps lock
blacklist-2 = scroll lock
format-prefix = " "
format-underline = ${colors.menucol-blue}
format-foreground = ${colors.menucol-blue}
format-padding = 3
label-layout = %layout%
label-layout-font = 2
label-layout-foreground = ${colors.light}
;Keyboard lock states by xkeyboard
[module/xkbstates]
type = internal/xkeyboard
format = <label-indicator>
format-underline = ${colors.menucol-green}
format-padding = 2
label-indicator-on-capslock = "%{F#743791} "
label-indicator-off-capslock = "%{F#333} "
label-indicator-on-numlock = "%{F#743791} "
label-indicator-off-numlock = "%{F#333} "
label-indicator-on-scrolllock = "%{F#743791}"
label-indicator-off-scrolllock = "%{F#333}"
;Keyboard lock states
[module/kbstates]
type = custom/script
format = <label>
format-underline = ${colors.menucol-green}
format-padding = 2
exec = $HOME/.config/polybar/kblocks.py
interval = 0.5
label-font = 7
label-foreground = ${colors.menucol-green}
;Custom Exit Button
[module/powermenu]
type = custom/text
content = ⏻
content-font = 7
content-padding = 2
content-foreground = ${colors.menucol-lightblue}
content-underline = ${colors.menucol-lightblue}
click-left = sh ~/.config/i3/powermenu.sh
;Battery Indicator
[module/battery]
type = internal/battery
battery = BAT1
full-at = 100
format-charging = <animation-charging> <label-charging>
format-charging-padding = 2
format-charging-underline = ${colors.menucol-orange}
format-discharging = <animation-discharging> <label-discharging>
format-discharging-padding = 2
format-discharging-underline = ${colors.menucol-orange}
label-charging = %percentage%
label-charging-font = 3
label-discharging = %percentage%
label-discharging-font = 3
animation-charging-0 = 
animation-charging-1 = 
animation-charging-2 = 
animation-charging-3 = 
animation-charging-4 = 
animation-charging-framerate = 750
animation-charging-foreground = ${colors.menucol-orange}
animation-discharging-0 = 
animation-discharging-1 = 
animation-discharging-2 = 
animation-discharging-3 = 
animation-discharging-4 = 
animation-discharging-5 = 
animation-discharging-6 = 
animation-discharging-7 = 
animation-discharging-8 = 
animation-discharging-9 = 
animation-discharging-framerate = 750
animation-discharging-foreground = ${colors.menucol-orange}
[module/cpu]
type = internal/cpu
interval = 3
format = <label>%
format-padding = 2
format-underline = ${colors.menucol-red}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-red}
label = " %percentage%"
label-font = 3
[module/memory]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-purple}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-purple}
label = " %gb_used%"
label-font = 3
[module/memoryswap]
type = internal/memory
interval = 3
format = <label>
format-padding = 2
format-underline = ${colors.menucol-pink}
format-prefix = ' '
format-prefix-foreground = ${colors.menucol-pink}
label = " %gb_swap_used%"
label-font = 3
[module/temperature]
type = internal/temperature
interval = 0.5
format = <ramp> <label>
format-padding = 2
format-underline = ${colors.menucol-deepblue}
format-warn = <ramp> <label-warn>
label = %temperature-c%
label-font = 3
label-warn = "%temperature-c% "
label-warn-font = 3
ramp-0 = 
ramp-1 = 
ramp-2 = 
ramp-3 = 
ramp-4 = 
ramp-font = 7
ramp-foreground = ${colors.menucol-deepblue}

View file

@ -0,0 +1,3 @@
#!bin/dash
curl -s https://api.coinbase.com/v2/prices/ETH-EUR/spot | sed -n 's|.*"amount":"\([^"]*\)".*|\1|p'

View file

@ -0,0 +1 @@
{"data":{"base":"ETH","currency":"EUR","amount":"3834.16"}}

View file

@ -0,0 +1,14 @@
#!/usr/bin/env python3
import os
import sys
res = os.popen("xset -q | grep 'Caps Lock'").read().split()
res = [res[3], res[7], res[11]]
arr = {"on": "%{F#77BD8B}", "off": "%{F#333}"}
keys = ["", "", ""]
print(" ".join([
arr[v]+keys[i] for i, v in enumerate(res)
]))
sys.stdout.flush()

View file

@ -0,0 +1,15 @@
#!/bin/bash
# Terminate already running bar instances
killall -q i3bar
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch Polybar, using default config location ~/.config/polybar/config
polybar main &
polybar secondary &
polybar third
echo "Polybar launched..."

View file

@ -0,0 +1,23 @@
MIT License
Copyright (c) 2021 Antonin Fischer (raven2cz)
https://fishlive.org
https://github.com/raven2cz
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.

View file

@ -0,0 +1,148 @@
# Advanced Polybar Module Configuration (MX-Linux/Debian and Arch Distros)
Polybar configuration with patched and improved modules for Awesome, i3 and XFCE4. Base design fits to **MX-Linux (Debian Stable) and Arch Distros**.
## Inherited and extended sources
This project configures and extend github polybar sources from
* **polybar-themes (adi1090x)** - forest theme - https://github.com/adi1090x/polybar-themes
* **polywins (alnj)** - https://github.com/alnj/polywins
* **polybar-mpris (0jdxt)** - https://github.com/0jdxt/polybar-mpris
* **polybar-scripts** - https://github.com/polybar/polybar-scripts
* **dotfiles by Derek Taylor (DT)** - https://gitlab.com/dwt1/dotfiles
* **My personal scripts** and modifications for several modules
*NOTE:* If you love this polybar - please add **git stars to listed projects!**
## Screenshots
##### Polybar Forest/Default in AwesomeWM
![Polybar Forest/Gruvbox FXCE4 with MPRIS (Spotify) Example](images/polybar-example-3-awesomewm.jpg)
##### Polybar Forest/Gruvbox FXCE4 with MPRIS - Spotify, Netflix, Youtube, text cycling and improved controls Example
![Polybar Forest/Gruvbox FXCE4 with MPRIS (Spotify) Example](images/polybar-example-2.jpg)
##### Polybar Forest/Default i3 Configured Modules Example
![Polybar Forest/Default i3 Configured Modules Example](images/polybar-example-1.jpg)
## MAIN GOALs
The main goal of this project is complete and enhanced configuration of polybar modules for MX-Linux and Arch systems.
Inherited actual theme is **Forest** with few styles colormaps from:
https://github.com/adi1090x/polybar-themes/tree/master/simple/forest
Supported all modules already included in the polybar-themes project.
### Added Enhanced Modules
* **Weather Module** for Open Weather site with Nerd Fonts.
* **MPRIS Module** - with scrolling and activity icon - support all players Spotify, MPD, Youtube, Netflix,...
* **Polywins Module** - Opened application administration support
* **Network Improved Modules**
* **AMD Ryzen and new AMD GPUs Temperatures Modules**
* **Workspaces Enhanced Module**
* **Update Module** - for MX-Linux and Arch Distros
* **System Module** - for MX-Linux and Arch Distros changed
## Dependencies
Install following programs on your system before you use these themes.
* **Polybar** : Ofcourse, the bar itself
* **Rofi** : App launcher, network, power and style menus
* **networkmanager_dmenu** : network modules (debian only)
* **mpris** and **playerctl** : Spotify and other music services
* **zscroll** : Text cycling library for music player (zscroll-git from AUR or compile it directly from git for Debian)
* **wmctrl** : polywins service library
### Fonts
Here's a list of all fonts used by these themes.
**`Text Fonts`**
- Iosevka Nerd Font
- Noto Sans
- Droid Sans
- Terminus
**`Icon Fonts`**
- Iosevka Nerd Font
- Icomoon Feather
I strictly recommend to call `setup.sh` script from `polybar-themes` git repo, because it is installed all necessary fonts from here:
https://github.com/adi1090x/polybar-themes/tree/master/fonts
### Installation
Follow the steps below to install polybar on your system.
- First, Clone this repository -
```
$ git clone https://github.com/raven2cz/polybar-config
```
- Change to cloned directory and make setup.sh executable -
```
$ cd polybar-config
$ chmod +x scripts/*
```
- Backup your polybar settings (if you already have).
- Copy dir polybar dir `.` to your `~/.config/polybar` user directory.
- **That's it, This polybar is now installed on your system.**
### Polybar Configuration
- Set correct network interfaces
```
In user_modules.ini:
module/networkspeedup
module/networkspeeddown
module/wired-network
# set correct interface parameter
interface = enp38s0
```
- Set correct sensors for your CPU and GPUs
```
In modules.ini:
temp-gpu and temp-cpu modules
call:
for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
and copy required sensors values to the fields.
```
- Set your free/paid OpenWeather API ID and City in script `weather.py`.
**NOTE:** For **AwesomeWM** only, set `modules.ini` module workspaces: `pin-workspaces = false` and `config.ini`: `override-redirect = true`
In addition, there is necessary to make trick - create empty wibar with same length and insert it to same position with polybar.
- **That's it, the polybar is fully configured now.**
### Launch the bar
To launch the bar with the selected theme, Just...
- Open the terminal and enter the following command -
```
$ bash ~/.config/polybar/launch.sh
```
- You can add the same command to your WM *autostart file* to launch the bar on login. For example, to launch the bar at startup on openbox, add following lines in **`$HOME/.config/openbox/autostart`** This polybar is optimized for fce4, i3 and partially for awesomewm. But it can be used for many others VMs with little modifications.
```
## Launch Polybar
bash ~/.config/polybar/launch.sh
```
### Change Colormap of Themes
`Right-Click` to launcher button (left side first button with rofi) starts the **selector of color maps**. Select Look and Feel.

View file

@ -0,0 +1,551 @@
;; ┌────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▄░█▀█░█▀▄░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▄░█▀█░█▀▄░▀▀█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀░░▀░▀░▀░▀░▀▀▀│
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░│
;; └────────────────────────────────────────────────────┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[bar]
fill =
empty =
indicator =
; Nerd font :   ,  ,  樂 籠 錄 , 雷 絛
[module/volume]
type = internal/alsa
; Soundcard to be used
; Usually in the format hw:# where # is the card number
; You can find the different card numbers in `/proc/asound/cards`
master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default
; Name of the master, speaker and headphone mixers
; Use the following command to list available mixer controls:
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
; If master, speaker or headphone-soundcard isn't the default,
; use `amixer -c # scontrols` instead where # is the number
; of the master, speaker or headphone soundcard respectively
;
; Default: Master
master-mixer = Master
; Optionally define speaker and headphone mixers
; Default: none
;;speaker-mixer = Speaker
; Default: none
;;headphone-mixer = Headphone
; NOTE: This is required if headphone_mixer is defined
; Use the following command to list available device controls
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
; You may also need to use `amixer -c # controls` as above for the mixer names
; Default: none
;;headphone-id = 9
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
; Default: false
;;mapped = true
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
; Available tags:
; <label-volume> (default)
; <ramp-volume>
; <bar-volume>
format-volume = <ramp-volume> <bar-volume>
; Available tags:
; <label-muted> (default)
; <ramp-volume>
; <bar-volume>
format-muted = <label-muted>
format-muted-prefix =
format-muted-prefix-foreground = ${color.red}
; Available tokens:
; %percentage% (default)
label-volume = %percentage%%
; Available tokens:
; %percentage% (default
label-muted = " Muted"
label-muted-foreground = ${color.sep}
; Only applies if <ramp-volume> is used
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-foreground = ${color.blue}
; Only applies if <bar-volume> is used
bar-volume-format = "%fill%%indicator%%empty%"
bar-volume-width = 11
bar-volume-gradient = false
bar-volume-indicator = ${bar.indicator}
bar-volume-indicator-foreground = ${color.foreground}
bar-volume-indicator-font = 2
bar-volume-fill = ${bar.fill}
bar-volume-fill-font = 2
bar-volume-foreground-0 = ${color.green}
bar-volume-foreground-1 = ${color.green}
bar-volume-foreground-2 = ${color.yellow}
bar-volume-foreground-3 = ${color.yellow}
bar-volume-foreground-4 = ${color.red}
bar-volume-empty = ${bar.empty}
bar-volume-empty-font = 2
bar-volume-empty-foreground = ${color.sep}
; If defined, it will replace <ramp-volume> when
; headphones are plugged in to `headphone_control_numid`
; If undefined, <ramp-volume> will be used for both
; Only applies if <ramp-volume> is used
ramp-headphones-0 =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/brightness]
;type = internal/xbacklight
type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
;card = intel_backlight
card = amdgpu_bl0
; Available tags:
; <label> (default)
; <ramp>
; <bar>
format = <ramp> <bar>
; Available tokens:
; %percentage% (default)
label = %percentage%%
; Only applies if <ramp> is used
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-foreground = ${color.lime}
; Only applies if <bar> is used
bar-format = "%fill%%indicator%%empty%"
bar-width = 11
bar-gradient = false
bar-indicator = ${bar.indicator}
bar-indicator-foreground = ${color.foreground}
bar-indicator-font = 2
bar-fill = ${bar.fill}
bar-fill-font = 2
bar-foreground-0 = ${color.green}
bar-foreground-1 = ${color.green}
bar-foreground-2 = ${color.yellow}
bar-foreground-3 = ${color.yellow}
bar-foreground-4 = ${color.red}
bar-empty = ${bar.empty}
bar-empty-font = 2
bar-empty-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/battery_bar]
type = internal/battery
; This is useful in case the battery never reports 100% charge
full-at = 99
; Use the following command to list batteries and adapters:
; $ ls -1 /sys/class/power_supply/
battery = BAT1
adapter = ACAD
; If an inotify event haven't been reported in this many
; seconds, manually poll for new values.
;
; Needed as a fallback for systems that don't report events
; on sysfs/procfs.
;
; Disable polling by setting the interval to 0.
;
; Default: 5
poll-interval = 2
; see "man date" for details on how to format the time string
; NOTE: if you want to use syntax tags here you need to use %%{...}
; Default: %H:%M:%S
time-format = %H:%M
; Available tags:
; <label-charging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-charging>
format-charging = <bar-capacity>
format-charging-prefix = ""
format-charging-prefix-foreground = ${color.green}
; Available tags:
; <label-discharging> (default)
; <bar-capacity>
; <ramp-capacity>
; <animation-discharging>
format-discharging = <bar-capacity>
format-discharging-prefix = ""
format-discharging-prefix-foreground = ${color.pink}
; Available tags:
; <label-full> (default)
; <bar-capacity>
; <ramp-capacity>
format-full = <label-full>
format-full-prefix = ""
format-full-prefix-foreground = ${color.red}
; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current charge rate in watts)
label-charging = %percentage%%
; Available tokens:
; %percentage% (default)
; %time%
; %consumption% (shows current discharge rate in watts)
label-discharging = %percentage%%
; Available tokens:
; %percentage% (default)
label-full = Full
; Only applies if <bar-capacity> is used
bar-capacity-format = " %fill%%indicator%%empty%"
bar-capacity-width = 11
bar-capacity-gradient = false
bar-capacity-indicator = ${bar.indicator}
bar-capacity-indicator-font = 2
bar-capacity-indicator-foreground = ${color.foreground}
bar-capacity-fill = ${bar.fill}
bar-capacity-fill-font = 2
bar-capacity-foreground-0 = ${color.green}
bar-capacity-foreground-1 = ${color.green}
bar-capacity-foreground-2 = ${color.yellow}
bar-capacity-foreground-3 = ${color.yellow}
bar-capacity-foreground-4 = ${color.red}
bar-capacity-empty = ${bar.empty}
bar-capacity-empty-font = 2
bar-capacity-empty-foreground = ${color.sep}
bar-fill-font = 2
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu_bar]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 0.5
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
;;format = <label> <ramp-coreload>
format = <bar-load><label>
format-prefix =
format-prefix-foreground = ${color.teal}
; Available tokens:
; %percentage% (default) - total cpu load averaged over all cores
; %percentage-sum% - Cumulative load on all cores
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label = " %percentage%%"
; Only applies if <bar-load> is used
bar-load-format = " %fill%%indicator%%empty%"
bar-load-width = 11
bar-load-gradient = false
bar-load-indicator = ${bar.indicator}
bar-load-indicator-font = 2
bar-load-indicator-foreground = ${color.foreground}
bar-load-fill = ${bar.fill}
bar-load-fill-font = 2
bar-load-foreground-0 = ${color.green}
bar-load-foreground-1 = ${color.green}
bar-load-foreground-2 = ${color.yellow}
bar-load-foreground-3 = ${color.yellow}
bar-load-foreground-4 = ${color.red}
bar-load-empty = ${bar.empty}
bar-load-empty-font = 2
bar-load-empty-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/filesystem_bar]
type = internal/fs
; Mountpoints to display
mount-0 = /
;;mount-1 = /home
;;mount-2 = /var
; Seconds to sleep between updates
; Default: 30
interval = 30
; Display fixed precision values
; Default: false
fixed-values = false
; Spacing between entries
; Default: 2
;;spacing = 4
; Available tags:
; <label-mounted> (default)
; <bar-free>
; <bar-used>
; <ramp-capacity>
format-mounted = <bar-used><label-mounted>
format-mounted-prefix =
format-mounted-prefix-foreground = ${color.purple}
; Available tags:
; <label-unmounted> (default)
format-unmounted = <label-unmounted>
format-unmounted-prefix =
format-unmounted-prefix-foreground = ${color.red}
; Available tokens:
; %mountpoint%
; %type%
; %fsname%
; %percentage_free%
; %percentage_used%
; %total%
; %free%
; %used%
; Default: %mountpoint% %percentage_free%%
label-mounted = " %used%/%total%"
; Available tokens:
; %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = " %mountpoint%: not mounted"
; Only applies if <bar-used> is used
bar-used-format = " %fill%%indicator%%empty%"
bar-used-width = 11
bar-used-gradient = false
bar-used-indicator = ${bar.indicator}
bar-used-indicator-font = 2
bar-used-indicator-foreground = ${color.foreground}
bar-used-fill = ${bar.fill}
bar-used-fill-font = 2
bar-used-foreground-0 = ${color.green}
bar-used-foreground-1 = ${color.green}
bar-used-foreground-2 = ${color.yellow}
bar-used-foreground-3 = ${color.yellow}
bar-used-foreground-4 = ${color.red}
bar-used-empty = ${bar.empty}
bar-used-empty-font = 2
bar-used-empty-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/memory_bar]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 2
; Available tags:
; <label> (default)
; <bar-used>
; <bar-free>
; <ramp-used>
; <ramp-free>
; <bar-swap-used>
; <bar-swap-free>
; <ramp-swap-used>
; <ramp-swap-free>
format = <bar-used><label>
format-prefix =
format-prefix-foreground = ${color.indigo}
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
; %percentage_swap_used%
; %percentage_swap_free%
; %mb_swap_total%
; %mb_swap_free%
; %mb_swap_used%
; %gb_swap_total%
; %gb_swap_free%
; %gb_swap_used%
label = " %mb_used%"
; Only applies if <bar-used> is used
bar-used-format = " %fill%%indicator%%empty%"
bar-used-width = 11
bar-used-gradient = false
bar-used-indicator = ${bar.indicator}
bar-used-indicator-font = 2
bar-used-indicator-foreground = ${color.foreground}
bar-used-fill = ${bar.fill}
bar-used-fill-font = 2
bar-used-foreground-0 = ${color.green}
bar-used-foreground-1 = ${color.green}
bar-used-foreground-2 = ${color.yellow}
bar-used-foreground-3 = ${color.yellow}
bar-used-foreground-4 = ${color.red}
bar-used-empty = ${bar.empty}
bar-used-empty-font = 2
bar-used-empty-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd_bar]
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 = mysecretpassword
; Seconds to sleep between progressbar/song timer sync
; Default: 1
interval = 1
; Available tags:
; <label-song> (default)
; <label-time>
; <bar-progress>
; <toggle> - gets replaced with <icon-(pause|play)>
; <toggle-stop> - gets replaced with <icon-(stop|play)>
; <icon-random>
; <icon-repeat>
; <icon-repeatone> (deprecated)
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
; <icon-consume>
; <icon-prev>
; <icon-stop>
; <icon-play>
; <icon-pause>
; <icon-next>
; <icon-seekb>
; <icon-seekf>
format-online = <label-song><bar-progress><label-time>
format-online-prefix =
format-online-prefix-foreground = ${color.green}
;format-playing = ${self.format-online}
;format-paused = ${self.format-online}
;format-stopped = ${self.format-online}
; Available tags:
; <label-offline>
format-offline = <label-offline>
format-offline-prefix =
format-offline-prefix-foreground = ${color.red}
; Available tokens:
; %artist%
; %album-artist%
; %album%
; %date%
; %title%
; Default: %artist% - %title%
label-song = " %artist% - %title%"
label-song-maxlen = 25
label-song-ellipsis = true
; Available tokens:
; %elapsed%
; %total%
; Default: %elapsed% / %total%
label-time = " %elapsed% / %total%"
; Available tokens:
; None
label-offline = " Offline"
; Only applies if <icon-X> is used
icon-play =
icon-pause =
icon-stop =
icon-next =
icon-prev =
icon-seekf =
icon-seekb =
icon-random =
icon-repeat =
icon-repeatone =
icon-single =
icon-consume =
; Used to display the state of random/repeat/repeatone/single
; Only applies if <icon-[random|repeat|repeatone|single]> is used
toggle-on-foreground = ${color.primary}
toggle-off-foreground = ${color.secondary}
; Only applies if <bar-progress> is used
bar-progress-format = " %fill%%indicator%%empty%"
bar-progress-width = 11
bar-progress-gradient = false
bar-progress-indicator = ${bar.indicator}
bar-progress-indicator-font = 2
bar-progress-indicator-foreground = ${color.foreground}
bar-progress-fill = ${bar.fill}
bar-progress-fill-font = 2
bar-progress-foreground-0 = ${color.green}
bar-progress-foreground-1 = ${color.green}
bar-progress-foreground-2 = ${color.yellow}
bar-progress-foreground-3 = ${color.yellow}
bar-progress-foreground-4 = ${color.red}
bar-progress-empty = ${bar.empty}
bar-progress-empty-font = 2
bar-progress-empty-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -0,0 +1,37 @@
;; ┌────────────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█░░░█▀█░█▀▄░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░░░█░█░█▀▄░▀▀█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀▀▀│
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └────────────────────────────────────────────────────────────┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[color]
;; Use pywal.sh in scripts directory to use colors from an image/wallpaper.
;; main colors
background = #000B1E
foreground = #C4C7C5
sep = #3F5360
white = #FFFFFF
black = #000000
red = #EC7875
pink = #EC407A
purple = #BA68C8
blue = #42A5F5
cyan = #4DD0E1
teal = #00B19F
green = #61C766
lime = #B9C244
yellow = #FF005A
amber = #FBC02D
orange = #E57C46
brown = #AC8476
indigo = #6C77BB
gray = #9E9E9E
blue-gray = #6D8895
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -0,0 +1,299 @@
;; ┌────────────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀▀░█▀█░█▀█░█▀▀░▀█▀░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░░░█░█░█░█░█▀▀░░█░░█░█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀░▀░▀░░░▀▀▀░▀▀▀│
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░│
;; │░Modified By Raven @raven2cz░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └────────────────────────────────────────────────────────────┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Global WM Settings
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; File Inclusion
; include an external file, like module file, etc.
include-file = ~/.config/polybar/bars.ini
include-file = ~/.config/polybar/colors.ini
include-file = ~/.config/polybar/modules.ini
include-file = ~/.config/polybar/user_modules.ini
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Bar Settings
[bar/main]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =
; Use the specified monitor as a fallback if the main one is not found.
monitor-fallback =
; Require the monitor to be in connected state
; XRandR sometimes reports my monitor as being disconnected (when in use)
monitor-strict = false
; Tell the Window Manager not to configure the window.
; Use this to detach the bar if your WM is locking its size/position.
override-redirect = false
; Put the bar at the bottom of the screen
bottom = false
; Prefer fixed center position for the `modules-center` block
; When false, the center position will be based on the size of the other blocks.
fixed-center = true
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
width = 100%
height = 25
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in an offset in the x or y direction
; of 50% minus 10 pixels
offset-x = 0%
offset-y = 0%
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${color.background}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${color.foreground}
; Background gradient (vertical steps)
; background-[0-9]+ = #aarrggbb
;;background-0 =
; Value used for drawing rounded corners
; Note: This shouldn't be used together with border-size because the border
; doesn't get rounded
; Individual top/bottom values can be defined using:
; radius-{top,bottom}
border-size = 0.0
radius = 0.0
radius-top = 0.0
radius-bottom = 0.0
; Under-/overline pixel size and argb color
; Individual values can be defined using:
; {overline,underline}-size
; {overline,underline}-color
line-size = 2
line-color = ${color.background}
; Values applied to all borders
; Individual side values can be defined using:
; border-{left,top,right,bottom}-size
; border-{left,top,right,bottom}-color
; The top and bottom borders are added to the bar height, so the effective
; window height is:
; height + border-top-size + border-bottom-size
; Meanwhile the effective window width is defined entirely by the width key and
; the border is placed withing this area. So you effectively only have the
; following horizontal space on the bar:
; width - border-right-size - border-left-size
border-bottom-size = 0
border-bottom-color = ${color.foreground}
; Number of spaces to add at the beginning/end of the bar
; Individual side values can be defined using:
; padding-{left,right}
padding = 2
; Number of spaces to add before/after each module
; Individual side values can be defined using:
; module-margin-{left,right}
module-margin-left = 1
module-margin-right = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; Fonts are defined using <font-name>;<vertical-offset>
; Font names are specified using a fontconfig pattern.
; font-0 = NotoSans-Regular:size=8;2
; font-1 = MaterialIcons:size=10
; font-2 = Termsynu:size=8;-1
; font-3 = FontAwesome:size=10
; See the Fonts wiki page for more details
font-0 = "Iosevka Nerd Font:size=10;4"
font-1 = "Iosevka Nerd Font:size=10;3"
font-2 = "feather:size=12;3"
font-3 = "Iosevka Nerd Font:size=12;4"
; Modules are added to one of the available blocks
; modules-left = cpu ram
; modules-center = xwindow xbacklight
; modules-right = ipc clock
modules-left = launcher sep workspaces sep weather cpu temp-cpu temp-gpu memory filesystem uptime networkspeedup networkspeeddown wired-network sep
modules-center = term screenshot files browser settings sep polywins
modules-right = sep sep keyboard sep mpris-play-pause mpris volume sep date sep sysmenu
;;updates-common
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; The separator will be inserted between the output of each module
separator =
; Opacity value between 0.0 and 1.0 used on fade in/out
dim-value = 1.0
; Value to be used to set the WM_NAME atom
; If the value is empty or undefined, the atom value
; will be created from the following template: polybar-[BAR]_[MONITOR]
; NOTE: The placeholders are not available for custom values
wm-name =
; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale =
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
tray-position = right
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = false
; Tray icon max size
tray-maxsize = 16
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
tray-background = ${color.background}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 5
; Scale factor for tray clients
tray-scale = 1.0
; Restack the bar window and put it above the
; selected window manager's root
;
; Fixes the issue where the bar is being drawn
; on top of fullscreen window's
;
; Currently supported WM's:
; bspwm
; i3 (requires: `override-redirect = true`)
wm-restack = i3
; Set a DPI values used when rendering text
; This only affects scalable fonts
; dpi =
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
scroll-up =
scroll-down =
double-click-left =
double-click-middle =
double-click-right =
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-click =
cursor-scroll =
;; WM Workspace Specific
; bspwm
;;scroll-up = bspwm-desknext
;;scroll-down = bspwm-deskprev
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
;i3
;;scroll-up = i3wm-wsnext
;;scroll-down = i3wm-wsprev
;;scroll-up = i3-msg workspace next_on_output
;;scroll-down = i3-msg workspace prev_on_output
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; 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
; Compositing operators
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
; Define fallback values used by all module formats
;format-foreground =
;format-background =
;format-underline =
;format-overline =
;format-spacing =
;format-padding =
;format-margin =
;format-offset =
; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = false
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -0,0 +1,5 @@
#!/bin/bash
counter=0
i3-msg -t get_workspaces | tr ',' '\n' | sed -nr 's/"name":"([^"]+)"/\1/p' | while read -r name; do
printf 'ws-icon-%i = "%s;<insert-icon-here>"\n' $((counter++)) $name
done

Binary file not shown.

After

Width:  |  Height:  |  Size: 498 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,001 KiB

View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# Add this script to your wm startup file.
DIR="$HOME/.config/polybar"
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch the bar
polybar -q main -c "$DIR"/config.ini &
# IPC settings and test
ln -sf /tmp/polybar_mqueue.$! /tmp/ipc-main
echo message >/tmp/ipc-main

View file

@ -0,0 +1,944 @@
;; ┌────────────────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀│
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; │░Modified By Raven @raven2cz░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └────────────────────────────────────────────────────────────────┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/alsa]
type = internal/alsa
; Soundcard to be used
; Usually in the format hw:# where # is the card number
; You can find the different card numbers in `/proc/asound/cards`
master-soundcard = default
speaker-soundcard = default
headphone-soundcard = default
; Name of the master, speaker and headphone mixers
; Use the following command to list available mixer controls:
; $ amixer scontrols | sed -nr "s/.*'([[:alnum:]]+)'.*/\1/p"
; If master, speaker or headphone-soundcard isn't the default,
; use `amixer -c # scontrols` instead where # is the number
; of the master, speaker or headphone soundcard respectively
;
; Default: Master
master-mixer = Master
; Optionally define speaker and headphone mixers
; Default: none
;;speaker-mixer = Speaker
; Default: none
;;headphone-mixer = Headphone
; NOTE: This is required if headphone_mixer is defined
; Use the following command to list available device controls
; $ amixer controls | sed -r "/CARD/\!d; s/.*=([0-9]+).*name='([^']+)'.*/printf '%3.0f: %s\n' '\1' '\2'/e" | sort
; You may also need to use `amixer -c # controls` as above for the mixer names
; Default: none
;;headphone-id = 9
; Use volume mapping (similar to amixer -M and alsamixer), where the increase in volume is linear to the ear
; Default: false
;;mapped = true
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
; Available tags:
; <label-volume> (default)
; <ramp-volume>
; <bar-volume>
format-volume = <ramp-volume> <label-volume>
; Available tags:
; <label-muted> (default)
; <ramp-volume>
; <bar-volume>
format-muted = <label-muted>
format-muted-prefix =
format-muted-prefix-foreground = ${color.red}
; Available tokens:
; %percentage% (default)
label-volume = %percentage%%
; Available tokens:
; %percentage% (default
label-muted = " Muted"
label-muted-foreground = ${color.sep}
; Only applies if <ramp-volume> is used
ramp-volume-0 =
ramp-volume-1 =
ramp-volume-2 =
ramp-volume-foreground = ${color.blue}
; If defined, it will replace <ramp-volume> when
; headphones are plugged in to `headphone_control_numid`
; If undefined, <ramp-volume> will be used for both
; Only applies if <ramp-volume> is used
ramp-headphones-0 =
ramp-headphones-background = ${color.blue}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;[module/backlight]
;type = internal/xbacklight
;type = internal/backlight
; Use the following command to list available cards:
; $ ls -1 /sys/class/backlight/
;card = intel_backlight
;card = amdgpu_bl0
; Available tags:
; <label> (default)
; <ramp>
; <bar>
;format = <ramp> <label>
; Available tokens:
; %percentage% (default)
;label = %percentage%%
; Only applies if <ramp> is used
;ramp-0 = 
;ramp-1 = 
;ramp-2 = 
;ramp-3 = 
;ramp-4 = 
;ramp-foreground = ${color.lime}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu]
type = internal/cpu
; Seconds to sleep between updates
; Default: 1
interval = 1
; Available tags:
; <label> (default)
; <bar-load>
; <ramp-load>
; <ramp-coreload>
;;format = <label> <ramp-coreload>
format = <label>
format-prefix =
format-prefix-foreground = ${color.yellow}
; Available tokens:
; %percentage% (default) - total cpu load averaged over all cores
; %percentage-sum% - Cumulative load on all cores
; %percentage-cores% - load percentage for each core
; %percentage-core[1-9]% - load percentage for specific core
label = " %percentage%%"
; Spacing between individual per-core ramps
;;ramp-coreload-spacing = 1
;;ramp-coreload-0 = ${cpu.load0}
;;ramp-coreload-1 = ${cpu.load1}
;;ramp-load-0 = ${cpu.load0}
;;ramp-load-1 = ${cpu.load1}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/date]
type = internal/date
; Seconds to sleep between updates
interval = 1.0
; See "http://en.cppreference.com/w/cpp/io/manip/put_time" for details on how to format the date string
; NOTE: if you want to use syntax tags here you need to use %%{...}
date = %A, %d %B
; Optional time format
time = %I:%M %p
; if `date-alt` or `time-alt` is defined, clicking
; the module will toggle between formats
date-alt = %A, %d %B %Y
time-alt = %k:%M:%S
; Available tags:
; <label> (default)
format = <label>
format-prefix = " "
format-prefix-foreground = ${color.red}
; Available tokens:
; %date%
; %time%
; Default: %date%
label = %date% at %{F#FF005A}%time%%{F-}
label-font = 4
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/filesystem]
type = internal/fs
; Mountpoints to display
mount-0 = /
;;mount-1 = /home
;;mount-2 = /var
; Seconds to sleep between updates
; Default: 30
interval = 30
; Display fixed precision values
; Default: false
fixed-values = true
; Spacing between entries
; Default: 2
;;spacing = 4
; Available tags:
; <label-mounted> (default)
; <bar-free>
; <bar-used>
; <ramp-capacity>
format-mounted = <label-mounted>
format-mounted-prefix =
format-mounted-prefix-foreground = ${color.orange}
; Available tags:
; <label-unmounted> (default)
format-unmounted = <label-unmounted>
format-unmounted-prefix =
format-unmounted-prefix-foreground = ${color.red}
; Available tokens:
; %mountpoint%
; %type%
; %fsname%
; %percentage_free%
; %percentage_used%
; %total%
; %free%
; %used%
; Default: %mountpoint% %percentage_free%%
label-mounted = " %free%"
; Available tokens:
; %mountpoint%
; Default: %mountpoint% is not mounted
label-unmounted = " %mountpoint%: NA"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;;[module/github]
;;type = internal/github
; Accessing an access token stored in file
;;token = ${file:/path/to/file/containing/github/access.token}
; Accessing an access token stored in an environment variable
;;token = ${env:GITHUB_ACCESS_TOKEN}
; Whether empty notifications should be displayed or not
;;empty-notifications = false
; Number of seconds in between requests
;;interval = 10
; Available tags:
; <label> (default)
;;format = <label>
;;format-prefix = 
; Available tokens:
; %notifications% (default)
; Default: Notifications: %notifications%
;;label = %notifications%
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/i3]
type = internal/i3
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = true
; This will split the workspace name on ':'
; Default: false
strip-wsnumbers = true
; Sort the workspaces by index instead of the default
; sorting that groups the workspaces by output
; Default: false
;;index-sort = true
; Create click handler used to focus workspace
; Default: true
;;enable-click = false
; Create scroll handlers used to cycle workspaces
; Default: true
;;enable-scroll = false
; Wrap around when reaching the first/last workspace
; Default: true
;;wrapping-scroll = false
; Set the scroll cycle direction
; Default: true
;;reverse-scroll = false
; Use fuzzy (partial) matching on labels when assigning
; icons to workspaces
; Example: code;♚ will apply the icon to all workspaces
; containing 'code' in the label
; Default: false
;;fuzzy-match = true
; ws-icon-[0-9]+ = label;icon
; NOTE: The label needs to match the name of the i3 workspace
;;ws-icon-0 = 1;♚
;;ws-icon-1 = 2;♛
;;ws-icon-2 = 3;♜
;;ws-icon-3 = 4;♝
;;ws-icon-4 = 5;♞
;;ws-icon-default = ♟
; NOTE: You cannot skip icons, e.g. to get a ws-icon-6
; you must also define a ws-icon-5.
; Available tags:
; <label-state> (default) - gets replaced with <label-(focused|unfocused|visible|urgent)>
; <label-mode> (default)
;;format = <label-state> <label-mode>
; Available tokens:
; %mode%
; Default: %mode%
;;label-mode = %mode%
;;label-mode-padding = 2
;;label-mode-background = #e60053
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
;;label-focused = %index%
;;label-focused-foreground = #ffffff
;;label-focused-background = #3f3f3f
;;label-focused-underline = #fba922
;;label-focused-padding = 4
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
;;label-unfocused = %index%
;;label-unfocused-padding = 4
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
;;label-visible = %index%
;;label-visible-underline = #555555
;;label-visible-padding = 4
; Available tokens:
; %name%
; %icon%
; %index%
; %output%
; Default: %icon% %name%
;;label-urgent = %index%
;;label-urgent-foreground = #000000
;;label-urgent-background = #bd2c40
;;label-urgent-padding = 4
; Separator in between workspaces
;;label-separator = |
;;label-separator-padding = 2
;;label-separator-foreground = #ffb52a
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/memory]
type = internal/memory
; Seconds to sleep between updates
; Default: 1
interval = 1
; Available tags:
; <label> (default)
; <bar-used>
; <bar-free>
; <ramp-used>
; <ramp-free>
; <bar-swap-used>
; <bar-swap-free>
; <ramp-swap-used>
; <ramp-swap-free>
format = <label>
format-prefix =
format-prefix-foreground = ${color.blue}
; Available tokens:
; %percentage_used% (default)
; %percentage_free%
; %gb_used%
; %gb_free%
; %gb_total%
; %mb_used%
; %mb_free%
; %mb_total%
; %percentage_swap_used%
; %percentage_swap_free%
; %mb_swap_total%
; %mb_swap_free%
; %mb_swap_used%
; %gb_swap_total%
; %gb_swap_free%
; %gb_swap_used%
label = " %mb_used%"
; Only applies if <ramp-used> is used
;;ramp-used-0 = ${memory.used0}
;;ramp-used-1 = ${memory.used1}
;;ramp-used-2 = ${memory.used2}
; Only applies if <ramp-free> is used
;;ramp-free-0 = ${memory.free0}
;;ramp-free-1 = ${memory.free1}
;;ramp-free-2 = ${memory.free2}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[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 = mysecretpassword
; Seconds to sleep between progressbar/song timer sync
; Default: 1
interval = 1
; Available tags:
; <label-song> (default)
; <label-time>
; <bar-progress>
; <toggle> - gets replaced with <icon-(pause|play)>
; <toggle-stop> - gets replaced with <icon-(stop|play)>
; <icon-random>
; <icon-repeat>
; <icon-repeatone> (deprecated)
; <icon-single> - Toggle playing only a single song. Replaces <icon-repeatone>
; <icon-consume>
; <icon-prev>
; <icon-stop>
; <icon-play>
; <icon-pause>
; <icon-next>
; <icon-seekb>
; <icon-seekf>
format-online = <label-song> <icon-prev> <toggle> <icon-next>
format-online-prefix =
format-online-prefix-foreground = ${color.green}
;format-playing = ${self.format-online}
;format-paused = ${self.format-online}
;format-stopped = ${self.format-online}
; Available tags:
; <label-offline>
format-offline = <label-offline>
format-offline-prefix =
format-offline-prefix-foreground = ${color.red}
; Available tokens:
; %artist%
; %album-artist%
; %album%
; %date%
; %title%
; Default: %artist% - %title%
label-song = " %artist% - %title%"
label-song-maxlen = 25
label-song-ellipsis = true
; Available tokens:
; %elapsed%
; %total%
; Default: %elapsed% / %total%
label-time = %elapsed% / %total%
label-time-background = ${color.background-alt}
label-time-padding = 1
; Available tokens:
; None
label-offline = " Offline"
; Only applies if <icon-X> is used
icon-play =
icon-play-foreground = ${color.cyan}
icon-pause =
icon-pause-foreground = ${color.cyan}
icon-stop =
icon-stop-foreground = ${color.red}
icon-next =
icon-next-foreground = ${color.cyan}
icon-prev =
icon-prev-foreground = ${color.cyan}
icon-seekf =
icon-seekb =
icon-random =
icon-repeat =
icon-repeatone =
icon-single =
icon-consume =
; Used to display the state of random/repeat/repeatone/single
; Only applies if <icon-[random|repeat|repeatone|single]> is used
toggle-on-foreground = ${color.primary}
toggle-off-foreground = ${color.red}
; Only applies if <bar-progress> is used
;;bar-progress-width = 45
;;bar-progress-indicator = |
;;bar-progress-fill = ─
;;bar-progress-empty = ─
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; If you use both a wired and a wireless network, just add 2 module definitions. For example
[module/wired-network]
type = internal/network
;interface = enp38s0
interface = enp4s0
[module/wireless-network]
type = internal/network
interface = virbr0
; Normal Module
;module/network]
;type = internal/network
;nterface = virbr0
; Seconds to sleep between updates
; Default: 1
interval = 1.0
; Test connectivity every Nth update
; A value of 0 disables the feature
; NOTE: Experimental (needs more testing)
; Default: 0
;ping-interval = 3
; @deprecated: Define min width using token specifiers (%downspeed:min% and %upspeed:min%)
; Minimum output width of upload/download rate
; Default: 3
;;udspeed-minwidth = 5
; Accumulate values from all interfaces
; when querying for up/downspeed rate
; Default: false
accumulate-stats = true
; Consider an `UNKNOWN` interface state as up.
; Some devices have an unknown state, even when they're running
; Default: false
unknown-as-up = true
; Available tags:
; <label-connected> (default)
; <ramp-signal>
format-connected = <label-connected>
format-connected-prefix =
format-connected-prefix-foreground = ${color.purple}
; Available tags:
; <label-disconnected> (default)
format-disconnected = <label-disconnected>
format-disconnected-prefix =
format-disconnected-prefix-foreground = ${color.orange}
; Available tags:
; <label-connected> (default)
; <label-packetloss>
; <animation-packetloss>
;;format-packetloss = <animation-packetloss> <label-connected>
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %local_ip6% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
; %upspeed% [wireless+wired]
; %downspeed% [wireless+wired]
; %linkspeed% [wired]
; Default: %ifname% %local_ip%
label-connected = "%{A1:networkmanager_dmenu &:} %essid% %{F#6C77BB}%{F-} %downspeed%%{A}"
; Available tokens:
; %ifname% [wireless+wired]
; Default: (none)
label-disconnected = "%{A1:networkmanager_dmenu &:} Offline%{A}"
; Available tokens:
; %ifname% [wireless+wired]
; %local_ip% [wireless+wired]
; %local_ip6% [wireless+wired]
; %essid% [wireless]
; %signal% [wireless]
; %upspeed% [wireless+wired]
; %downspeed% [wireless+wired]
; %linkspeed% [wired]
; Default: (none)
;label-packetloss = %essid%
;label-packetloss-foreground = #eefafafa
; Only applies if <ramp-signal> is used
ramp-signal-0 =
ramp-signal-1 =
ramp-signal-2 =
; Only applies if <animation-packetloss> is used
;;animation-packetloss-0 = ⚠
;;animation-packetloss-0-foreground = #ffa64c
;;animation-packetloss-1 = ⚠
;;animation-packetloss-1-foreground = #000000
; Framerate in milliseconds
;;animation-packetloss-framerate = 500
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;module/pulseaudio]
;ype = internal/pulseaudio
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
;ink = alsa_output.pci-0000_03_00.6.analog-stereo
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
;se-ui-max = false
; Interval for volume increase/decrease (in percent points)
; Default: 5
;nterval = 5
; Available tags:
; <label-volume> (default)
; <ramp-volume>
; <bar-volume>
;ormat-volume = <ramp-volume> <label-volume>
; Available tags:
; <label-muted> (default)
; <ramp-volume>
; <bar-volume>
;ormat-muted = <label-muted>
;ormat-muted-prefix = 
;ormat-muted-prefix-foreground = ${color.red}
; Available tokens:
; %percentage% (default)
;abel-volume = %percentage%%
; Available tokens:
; %percentage% (default
;abel-muted = " Muted"
;lbel-muted-foreground = ${color.sep}
; Only applies if <ramp-volume> is used
;ramp-volume-0 = 
;ramp-volume-1 = 
;ramp-volume-2 = 
;ramp-volume-foreground = ${color.blue}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/temp-cpu]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 2
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon-path = /sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon3/temp2_input
; Threshold temperature to display warning label (in degrees celsius)
; Default: 80
base-temperature = 40
warn-temperature = 75
; Whether or not to show units next to the temperature tokens (°C, °F)
; Default: true
units = true
; Available tags:
; <label> (default)
; <ramp>
format = <ramp>cpu <label>
; Available tags:
; <label-warn> (default)
; <ramp>
format-warn = <ramp>cpu <label-warn>
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label = %temperature-c%
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label-warn = "%temperature-c%"
label-warn-foreground = ${color.red}
; Requires the <ramp> tag
; The icon selection will range from 0 to `warn-temperature`
; with the current temperature as index.
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/temp-gpu]
type = internal/temperature
; Seconds to sleep between updates
; Default: 1
interval = 2
; Thermal zone to use
; To list all the zone types, run
; $ for i in /sys/class/thermal/thermal_zone*; do echo "$i: $(<$i/type)"; done
; Default: 0
thermal-zone = 0
; Full path of temperature sysfs path
; Use `sensors` to find preferred temperature source, then run
; $ for i in /sys/class/hwmon/hwmon*/temp*_input; do echo "$(<$(dirname $i)/name): $(cat ${i%_*}_label 2>/dev/null || echo $(basename ${i%_*})) $(readlink -f $i)"; done
; to find path to desired file
; Default reverts to thermal zone setting
;;hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
hwmon-path = /sys/devices/pci0000:00/0000:00:03.1/0000:2d:00.0/0000:2e:00.0/0000:2f:00.0/hwmon/hwmon2/temp1_input
; Threshold temperature to display warning label (in degrees celsius)
; Default: 80
base-temperature = 40
warn-temperature = 75
; Whether or not to show units next to the temperature tokens (°C, °F)
; Default: true
units = true
; Available tags:
; <label> (default)
; <ramp>
format = <ramp>gpu <label>
; Available tags:
; <label-warn> (default)
; <ramp>
format-warn = <ramp>gpu <label-warn>
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label = %temperature-c%
; Available tokens:
; %temperature% (deprecated)
; %temperature-c% (default, temperature in °C)
; %temperature-f% (temperature in °F)
label-warn = "%temperature-c%"
label-warn-foreground = ${color.red}
; Requires the <ramp> tag
; The icon selection will range from 0 to `warn-temperature`
; with the current temperature as index.
ramp-0 =
ramp-1 =
ramp-2 =
ramp-3 =
ramp-4 =
ramp-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/keyboard]
type = internal/xkeyboard
; List of indicators to ignore
blacklist-0 = num lock
blacklist-1 = scroll lock
; Available tags:
; <label-layout> (default)
; <label-indicator> (default)
format = <label-layout> <label-indicator>
format-prefix =
format-prefix-foreground = ${color.blue-gray}
; Available tokens:
; %layout%
; %name%
; %number%
; Default: %layout%
label-layout = " %layout%"
; Available tokens:
; %name%
; Default: %name%
label-indicator-on = "%name%"
label-indicator-on-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/title]
type = internal/xwindow
; Available tags:
; <label> (default)
format = <label>
format-prefix =
format-foreground = ${color.foreground}
; Available tokens:
; %title%
; Default: %title%
label = " %title%"
label-maxlen = 30
; Used instead of label when there is no window title
label-empty = " Desktop"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/workspaces]
type = internal/xworkspaces
; Only show workspaces defined on the same output as the bar
;
; Useful if you want to show monitor specific workspaces
; on different bars
;
; Default: false
pin-workspaces = true
; Create click handler used to focus desktop
; Default: true
enable-click = true
; Create scroll handlers used to cycle desktops
; Default: true
enable-scroll = true
; icon-[0-9]+ = <desktop-name>;<icon>
; NOTE: The desktop name needs to match the name configured by the WM
; You can get a list of the defined desktops using:
; $ xprop -root _NET_DESKTOP_NAMES
icon-0 = 1:main;/main
icon-1 = 2:www;/w3R
icon-2 = 5:media;/media
icon-3 = 4:dev;/dev
icon-4 = 3:chat;/chat
icon-default =
; Available tags:
; <label-monitor>
; <label-state> - gets replaced with <label-(active|urgent|occupied|empty)>
; Default: <label-state>
format = <label-state>
; Available tokens:
; %name%
; Default: %name%
label-monitor = %name%
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-active = %icon%
label-active-foreground = ${color.pink}
label-active-underline = ${color.pink}
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-occupied = %icon%
label-occupied-foreground = ${color.cyan}
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-urgent = %icon%
label-urgent-foreground = ${color.red}
label-urgent-underline = ${color.red}
; Available tokens:
; %name%
; %icon%
; %index%
; Default: %icon% %name%
label-empty = %icon%
label-empty-foreground = ${color.foreground}
label-active-padding = 1
label-urgent-padding = 1
label-occupied-padding = 1
label-empty-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -0,0 +1,310 @@
;; ┌────────────────────────────────────────────────────────────────────┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀▀░█░█░█▀▀│
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█▀▀░█▀▄░█▀▀░▀▄▀░░█░░█▀▀░█▄█░▀▀█│
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀░░░▀░▀░▀▀▀░░▀░░▀▀▀░▀▀▀░▀░▀░▀▀▀│
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └────────────────────────────────────────────────────────────────────┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Global WM Settings
[global/wm]
; Adjust the _NET_WM_STRUT_PARTIAL top value
; Used for top aligned bars
margin-bottom = 0
; Adjust the _NET_WM_STRUT_PARTIAL bottom value
; Used for bottom aligned bars
margin-top = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; File Inclusion
; include an external file, like module file, etc.
include-file = ~/.config/polybar/bars.ini
include-file = ~/.config/polybar/colors.ini
include-file = ~/.config/polybar/modules.ini
include-file = ~/.config/polybar/user_modules.ini
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; Bar Settings
[bar/main]
; Use either of the following command to list available outputs:
; If unspecified, the application will pick the first one it finds.
; $ polybar -m | cut -d ':' -f 1
; $ xrandr -q | grep " connected" | cut -d ' ' -f1
monitor =
; Use the specified monitor as a fallback if the main one is not found.
monitor-fallback =
; Require the monitor to be in connected state
; XRandR sometimes reports my monitor as being disconnected (when in use)
monitor-strict = false
; Tell the Window Manager not to configure the window.
; Use this to detach the bar if your WM is locking its size/position.
override-redirect = false
; Put the bar at the bottom of the screen
bottom = false
; Prefer fixed center position for the `modules-center` block
; When false, the center position will be based on the size of the other blocks.
fixed-center = true
; Dimension defined as pixel value (e.g. 35) or percentage (e.g. 50%),
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in a width or height of 50% minus 10 pixels
width = 100%
height = 34
; Offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
; the percentage can optionally be extended with a pixel offset like so:
; 50%:-10, this will result in an offset in the x or y direction
; of 50% minus 10 pixels
offset-x = 0%
offset-y = 0%
; Background ARGB color (e.g. #f00, #ff992a, #ddff1023)
background = ${color.background}
; Foreground ARGB color (e.g. #f00, #ff992a, #ddff1023)
foreground = ${color.foreground}
; Background gradient (vertical steps)
; background-[0-9]+ = #aarrggbb
;;background-0 =
; Value used for drawing rounded corners
; Note: This shouldn't be used together with border-size because the border
; doesn't get rounded
; Individual top/bottom values can be defined using:
; radius-{top,bottom}
radius-top = 0.0
radius-bottom = 0.0
; Under-/overline pixel size and argb color
; Individual values can be defined using:
; {overline,underline}-size
; {overline,underline}-color
line-size = 5
line-color = ${color.background}
; Values applied to all borders
; Individual side values can be defined using:
; border-{left,top,right,bottom}-size
; border-{left,top,right,bottom}-color
; The top and bottom borders are added to the bar height, so the effective
; window height is:
; height + border-top-size + border-bottom-size
; Meanwhile the effective window width is defined entirely by the width key and
; the border is placed withing this area. So you effectively only have the
; following horizontal space on the bar:
; width - border-right-size - border-left-size
border-bottom-size = 0
border-bottom-color = ${color.foreground}
; Number of spaces to add at the beginning/end of the bar
; Individual side values can be defined using:
; padding-{left,right}
padding = 0
; Number of spaces to add before/after each module
; Individual side values can be defined using:
; module-margin-{left,right}
module-margin-left = 1
module-margin-right = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; Fonts are defined using <font-name>;<vertical-offset>
; Font names are specified using a fontconfig pattern.
; font-0 = NotoSans-Regular:size=8;2
; font-1 = MaterialIcons:size=10
; font-2 = Termsynu:size=8;-1
; font-3 = FontAwesome:size=10
; See the Fonts wiki page for more details
font-0 = "Iosevka Nerd Font:size=10;4"
font-1 = "Iosevka Nerd Font:size=10;3"
font-2 = "feather:size=12;3"
; Modules are added to one of the available blocks
; modules-left = cpu ram
; modules-center = xwindow xbacklight
; modules-right = ipc clock
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[bar/top]
inherit = bar/main
offset-y = 10
modules-center = title sep menu sep term files browser settings sep filesystem sep temperature sep color-switch sep keyboard sep pulseaudio sep backlight sep updates sep powermenu
enable-ipc = true
[bar/mid]
inherit = bar/main
offset-y = 54
modules-center = volume sep brightness sep battery_bar sep cpu_bar sep filesystem_bar sep memory_bar sep mpd_bar
enable-ipc = true
[bar/bottom]
inherit = bar/main
offset-y = 98
modules-center = launcher sep workspaces sep cpu sep memory sep mpd sep alsa sep battery sep network sep date sep sysmenu
enable-ipc = true
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; The separator will be inserted between the output of each module
separator =
; Opacity value between 0.0 and 1.0 used on fade in/out
dim-value = 1.0
; Value to be used to set the WM_NAME atom
; If the value is empty or undefined, the atom value
; will be created from the following template: polybar-[BAR]_[MONITOR]
; NOTE: The placeholders are not available for custom values
wm-name =
; Locale used to localize various module data (e.g. date)
; Expects a valid libc locale, for example: sv_SE.UTF-8
locale =
; Position of the system tray window
; If empty or undefined, tray support will be disabled
; NOTE: A center aligned tray will cover center aligned modules
;
; Available positions:
; left
; center
; right
; none
tray-position = none
; If true, the bar will not shift its
; contents when the tray changes
tray-detached = false
; Tray icon max size
tray-maxsize = 16
; Background color for the tray container
; ARGB color (e.g. #f00, #ff992a, #ddff1023)
; By default the tray container will use the bar
; background color.
tray-background = ${color.background}
; Tray offset defined as pixel value (e.g. 35) or percentage (e.g. 50%)
tray-offset-x = 0
tray-offset-y = 0
; Pad the sides of each tray icon
tray-padding = 0
; Scale factor for tray clients
tray-scale = 1.0
; Restack the bar window and put it above the
; selected window manager's root
;
; Fixes the issue where the bar is being drawn
; on top of fullscreen window's
;
; Currently supported WM's:
; bspwm
; i3 (requires: `override-redirect = true`)
;;wm-restack =
; Set a DPI values used when rendering text
; This only affects scalable fonts
; dpi =
; Enable support for inter-process messaging
; See the Messaging wiki page for more details.
;enable-ipc = true
; Fallback click handlers that will be called if
; there's no matching module handler found.
click-left =
click-middle =
click-right =
scroll-up =
scroll-down =
double-click-left =
double-click-middle =
double-click-right =
; Requires polybar to be built with xcursor support (xcb-util-cursor)
; Possible values are:
; - default : The default pointer as before, can also be an empty string (default)
; - pointer : Typically in the form of a hand
; - ns-resize : Up and down arrows, can be used to indicate scrolling
cursor-click =
cursor-scroll =
;; WM Workspace Specific
; bspwm
;;scroll-up = bspwm-desknext
;;scroll-down = bspwm-deskprev
;;scroll-up = bspc desktop -f prev.local
;;scroll-down = bspc desktop -f next.local
;i3
;;scroll-up = i3wm-wsnext
;;scroll-down = i3wm-wsprev
;;scroll-up = i3-msg workspace next_on_output
;;scroll-down = i3-msg workspace prev_on_output
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
;; 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
; Compositing operators
; @see: https://www.cairographics.org/manual/cairo-cairo-t.html#cairo-operator-t
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
; Define fallback values used by all module formats
;format-foreground =
;format-background =
;format-underline =
;format-overline =
;format-spacing =
;format-padding =
;format-margin =
;format-offset =
; Enables pseudo-transparency for the bar
; If set to true the bar can be transparent without a compositor.
pseudo-transparency = false
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -0,0 +1,14 @@
#!/usr/bin/env bash
DIR="$HOME/.config/polybar"
# Terminate already running bar instances
killall -q polybar
# Wait until the processes have been shut down
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
# Launch the preview bar
polybar -q top -c "$DIR"/preview.ini &
polybar -q mid -c "$DIR"/preview.ini &
polybar -q bottom -c "$DIR"/preview.ini &

View file

@ -0,0 +1,56 @@
#!/bin/bash
function usage {
echo
echo "Usage: $0 (current|phone|music|switch)"
exit 0
}
function current {
if pactl list | grep "Active Profile: a2dp_sink" > /dev/null; then
echo ""
else
echo ""
fi
}
function setprofile {
#change the default sink
pactl set-card-profile "$cardname" "$profilename" || echo "Problem setting profile"; exit 3
pacmd set-default-sink "$devicename" || echo "Problem setting default sink"; exit 4
}
function switchprofile {
if pactl list | grep "Active Profile: a2dp_sink"; then
pactl set-card-profile "$cardname" "headset_head_unit" || echo "Problem setting profile"; exit 3
pacmd set-default-sink "$devicename" || echo "Problem setting default sink"; exit 4
else
pactl set-card-profile "$cardname" "a2dp_sink" || echo "Problem setting profile"; exit 3
pacmd set-default-sink "$devicename" || echo "Problem setting default sink"; exit 4
fi
}
# Get Card and Device
cardname=$(pactl list | grep bluez_card | awk '{print $NF}')
devicename=$(pacmd list-sinks | grep -o '<bluez_sink[^>]*' | cut -d\< -f2)
case "$1" in
phone)
profilename="headset_head_unit"
setprofile
;;
music)
profilename="a2dp_sink"
setprofile
;;
current)
current
;;
switch)
switchprofile
;;
*)
usage
;;
esac
exit 0

View file

@ -0,0 +1,79 @@
#!/bin/env python3
import argparse
import os
import signal
import subprocess
import sys
import tempfile
if len(sys.argv) > 1 and sys.argv[1] == '--subproc':
ramp_list = [' ', '', '', '', '', '', '', '', '']
ramp_list.extend(
f'%{{F#{color.strip(" #")}}}█%{{F-}}'
for color in sys.argv[2].split(',')
if color
)
while True:
cava_input = input().strip().split()
cava_input = [int(i) for i in cava_input]
output = ''
for bar in cava_input:
if bar < len(ramp_list):
output += ramp_list[bar]
else:
output += ramp_list[-1]
print(output)
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--framerate', type=int, default=60,
help='Framerate to be used by cava, default is 60')
parser.add_argument('-b', '--bars', type=int, default=8,
help='Amount of bars, default is 8')
parser.add_argument('-e', '--extra_colors', default='',
help='Color gradient used on higher values, separated by commas, default is')
parser.add_argument('-c', '--channels', choices=['stereo', 'left', 'right', 'average'],
help='Audio channels to be used, defaults to stereo')
opts = parser.parse_args()
conf_channels = ''
if opts.channels != 'stereo':
conf_channels = (
'channels=mono\n'
f'mono_option={opts.channels}'
)
conf_ascii_max_range = 20
cava_conf = tempfile.mkstemp('','polybar-cava-conf.')[1]
with open(cava_conf, 'w') as cava_conf_file:
cava_conf_file.write(
'[general]\n'
f'framerate={opts.framerate}\n'
f'bars={opts.bars}\n'
'autosense=1\n'
'sensitivity=200\n'
'[input]\n'
'sample_rate=44100\n'
'[output]\n'
'method=raw\n'
'data_format=ascii\n'
f'ascii_max_range={conf_ascii_max_range}\n'
'bar_delimiter=32'
+ conf_channels
)
cava_proc = subprocess.Popen(['cava', '-p', cava_conf], stdout=subprocess.PIPE)
self_proc = subprocess.Popen(['python3', __file__, '--subproc', opts.extra_colors], stdin=cava_proc.stdout)
def cleanup(sig, frame):
os.remove(cava_conf)
cava_proc.kill()
self_proc.kill()
sys.exit(0)
signal.signal(signal.SIGTERM, cleanup)
signal.signal(signal.SIGINT, cleanup)
self_proc.wait()

View file

@ -0,0 +1,24 @@
#!/bin/bash
#source https://github.com/x70b1/polybar-scripts
if [[ -f "/usr/bin/apt" ]]; then
# apt is available
updates=$(LANG=C apt-get upgrade -s |grep -P '^\d+ upgraded'|cut -d" " -f1)
else
# arch variant
if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then
updates_arch=0
fi
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
updates_aur=0
fi
updates=$(("$updates_arch" + "$updates_aur"))
fi
if [ "$updates" -gt 0 ]; then
echo " $updates"
else
echo "0"
fi

View file

@ -0,0 +1,117 @@
#!/usr/bin/bash
#
# checkupdates: Safely print a list of pending updates.
#
# Copyright (c) 2013 Kyle Keen <keenerd@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
declare -r myname='checkupdates'
declare -r myver='1.0.0'
plain() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg() {
(( QUIET )) && return
local mesg=$1; shift
printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
msg2() {
(( QUIET )) && return
local mesg=$1; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1
}
ask() {
local mesg=$1; shift
printf "${BLUE}::${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}" "$@" >&1
}
warning() {
local mesg=$1; shift
printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
error() {
local mesg=$1; shift
printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
# check if messages are to be printed using color
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
# prefer terminal safe colored and bold text when tput is supported
if tput setaf 0 &>/dev/null; then
ALL_OFF="$(tput sgr0)"
BOLD="$(tput bold)"
BLUE="${BOLD}$(tput setaf 4)"
GREEN="${BOLD}$(tput setaf 2)"
RED="${BOLD}$(tput setaf 1)"
YELLOW="${BOLD}$(tput setaf 3)"
else
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
BLUE="${BOLD}\e[1;34m"
GREEN="${BOLD}\e[1;32m"
RED="${BOLD}\e[1;31m"
YELLOW="${BOLD}\e[1;33m"
fi
fi
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
if (( $# > 0 )); then
echo "${myname} v${myver}"
echo
echo "Safely print a list of pending updates"
echo
echo "Usage: ${myname}"
echo
echo 'Note: Export the "CHECKUPDATES_DB" variable to change the path of the temporary database.'
exit 0
fi
if ! type -P fakeroot >/dev/null; then
error 'Cannot find the fakeroot binary.'
exit 1
fi
if [[ -z $CHECKUPDATES_DB ]]; then
CHECKUPDATES_DB="${TMPDIR:-/tmp}/checkup-db-${USER}/"
fi
trap 'rm -f $CHECKUPDATES_DB/db.lck' INT TERM EXIT
DBPath="$(pacman-conf DBPath)"
if [[ -z "$DBPath" ]] || [[ ! -d "$DBPath" ]]; then
DBPath="/var/lib/pacman/"
fi
mkdir -p "$CHECKUPDATES_DB"
ln -s "${DBPath}/local" "$CHECKUPDATES_DB" &> /dev/null
if ! fakeroot -- pacman -Sy --dbpath "$CHECKUPDATES_DB" --logfile /dev/null &> /dev/null; then
error 'Cannot fetch updates'
exit 1
fi
pacman -Qu --dbpath "$CHECKUPDATES_DB" 2> /dev/null | grep -v '\[.*\]'
exit 0
# vim: set noet:

View file

@ -0,0 +1,99 @@
#!/bin/bash
# The name of polybar bar which houses the main spotify module and the control modules.
PARENT_BAR="${1:-music}"
PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1)
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
send_hook() {
[ -z "$1" ] && echo "send_hook: missing arg" && exit 1
polybar-msg hook mpris-play-pause "$1" 1>/dev/null 2>&1
}
extract_meta() {
grep "$1\W" <<< "$meta" | awk '{$1=$2=""; print $0}' | sed 's/^ *//; s/; */;/g' | paste -s -d/ -
}
# if "icon" given, determine icon. otherwise, print metadata
get_info() {
if [ -z "$1" ]; then
echo "Usage: get_info PLAYER [icon]"
exit 1
fi
meta=$(playerctl -p "$1" metadata)
# get title
title=$(extract_meta title)
# if no title, try url e.g. vlc
if [ -z "$title" ]; then
title=$(extract_meta url)
title=$(urldecode "${title##*/}")
fi
# if not "icon", display information and return
if [ "$2" != "icon" ]; then
artist=$(extract_meta artist)
[ -z "$artist" ] && artist=$(extract_meta albumArtist)
if [ -n "$artist" ]; then
album=$(extract_meta album)
[ -n "$album" ] && echo -n "$album"
echo -n "$artist"
fi
echo "$title"
return 0
fi
# determine icon:
# if player name is recognised, use it
case "$1" in
spotify* | vlc | mpv) echo "$1";;
kdeconnect*) echo "kdeconnect";;
chromium*)
# if a browser, search window titles:
# this tries to avoid title messing up the regex
regex_title=$(echo "$title" | tr "[:punct:]" ".")
windowname=$(xdotool search --name --class --classname "$regex_title" getwindowname 2>/dev/null)
case $windowname in
"") ;; # ignore if empty
*Netflix*) echo "netflix";;
*YouTube*) echo "youtube";;
*"Prime Video"*) echo "prime";;
*"Corridor Digital"*) echo "corridor";;
*) echo "browser";;
esac;;
*) echo "none";;
esac
}
# manually go through players
read -d'\n' -ra PLAYERS <<<"$(playerctl -l 2>/dev/null)"
declare -a PAUSED
for player in "${PLAYERS[@]}"; do
[ "$player" = "playerctld" ] && continue;
p_status=$(playerctl -p "$player" status 2>/dev/null)
# if we have one playing, we'll use it and EXIT
if [ "$p_status" = "Playing" ]; then
send_hook 1
get_info "$player" "$2"
exit 0;
fi
[ "$p_status" = "Paused" ] && PAUSED+=("$player")
done
# if we have a paused, show it otherwise assume there are no players or have all stopped
if [ -n "${PAUSED[0]}" ]; then
send_hook 2
get_info "${PAUSED[0]}" "$2"
else
[ "$2" = icon ] && echo "none" || echo " 鈴 no players "
fi

View file

@ -0,0 +1,54 @@
#!/bin/bash
# The name of polybar bar which houses the main spotify module and the control modules.
PARENT_BAR="now-playing"
PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1)
# Set the source audio player here.
# Players supporting the MPRIS spec are supported.
# Examples: spotify, vlc, chrome, mpv and others.
# Use `playerctld` to always detect the latest player.
# See more here: https://github.com/altdesktop/playerctl/#selecting-players-to-control
PLAYER="spotify"
callDbus() {
if ! pgrep -x spotify >/dev/null; then
echo ""; exit
fi
cmd="org.freedesktop.DBus.Properties.Get"
domain="org.mpris.MediaPlayer2"
path="/org/mpris/MediaPlayer2"
meta=$(dbus-send --print-reply --dest=${domain}.spotify \
/org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:${domain}.Player string:Metadata)
artist=$(echo "$meta" | sed -nr '/xesam:artist"/,+2s/^ +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g' | sed 's#\/#\\/#g')
album=$(echo "$meta" | sed -nr '/xesam:album"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1| sed 's/\&/\\&/g'| sed 's#\/#\\/#g')
title=$(echo "$meta" | sed -nr '/xesam:title"/,+2s/^ +variant +string "(.*)"$/\1/p' | tail -1 | sed 's/\&/\\&/g'| sed 's#\/#\\/#g')
echo "${*:-%title% [%artist%]}" | sed "s/%artist%/$artist/g;s/%title%/$title/g;s/%album%/$album/g"i | sed "s/\&/\&/g" | sed "s#\/#\/#g"
}
PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null)
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
STATUS=$PLAYERCTL_STATUS
else
STATUS="No player is running"
fi
if [ "$1" == "--status" ]; then
echo "$STATUS"
else
if [ "$STATUS" = "Stopped" ]; then
echo "No music is playing"
elif [ "$STATUS" = "Paused" ]; then
echo `callDbus`
elif [ "$STATUS" = "No player is running" ]; then
echo "$STATUS"
else
echo `callDbus`
fi
fi

View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
FILE="$HOME/.config/polybar/scripts/rofi/colors.rasi"
## random accent color
#COLORS=('#EC7875' '#EC6798' '#BE78D1' '#75A4CD' '#00C7DF' '#00B19F' '#61C766' \
# '#B9C244' '#EBD369' '#EDB83F' '#E57C46' '#AC8476' '#6C77BB' '#6D8895')
#AC="${COLORS[$(( $RANDOM % 14 ))]}"
#SE="${COLORS[$(( $RANDOM % 14 ))]}"
#sed -i -e "s/ac: .*/ac: ${AC}FF;/g" $FILE
#sed -i -e "s/se: .*/se: ${SE}FF;/g" $FILE
rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/polybar/scripts/rofi/launcher.rasi

View file

@ -0,0 +1,59 @@
#!/bin/bash
print_bytes() {
if [ "$1" -eq 0 ] || [ "$1" -lt 1000 ]; then
bytes="0 kB/s"
elif [ "$1" -lt 1000000 ]; then
bytes="$(echo "$1/1000" | bc -l | LANG=C xargs printf "%.f\n") kB/s"
fi
echo "$bytes"
}
print_bit() {
if [ "$1" -eq 0 ] || [ "$1" -lt 10 ]; then
bit="0 B"
elif [ "$1" -lt 100 ]; then
bit="$(echo "$1*8" | bc -l | LANG=C xargs printf "%.f\n") B"
elif [ "$1" -lt 100000 ]; then
bit="$(echo "$1*8/1000" | bc -l | LANG=C xargs printf "%.f\n") K"
else
bit="$(echo "$1*8/1000000" | bc -l | LANG=C xargs printf "%.1f\n") M"
fi
echo "$bit"
}
INTERVAL=1
INTERFACES="enp0s31f6 wlp3s0"
declare -A bytes
for interface in $INTERFACES; do
bytes[past_rx_$interface]="$(cat /sys/class/net/"$interface"/statistics/rx_bytes)"
bytes[past_tx_$interface]="$(cat /sys/class/net/"$interface"/statistics/tx_bytes)"
done
while true; do
down=0
up=0
for interface in $INTERFACES; do
bytes[now_rx_$interface]="$(cat /sys/class/net/"$interface"/statistics/rx_bytes)"
bytes[now_tx_$interface]="$(cat /sys/class/net/"$interface"/statistics/tx_bytes)"
bytes_down=$((((${bytes[now_rx_$interface]} - ${bytes[past_rx_$interface]})) / INTERVAL))
bytes_up=$((((${bytes[now_tx_$interface]} - ${bytes[past_tx_$interface]})) / INTERVAL))
down=$(((( "$down" + "$bytes_down" ))))
up=$(((( "$up" + "$bytes_up" ))))
bytes[past_rx_$interface]=${bytes[now_rx_$interface]}
bytes[past_tx_$interface]=${bytes[now_tx_$interface]}
done
echo "ﯱ : $(print_bytes $down) / ﯱ : $(print_bytes $up) "
# echo "Download: $(print_bit $down) / Upload: $(print_bit $up)"
sleep $INTERVAL
done

View file

@ -0,0 +1,241 @@
#!/bin/sh
# POLYWINS
# SETTINGS {{{ ---
active_text_color="#FFFFFF"
active_bg=
active_underline="#00FFFF"
inactive_text_color="${foreground}"
inactive_bg=
inactive_underline=
separator="·"
show="window_class" # options: window_title, window_class, window_classname
forbidden_classes="Polybar Conky Gmrun Xfdesktop Xfce4-panel"
empty_desktop_message="Desktop"
char_limit=20
max_windows=15
char_case="normal" # normal, upper, lower
add_spaces="true"
resize_increment=16
wm_border_width=1 # setting this might be required for accurate resize position
# --- }}}
main() {
# If no argument passed...
if [ -z "$2" ]; then
# ...print new window list every time
# the active window changes or
# a window is opened or closed
xprop -root -spy _NET_CLIENT_LIST _NET_ACTIVE_WINDOW |
while IFS= read -r _; do
generate_window_list
done
# If arguments are passed, run requested on-click function
else
"$@"
fi
}
# ON-CLICK FUNCTIONS {{{ ---
raise_or_minimize() {
if [ "$(get_active_wid)" = "$1" ]; then
if [[ "$DESKTOP_SESSION" == "i3" ]]; then
i3-msg '[instance="^"$1"]' move scratchpad
else
wmctrl -ir "$1" -b toggle,hidden
fi
else
wmctrl -ia "$1"
fi
}
close() {
wmctrl -ic "$1"
}
slop_resize() {
wmctrl -ia "$1"
wmctrl -ir "$1" -e "$(slop -f 0,%x,%y,%w,%h)"
}
increment_size() {
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
test "$wid" != "$1" && continue
x=$(( wx - wm_border_width * 2 - resize_increment / 2 ))
y=$(( wy - wm_border_width * 2 - resize_increment / 2 ))
w=$(( ww + resize_increment ))
h=$(( wh + resize_increment ))
done <<-EOF
$(wmctrl -lG)
EOF
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
}
decrement_size() {
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
test "$wid" != "$1" && continue
x=$(( wx - wm_border_width * 2 + resize_increment / 2 ))
y=$(( wy - wm_border_width * 2 + resize_increment / 2 ))
w=$(( ww - resize_increment ))
h=$(( wh - resize_increment ))
done <<-EOF
$(wmctrl -lG)
EOF
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
}
# --- }}}
# WINDOW LIST SETUP {{{ ---
active_left="%{F$active_text_color}"
active_right="%{F-}"
inactive_left="%{F$inactive_text_color}"
inactive_right="%{F-}"
separator="%{F$inactive_text_color}$separator%{F-}"
if [ -n "$active_underline" ]; then
active_left="${active_left}%{+u}%{u$active_underline}"
active_right="%{-u}${active_right}"
fi
if [ -n "$active_bg" ]; then
active_left="${active_left}%{B$active_bg}"
active_right="%{B-}${active_right}"
fi
if [ -n "$inactive_underline" ]; then
inactive_left="${inactive_left}%{+u}%{u$inactive_underline}"
inactive_right="%{-u}${inactive_right}"
fi
if [ -n "$inactive_bg" ]; then
inactive_left="${inactive_left}%{B$inactive_bg}"
inactive_right="%{B-}${inactive_right}"
fi
get_active_wid() {
active_wid=$(xprop -root _NET_ACTIVE_WINDOW)
active_wid="${active_wid#*\# }"
active_wid="${active_wid%,*}" # Necessary for XFCE
while [ ${#active_wid} -lt 10 ]; do
active_wid="0x0${active_wid#*x}"
done
echo "$active_wid"
}
get_active_workspace() {
wmctrl -d |
while IFS="[ .]" read -r number active_status _; do
test "$active_status" = "*" && echo "$number" && break
done
}
generate_window_list() {
active_workspace=$(get_active_workspace)
active_wid=$(get_active_wid)
window_count=0
on_click="$0"
# Format each window name one by one
# Space and . are both used as IFS,
# because classname and class are separated by '.'
while IFS="[ .\.]" read -r wid ws cname cls host title; do
# Don't show the window if on another workspace (-1 = sticky)
if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then
continue
fi
# Don't show the window if its class is forbidden
case "$forbidden_classes" in
*$cls*) continue ;;
esac
# If max number of windows reached, just increment
# the windows counter
if [ "$window_count" -ge "$max_windows" ]; then
window_count=$(( window_count + 1 ))
continue
fi
# Show the user-selected window property
case "$show" in
"window_class") w_name="$cls" ;;
"window_classname") w_name="$cname" ;;
"window_title") w_name="$title" ;;
esac
# Use user-selected character case
case "$char_case" in
"lower") w_name=$(
echo "$w_name" | tr '[:upper:]' '[:lower:]'
) ;;
"upper") w_name=$(
echo "$w_name" | tr '[:lower:]' '[:upper:]'
) ;;
esac
# Truncate displayed name to user-selected limit
if [ "${#w_name}" -gt "$char_limit" ]; then
w_name="$(echo "$w_name" | cut -c1-$((char_limit-1)))"
fi
# Apply add-spaces setting
if [ "$add_spaces" = "true" ]; then
w_name=" $w_name "
fi
# Add left and right formatting to displayed name
if [ "$wid" = "$active_wid" ]; then
w_name="${active_left}${w_name}${active_right}"
else
w_name="${inactive_left}${w_name}${inactive_right}"
fi
# Add separator unless the window is first in list
if [ "$window_count" != 0 ]; then
printf "%s" "$separator"
fi
# Add on-click action Polybar formatting
printf "%s" "%{A1:$on_click raise_or_minimize $wid:}"
printf "%s" "%{A2:$on_click close $wid:}"
printf "%s" "%{A3:$on_click slop_resize $wid:}"
printf "%s" "%{A4:$on_click increment_size $wid:}"
printf "%s" "%{A5:$on_click decrement_size $wid:}"
# Print the final window name
printf "%s" "$w_name"
printf "%s" "%{A}%{A}%{A}%{A}%{A}"
window_count=$(( window_count + 1 ))
done <<-EOF
$(wmctrl -lx)
EOF
# After printing all the windows,
# print number of hidden windows
if [ "$window_count" -gt "$max_windows" ]; then
printf "%s" "+$(( window_count - max_windows ))"
fi
# Print empty desktop message if no windows are open
if [ "$window_count" = 0 ]; then
printf "%s" "$empty_desktop_message"
fi
# Print newline
echo ""
}
# --- }}}
main "$@"

View file

@ -0,0 +1,94 @@
#!/usr/bin/env bash
## Author : Aditya Shakya
## Mail : adi1090x@gmail.com
## Github : @adi1090x
## Twitter : @adi1090x
dir="~/.config/polybar/scripts/rofi"
uptime=$(uptime -p | sed -e 's/up //g')
rofi_command="rofi -theme $dir/powermenu.rasi"
# Options
shutdown=" Shutdown"
reboot=" Restart"
lock=" Lock"
suspend=" Sleep"
logout=" Logout"
# Confirmation
confirm_exit() {
rofi -dmenu\
-i\
-no-fixed-num-lines\
-p "Are You Sure? : "\
-theme $dir/confirm.rasi
}
# Message
msg() {
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
}
# Variable passed to rofi
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
case $chosen in
$shutdown)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl poweroff
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$reboot)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
systemctl reboot
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$lock)
if [[ -f /usr/bin/i3lock ]]; then
i3lock
elif [[ -f /usr/bin/betterlockscreen ]]; then
betterlockscreen -l
fi
;;
$suspend)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
mpc -q pause
amixer set Master mute
systemctl suspend
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
$logout)
ans=$(confirm_exit &)
if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then
openbox --exit
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
bspc quit
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
i3-msg exit
fi
elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
exit 0
else
msg
fi
;;
esac

View file

@ -0,0 +1,10 @@
/* colors */
* {
al: #00000000;
bg: #212B30FF;
bga: #263035FF;
fg: #C4C7C5FF;
ac: #EC407AFF;
se: #4DD0E1FF;
}

View file

@ -0,0 +1,24 @@
/* Confirm Dialog */
@import "colors.rasi"
* {
background-color: @bg;
text-color: @fg;
font: "Iosevka Nerd Font 10";
}
window {
width: 210px;
padding: 25px;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @ac;
}

View file

@ -0,0 +1,115 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px 0px 0px 0px;
border-color: @ac;
border-radius: 0px;
width: 500px;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0px;
background-color: @bga;
text-color: @ac;
font: "feather 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 0px 0px 0px 5px;
blink: true;
}
inputbar {
children: [ prompt, entry ];
background-color: @bga;
text-color: @fg;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
margin: 0px;
padding: 10px;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 6;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0px;
border-radius: 0px;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0px;
padding: 8px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0px 2.5px 0px 2.5px;
}
element selected {
background-color: @se;
text-color: @bg;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @ac;
}

View file

@ -0,0 +1,24 @@
/* Confirm Dialog */
@import "colors.rasi"
* {
background-color: @bg;
text-color: @fg;
font: "Iosevka Nerd Font 10";
}
window {
width: 320px;
padding: 25px;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
location: center;
y-offset: -2em;
}
entry {
expand: true;
text-color: @ac;
}

View file

@ -0,0 +1,123 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px 0px 0px 0px;
border-color: @ac;
border-radius: 0px;
width: 400px;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0px 0px 0px 10px;
background-color: @bga;
text-color: @fg;
}
textbox-prompt-colon {
padding: 0px;
background-color: @bga;
text-color: @ac;
expand: false;
str: "";
font: "feather 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 0px 0px 0px 5px;
blink: true;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @bga;
text-color: @fg;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
margin: 0px;
padding: 10px;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 8;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0px;
border-radius: 0px;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0px;
padding: 8px 8px 8px -15px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0px 2.5px 0px 2.5px;
}
element selected {
background-color: @se;
text-color: @bg;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @ac;
}

View file

@ -0,0 +1,123 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px 0px 0px 0px;
border-color: @ac;
border-radius: 0px;
width: 350px;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0px 0px 0px 10px;
background-color: @bga;
text-color: @fg;
}
textbox-prompt-colon {
padding: 0px;
background-color: @bga;
text-color: @ac;
expand: false;
str: "";
font: "feather 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 0px 0px 0px 5px;
blink: true;
}
inputbar {
children: [ textbox-prompt-colon, prompt ];
background-color: @bga;
text-color: @fg;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
margin: 0px;
padding: 10px;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0px;
border-radius: 0px;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0px;
padding: 8px 8px 8px -20px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0px 2.5px 0px 2.5px;
}
element selected {
background-color: @se;
text-color: @bg;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @ac;
}

View file

@ -0,0 +1,123 @@
/*
*
* Author : Aditya Shakya
* Mail : adi1090x@gmail.com
* Github : @adi1090x
* Twitter : @adi1090x
*
*/
configuration {
font: "Iosevka Nerd Font 10";
show-icons: true;
icon-theme: "Papirus";
display-drun: "";
drun-display-format: "{name}";
disable-history: false;
fullscreen: false;
hide-scrollbar: true;
sidebar-mode: false;
}
@import "colors.rasi"
window {
transparency: "real";
background-color: @bg;
text-color: @fg;
border: 0px 0px 0px 0px;
border-color: @ac;
border-radius: 0px;
width: 350px;
location: center;
x-offset: 0;
y-offset: 0;
}
prompt {
enabled: true;
padding: 0px 0px 0px 5px;
background-color: @bga;
text-color: @fg;
}
textbox-prompt-colon {
padding: 0px;
background-color: @bga;
text-color: @ac;
expand: false;
str: "";
font: "feather 12";
}
entry {
background-color: @al;
text-color: @fg;
placeholder-color: @fg;
expand: true;
horizontal-align: 0;
placeholder: "Search...";
padding: 0px 0px 0px 10px;
blink: true;
}
inputbar {
children: [ textbox-prompt-colon, entry ];
background-color: @bga;
text-color: @fg;
expand: false;
border: 0px 0px 1px 0px;
border-radius: 0px;
border-color: @se;
margin: 0px;
padding: 10px;
}
listview {
background-color: @al;
padding: 0px;
columns: 1;
lines: 5;
spacing: 5px;
cycle: true;
dynamic: true;
layout: vertical;
}
mainbox {
background-color: @al;
border: 0px;
border-radius: 0px;
border-color: @ac;
children: [ inputbar, listview ];
spacing: 5px;
padding: 5px;
}
element {
background-color: @al;
text-color: @fg;
orientation: horizontal;
border-radius: 0px;
padding: 8px 8px 8px -20px;
}
element-icon {
size: 24px;
border: 0px;
}
element-text {
expand: true;
horizontal-align: 0;
vertical-align: 0.5;
margin: 0px 2.5px 0px 2.5px;
}
element selected {
background-color: @se;
text-color: @bg;
border: 0px 0px 0px 0px;
border-radius: 0px;
border-color: @ac;
}

View file

@ -0,0 +1,21 @@
#!/bin/bash
cmd="${0%/*}/get_mpris_status.sh $1"
zscroll -l 50 \
--scroll-padding "$(printf ' %.0s' {1..8})" \
-d 0.5 \
-M "$cmd icon" \
-m "none" "-b ''" \
-m "browser" "-b ' '" \
-m "netflix" "-b 'ﱄ '" \
-m "youtube" "-b ' '" \
-m "prime" "-b ' '" \
-m "spotify" "-b ' '" \
-m "vlc" "-b '嗢 '" \
-m "mpv" "-b ' '" \
-m "kdeconnect" "-b ' '" \
-m "corridor" "-b ' '" \
-U 1 -u t "$cmd" &
wait

View file

@ -0,0 +1,141 @@
#!/usr/bin/env python3
import sys
import dbus
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
'-t',
'--trunclen',
type=int,
metavar='trunclen'
)
parser.add_argument(
'-f',
'--format',
type=str,
metavar='custom format',
dest='custom_format'
)
parser.add_argument(
'-p',
'--playpause',
type=str,
metavar='play-pause indicator',
dest='play_pause'
)
parser.add_argument(
'--font',
type=str,
metavar='the index of the font to use for the main label',
dest='font'
)
parser.add_argument(
'--playpause-font',
type=str,
metavar='the index of the font to use to display the playpause indicator',
dest='play_pause_font'
)
parser.add_argument(
'-q',
'--quiet',
action='store_true',
help="if set, don't show any output when the current song is paused",
dest='quiet',
)
args = parser.parse_args()
def fix_string(string):
# corrects encoding for the python version used
if sys.version_info.major == 3:
return string
else:
return string.encode('utf-8')
def truncate(name, trunclen):
if len(name) > trunclen:
name = name[:trunclen]
name += '...'
if ('(' in name) and (')' not in name):
name += ')'
return name
# Default parameters
output = fix_string(u'{play_pause} {artist}: {song}')
trunclen = 35
play_pause = fix_string(u'\u25B6,\u23F8') # first character is play, second is paused
label_with_font = '%{{T{font}}}{label}%{{T-}}'
font = args.font
play_pause_font = args.play_pause_font
quiet = args.quiet
# parameters can be overwritten by args
if args.trunclen is not None:
trunclen = args.trunclen
if args.custom_format is not None:
output = args.custom_format
if args.play_pause is not None:
play_pause = args.play_pause
try:
session_bus = dbus.SessionBus()
spotify_bus = session_bus.get_object(
'org.mpris.MediaPlayer2.spotify',
'/org/mpris/MediaPlayer2'
)
spotify_properties = dbus.Interface(
spotify_bus,
'org.freedesktop.DBus.Properties'
)
metadata = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'Metadata')
status = spotify_properties.Get('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')
# Handle play/pause label
play_pause = play_pause.split(',')
if status == 'Playing':
play_pause = play_pause[0]
elif status == 'Paused':
play_pause = play_pause[1]
else:
play_pause = str()
if play_pause_font:
play_pause = label_with_font.format(font=play_pause_font, label=play_pause)
# Handle main label
artist = fix_string(metadata['xesam:artist'][0]) if metadata['xesam:artist'] else ''
song = fix_string(metadata['xesam:title']) if metadata['xesam:title'] else ''
album = fix_string(metadata['xesam:album']) if metadata['xesam:album'] else ''
if (quiet and status == 'Paused') or (not artist and not song and not album):
print('')
else:
if font:
artist = label_with_font.format(font=font, label=artist)
song = label_with_font.format(font=font, label=song)
album = label_with_font.format(font=font, label=album)
# Add 4 to trunclen to account for status symbol, spaces, and other padding characters
print(truncate(output.format(artist=artist,
song=song,
play_pause=play_pause,
album=album), trunclen + 4))
except Exception as e:
if isinstance(e, dbus.exceptions.DBusException):
print('')
else:
print(e)

View file

@ -0,0 +1,15 @@
#!/usr/bin/env bash
SDIR="$HOME/.config/polybar/scripts"
# Launch Rofi
MENU="$(rofi -no-config -no-lazy-grab -sep "|" -dmenu -i -p '' \
-theme $SDIR/rofi/styles.rasi \
<<< " Default| Nord| Gruvbox| Dark| Cherry|")"
case "$MENU" in
*Default) "$SDIR"/styles.sh --default ;;
*Nord) "$SDIR"/styles.sh --nord ;;
*Gruvbox) "$SDIR"/styles.sh --gruvbox ;;
*Dark) "$SDIR"/styles.sh --dark ;;
*Cherry) "$SDIR"/styles.sh --cherry ;;
esac

View file

@ -0,0 +1,76 @@
#!/usr/bin/env bash
# Color files
PFILE="$HOME/.config/polybar/colors.ini"
RFILE="$HOME/.config/polybar/scripts/rofi/colors.rasi"
# Change colors
change_color() {
# polybar
sed -i -e "s/background = #.*/background = $BG/g" $PFILE
sed -i -e "s/foreground = #.*/foreground = $FG/g" $PFILE
sed -i -e "s/sep = #.*/sep = $SEP/g" $PFILE
# rofi
cat > $RFILE <<- EOF
/* colors */
* {
al: #00000000;
bg: ${BG}FF;
bga: ${BGA}FF;
fg: ${FG}FF;
ac: ${AC}FF;
se: ${SE}FF;
}
EOF
polybar-msg cmd restart
}
if [[ $1 = "--default" ]]; then
BG="#212B30"
FG="#C4C7C5"
BGA="#263035"
SEP="#3F5360"
AC="#EC407A"
SE="#4DD0E1"
change_color
elif [[ $1 = "--nord" ]]; then
BG="#3B4252"
FG="#E5E9F0"
BGA="#454C5C"
SEP="#5B6579"
AC="#BF616A"
SE="#88C0D0"
change_color
elif [[ $1 = "--gruvbox" ]]; then
BG="#282828"
FG="#EBDBB2"
BGA="#313131"
SEP="#505050"
AC="#FB4934"
SE="#8EC07C"
change_color
elif [[ $1 = "--dark" ]]; then
BG="#141C21"
FG="#93A1A1"
BGA="#1E262B"
SEP="#3C4449"
AC="#D12F2C"
SE="#33C5BA"
change_color
elif [[ $1 = "--cherry" ]]; then
BG="#1F1626"
FG="#FFFFFF"
BGA="#292030"
SEP="#473F4E"
AC="#D94084"
SE="#4F5D95"
change_color
else
cat <<- _EOF_
No option specified, Available options:
--default --nord --gruvbox --dark --cherry
_EOF_
fi

View file

@ -0,0 +1,61 @@
#!/bin/bash
bluetooth_print() {
bluetoothctl | while read -r; do
if [ "$(systemctl is-active "bluetooth.service")" = "active" ]; then
printf ''
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
counter=0
echo "$devices_paired" | while read -r line; do
device_info=$(bluetoothctl info "$line")
if echo "$device_info" | grep -q "Connected: yes"; then
device_alias=$(echo "$device_info" | grep "Alias" | cut -d ' ' -f 2-)
if [ $counter -gt 0 ]; then
printf ", %s" "$device_alias"
else
printf " %s" "$device_alias"
fi
counter=$((counter + 1))
fi
done
printf '\n'
else
echo ""
fi
done
}
bluetooth_toggle() {
if bluetoothctl show | grep -q "Powered: no"; then
bluetoothctl power on >> /dev/null
sleep 1
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl connect "$line" >> /dev/null
done
else
devices_paired=$(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
echo "$devices_paired" | while read -r line; do
bluetoothctl disconnect "$line" >> /dev/null
done
bluetoothctl power off >> /dev/null
fi
}
case "$1" in
--toggle)
bluetooth_toggle
;;
*)
bluetooth_print
;;
esac

View file

@ -0,0 +1,45 @@
#!/usr/bin/env bash
NOTIFY_ICON=/usr/share/icons/Papirus/32x32/apps/system-software-update.svg
get_total_updates() { UPDATES=$(checkupdates 2>/dev/null | wc -l); }
while true; do
get_total_updates
# notify user of updates
if hash notify-send &>/dev/null; then
if (( UPDATES > 50 )); then
notify-send -u critical -i $NOTIFY_ICON \
"You really need to update!!" "$UPDATES New packages"
elif (( UPDATES > 25 )); then
notify-send -u normal -i $NOTIFY_ICON \
"You should update soon" "$UPDATES New packages"
elif (( UPDATES > 2 )); then
notify-send -u low -i $NOTIFY_ICON \
"$UPDATES New packages"
fi
fi
# when there are updates available
# every 10 seconds another check for updates is done
while (( UPDATES > 0 )); do
if (( UPDATES == 1 )); then
echo "$UPDATES"
elif (( UPDATES > 1 )); then
echo "$UPDATES"
else
echo "None"
fi
sleep 10
get_total_updates
done
# when no updates are available, use a longer loop, this saves on CPU
# and network uptime, only checking once every 30 min for new updates
while (( UPDATES == 0 )); do
echo "None"
sleep 1800
get_total_updates
done
done

View file

@ -0,0 +1,3 @@
#!/bin/sh
echo "ﰌ `uptime --pretty | sed 's/up //' | sed 's/\ years\?,/y/' | sed 's/\ weeks\?,/w/' | sed 's/\ days\?,/d/' | sed 's/\ hours\?,\?/h/' | sed 's/\ minutes\?/m/'`"

View file

@ -0,0 +1,9 @@
#!/bin/sh
vpn="$(nmcli -t -f name,type connection show --order name --active 2>/dev/null | grep vpn | head -1 | cut -d ':' -f 1)"
if [ -n "$vpn" ]; then
echo "VPN: $vpn"
else
echo "VPN: Down "
fi

View file

@ -0,0 +1,83 @@
# 3-simple-weather Copyright (C) 2020 BrutalWizard (https://github.com/bru74lw1z4rd).
# This program comes with ABSOLUTELY NO WARRANTY;
# This is free software, and you are welcome to redistribute it
# under certain conditions;
# More info about wether at - https://openweathermap.org/weather-conditions
# To show icons from this script you will need to buy "Font Awesome Pro" font - https://fontawesome.com/
# Also you can change icon in arrays to yours icons
# Configured for NerdFonts - GitHub raven2cz @raven2cz
import requests
import json
# Settings
city = "<CITY>" # Your town
api_key = "<API-KEY>" # Your openweather api key
units = "metric" # Unit system {imperial or metric}
temperature_unit = "C" # Units of measurement. That will be showed in UI. Does not affect on API.
icons_list = {
"01d": "", # Clear sky day.
"01n": "", # Clear sky night.
"02d": "", # Few clouds day.
"02n": "", # Few clouds night.
"03d": "", # Scattered clouds day.
"03n": "", # Scattered clouds night.
"04d": "", # Broken clouds day.
"04n": "", # Broken clouds night.
"09d": "", # Shower rain day.
"09n": "", # Shower rain night.
"10d": "", # Rain day.
"10n": "", # Rain night
"11d": "", # Thunderstorm day.
"11n": "", # Thunderstorm night
"13d": "", # Snow day. Snowflake alternative: 
"13n": "", # Snow night. Snowflake alternative: 
"50d": "", # Mist day.
"50n": "" # Mist night.
}
atmophere_icons_list = {
701: "", # Mist
711: "", # Smoke
721: "", # Haze
731: "", # Dust (Sand / dust whirls)
741: "", # Fog
751: "", # Sand
761: "", # Dust
762: "", # Ash
771: "", # Squalls
781: "" # Tornado
}
def main():
try:
# Get data from openweather
url = ('http://api.openweathermap.org/data/2.5/weather?q={}&units={}&appid={}').format(city, units, api_key)
result = requests.get(url)
# If result was received
if(result.status_code == requests.codes['ok']):
# Read json
weather = result.json()
# Get info from array
id = int(weather['weather'][0]['id'])
group = weather['weather'][0]['main'].capitalize()
icon = weather['weather'][0]['icon'].capitalize()
temp = int(float(weather['main']['temp']))
# Load another icons for Atmosphere group
if(group == "Atmosphere"):
return atmophere_icons_list[id] + ' {}°{}'.format(temp, temperature_unit)
return icons_list[icon] + '%{F${foreground}' + ' {}°{}'.format(temp, temperature_unit) + '%{F-}'
else:
return "" # Return reload icon
except:
return "" # Return reload icon
if __name__ == "__main__":
print(main())

View file

@ -0,0 +1,75 @@
#!/bin/sh
get_icon() {
case $1 in
# Icons for weather-icons
01d) icon="";;
01n) icon="";;
02d) icon="";;
02n) icon="";;
03*) icon="";;
04*) icon="";;
09d) icon="";;
09n) icon="";;
10d) icon="";;
10n) icon="";;
11d) icon="";;
11n) icon="";;
13d) icon="";;
13n) icon="";;
50d) icon="";;
50n) icon="";;
*) icon="";
# Icons for Font Awesome 5 Pro
#01d) icon="";;
#01n) icon="";;
#02d) icon="";;
#02n) icon="";;
#03d) icon="";;
#03n) icon="";;
#04*) icon="";;
#09*) icon="";;
#10d) icon="";;
#10n) icon="";;
#11*) icon="";;
#13*) icon="";;
#50*) icon="";;
#*) icon="";
esac
echo $icon
}
KEY="71e6938c5e3cd8ea54cd6d0e216f2807"
CITY="6324729"
UNITS="metric"
SYMBOL="°"
API="https://api.openweathermap.org/data/2.5"
if [ -n "$CITY" ]; then
if [ "$CITY" -eq "$CITY" ] 2>/dev/null; then
CITY_PARAM="id=$CITY"
else
CITY_PARAM="q=$CITY"
fi
weather=$(curl -sf "$API/weather?appid=$KEY&$CITY_PARAM&units=$UNITS")
else
location=$(curl -sf https://location.services.mozilla.com/v1/geolocate?key=geoclue)
if [ -n "$location" ]; then
location_lat="$(echo "$location" | jq '.location.lat')"
location_lon="$(echo "$location" | jq '.location.lng')"
weather=$(curl -sf "$API/weather?appid=$KEY&lat=$location_lat&lon=$location_lon&units=$UNITS")
fi
fi
if [ -n "$weather" ]; then
weather_temp=$(echo "$weather" | jq ".main.temp" | cut -d "." -f 1)
weather_icon=$(echo "$weather" | jq -r ".weather[0].icon")
echo " $(get_icon "$weather_icon")" "$weather_temp$SYMBOL "
fi

View file

@ -0,0 +1,401 @@
;; ┌──────────────────────────────────────────────────────────────────────────────-----┐
;; │░█▀█░█▀█░█░░░█░█░█▀▄░█▀█░█▀▄░░░░░░░░░█░█░█▀▀░█▀▀░█▀▄░░░█▄█░█▀█░█▀▄░█░█░█░░░█▀▀░█▀▀ │
;; │░█▀▀░█░█░█░░░░█░░█▀▄░█▀█░█▀▄░░░░▀░░░░█░█░▀▀█░█▀▀░█▀▄░░░█░█░█░█░█░█░█░█░█░░░█▀▀░▀▀█ │
;; │░▀░░░▀▀▀░▀▀▀░░▀░░▀▀░░▀░▀░▀░▀░░░░▀░░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░░░▀░▀░▀▀▀░▀▀░░▀▀▀░▀▀▀░▀▀▀░▀▀▀ │
;; │░Created░By░Aditya░Shakya░@adi1090x░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; │░Modified By Raven @raven2cz░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░│
;; └──────────────────────────────────────────────────────────────────────────────-----┘
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/launcher]
type = custom/text
content =
content-foreground = ${color.purple}
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c $COMMAND"
click-left = ~/.config/polybar/scripts/launcher.sh &
;;click-middle = ~/.config/polybar/scripts/launcher-full
click-right = ~/.config/polybar/scripts/style-switch.sh &
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c $COMMAND"
;;scroll-up = ~/.config/polybar/scripts/launcher.sh &
;;scroll-down = ~/.config/polybar/scripts/color-switch.sh &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/sysmenu]
type = custom/text
content =
content-foreground = ${color.cyan}
click-left = xfce4-session-logout &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/color-switch]
type = custom/text
content =
content-foreground = ${color.red}
click-left = ~/.config/polybar/scripts/style-switch.sh &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/sep]
type = custom/text
content = |
content-foreground = ${color.sep}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/apps]
type = custom/text
[module/term]
inherit = module/apps
content =
content-foreground = ${color.blue-gray}
click-left = alacritty &
click-middle = urxvt &
click-right = xfce4-terminal &
[module/files]
inherit = module/apps
content =
content-foreground = ${color.blue}
click-left = dolphin &
click-right = thunar &
[module/browser]
inherit = module/apps
content =
content-foreground = ${color.orange}
click-left = firefox &
click-right = chromium &
[module/settings]
inherit = module/apps
content =
content-foreground = ${color.teal}
click-left = xfce4-settings-manager &
click-right = lxappearance &
[module/screenshot]
inherit = module/apps
content =
content-foreground = ${color.cyan}
click-left = spectacle &
click-right = xfce4-screenshooter &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/powermenu]
type = custom/menu
; If true, <label-toggle> will be to the left of the menu items (default).
; If false, it will be on the right of all the items.
expand-right = true
; "menu-LEVEL-N" has the same properties as "label-NAME" with
; the additional "exec" property
;
; Available exec commands:
; menu-open-LEVEL
; menu-close
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
menu-0-0 = " Reboot |"
menu-0-0-exec = menu-open-1
menu-0-1 = " Shutdown "
menu-0-1-exec = menu-open-2
menu-1-0 = " Back |"
menu-1-0-exec = menu-open-0
menu-1-1 = " Reboot "
menu-1-1-exec = systemctl reboot
menu-2-0 = " Shutdown |"
menu-2-0-exec = systemctl poweroff
menu-2-1 = " Back "
menu-2-1-exec = menu-open-0
; Available tags:
; <label-toggle> (default) - gets replaced with <label-(open|close)>
; <menu> (default)
; Note that if you use <label-toggle> you must also include
; the definition for <label-open>
format = <label-toggle><menu>
label-open =
label-open-foreground = ${color.cyan}
label-open-padding = 1
label-close =
label-close-foreground = ${color.red}
label-close-padding = 1
; Optional item separator
; Default: none
;label-separator = " | "
;label-separator-foreground = ${color.foreground}
;label-separator-background = ${color.background-alt}
;;label-open-foreground = ${color.foreground}
;;label-close-foreground = ${color.background}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/menu]
type = custom/menu
; If true, <label-toggle> will be to the left of the menu items (default).
; If false, it will be on the right of all the items.
expand-right = true
; "menu-LEVEL-N" has the same properties as "label-NAME" with
; the additional "exec" property
;
; Available exec commands:
; menu-open-LEVEL
; menu-close
; Other commands will be executed using "/usr/bin/env sh -c $COMMAND"
menu-0-0 ="  Menu | "
menu-0-0-exec = ~/.config/polybar/scripts/launcher.sh &
menu-0-1 =" Files | "
menu-0-1-exec = thunar &
menu-0-2 =" Terminal | "
menu-0-2-exec = termite &
menu-0-3 =" Browser "
menu-0-3-exec = firefox &
; Available tags:
; <label-toggle> (default) - gets replaced with <label-(open|close)>
; <menu> (default)
; Note that if you use <label-toggle> you must also include
; the definition for <label-open>
format = <label-toggle><menu>
label-open =
label-open-foreground = ${color.yellow}
label-open-padding = 1
label-close =
label-close-foreground = ${color.red}
label-close-padding = 1
; Optional item separator
; Default: none
;label-separator = " | "
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/polywins]
type = custom/script
exec = ~/.config/polybar/scripts/polywins.sh 2>/dev/null
format = <label>
label = %output%
label-padding = 1
tail = true
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/uptime]
;https://github.com/jaagr/polybar/wiki/User-contributed-modules#uptime
type = custom/script
exec = uptime | awk -F, '{sub(".*up ",x,$1);print $1}'
interval = 100
label = Uptime %output%
format-prefix = " "
format-prefix-foreground = ${color.teal}
format-underline =
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/kernel]
type = custom/script
exec = uname -r
tail = false
interval = 1024
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix = " "
format-prefix-foreground = ${color.blue}
format-underline = ${color.gray}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/networkspeedup]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
;interface = enp38s0
interface = eth0
label-connected = "%upspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " +"
format-connected-prefix-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/networkspeeddown]
;https://github.com/jaagr/polybar/wiki/Module:-network
type = internal/network
;interface = wlp3s0
;interface = enp14s0
;interface = enp0s31f6
;interface = enp38s0
interface = eth0
label-connected = "%downspeed:7%"
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/updates]
type = custom/script
; Available tokens:
; %counter%
; Command to be executed (using "/usr/bin/env sh -c [command]")
exec = ~/.config/polybar/scripts/updates.sh
; Conditional command that, if defined, needs to exit successfully
; before the main exec command is invoked.
; Default: ""
;;exec-if = ""
; Will the script output continous content?
; Default: false
tail = true
; Seconds to sleep between updates
; Default: 2 (0 if `tail = true`)
interval = 5
; Available tags:
; <output> - deprecated
; <label> (default)
format = <label>
format-prefix =
format-prefix-foreground = ${color.yellow}
; Available tokens:
; %output%
; Default: %output%
label = " %output%"
; Available tokens:
; %counter%
; %pid%
;
; "click-(left|middle|right)" will be executed using "/usr/bin/env sh -c [command]"
click-left = exo-open --launch TerminalEmulator &
click-right = exo-open --launch TerminalEmulator &
;;double-click-left = echo double left %counter%
;;double-click-middle = echo double middle %counter%
;;double-click-right = echo double right %counter%
; Available tokens:
; %counter%
; %pid%
;
; "scroll-(up|down)" will be executed using "/usr/bin/env sh -c [command]"
;;scroll-up = echo scroll up %counter%
;;scroll-down = echo scroll down %counter%
[module/pacman-updates]
type = custom/script
;exec = pacman -Qu | wc -l
exec = checkupdates | wc -l
interval = 1000
label = Repo: %output%
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix = " "
format-prefix-foreground = ${color.yellow}
;format-underline = ${color.yellow}
[module/aur-updates]
type = custom/script
exec = cower -u | wc -l
interval = 1000
label = Aur: %output%
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix = " "
format-prefix-foreground = ${color.yellow}
format-underline = ${color.yellow}
[module/updates-common]
type = custom/script
exec = ~/.config/polybar/scripts/check-all-updates.sh
interval = 600
label = Updates: %output%
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix = " "
format-prefix-foreground = ${color.yellow}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/release]
type = custom/script
exec = (lsb_release -d | awk {'print $2'} ;echo " "; lsb_release -r | awk {'print $2'}) | tr -d '\n'
interval = 6000
format-foreground = ${color.foreground}
format-background = ${color.background}
format-prefix = " "
format-prefix-foreground = ${color.green}
;format-underline = ${color.green}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpris-play-pause]
type = custom/ipc
hook-0 = echo "%{F#0f0}%{F-}"
hook-1 = echo "%{F${foreground}}%{F-}"
initial = 2
click-left = playerctl play-pause
scroll-up = playerctl previous
scroll-down = playerctl next
[module/mpris]
type = custom/script
tail = true
format = <label>
exec = ~/.config/polybar/scripts/scroll_mpris_status.sh
click-left = playerctl play-pause
scroll-up = playerctl previous
scroll-down = playerctl next
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/weather]
type = custom/script
exec = python3 ~/.config/polybar/scripts/weather.py
interval = 600
format-foreground = ${color.yellow}
cursor-click = python3 ~/.config/polybar/scripts/weather.py
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/xmenu]
type = custom/script
interval = 1200
exec = echo " "
click-left = "sh ~/xmenu/xmenu.sh"
format-foreground = ${color.foreground}
format-background = ${color.background}

View file

@ -0,0 +1,48 @@
#!/usr/bin/env python3
import os
import sys
cmd = os.popen("playerctl metadata").read()
trunclen = 50
artist_key = "xesam:artist"
title_key = "xesam:title"
artist_start = cmd.find(artist_key)
title_start = cmd.find(title_key)
colorb = "%{F#1771F1}"
colorw = "%{F#FFF}"
res = ""
cmd2 = os.popen("playerctl status").read().replace("\n", "")
states = {"Playing": "", "Paused": "", "Stopped": ""}
if "Playing" in cmd2 or "Paused" in cmd2 or "Stopped" in cmd2:
res = colorb+states[cmd2]+colorw+" "
if artist_start >= 0:
artist_nl = cmd[artist_start:].find("\n")
artist = cmd[artist_start+len(artist_key) : artist_start+artist_nl]
title_nl = cmd[title_start:].find("\n")
title = cmd[title_start+len(title_key) : title_start+title_nl]
result = artist.strip() + " - " + title.strip()
if len(result) > trunclen:
result = result[:trunclen] + "..."
res += result
if "No players found" in res:
res = ""
print(res)
sys.stdout.flush()

View file

@ -0,0 +1,17 @@
#!/bin/sh
player_status=$(playerctl status 2> /dev/null)
player_artist=$(playerctl metadata artist)
player_titles=$(playerctl metadata title)
if [ "$player_artist" != "" ]; then
if [ "$player_status" = "Playing" ]; then
echo "%{F#FFF} $player_artist - $player_titles"
elif [ "$player_status" = "Paused" ]; then
echo "%{F#FFF} $player_artist - $player_titles"
elif [ "$player_status" = "Stopped" ]; then
echo "%{F#FFF} $player_artist - $player_titles"
else
echo ""
fi
fi

View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View file

@ -0,0 +1,43 @@
# polybar-cryptocurrency
![pcrypto](https://user-images.githubusercontent.com/21110159/64199525-30750300-ce93-11e9-812b-0eaf94494b1f.png)
![pcrypto2](https://user-images.githubusercontent.com/21110159/64337066-324fdb00-cfe7-11e9-8962-b82d1f76b72f.png)
![pcrypto3](https://user-images.githubusercontent.com/21110159/64337087-4c89b900-cfe7-11e9-983e-23b02e32e9a1.png)
A polybar script much like [polybar-crypto](https://github.com/willHol/polybar-crypto).
It's a great script, but:
* I dislike messing with configuration files for small scripts
* I feel as if changing what the module displays should be quick
* [Coinranking's API](https://docs.coinranking.com/public) is much better than CMC, in my opinion (currency symbols)
* [Guarda's icons](https://github.com/guardaco/crypto-icons) are recent and look really nice, and it's fun to be able to fetch them quickly
## Setup
```
git clone https://github.com/plinki/polybar-cryptocurrency.git
cd polybar-cryptocurrency && ./setup.sh
```
__or__ copy coins.otf to ~/.fonts, and coins.svg & pcrypto.py to ~/.config/polybar
### Module
Add to your polybar config:
```
[bar/my-left]
modules-right = crypto
[module/crypto]
type = custom/script
exec = ~/.config/polybar/pcrypto.py --base USD --coins btc eth link ltc xrp xmr
interval = 60
font-0 = "coins:style=Regular;0"
```
### Icons
Icons are fetched from coins.svg, if you'd like to use your own icon for a specific coin, just replace the unicode with the icon
```
:btc
```
more options in `pcrypto.py -h`

View file

@ -0,0 +1,304 @@
e900:1st
e901:ada
e902:adc
e903:adx
e904:aeon
e905:amp
e906:anc
e907:ant
e908:arch
e909:ardr
e90a:aur
e90b:banx
e90c:bat
e90d:bay
e90e:bc
e90f:bch
e910:bcn
e911:bft
e912:bnb
e913:bnt
e914:brk
e915:brx
e916:bsd
e917:bta
e918:btc
e919:btcd
e91a:btg
e91b:btm
e91c:bts
e91d:clam
e91e:clo
e91f:cloak
e920:cvc
e921:dao
e922:dash
e923:dcr
e924:dct
e925:dent
e926:dgb
e927:dgd
e928:dgx
e929:dmd
e92a:dnt
e92b:doge
e92c:edg
e92d:emc
e92e:eos
e92f:erc
e930:etc
e931:eth
e932:exp
e933:fc2
e934:fcn
e935:fct
e936:flo
e937:frk
e938:ftc
e939:fun
e93a:game
e93b:gbg
e93c:gbyte
e93d:gdc
e93e:gemz
e93f:gld
e940:gno
e941:gnt
e942:golos
e943:grc
e944:grs
e945:gup
e946:awc
e947:hmq
e948:icn
e949:ifc
e94a:incnt
e94b:ioc
e94c:cnd
e94d:ixt
e94e:jbs
e94f:kmd
e950:kore
e951:lbc
e952:ldoge
e953:lsk
e954:ltc
e955:lun
e956:maid
e957:mco
e958:mint
e959:mln
e95a:mona
e95b:mrc
e95c:msc
e95d:msp
e95e:mtl
e95f:mtr
e960:mue
e961:nano
e962:nav
e963:nbt
e964:neo
e965:neos
e966:neu
e967:nlg
e968:nmc
e969:note
e96a:nvc
e96b:nxt
e96c:oax
e96d:ok
e96e:omg
e96f:omni
e970:opal
e971:part
e972:pay
e973:piggy
e974:pink
e975:pivx
e976:plbt
e977:plr
e978:plu
e979:pot
e97a:ppc
e97b:ptoy
e97c:qcn
e97d:qrk
e97e:qtum
e97f:rads
e980:rbies
e981:rbt
e982:rby
e983:rdd
e984:rep
e985:rise
e986:rlc
e987:salt
e988:sar
e989:scot
e98a:sdc
e98b:sia
e98c:sjcx
e98d:slg
e98e:sls
e98f:sngls
e990:snrg
e991:snt
e992:start
e993:steem
e994:storj
e995:str
e996:strat
e997:swift
e998:swt
e999:sync
e99a:sys
e99b:time
e99c:tkn
e99d:trig
e99e:trst
e99f:trx
e9a0:tx
e9a1:ubq
e9a2:unity
e9a3:usdt
e9a4:ven
e9a5:vior
e9a6:vnl
e9a7:vpn
e9a8:vrc
e9a9:vtc
e9aa:waves
e9ab:wings
e9ac:xai
e9ad:xaur
e9ae:xbs
e9af:xcp
e9b0:xdn
e9b1:xem
e9b2:xmr
e9b3:xpm
e9b4:xrp
e9b5:xtz
e9b7:xzc
e9b8:ybc
e9b9:zec
e9ba:zeit
e9bb:zrx
e9bc:stx
e9bd:sbtc
e9be:rcn
e9bf:nmr
e9c0:zil
e9c1:vib
e9c2:xnn
e9c3:viu
e9c4:veri
e9c5:sc
e9c6:rhoc
e9c7:kcs
e9c8:icx
e9c9:ark
e9ca:ae
e9cb:tip
e9cc:crpt
e9cd:via
e9ce:myst
e9cf:miota
e9d0:adt
e9d1:eng
e9d2:cfi
e9d3:dsh
e9d4:xlm
e9d5:fsbt
e9d6:atl
e9d7:ath
e9d8:arn
e9d9:arc
e9da:apt
e9db:aidoc
e9dc:amis
e9dd:adst
e9de:300
e9df:ngc
e9e0:srn
e9e1:wax
e9e2:dcn
e9e3:powr
e9e4:dkk
e9e5:gbp
e9e6:eur
e9e7:usd
e9e8:ukg
e9e9:lrc
e9ea:brd
e9eb:mana
e9ec:mer
e9ed:tix
e9ee:xel
e9ef:zen
e9f0:btcp
e9f1:ebst
e9f2:elf
e9f3:hsr
e9f4:iost
e9f5:loom
e9f6:mkr
e9f7:nas
e9f8:now
e9f9:snm
e9fa:synx
e9fb:wan
e9fd:ely
e9fe:ela
e9ff:smart
ea00:aion
ea01:tusd
ea02:usdc
ea03:vet
ea04:pax
ea05:joys
ea06:bchsv
ea07:bsv
ea08:bth
ea09:trezor
ea0a:ledger
ea0b:r
ea0c:npxs
ea0d:dai
ea0e:link
ea0f:hot
ea10:gusd
ea11:eurs
ea12:vtho
ea13:kin
ea14:ont
ea15:atom
ea16:ankr
ea17:erd
ea18:ftm
ea19:lto
ea1a:und
ea1b:vera
ea1c:yec
ea1d:aya
ea1e:ethplo
ea1f:iotx
ea20:enj
ea21:rvn
ea22:xns
ea23:pyn
ea24:ncash
ea25:loki
ea26:knc
ea27:job
ea28:chz
ea29:btu
ea2a:apis
ea2b:gas
ea2c:busd
ea2d:iq
ea2e:lst
ea2f:ong
ea30:nut
ea31:eosdt

View file

@ -0,0 +1,47 @@
#!/usr/bin/env python3
import requests
import argparse
import json
import sys
import os
parser = argparse.ArgumentParser(description="Display currencies on polybar")
parser.add_argument("--coins", type=str,
nargs="+", help="Select coins to display")
parser.add_argument("--base", type=str,
nargs="?", default="USD", help="Currency base to convert against")
parser.add_argument("--decimals", type=int,
nargs="?", default=2, help="How many decimals to show")
parser.add_argument("--display", type=str,
nargs="?", default="price", choices=["price", "percentage", "both"], help="Display mode")
args = parser.parse_args()
home = os.path.expanduser("~/")
unicode_dict = {}
with open(f"{home}.config/polybar/polybar-cryptocurrency/coins.svg", "r", encoding="utf-8") as icons:
for line in icons:
unicode, coin = line.strip().split(":")
unicode_dict[unicode] = coin
if not args.coins:
parser.print_help()
parser.exit()
for coin in args.coins:
get = requests.get(
f"https://api.coinranking.com/v1/public/coins?prefix={coin}&base={args.base}").json()["data"]
price_float = round(float(get["coins"][0]["price"]), args.decimals)
current_price = get["base"]["sign"] + str(price_float)
change = get["coins"][0]["change"]
for _unicode, _coin in unicode_dict.items():
if _coin == coin:
icon = chr(int(_unicode, 16)) if len(_unicode) > 1 else _unicode
if args.display == "price":
sys.stdout.write(f" {icon} {current_price} ")
if args.display == "percentage":
sys.stdout.write(f" {icon} {change:+}% ")
if args.display == "both":
sys.stdout.write(f" {icon} {current_price} | {change:+}% ")

View file

@ -0,0 +1,26 @@
#!/bin/sh
set -x
DISTRO=$(lsb_release -i | cut -f 2-)
case $DISTRO in
'Manjaro')
dir_fonts=/home/$USER/.local/share/fonts/
;;
'Arch')
dir_fonts=/home/$USER/.local/share/fonts/
;;
'Artix')
dir_fonts=/home/$USER/.local/share/fonts/
;;
*)
dir_fonts=/home/$USER/.fonts/
;;
esac
mkdir $dir_fonts
dir_polybar=/home/$USER/.config/polybar/
cp coins.otf $dir_fonts
cp -t $dir_polybar pcrypto.py coins.svg

View file

@ -0,0 +1,42 @@
#!/bin/sh
BAR_HEIGHT=22 # polybar height
BORDER_SIZE=1 # border size from your wm settings
YAD_WIDTH=222 # 222 is minimum possible value
YAD_HEIGHT=193 # 193 is minimum possible value
DATE="$(date +"%a %d %H:%M")"
case "$1" in
--popup)
if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then
exit 0
fi
eval "$(xdotool getmouselocation --shell)"
eval "$(xdotool getdisplaygeometry --shell)"
# X
if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side
: $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))
elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side
: $((pos_x = BORDER_SIZE))
else #Center
: $((pos_x = X - YAD_WIDTH / 2))
fi
# Y
if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom
: $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))
else #Top
: $((pos_y = BAR_HEIGHT + BORDER_SIZE))
fi
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
--width="$YAD_WIDTH" --height="$YAD_HEIGHT" --posx="$pos_x" --posy="$pos_y" \
--title="yad-calendar" --borders=0 >/dev/null &
;;
*)
echo "$DATE"
;;
esac

View file

@ -0,0 +1,17 @@
#!/bin/sh
if ! updates=$(yay -Qum 2> /dev/null | wc -l); then
# if ! updates=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates=$(cower -u 2> /dev/null | wc -l); then
# if ! updates=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates=0
fi
if [ "$updates" -gt 0 ]; then
echo "# $updates"
else
echo ""
fi

View file

@ -0,0 +1,22 @@
#!/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
# if ! updates_aur=$(paru -Qum 2> /dev/null | wc -l); then
# if ! updates_aur=$(cower -u 2> /dev/null | wc -l); then
# if ! updates_aur=$(trizen -Su --aur --quiet | wc -l); then
# if ! updates_aur=$(pikaur -Qua 2> /dev/null | wc -l); then
# if ! updates_aur=$(rua upgrade --printonly 2> /dev/null | wc -l); then
updates_aur=0
fi
updates=$((updates_arch + updates_aur))
if [ "$updates" -gt 0 ]; then
echo "# $updates"
else
echo ""
fi

View file

@ -0,0 +1,62 @@
# This is a sample commands.py. You can add your own commands here.
#
# Please refer to commands_full.py for all the default commands and a complete
# documentation. Do NOT add them all here, or you may end up with defunct
# commands when upgrading ranger.
# A simple command for demonstration purposes follows.
# -----------------------------------------------------------------------------
from __future__ import (absolute_import, division, print_function)
# You can import any python module as needed.
import os
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import Command
# Any class that is a subclass of "Command" will be integrated into ranger as a
# command. Try typing ":my_edit<ENTER>" in ranger!
class my_edit(Command):
# The so-called doc-string of the class will be visible in the built-in
# help that is accessible by typing "?c" inside ranger.
""":my_edit <filename>
A sample command for demonstration purposes that opens a file in an editor.
"""
# The execute method is called when you run this command in ranger.
def execute(self):
# self.arg(1) is the first (space-separated) argument to the function.
# This way you can write ":my_edit somefilename<ENTER>".
if self.arg(1):
# self.rest(1) contains self.arg(1) and everything that follows
target_filename = self.rest(1)
else:
# self.fm is a ranger.core.filemanager.FileManager object and gives
# you access to internals of ranger.
# self.fm.thisfile is a ranger.container.file.File object and is a
# reference to the currently selected file.
target_filename = self.fm.thisfile.path
# This is a generic function to print text in ranger.
self.fm.notify("Let's edit the file " + target_filename + "!")
# Using bad=True in fm.notify allows you to print error messages:
if not os.path.exists(target_filename):
self.fm.notify("The given file does not exist!", bad=True)
return
# This executes a function from ranger.core.acitons, a module with a
# variety of subroutines that can help you construct commands.
# Check out the source, or run "pydoc ranger.core.actions" for a list.
self.fm.edit_file(target_filename)
# The tab method is called when you press tab, and should return a list of
# suggestions that the user will tab through.
# tabnum is 1 for <TAB> and -1 for <S-TAB> by default
def tab(self, tabnum):
# This is a generic tab-completion function that iterates through the
# content of the current directory.
return self._tab_directory_content()

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,759 @@
# ===================================================================
# This file contains the default startup commands for ranger.
# To change them, it is recommended to create either /etc/ranger/rc.conf
# (system-wide) or ~/.config/ranger/rc.conf (per user) and add your custom
# commands there.
#
# If you copy this whole file there, you may want to set the environment
# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice.
#
# The purpose of this file is mainly to define keybindings and settings.
# For running more complex python code, please create a plugin in "plugins/" or
# a command in "commands.py".
#
# Each line is a command that will be run before the user interface
# is initialized. As a result, you can not use commands which rely
# on the UI such as :delete or :mark.
# ===================================================================
# ===================================================================
# == Options
# ===================================================================
# Which viewmode should be used? Possible values are:
# miller: Use miller columns which show multiple levels of the hierarchy
# multipane: Midnight-commander like multipane view showing all tabs next
# to each other
set viewmode miller
#set viewmode multipane
# How many columns are there, and what are their relative widths?
set column_ratios 1,3,4
# Which files should be hidden? (regular expression)
set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$
# Show hidden files? You can toggle this by typing 'zh'
set show_hidden false
# Ask for a confirmation when running the "delete" command?
# Valid values are "always", "never", "multiple" (default)
# With "multiple", ranger will ask only if you delete multiple files at once.
set confirm_on_delete multiple
# Use non-default path for file preview script?
# ranger ships with scope.sh, a script that calls external programs (see
# README.md for dependencies) to preview images, archives, etc.
#set preview_script ~/.config/ranger/scope.sh
# Use the external preview script or display simple plain text or image previews?
set use_preview_script true
# Automatically count files in the directory, even before entering them?
set automatically_count_files true
# Open all images in this directory when running certain image viewers
# like feh or sxiv? You can still open selected files by marking them.
set open_all_images true
# Be aware of version control systems and display information.
set vcs_aware false
# State of the four backends git, hg, bzr, svn. The possible states are
# disabled, local (only show local info), enabled (show local and remote
# information).
set vcs_backend_git enabled
set vcs_backend_hg disabled
set vcs_backend_bzr disabled
set vcs_backend_svn disabled
# Truncate the long commit messages to this length when shown in the statusbar.
set vcs_msg_length 50
# Use one of the supported image preview protocols
set preview_images true
# Set the preview image method. Supported methods:
#
# * w3m (default):
# Preview images in full color with the external command "w3mimgpreview"?
# This requires the console web browser "w3m" and a supported terminal.
# It has been successfully tested with "xterm" and "urxvt" without tmux.
#
# * iterm2:
# Preview images in full color using iTerm2 image previews
# (http://iterm2.com/images.html). This requires using iTerm2 compiled
# with image preview support.
#
# This feature relies on the dimensions of the terminal's font. By default, a
# width of 8 and height of 11 are used. To use other values, set the options
# iterm2_font_width and iterm2_font_height to the desired values.
#
# * terminology:
# Previews images in full color in the terminology terminal emulator.
# Supports a wide variety of formats, even vector graphics like svg.
#
# * urxvt:
# Preview images in full color using urxvt image backgrounds. This
# requires using urxvt compiled with pixbuf support.
#
# * urxvt-full:
# The same as urxvt but utilizing not only the preview pane but the
# whole terminal window.
#
# * kitty:
# Preview images in full color using kitty image protocol.
# Requires python PIL or pillow library.
# If ranger does not share the local filesystem with kitty
# the transfer method is changed to encode the whole image;
# while slower, this allows remote previews,
# for example during an ssh session.
# Tmux is unsupported.
#
# * ueberzug:
# Preview images in full color with the external command "ueberzug".
# Images are shown by using a child window.
# Only for users who run X11 in GNU/Linux.
set preview_images_method w3m
# Delay in seconds before displaying an image with the w3m method.
# Increase it in case of experiencing display corruption.
set w3m_delay 0.02
# Manually adjust the w3mimg offset when using a terminal which needs this
set w3m_offset 0
# Default iTerm2 font size (see: preview_images_method: iterm2)
set iterm2_font_width 8
set iterm2_font_height 11
# Use a unicode "..." character to mark cut-off filenames?
set unicode_ellipsis false
# BIDI support - try to properly display file names in RTL languages (Hebrew, Arabic).
# Requires the python-bidi pip package
set bidi_support false
# Show dotfiles in the bookmark preview box?
set show_hidden_bookmarks true
# Which colorscheme to use? These colorschemes are available by default:
# default, jungle, snow, solarized
set colorscheme default
# Preview files on the rightmost column?
# And collapse (shrink) the last column if there is nothing to preview?
set preview_files true
set preview_directories true
set collapse_preview true
# Wrap long lines in plain text previews?
set wrap_plaintext_previews false
# Save the console history on exit?
set save_console_history true
# Draw the status bar on top of the browser window (default: bottom)
set status_bar_on_top false
# Draw a progress bar in the status bar which displays the average state of all
# currently running tasks which support progress bars?
set draw_progress_bar_in_status_bar true
# Draw borders around columns? (separators, outline, both, or none)
# Separators are vertical lines between columns.
# Outline draws a box around all the columns.
# Both combines the two.
set draw_borders none
# Display the directory name in tabs?
set dirname_in_tabs false
# Enable the mouse support?
set mouse_enabled true
# Display the file size in the main column or status bar?
set display_size_in_main_column true
set display_size_in_status_bar true
# Display the free disk space in the status bar?
set display_free_space_in_status_bar true
# Display files tags in all columns or only in main column?
set display_tags_in_all_columns true
# Set a title for the window? Updates both `WM_NAME` and `WM_ICON_NAME`
set update_title false
# Set the tmux/screen window-name to "ranger"?
set update_tmux_title true
# Shorten the title if it gets long? The number defines how many
# directories are displayed at once, 0 turns off this feature.
set shorten_title 3
# Show hostname in titlebar?
set hostname_in_titlebar true
# Abbreviate $HOME with ~ in the titlebar (first line) of ranger?
set tilde_in_titlebar false
# How many directory-changes or console-commands should be kept in history?
set max_history_size 20
set max_console_history_size 50
# Try to keep so much space between the top/bottom border when scrolling:
set scroll_offset 8
# Flush the input after each key hit? (Noticeable when ranger lags)
set flushinput true
# Padding on the right when there's no preview?
# This allows you to click into the space to run the file.
set padding_right true
# Save bookmarks (used with mX and `X) instantly?
# This helps to synchronize bookmarks between multiple ranger
# instances but leads to *slight* performance loss.
# When false, bookmarks are saved when ranger is exited.
set autosave_bookmarks true
# Save the "`" bookmark to disk. This can be used to switch to the last
# directory by typing "``".
set save_backtick_bookmark true
# You can display the "real" cumulative size of directories by using the
# command :get_cumulative_size or typing "dc". The size is expensive to
# calculate and will not be updated automatically. You can choose
# to update it automatically though by turning on this option:
set autoupdate_cumulative_size false
# Turning this on makes sense for screen readers:
set show_cursor false
# One of: size, natural, basename, atime, ctime, mtime, type, random
set sort natural
# Additional sorting options
set sort_reverse false
set sort_case_insensitive true
set sort_directories_first true
set sort_unicode false
# Enable this if key combinations with the Alt Key don't work for you.
# (Especially on xterm)
set xterm_alt_key false
# Whether to include bookmarks in cd command
set cd_bookmarks true
# Changes case sensitivity for the cd command tab completion
set cd_tab_case sensitive
# Use fuzzy tab completion with the "cd" command. For example,
# ":cd /u/lo/b<tab>" expands to ":cd /usr/local/bin".
set cd_tab_fuzzy false
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
# disable this feature.
set preview_max_size 0
# The key hint lists up to this size have their sublists expanded.
# Otherwise the submaps are replaced with "...".
set hint_collapse_threshold 10
# Add the highlighted file to the path in the titlebar
set show_selection_in_titlebar true
# The delay that ranger idly waits for user input, in milliseconds, with a
# resolution of 100ms. Lower delay reduces lag between directory updates but
# increases CPU load.
set idle_delay 2000
# When the metadata manager module looks for metadata, should it only look for
# a ".metadata.json" file in the current directory, or do a deep search and
# check all directories above the current one as well?
set metadata_deep_search false
# Clear all existing filters when leaving a directory
set clear_filters_on_dir_change false
# Disable displaying line numbers in main column.
# Possible values: false, absolute, relative.
set line_numbers false
# When line_numbers=relative show the absolute line number in the
# current line.
set relative_current_zero false
# Start line numbers from 1 instead of 0
set one_indexed false
# Save tabs on exit
set save_tabs_on_exit false
# Enable scroll wrapping - moving down while on the last item will wrap around to
# the top and vice versa.
set wrap_scroll false
# Set the global_inode_type_filter to nothing. Possible options: d, f and l for
# directories, files and symlinks respectively.
set global_inode_type_filter
# This setting allows to freeze the list of files to save I/O bandwidth. It
# should be 'false' during start-up, but you can toggle it by pressing F.
set freeze_files false
# Print file sizes in bytes instead of the default human-readable format.
set size_in_bytes false
# Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
# give a warning when you nest ranger in a subshell started by ranger.
# Special value "error" makes the warning more visible.
set nested_ranger_warning true
# ===================================================================
# == Local Options
# ===================================================================
# You can set local options that only affect a single directory.
# Examples:
# setlocal path=~/downloads sort mtime
# ===================================================================
# == Command Aliases in the Console
# ===================================================================
alias e edit
alias q quit
alias q! quit!
alias qa quitall
alias qa! quitall!
alias qall quitall
alias qall! quitall!
alias setl setlocal
alias filter scout -prts
alias find scout -aets
alias mark scout -mr
alias unmark scout -Mr
alias search scout -rs
alias search_inc scout -rts
alias travel scout -aefklst
# ===================================================================
# == Define keys for the browser
# ===================================================================
# Basic
map Q quitall
map q quit
copymap q ZZ ZQ
map R reload_cwd
map F set freeze_files!
map <C-r> reset
map <C-l> redraw_window
map <C-c> abort
map <esc> change_mode normal
map ~ set viewmode!
map i display_file
map <A-j> scroll_preview 1
map <A-k> scroll_preview -1
map ? help
map W display_log
map w taskview_open
map S shell $SHELL
map : console
map ; console
map ! console shell%space
map @ console -p6 shell %%s
map # console shell -p%space
map s console shell%space
map r chain draw_possible_programs; console open_with%space
map f console find%space
map cd console cd%space
map <C-p> chain console; eval fm.ui.console.history_move(-1)
# Change the line mode
map Mf linemode filename
map Mi linemode fileinfo
map Mm linemode mtime
map Mh linemode humanreadablemtime
map Mp linemode permissions
map Ms linemode sizemtime
map MH linemode sizehumanreadablemtime
map Mt linemode metatitle
# Tagging / Marking
map t tag_toggle
map ut tag_remove
map "<any> tag_toggle tag=%any
map <Space> mark_files toggle=True
map v mark_files all=True toggle=True
map uv mark_files all=True val=False
map V toggle_visual_mode
map uV toggle_visual_mode reverse=True
# For the nostalgics: Midnight Commander bindings
map <F1> help
map <F2> rename_append
map <F3> display_file
map <F4> edit
map <F5> copy
map <F6> cut
map <F7> console mkdir%space
map <F8> console delete
#map <F8> console trash
map <F10> exit
# In case you work on a keyboard with dvorak layout
map <UP> move up=1
map <DOWN> move down=1
map <LEFT> move left=1
map <RIGHT> move right=1
map <HOME> move to=0
map <END> move to=-1
map <PAGEDOWN> move down=1 pages=True
map <PAGEUP> move up=1 pages=True
map <CR> move right=1
#map <DELETE> console delete
map <INSERT> console touch%space
# VIM-like
copymap <UP> k
copymap <DOWN> j
copymap <LEFT> h
copymap <RIGHT> l
copymap <HOME> gg
copymap <END> G
copymap <PAGEDOWN> <C-F>
copymap <PAGEUP> <C-B>
map J move down=0.5 pages=True
map K move up=0.5 pages=True
copymap J <C-D>
copymap K <C-U>
# Jumping around
map H history_go -1
map L history_go 1
map ] move_parent 1
map [ move_parent -1
map } traverse
map { traverse_backwards
map ) jump_non
map gh cd ~
map ge cd /etc
map gu cd /usr
map gd cd /dev
map gl cd -r .
map gL cd -r %f
map go cd /opt
map gv cd /var
map gm cd /media
map gi eval fm.cd('/run/media/' + os.getenv('USER'))
map gM cd /mnt
map gs cd /srv
map gp cd /tmp
map gr cd /
map gR eval fm.cd(ranger.RANGERDIR)
map g/ cd /
map g? cd /usr/share/doc/ranger
# External Programs
map E edit
map du shell -p du --max-depth=1 -h --apparent-size
map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh
map yp yank path
map yd yank dir
map yn yank name
map y. yank name_without_extension
# Filesystem Operations
map = chmod
map cw console rename%space
map a rename_append
map A eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
map I eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
map pp paste
map po paste overwrite=True
map pP paste append=True
map pO paste overwrite=True append=True
map pl paste_symlink relative=False
map pL paste_symlink relative=True
map phl paste_hardlink
map pht paste_hardlinked_subtree
map pd console paste dest=
map p`<any> paste dest=%any_path
map p'<any> paste dest=%any_path
map dD console delete
map dT console trash
map dd cut
map ud uncut
map da cut mode=add
map dr cut mode=remove
map dt cut mode=toggle
map yy copy
map uy uncut
map ya copy mode=add
map yr copy mode=remove
map yt copy mode=toggle
# Temporary workarounds
map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier)
map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier)
map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier)
map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier)
map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier)
map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier)
map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier)
map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier)
# Searching
map / console search%space
map n search_next
map N search_next forward=False
map ct search_next order=tag
map cs search_next order=size
map ci search_next order=mimetype
map cc search_next order=ctime
map cm search_next order=mtime
map ca search_next order=atime
# Tabs
map <C-n> tab_new
map <C-w> tab_close
map <TAB> tab_move 1
map <S-TAB> tab_move -1
map <A-Right> tab_move 1
map <A-Left> tab_move -1
map gt tab_move 1
map gT tab_move -1
map gn tab_new
map gc tab_close
map uq tab_restore
map <a-1> tab_open 1
map <a-2> tab_open 2
map <a-3> tab_open 3
map <a-4> tab_open 4
map <a-5> tab_open 5
map <a-6> tab_open 6
map <a-7> tab_open 7
map <a-8> tab_open 8
map <a-9> tab_open 9
map <a-r> tab_shift 1
map <a-l> tab_shift -1
# Sorting
map or set sort_reverse!
map oz set sort=random
map os chain set sort=size; set sort_reverse=False
map ob chain set sort=basename; set sort_reverse=False
map on chain set sort=natural; set sort_reverse=False
map om chain set sort=mtime; set sort_reverse=False
map oc chain set sort=ctime; set sort_reverse=False
map oa chain set sort=atime; set sort_reverse=False
map ot chain set sort=type; set sort_reverse=False
map oe chain set sort=extension; set sort_reverse=False
map oS chain set sort=size; set sort_reverse=True
map oB chain set sort=basename; set sort_reverse=True
map oN chain set sort=natural; set sort_reverse=True
map oM chain set sort=mtime; set sort_reverse=True
map oC chain set sort=ctime; set sort_reverse=True
map oA chain set sort=atime; set sort_reverse=True
map oT chain set sort=type; set sort_reverse=True
map oE chain set sort=extension; set sort_reverse=True
map dc get_cumulative_size
# Settings
map zc set collapse_preview!
map zd set sort_directories_first!
map zh set show_hidden!
map <C-h> set show_hidden!
copymap <C-h> <backspace>
copymap <backspace> <backspace2>
map zI set flushinput!
map zi set preview_images!
map zm set mouse_enabled!
map zp set preview_files!
map zP set preview_directories!
map zs set sort_case_insensitive!
map zu set autoupdate_cumulative_size!
map zv set use_preview_script!
map zf console filter%space
copymap zf zz
# Filter stack
map .d filter_stack add type d
map .f filter_stack add type f
map .l filter_stack add type l
map .m console filter_stack add mime%space
map .n console filter_stack add name%space
map .# console filter_stack add hash%space
map ." filter_stack add duplicate
map .' filter_stack add unique
map .| filter_stack add or
map .& filter_stack add and
map .! filter_stack add not
map .r filter_stack rotate
map .c filter_stack clear
map .* filter_stack decompose
map .p filter_stack pop
map .. filter_stack show
# Bookmarks
map `<any> enter_bookmark %any
map '<any> enter_bookmark %any
map m<any> set_bookmark %any
map um<any> unset_bookmark %any
map m<bg> draw_bookmarks
copymap m<bg> um<bg> `<bg> '<bg>
# Generate all the chmod bindings with some python help:
eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg))
eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg))
# ===================================================================
# == Define keys for the console
# ===================================================================
# Note: Unmapped keys are passed directly to the console.
# Basic
cmap <tab> eval fm.ui.console.tab()
cmap <s-tab> eval fm.ui.console.tab(-1)
cmap <ESC> eval fm.ui.console.close()
cmap <CR> eval fm.ui.console.execute()
cmap <C-l> redraw_window
copycmap <ESC> <C-c>
copycmap <CR> <C-j>
# Move around
cmap <up> eval fm.ui.console.history_move(-1)
cmap <down> eval fm.ui.console.history_move(1)
cmap <left> eval fm.ui.console.move(left=1)
cmap <right> eval fm.ui.console.move(right=1)
cmap <home> eval fm.ui.console.move(right=0, absolute=True)
cmap <end> eval fm.ui.console.move(right=-1, absolute=True)
cmap <a-b> eval fm.ui.console.move_word(left=1)
cmap <a-f> eval fm.ui.console.move_word(right=1)
copycmap <a-b> <a-left>
copycmap <a-f> <a-right>
# Line Editing
cmap <backspace> eval fm.ui.console.delete(-1)
cmap <delete> eval fm.ui.console.delete(0)
cmap <C-w> eval fm.ui.console.delete_word()
cmap <A-d> eval fm.ui.console.delete_word(backward=False)
cmap <C-k> eval fm.ui.console.delete_rest(1)
cmap <C-u> eval fm.ui.console.delete_rest(-1)
cmap <C-y> eval fm.ui.console.paste()
# And of course the emacs way
copycmap <ESC> <C-g>
copycmap <up> <C-p>
copycmap <down> <C-n>
copycmap <left> <C-b>
copycmap <right> <C-f>
copycmap <home> <C-a>
copycmap <end> <C-e>
copycmap <delete> <C-d>
copycmap <backspace> <C-h>
# Note: There are multiple ways to express backspaces. <backspace> (code 263)
# and <backspace2> (code 127). To be sure, use both.
copycmap <backspace> <backspace2>
# This special expression allows typing in numerals:
cmap <allow_quantifiers> false
# ===================================================================
# == Pager Keybindings
# ===================================================================
# Movement
pmap <down> pager_move down=1
pmap <up> pager_move up=1
pmap <left> pager_move left=4
pmap <right> pager_move right=4
pmap <home> pager_move to=0
pmap <end> pager_move to=-1
pmap <pagedown> pager_move down=1.0 pages=True
pmap <pageup> pager_move up=1.0 pages=True
pmap <C-d> pager_move down=0.5 pages=True
pmap <C-u> pager_move up=0.5 pages=True
copypmap <UP> k <C-p>
copypmap <DOWN> j <C-n> <CR>
copypmap <LEFT> h
copypmap <RIGHT> l
copypmap <HOME> g
copypmap <END> G
copypmap <C-d> d
copypmap <C-u> u
copypmap <PAGEDOWN> n f <C-F> <Space>
copypmap <PAGEUP> p b <C-B>
# Basic
pmap <C-l> redraw_window
pmap <ESC> pager_close
copypmap <ESC> q Q i <F3>
pmap E edit_file
# ===================================================================
# == Taskview Keybindings
# ===================================================================
# Movement
tmap <up> taskview_move up=1
tmap <down> taskview_move down=1
tmap <home> taskview_move to=0
tmap <end> taskview_move to=-1
tmap <pagedown> taskview_move down=1.0 pages=True
tmap <pageup> taskview_move up=1.0 pages=True
tmap <C-d> taskview_move down=0.5 pages=True
tmap <C-u> taskview_move up=0.5 pages=True
copytmap <UP> k <C-p>
copytmap <DOWN> j <C-n> <CR>
copytmap <HOME> g
copytmap <END> G
copytmap <C-u> u
copytmap <PAGEDOWN> n f <C-F> <Space>
copytmap <PAGEUP> p b <C-B>
# Changing priority and deleting tasks
tmap J eval -q fm.ui.taskview.task_move(-1)
tmap K eval -q fm.ui.taskview.task_move(0)
tmap dd eval -q fm.ui.taskview.task_remove()
tmap <pagedown> eval -q fm.ui.taskview.task_move(-1)
tmap <pageup> eval -q fm.ui.taskview.task_move(0)
tmap <delete> eval -q fm.ui.taskview.task_remove()
# Basic
tmap <C-l> redraw_window
tmap <ESC> taskview_close
copytmap <ESC> q Q w <C-c>

View file

@ -0,0 +1,284 @@
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
# $1-$9 | The n-th selected file
# $@ | All selected files
#
# If you use the special command "ask", rifle will ask you what program to run.
#
# Prefixing a condition with "!" will negate its result.
# These conditions are currently supported:
# match <regexp> | The regexp matches $1
# ext <regexp> | The regexp matches the extension of $1
# mime <regexp> | The regexp matches the mime type of $1
# name <regexp> | The regexp matches the basename of $1
# path <regexp> | The regexp matches the absolute path of $1
# has <program> | The program is installed (i.e. located in $PATH)
# env <variable> | The environment variable "variable" is non-empty
# file | $1 is a file
# directory | $1 is a directory
# number <n> | change the number of this command to n
# terminal | stdin, stderr and stdout are connected to a terminal
# X | A graphical environment is available (darwin, Xorg, or Wayland)
#
# There are also pseudo-conditions which have a "side effect":
# flag <flags> | Change how the program is run. See below.
# label <label> | Assign a label or name to the command so it can
# | be started with :open_with <label> in ranger
# | or `rifle -p <label>` in the standalone executable.
# else | Always true.
#
# Flags are single characters which slightly transform the command:
# f | Fork the program, make it run in the background.
# | New command = setsid $command >& /dev/null &
# r | Execute the command with root permissions
# | New command = sudo $command
# t | Run the program in a new terminal. If $TERMCMD is not defined,
# | rifle will attempt to extract it from $TERM.
# | New command = $TERMCMD -e $command
# Note: The "New command" serves only as an illustration, the exact
# implementation may differ.
# Note: When using rifle in ranger, there is an additional flag "c" for
# only running the current file even if you have marked multiple files.
#-------------------------------------------
# Websites
#-------------------------------------------
# Rarely installed browsers get higher priority; It is assumed that if you
# install a rare browser, you probably use it. Firefox/konqueror/w3m on the
# other hand are often only installed as fallback browsers.
ext x?html?, has surf, X, flag f = surf -- file://"$1"
ext x?html?, has vimprobable, X, flag f = vimprobable -- "$@"
ext x?html?, has vimprobable2, X, flag f = vimprobable2 -- "$@"
ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@"
ext x?html?, has dwb, X, flag f = dwb -- "$@"
ext x?html?, has jumanji, X, flag f = jumanji -- "$@"
ext x?html?, has luakit, X, flag f = luakit -- "$@"
ext x?html?, has uzbl, X, flag f = uzbl -- "$@"
ext x?html?, has uzbl-tabbed, X, flag f = uzbl-tabbed -- "$@"
ext x?html?, has uzbl-browser, X, flag f = uzbl-browser -- "$@"
ext x?html?, has uzbl-core, X, flag f = uzbl-core -- "$@"
ext x?html?, has midori, X, flag f = midori -- "$@"
ext x?html?, has opera, X, flag f = opera -- "$@"
ext x?html?, has firefox, X, flag f = firefox -- "$@"
ext x?html?, has seamonkey, X, flag f = seamonkey -- "$@"
ext x?html?, has iceweasel, X, flag f = iceweasel -- "$@"
ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@"
ext x?html?, has chromium, X, flag f = chromium -- "$@"
ext x?html?, has google-chrome, X, flag f = google-chrome -- "$@"
ext x?html?, has epiphany, X, flag f = epiphany -- "$@"
ext x?html?, has konqueror, X, flag f = konqueror -- "$@"
ext x?html?, has elinks, terminal = elinks "$@"
ext x?html?, has links2, terminal = links2 "$@"
ext x?html?, has links, terminal = links "$@"
ext x?html?, has lynx, terminal = lynx -- "$@"
ext x?html?, has w3m, terminal = w3m "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
# Define the "editor" for text files as first action
mime ^text, label editor = ${VISUAL:-$EDITOR} -- "$@"
mime ^text, label pager = "$PAGER" -- "$@"
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
ext 1 = man "$1"
ext s[wmf]c, has zsnes, X = zsnes "$1"
ext s[wmf]c, has snes9x-gtk,X = snes9x-gtk "$1"
ext nes, has fceux, X = fceux "$1"
ext exe = wine "$1"
name ^[mM]akefile$ = make
#--------------------------------------------
# Scripts
#-------------------------------------------
ext py = python -- "$1"
ext pl = perl -- "$1"
ext rb = ruby -- "$1"
ext js = node -- "$1"
ext sh = sh -- "$1"
ext php = php -- "$1"
#--------------------------------------------
# Audio without X
#-------------------------------------------
mime ^audio|ogg$, terminal, has mpv = mpv -- "$@"
mime ^audio|ogg$, terminal, has mplayer2 = mplayer2 -- "$@"
mime ^audio|ogg$, terminal, has mplayer = mplayer -- "$@"
ext midi?, terminal, has wildmidi = wildmidi -- "$@"
#--------------------------------------------
# Video/Audio with a GUI
#-------------------------------------------
mime ^video|audio, has gmplayer, X, flag f = gmplayer -- "$@"
mime ^video|audio, has smplayer, X, flag f = smplayer "$@"
mime ^video, has mpv, X, flag f = mpv -- "$@"
mime ^video, has mpv, X, flag f = mpv --fs -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@"
mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -- "$@"
mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@"
mime ^video|audio, has vlc, X, flag f = vlc -- "$@"
mime ^video|audio, has totem, X, flag f = totem -- "$@"
mime ^video|audio, has totem, X, flag f = totem --fullscreen -- "$@"
#--------------------------------------------
# Video without X
#-------------------------------------------
mime ^video, terminal, !X, has mpv = mpv -- "$@"
mime ^video, terminal, !X, has mplayer2 = mplayer2 -- "$@"
mime ^video, terminal, !X, has mplayer = mplayer -- "$@"
#-------------------------------------------
# Documents
#-------------------------------------------
ext pdf, has llpp, X, flag f = llpp "$@"
ext pdf, has zathura, X, flag f = zathura -- "$@"
ext pdf, has mupdf, X, flag f = mupdf "$@"
ext pdf, has mupdf-x11,X, flag f = mupdf-x11 "$@"
ext pdf, has apvlv, X, flag f = apvlv -- "$@"
ext pdf, has xpdf, X, flag f = xpdf -- "$@"
ext pdf, has evince, X, flag f = evince -- "$@"
ext pdf, has atril, X, flag f = atril -- "$@"
ext pdf, has okular, X, flag f = okular -- "$@"
ext pdf, has epdfview, X, flag f = epdfview -- "$@"
ext pdf, has qpdfview, X, flag f = qpdfview "$@"
ext pdf, has open, X, flag f = open "$@"
ext docx?, has catdoc, terminal = catdoc -- "$@" | "$PAGER"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has gnumeric, X, flag f = gnumeric -- "$@"
ext sxc|xlsx?|xlt|xlw|gnm|gnumeric, has kspread, X, flag f = kspread -- "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has soffice, X, flag f = soffice "$@"
ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has ooffice, X, flag f = ooffice "$@"
ext djvu, has zathura,X, flag f = zathura -- "$@"
ext djvu, has evince, X, flag f = evince -- "$@"
ext djvu, has atril, X, flag f = atril -- "$@"
ext djvu, has djview, X, flag f = djview -- "$@"
ext epub, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
ext epub, has zathura, X, flag f = zathura -- "$@"
ext epub, has mupdf, X, flag f = mupdf -- "$@"
ext mobi, has ebook-viewer, X, flag f = ebook-viewer -- "$@"
ext cbr, has zathura, X, flag f = zathura -- "$@"
ext cbz, has zathura, X, flag f = zathura -- "$@"
#-------------------------------------------
# Images
#-------------------------------------------
mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"
mime ^image/svg, has display, X, flag f = display -- "$@"
mime ^image, has imv, X, flag f = imv -- "$@"
mime ^image, has pqiv, X, flag f = pqiv -- "$@"
mime ^image, has sxiv, X, flag f = sxiv -- "$@"
mime ^image, has feh, X, flag f = feh -- "$@"
mime ^image, has mirage, X, flag f = mirage -- "$@"
mime ^image, has ristretto, X, flag f = ristretto "$@"
mime ^image, has eog, X, flag f = eog -- "$@"
mime ^image, has eom, X, flag f = eom -- "$@"
mime ^image, has nomacs, X, flag f = nomacs -- "$@"
mime ^image, has geeqie, X, flag f = geeqie -- "$@"
mime ^image, has gpicview, X, flag f = gpicview -- "$@"
mime ^image, has gwenview, X, flag f = gwenview -- "$@"
mime ^image, has gimp, X, flag f = gimp -- "$@"
ext xcf, X, flag f = gimp -- "$@"
#-------------------------------------------
# Archives
#-------------------------------------------
# avoid password prompt by providing empty password
ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
# This requires atool
ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"
ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@"
ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"
# Listing and extracting archives without atool:
ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"
ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done
ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done
ext zip, has unzip = unzip -l "$1" | less
ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done
ext ace, has unace = unace l "$1" | less
ext ace, has unace = for file in "$@"; do unace e "$file"; done
ext rar, has unrar = unrar l "$1" | less
ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
#-------------------------------------------
# Fonts
#-------------------------------------------
mime ^font, has fontforge, X, flag f = fontforge "$@"
#-------------------------------------------
# Flag t fallback terminals
#-------------------------------------------
# Rarely installed terminal emulators get higher priority; It is assumed that
# if you install a rare terminal emulator, you probably use it.
# gnome-terminal/konsole/xterm on the other hand are often installed as part of
# a desktop environment or as fallback terminal emulators.
mime ^ranger/x-terminal-emulator, has terminology = terminology -e "$@"
mime ^ranger/x-terminal-emulator, has kitty = kitty -- "$@"
mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@"
mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@"
mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@"
#mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@"
mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"'
#mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@"
mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@"
mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@"
mime ^ranger/x-terminal-emulator, has st = st -e "$@"
mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@"
mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@"
mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@"
mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@"
mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@"
mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@"
mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@"
mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@"
mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@"
#-------------------------------------------
# Misc
#-------------------------------------------
label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1"
label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1"
label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1"
label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
#-------------------------------------------
# Generic file openers
#-------------------------------------------
label open, has xdg-open = xdg-open -- "$@"
label open, has open = open -- "$@"
# Define the editor for non-text files + pager as last action
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ${VISUAL:-$EDITOR} -- "$@"
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
######################################################################
# The actions below are left so low down in this file on purpose, so #
# they are never triggered accidentally. #
######################################################################
# Execute a file as program/script.
mime application/x-executable = "$1"
# Move the file to trash using trash-cli.
label trash, has trash-put = trash-put -- "$@"
label trash = mkdir -p -- ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash; mv -- "$@" ${XDG_DATA_DIR:-$HOME/.ranger}/ranger-trash

View file

@ -0,0 +1,350 @@
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
## If the option `use_preview_script` is set to `true`,
## then this script will be called and its output will be displayed in ranger.
## ANSI color codes are supported.
## STDIN is disabled, so interactive scripts won't work properly
## This script is considered a configuration file and must be updated manually.
## It will be left untouched if you upgrade ranger.
## Because of some automated testing we do on the script #'s for comments need
## to be doubled up. Code that is commented out, because it's an alternative for
## example, gets only one #.
## Meanings of exit codes:
## code | meaning | action of ranger
## -----+------------+-------------------------------------------
## 0 | success | Display stdout as preview
## 1 | no preview | Display no preview at all
## 2 | plain text | Display the plain content of the file
## 3 | fix width | Don't reload when width changes
## 4 | fix height | Don't reload when height changes
## 5 | fix both | Don't ever reload
## 6 | image | Display the image `$IMAGE_CACHE_PATH` points to as an image preview
## 7 | image | Display the file directly as an image
## Script arguments
FILE_PATH="${1}" # Full path of the highlighted file
PV_WIDTH="${2}" # Width of the preview pane (number of fitting characters)
## shellcheck disable=SC2034 # PV_HEIGHT is provided for convenience and unused
PV_HEIGHT="${3}" # Height of the preview pane (number of fitting characters)
IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview
PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise.
FILE_EXTENSION="${FILE_PATH##*.}"
FILE_EXTENSION_LOWER="$(printf "%s" "${FILE_EXTENSION}" | tr '[:upper:]' '[:lower:]')"
## Settings
HIGHLIGHT_SIZE_MAX=262143 # 256KiB
HIGHLIGHT_TABWIDTH=${HIGHLIGHT_TABWIDTH:-8}
HIGHLIGHT_STYLE=${HIGHLIGHT_STYLE:-pablo}
HIGHLIGHT_OPTIONS="--replace-tabs=${HIGHLIGHT_TABWIDTH} --style=${HIGHLIGHT_STYLE} ${HIGHLIGHT_OPTIONS:-}"
PYGMENTIZE_STYLE=${PYGMENTIZE_STYLE:-autumn}
OPENSCAD_IMGSIZE=${RNGR_OPENSCAD_IMGSIZE:-1000,1000}
OPENSCAD_COLORSCHEME=${RNGR_OPENSCAD_COLORSCHEME:-Tomorrow Night}
handle_extension() {
case "${FILE_EXTENSION_LOWER}" in
## Archive
a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
atool --list -- "${FILE_PATH}" && exit 5
bsdtar --list --file "${FILE_PATH}" && exit 5
exit 1;;
rar)
## Avoid password prompt by providing empty password
unrar lt -p- -- "${FILE_PATH}" && exit 5
exit 1;;
7z)
## Avoid password prompt by providing empty password
7z l -p -- "${FILE_PATH}" && exit 5
exit 1;;
## PDF
pdf)
## Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - | \
fmt -w "${PV_WIDTH}" && exit 5
mutool draw -F txt -i -- "${FILE_PATH}" 1-10 | \
fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## BitTorrent
torrent)
transmission-show -- "${FILE_PATH}" && exit 5
exit 1;;
## OpenDocument
odt|ods|odp|sxw)
## Preview as text conversion
odt2txt "${FILE_PATH}" && exit 5
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLSX
xlsx)
## Preview as csv conversion
## Uses: https://github.com/dilshod/xlsx2csv
xlsx2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## HTML
htm|html|xhtml)
## Preview as text conversion
w3m -dump "${FILE_PATH}" && exit 5
lynx -dump -- "${FILE_PATH}" && exit 5
elinks -dump "${FILE_PATH}" && exit 5
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
;;
## JSON
json)
jq --color-output . "${FILE_PATH}" && exit 5
python -m json.tool -- "${FILE_PATH}" && exit 5
;;
## Direct Stream Digital/Transfer (DSDIFF) and wavpack aren't detected
## by file(1).
dff|dsf|wv|wvc)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
;; # Continue with next handler on failure
esac
}
handle_image() {
## Size of the preview if there are multiple options or it has to be
## rendered from vector graphics. If the conversion program allows
## specifying only one dimension while keeping the aspect ratio, the width
## will be used.
local DEFAULT_SIZE="1920x1080"
local mimetype="${1}"
case "${mimetype}" in
## SVG
# image/svg+xml|image/svg)
# convert -- "${FILE_PATH}" "${IMAGE_CACHE_PATH}" && exit 6
# exit 1;;
## DjVu
# image/vnd.djvu)
# ddjvu -format=tiff -quality=90 -page=1 -size="${DEFAULT_SIZE}" \
# - "${IMAGE_CACHE_PATH}" < "${FILE_PATH}" \
# && exit 6 || exit 1;;
## Image
image/*)
local orientation
orientation="$( identify -format '%[EXIF:Orientation]\n' -- "${FILE_PATH}" )"
## If orientation data is present and the image actually
## needs rotating ("1" means no rotation)...
if [[ -n "$orientation" && "$orientation" != 1 ]]; then
## ...auto-rotate the image according to the EXIF data.
convert -- "${FILE_PATH}" -auto-orient "${IMAGE_CACHE_PATH}" && exit 6
fi
## `w3mimgdisplay` will be called for all images (unless overriden
## as above), but might fail for unsupported types.
exit 7;;
## Video
# video/*)
# # Thumbnail
# ffmpegthumbnailer -i "${FILE_PATH}" -o "${IMAGE_CACHE_PATH}" -s 0 && exit 6
# exit 1;;
## PDF
# application/pdf)
# pdftoppm -f 1 -l 1 \
# -scale-to-x "${DEFAULT_SIZE%x*}" \
# -scale-to-y -1 \
# -singlefile \
# -jpeg -tiffcompression jpeg \
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
# && exit 6 || exit 1;;
## ePub, MOBI, FB2 (using Calibre)
# application/epub+zip|application/x-mobipocket-ebook|\
# application/x-fictionbook+xml)
# # ePub (using https://github.com/marianosimone/epub-thumbnailer)
# epub-thumbnailer "${FILE_PATH}" "${IMAGE_CACHE_PATH}" \
# "${DEFAULT_SIZE%x*}" && exit 6
# ebook-meta --get-cover="${IMAGE_CACHE_PATH}" -- "${FILE_PATH}" \
# >/dev/null && exit 6
# exit 1;;
## Font
application/font*|application/*opentype)
preview_png="/tmp/$(basename "${IMAGE_CACHE_PATH%.*}").png"
if fontimage -o "${preview_png}" \
--pixelsize "120" \
--fontname \
--pixelsize "80" \
--text " ABCDEFGHIJKLMNOPQRSTUVWXYZ " \
--text " abcdefghijklmnopqrstuvwxyz " \
--text " 0123456789.:,;(*!?') ff fl fi ffi ffl " \
--text " The quick brown fox jumps over the lazy dog. " \
"${FILE_PATH}";
then
convert -- "${preview_png}" "${IMAGE_CACHE_PATH}" \
&& rm "${preview_png}" \
&& exit 6
else
exit 1
fi
;;
## Preview archives using the first image inside.
## (Very useful for comic book collections for example.)
# application/zip|application/x-rar|application/x-7z-compressed|\
# application/x-xz|application/x-bzip2|application/x-gzip|application/x-tar)
# local fn=""; local fe=""
# local zip=""; local rar=""; local tar=""; local bsd=""
# case "${mimetype}" in
# application/zip) zip=1 ;;
# application/x-rar) rar=1 ;;
# application/x-7z-compressed) ;;
# *) tar=1 ;;
# esac
# { [ "$tar" ] && fn=$(tar --list --file "${FILE_PATH}"); } || \
# { fn=$(bsdtar --list --file "${FILE_PATH}") && bsd=1 && tar=""; } || \
# { [ "$rar" ] && fn=$(unrar lb -p- -- "${FILE_PATH}"); } || \
# { [ "$zip" ] && fn=$(zipinfo -1 -- "${FILE_PATH}"); } || return
#
# fn=$(echo "$fn" | python -c "import sys; import mimetypes as m; \
# [ print(l, end='') for l in sys.stdin if \
# (m.guess_type(l[:-1])[0] or '').startswith('image/') ]" |\
# sort -V | head -n 1)
# [ "$fn" = "" ] && return
# [ "$bsd" ] && fn=$(printf '%b' "$fn")
#
# [ "$tar" ] && tar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fn" > "${IMAGE_CACHE_PATH}" && exit 6
# fe=$(echo -n "$fn" | sed 's/[][*?\]/\\\0/g')
# [ "$bsd" ] && bsdtar --extract --to-stdout \
# --file "${FILE_PATH}" -- "$fe" > "${IMAGE_CACHE_PATH}" && exit 6
# [ "$bsd" ] || [ "$tar" ] && rm -- "${IMAGE_CACHE_PATH}"
# [ "$rar" ] && unrar p -p- -inul -- "${FILE_PATH}" "$fn" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$zip" ] && unzip -pP "" -- "${FILE_PATH}" "$fe" > \
# "${IMAGE_CACHE_PATH}" && exit 6
# [ "$rar" ] || [ "$zip" ] && rm -- "${IMAGE_CACHE_PATH}"
# ;;
esac
# openscad_image() {
# TMPPNG="$(mktemp -t XXXXXX.png)"
# openscad --colorscheme="${OPENSCAD_COLORSCHEME}" \
# --imgsize="${OPENSCAD_IMGSIZE/x/,}" \
# -o "${TMPPNG}" "${1}"
# mv "${TMPPNG}" "${IMAGE_CACHE_PATH}"
# }
# case "${FILE_EXTENSION_LOWER}" in
# ## 3D models
# ## OpenSCAD only supports png image output, and ${IMAGE_CACHE_PATH}
# ## is hardcoded as jpeg. So we make a tempfile.png and just
# ## move/rename it to jpg. This works because image libraries are
# ## smart enough to handle it.
# csg|scad)
# openscad_image "${FILE_PATH}" && exit 6
# ;;
# 3mf|amf|dxf|off|stl)
# openscad_image <(echo "import(\"${FILE_PATH}\");") && exit 6
# ;;
# esac
}
handle_mime() {
local mimetype="${1}"
case "${mimetype}" in
## RTF and DOC
text/rtf|*msword)
## Preview as text conversion
## note: catdoc does not always work for .doc files
## catdoc: http://www.wagner.pp.ru/~vitus/software/catdoc/
catdoc -- "${FILE_PATH}" && exit 5
exit 1;;
## DOCX, ePub, FB2 (using markdown)
## You might want to remove "|epub" and/or "|fb2" below if you have
## uncommented other methods to preview those formats
*wordprocessingml.document|*/epub+zip|*/x-fictionbook+xml)
## Preview as markdown conversion
pandoc -s -t markdown -- "${FILE_PATH}" && exit 5
exit 1;;
## XLS
*ms-excel)
## Preview as csv conversion
## xls2csv comes with catdoc:
## http://www.wagner.pp.ru/~vitus/software/catdoc/
xls2csv -- "${FILE_PATH}" && exit 5
exit 1;;
## Text
text/* | */xml)
## Syntax highlight
if [[ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]]; then
exit 2
fi
if [[ "$( tput colors )" -ge 256 ]]; then
local pygmentize_format='terminal256'
local highlight_format='xterm256'
else
local pygmentize_format='terminal'
local highlight_format='ansi'
fi
env HIGHLIGHT_OPTIONS="${HIGHLIGHT_OPTIONS}" highlight \
--out-format="${highlight_format}" \
--force -- "${FILE_PATH}" && exit 5
env COLORTERM=8bit bat --color=always --style="plain" \
-- "${FILE_PATH}" && exit 5
pygmentize -f "${pygmentize_format}" -O "style=${PYGMENTIZE_STYLE}"\
-- "${FILE_PATH}" && exit 5
exit 2;;
## DjVu
image/vnd.djvu)
## Preview as text conversion (requires djvulibre)
djvutxt "${FILE_PATH}" | fmt -w "${PV_WIDTH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Image
image/*)
## Preview as text conversion
# img2txt --gamma=0.6 --width="${PV_WIDTH}" -- "${FILE_PATH}" && exit 4
exiftool "${FILE_PATH}" && exit 5
exit 1;;
## Video and audio
video/* | audio/*)
mediainfo "${FILE_PATH}" && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
esac
}
handle_fallback() {
echo '----- File Type Classification -----' && file --dereference --brief -- "${FILE_PATH}" && exit 5
exit 1
}
MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
if [[ "${PV_IMAGE_ENABLED}" == 'True' ]]; then
handle_image "${MIMETYPE}"
fi
handle_extension
handle_mime "${MIMETYPE}"
handle_fallback
exit 1

View file

@ -0,0 +1,3 @@
//@theme "/usr/share/rofi/themes/purple.rasi"
//@theme "/home/zoey/.config/rofi/themes/iceberg-dark.rasi"
@theme "/usr/share/rofi/themes/purple.rasi"

View file

@ -0,0 +1,182 @@
#
# wm independent hotkeys
#
# terminal emulator
super + Return
kitty
# region screenshot
#ctrl + shift + 4
# maim -s -u | xclip -selection clipboard -t image/png
ctrl + shift + 4
escrotum -s -C
# thunar
super + shift + t
thunar
# furryfox
super + shift + f
firefox
# brave
super + b
brave --disable-features=UseSkiaRenderer --use-gl=desktop --enable-gpu-rasterization --ignore-gpu-blocklist --enable-zero-copy --enable-features=VaapiVideoDecoder --disable-gpu-driver-bug-workarounds
# discord
super + shift + d
discord --enable-gpu-rasterization --enable-features=VaapiVideoDecoder --ignore-gpu-blocklist --enable-zero-copy
# xkill
super + x
xkill
# program launcher
super + @space
rofi -show drun
#dmenu_run
# make sxhkd reload its configuration files:
super + shift + {c}
pkill -USR1 -x sxhkd
# keyboard layout
alt + space
/mnt/Usagichan/Scripts/keyboardlayout.sh
# Volume media keys (amixer pkg alsa-utils)
XF86AudioRaiseVolume
amixer -q set Master 5%+
XF86AudioLowerVolume
amixer -q set Master 5%-
XF86AudioMute
amixer -q set Master toggle
#
# bspwm hotkeys
#
# quit/restart bspwm
super + shift + {e}
bspc {quit,wm -r}
# reload bspwm config
super + shift + b
pkill docky; $HOME/.config/bspwm/bspwmrc; docky
# close and kill
super + q
bspc node -c
# alternate between the tiled and monocle layout
super + m
bspc desktop -l next
# send the newest marked node to the newest preselected node
super + y
bspc node newest.marked.local -n newest.!automatic.local
# swap the current node and the biggest window
super + g
bspc node -s biggest.window
#
# state/flags
#
# set the window state
super + {t,shift + t,s,f}
bspc node -t {tiled,pseudo_tiled,floating,fullscreen}
# set the node flags
super + ctrl + {m,x,y,z}
bspc node -g {marked,locked,sticky,private}
#
# focus/swap
#
# focus the node in the given direction
super + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# focus the node in the given direction arrow keys
super + {_,shift + }{Left, Down, Up, Right}
bspc node -{f,s} {west,south,north,east}
# focus the node for the given path jump
super + {p,b,comma,period}
bspc node -f @{parent,brother,first,second}
# focus the next/previous window in the current desktop
super + {_,shift + }c
bspc node -f {next,prev}.local.!hidden.window
# focus the next/previous desktop in the current monitor
super + bracket{left,right}
bspc desktop -f {prev,next}.local
# focus the last node/desktop
super + {grave,Tab}
bspc {node,desktop} -f last
# focus the older or newer node in the focus history
super + {o,i}
bspc wm -h off; \
bspc node {older,newer} -f; \
bspc wm -h on
# focus or send to the given desktop
super + {_,shift + }{1-9}
bspc {desktop -f,node -d} '{I,II,III,IV,V,VI,VII,VIII,IX}'
#
# preselect
#
# preselect the direction
super + ctrl + {h,j,k,l}
bspc node -p {west,south,north,east}
# preselect the ratio
super + ctrl + {1-9}
bspc node -o 0.{1-9}
# cancel the preselection for the focused node
super + ctrl + space
bspc node -p cancel
# cancel the preselection for the focused desktop
super + ctrl + shift + space
bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel
#
# move/resize
#
# expand a window by moving one of its side outward
super + alt + {h,j,k,l}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# expand a window by moving one of its side outward
super + alt + {Left,Down,Up,Right}
bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {h,j,k,l}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# contract a window by moving one of its side inward
super + alt + shift + {Left,Down,Up,Right}
bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}
# move a floating window
super + ctrl + {Left,Down,Up,Right}
bspc node -v {-20 0,0 20,0 -20,20 0}

69
configs/home/zshrc Normal file
View file

@ -0,0 +1,69 @@
HISTFILE=~/.zshist
HISTSIZE=1000
SAVEHIST=5000
###autocomplete
source ~/Documents/Scripts/zsh/zsh-autocomplete/zsh-autocomplete.plugin.zsh
unsetopt autocd beep
zstyle :compinstall filename '/home/zoey/.zshrc'
#autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# history
autoload -Uz up-line-or-beginning-search down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
[[ -n "${key[Up]}" ]] && bindkey -- "${key[Up]}" up-line-or-beginning-search
[[ -n "${key[Down]}" ]] && bindkey -- "${key[Down]}" down-line-or-beginning-search
#bindkey -v
bindkey "^[[2~" overwrite-mode # Ins
bindkey "^[[3~" delete-char # Del
bindkey "^[[5~" beginning-of-history #PageUp
bindkey "^[[6~" end-of-history #PageDown
### ctrl+arrows
bindkey "\e[1;5C" forward-word
bindkey "\e[1;5D" backward-word
### ctrl+delete
bindkey "\e[3;5~" kill-word
### ctrl+backspace
bindkey '^H' backward-kill-word
# random
################# LOOKS #####################
# prompt
autoload -Uz promptinit && promptinit
PROMPT='🐰%F{204}%n%f%F{161}@%f%m %F{096}%~%f %F{204}❀%f '
################ ALIASES ####################
# ssh
alias lappy='ssh zoopy@192.168.0.56'
alias janedoe='ssh jane\ doe@192.168.122.47'
# QEMU
alias screamloop='sh ~/Documents/Scripts/screamloop.sh'
alias attachm='sudo sh ~/Documents/Scripts/attachmain.sh'
alias attachs='sudo sh ~/Documents/Scripts/attachsecondary.sh'
alias govp='sudo sh ~/Documents/Scripts/perfgov.sh'
alias govs='sudo sh ~/Documents/Scripts/schedutilgov.sh'
# random
alias animemovies='cd /mnt/Pyon/Videos/Anime\ Movies/ && ls'
alias anime='cd /mnt/Pyon/Videos/Anime && ls'
alias piperestart='systemctl --user restart --now pipewire-media-session.service'
alias sb='cd ~/Documents/Sawabot/ && sh Sawabot.sh'
alias drp='echo 1 | sudo tee /proc/sys/vm/drop_caches'