mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Compare commits
173 Commits
surface-do
...
f379b758c9
Author | SHA1 | Date | |
---|---|---|---|
f379b758c9
|
|||
93a2899c7b
|
|||
df03d9062e
|
|||
ddf5a1d387
|
|||
ba8dc84993
|
|||
757bd4c26d
|
|||
d96ffc16ff
|
|||
2598df0f17
|
|||
d251f3e23a
|
|||
0d5e1a92c9
|
|||
ed0e66dede
|
|||
f695136338
|
|||
4fd3c35d52
|
|||
4335eb18c7
|
|||
27991a9460
|
|||
d54737ee28
|
|||
30fd0b3024
|
|||
7a2e8b3f1e
|
|||
37d044aab0
|
|||
6d0df3bc65
|
|||
dc6fab9f8a
|
|||
a7f104e942
|
|||
5759872bbd
|
|||
10ffcecb31
|
|||
4c634c402a
|
|||
00a83da619
|
|||
1eae7f9969
|
|||
4646ddae36
|
|||
ae5521f516
|
|||
e2816d2837
|
|||
ae35df326d
|
|||
90a5d29178
|
|||
616edc0cc7
|
|||
3bb6de1dd9
|
|||
7b418c2abc
|
|||
0fc023db91
|
|||
e17ebf0201
|
|||
8f969737ed
|
|||
8287acf3a7
|
|||
2050b1a5b7
|
|||
d6289c47ba
|
|||
6c19740e21
|
|||
8b838aa771
|
|||
af65ab019e
|
|||
a11dac4d00
|
|||
90750c0ede
|
|||
18208e2362
|
|||
ad713cd680
|
|||
b4e3cdeff3
|
|||
c6bd6a83c6
|
|||
f247802bda
|
|||
abb66a954b
|
|||
ed9d50d68e
|
|||
89b9222b7c
|
|||
ee6b7333fb
|
|||
2ac1111b72
|
|||
83f8566faf
|
|||
59ac129a85
|
|||
809f27b576
|
|||
c6f653f88c
|
|||
48b116e2a6
|
|||
8bd77f63cd
|
|||
e8a3b91052
|
|||
ef4e16fe5b
|
|||
43a656ee96
|
|||
51c91b4803
|
|||
1a6c9dedc0
|
|||
820c355722
|
|||
868454c26a
|
|||
5185349b8c
|
|||
bedead5cda
|
|||
e140647ba7
|
|||
acf3e57c74
|
|||
8f089165ab
|
|||
add6050146
|
|||
4cb02a72da
|
|||
861ee18775
|
|||
30cab7d90b
|
|||
56229dea13
|
|||
3471454e8e
|
|||
fc8bfb220b
|
|||
abe83d85c4
|
|||
cfe95eb879
|
|||
c03170a4ef
|
|||
60b52ffc29
|
|||
944d64a5e6
|
|||
01abda43c3
|
|||
1894a6f965
|
|||
990b9ffb30
|
|||
927fdb5660
|
|||
2c3d0edc28
|
|||
6e7f2f1074
|
|||
e0db65a9d8
|
|||
216737535e
|
|||
c5cd1cf36e
|
|||
863de0d0ef
|
|||
ebe00b192a
|
|||
0e4b0aee25
|
|||
8b1f6aaa01
|
|||
12a46db7dd
|
|||
e4bc126708
|
|||
a619593815
|
|||
51edd3ddf7
|
|||
f17a34c65a
|
|||
3dbc78c03b
|
|||
f37cf0f49b
|
|||
abed398b07
|
|||
d0fee7b959
|
|||
f1371b67db
|
|||
eb88ac1c04
|
|||
38f0f8ccec
|
|||
289e31b65a
|
|||
700dfdda6f
|
|||
a3c0e5d7de
|
|||
580b9e33b5
|
|||
bbf329eb70
|
|||
09be200c9c
|
|||
650ff6e0c1
|
|||
89e325c503
|
|||
7b1bd4f808
|
|||
3b85967614
|
|||
eeb90bd2e3
|
|||
972ee067ab
|
|||
5d3eb76075
|
|||
7f8c8eccb3
|
|||
815da41076
|
|||
66e0bf911b
|
|||
2562a50f89
|
|||
5c705fde91
|
|||
f0e6807814
|
|||
dbbb533850
|
|||
a057c840cd
|
|||
c89a3829dc
|
|||
f0508fe73e
|
|||
59a138c605
|
|||
e4e62ae40d
|
|||
28dda3e9b0
|
|||
c260a480aa
|
|||
94c3cb5741 | |||
3bcb38f9f2
|
|||
d7f1a2193d
|
|||
1418a51626
|
|||
7597a300f4 | |||
f1a353aed5
|
|||
2b2e963c2a
|
|||
b7ef22f4f6
|
|||
9b89946ea4
|
|||
e854d2b1d5
|
|||
b59607c147
|
|||
24cf4ac494
|
|||
fc4560b31f
|
|||
c164577bd7
|
|||
2b631fb2cd
|
|||
40c3f61819
|
|||
c0420a7022
|
|||
1c297d3a77
|
|||
ae1acb194c | |||
73ecd1f584
|
|||
ff4bdb5ec2
|
|||
4579473479
|
|||
fff7fa1452
|
|||
1d590fe8c6
|
|||
223034a3ea
|
|||
5bb7c53519
|
|||
8edf74dc4f
|
|||
366873ea47
|
|||
e09e7105dd
|
|||
b512bace44
|
|||
69d884ec5f
|
|||
3f16439695
|
|||
8edd378b66
|
|||
1bc7dd7845
|
|||
ebc435ad33
|
96
.Xresources
96
.Xresources
@ -1,96 +0,0 @@
|
|||||||
!!=============================================================================
|
|
||||||
!! RXVT-unicode setting
|
|
||||||
!!=============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
urxvt.depth: 32
|
|
||||||
|
|
||||||
urxvt.internalBorder: 4
|
|
||||||
urxvt.blurRadius: 25
|
|
||||||
urxvt.scrollBar: false
|
|
||||||
urxvt.saveLines: 10000
|
|
||||||
urxvt.preeditType: Root
|
|
||||||
urxvt.jumpScroll: false
|
|
||||||
urxvt.altSendsEscape: true
|
|
||||||
|
|
||||||
xterm.metaSendsEscape: true
|
|
||||||
|
|
||||||
!Set TERM
|
|
||||||
urxvt.termName: xterm-256color
|
|
||||||
|
|
||||||
Xft.dpi: 96
|
|
||||||
Xft.antialias: true
|
|
||||||
Xft.rgba: rgb
|
|
||||||
Xft.autohint: false
|
|
||||||
Xft.hinting: true
|
|
||||||
Xft.hintstyle: hintfull
|
|
||||||
urxvt*font: xft:Sauce Code Pro:style=Regular:size=9
|
|
||||||
urxvt*imFont: xft:Sauce Code Pro:style=Regular:size=9
|
|
||||||
urxvt*boldFont: xft:Sauce Code Pro:style=Bold:size=9
|
|
||||||
urxvt*italicFont: xft:Sauce Code Pro:style=Italic:size=9
|
|
||||||
urxvt*boldItalicFont: xft:Sauce Code Pro:style=Bold,Italic:size=9
|
|
||||||
|
|
||||||
|
|
||||||
! clickable Url and copy paste keys
|
|
||||||
|
|
||||||
urxvt.iso14755: false
|
|
||||||
urxvt.iso14755_52: false
|
|
||||||
urxvt.perl-ext-common: default,clipboard,vtwheel,font-size
|
|
||||||
urxvt.keysym.Shift-Control-C: perl:clipboard:copy
|
|
||||||
urxvt.keysym.Shift-Control-V: perl:clipboard:paste
|
|
||||||
urxvt.url-launcher: /usr/bin/chromium
|
|
||||||
urxvt.matcher.button: 1
|
|
||||||
|
|
||||||
urxvt.keysym.C-Up: font-size:increase
|
|
||||||
urxvt.keysym.C-Down: font-size:decrease
|
|
||||||
urxvt.keysym.C-S-Up: font-size:incglobal
|
|
||||||
urxvt.keysym.C-S-Down: font-size:decglobal
|
|
||||||
|
|
||||||
Xft.lcdfilter: lcddefault
|
|
||||||
|
|
||||||
! special
|
|
||||||
*.foreground: #ECEFF1
|
|
||||||
*.background: #002B36
|
|
||||||
!*.cursorColor: #ECEFF1
|
|
||||||
*.cursorColor: #5294E2
|
|
||||||
*.highlightColor: #5294E2
|
|
||||||
urxvt.background: [95]#383C4A
|
|
||||||
urxvt.scrollColor: #767B87
|
|
||||||
urxvt*dynamicColors: on
|
|
||||||
urxvt*highlightSelection: true
|
|
||||||
urxvt*colorMode: on
|
|
||||||
|
|
||||||
! black
|
|
||||||
*.color0: #333638
|
|
||||||
|
|
||||||
!white
|
|
||||||
*.color15: #eceff1
|
|
||||||
|
|
||||||
! gray
|
|
||||||
*.color7: #8b9396
|
|
||||||
*.color8: #475760
|
|
||||||
|
|
||||||
! red
|
|
||||||
*.color1: #ff3f00
|
|
||||||
*.color9: #ef5345
|
|
||||||
|
|
||||||
! green
|
|
||||||
*.color2: #8bc34a
|
|
||||||
*.color10: #9ccc65
|
|
||||||
|
|
||||||
! yellow
|
|
||||||
*.color3: #ffc107
|
|
||||||
*.color11: #ffa000
|
|
||||||
|
|
||||||
! blue
|
|
||||||
*.color4: #0266f4
|
|
||||||
*.color12: #3f86da
|
|
||||||
|
|
||||||
! magenta
|
|
||||||
*.color5: #cc17cc
|
|
||||||
*.color13: #a56ecC
|
|
||||||
|
|
||||||
! cyan
|
|
||||||
*.color6: #10aeba
|
|
||||||
*.color14: #5ddae2
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
# Run all system xinitrc shell scripts
|
# Run all system xinitrc shell scripts
|
||||||
xinitdir="/etc/X11/xinit/xinitrc.d"
|
xinitdir="/etc/X11/xinit/xinitrc.d"
|
||||||
@ -11,8 +11,12 @@ if [ -d "$xinitdir" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source ~/.profile
|
# Source generic xprofile stuff
|
||||||
source ~/.xsession
|
source "$(dirname "${BASH_SOURCE[0]}")/xprofile"
|
||||||
xrdb -merge ~/.Xresources
|
|
||||||
|
# Start the gnome-keyring if it's installed
|
||||||
|
if exists gnome-keyring-daemon; then
|
||||||
|
export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg)
|
||||||
|
fi
|
||||||
|
|
||||||
exec i3
|
exec i3
|
18
.config/X11/xprofile
Normal file
18
.config/X11/xprofile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Graphical-specific environment variables
|
||||||
|
export TERMINAL="termite"
|
||||||
|
export BROWSER="chromium"
|
||||||
|
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
||||||
|
export QT_QPA_PLATFORMTHEME=gtk2
|
||||||
|
export QT_STYLE_OVERRIDE=gtk2
|
||||||
|
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
|
||||||
|
|
||||||
|
|
||||||
|
# Load Xorg resources and set the DPI
|
||||||
|
xrdb -merge $XDG_CONFIG_HOME/X11/xresources
|
||||||
|
xrandr --dpi $(xrdb -query | grep -i xft.dpi | cut -d: -f2)
|
||||||
|
|
||||||
|
setxkbmap -option caps:none
|
||||||
|
xset r rate 200 18
|
||||||
|
xmodmap "$XDG_CONFIG_HOME"/X11/xmodmap
|
89
.config/X11/xresources
Normal file
89
.config/X11/xresources
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
! Colour order:
|
||||||
|
! black
|
||||||
|
! red
|
||||||
|
! green
|
||||||
|
! yellow
|
||||||
|
! blue
|
||||||
|
! magenta
|
||||||
|
! cyan
|
||||||
|
! white/gray
|
||||||
|
|
||||||
|
! Normal colours
|
||||||
|
*.color0: #333638
|
||||||
|
*.color1: #f41f1c
|
||||||
|
*.color2: #8bc34a
|
||||||
|
*.color3: #ffc107
|
||||||
|
*.color4: #0266f4
|
||||||
|
*.color5: #cc17cc
|
||||||
|
*.color6: #10aeba
|
||||||
|
*.color7: #8b9396
|
||||||
|
|
||||||
|
! Bright colours
|
||||||
|
*.color8: #475760
|
||||||
|
*.color9: #e53727
|
||||||
|
*.color10: #9ccc65
|
||||||
|
*.color11: #ffa000
|
||||||
|
*.color12: #81b3f9
|
||||||
|
*.color13: #a56ecc
|
||||||
|
*.color14: #5ddae2
|
||||||
|
*.color15: #eceff1
|
||||||
|
|
||||||
|
|
||||||
|
Xft.dpi: 96
|
||||||
|
Xft.antialias: true
|
||||||
|
Xft.rgba: rgb
|
||||||
|
Xft.hinting: true
|
||||||
|
Xft.hintstyle: hintfull
|
||||||
|
Xft.lcdfilter: lcddefault
|
||||||
|
|
||||||
|
Xcursor.theme: Breeze_Obsidian
|
||||||
|
|
||||||
|
!!======================!!
|
||||||
|
!! RXVT-unicode setting !!
|
||||||
|
!!======================!!
|
||||||
|
|
||||||
|
urxvt.depth: 32
|
||||||
|
urxvt.internalBorder: 16
|
||||||
|
urxvt.blurRadius: 25
|
||||||
|
urxvt.saveLines: 10000
|
||||||
|
urxvt.preeditType: Root
|
||||||
|
|
||||||
|
urxvt.scrollBar: false
|
||||||
|
urxvt.jumpScroll: false
|
||||||
|
urxvt.scrollTtyOutput: false
|
||||||
|
urxvt.scrollWithBuffer: true
|
||||||
|
urxvt.scrollTtyKeypress: true
|
||||||
|
|
||||||
|
urxvt.altSendsEscape: true
|
||||||
|
xterm.metaSendsEscape: true
|
||||||
|
|
||||||
|
urxvt.termName: xterm-256color
|
||||||
|
|
||||||
|
urxvt.font: xft:Source Code Pro:style=regular:size=9
|
||||||
|
urxvt.imFont: xft:Source Code Pro:style=regular:size=9
|
||||||
|
urxvt.boldFont: xft:Source Code Pro:style=bold:size=9
|
||||||
|
urxvt.italicFont: xft:Source Code Pro:style=italic:size=9
|
||||||
|
urxvt.boldItalicFont: xft:Source Code Pro:style=bold,italic:size=9
|
||||||
|
|
||||||
|
|
||||||
|
urxvt.iso14755: false
|
||||||
|
urxvt.iso14755_52: false
|
||||||
|
urxvt.perl-ext-common: default,vtwheel,font-size
|
||||||
|
urxvt.url-launcher: /usr/bin/chromium
|
||||||
|
urxvt.matcher.button: 1
|
||||||
|
|
||||||
|
urxvt.keysym.C-Up: font-size:increase
|
||||||
|
urxvt.keysym.C-Down: font-size:decrease
|
||||||
|
urxvt.keysym.C-equal: font-size:reset
|
||||||
|
urxvt.keysym.C-slash: font-size:show
|
||||||
|
|
||||||
|
! special
|
||||||
|
*.foreground: #ECEFF1
|
||||||
|
*.background: #002B36
|
||||||
|
*.cursorColor: #5294E2
|
||||||
|
*.highlightColor: #5294E2
|
||||||
|
urxvt.background: [95]#383C4A
|
||||||
|
urxvt.scrollColor: #767B87
|
||||||
|
urxvt.dynamicColors: on
|
||||||
|
urxvt.highlightSelection: true
|
||||||
|
urxvt.colorMode: on
|
647
.config/alacritty/alacritty.yml
Normal file
647
.config/alacritty/alacritty.yml
Normal file
@ -0,0 +1,647 @@
|
|||||||
|
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||||
|
|
||||||
|
# Any items in the `env` entry below will be added as
|
||||||
|
# environment variables. Some entries may override variables
|
||||||
|
# set by alacritty itself.
|
||||||
|
env:
|
||||||
|
# TERM variable
|
||||||
|
#
|
||||||
|
# This value is used to set the `$TERM` environment variable for
|
||||||
|
# each instance of Alacritty. If it is not present, alacritty will
|
||||||
|
# check the local terminfo database and use `alacritty` if it is
|
||||||
|
# available, otherwise `xterm-256color` is used.
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
window:
|
||||||
|
# Window dimensions (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of columns/lines, not pixels.
|
||||||
|
# If both are `0`, this setting is ignored.
|
||||||
|
#dimensions:
|
||||||
|
# columns: 0
|
||||||
|
# lines: 0
|
||||||
|
|
||||||
|
# Window position (changes require restart)
|
||||||
|
#
|
||||||
|
# Specified in number of pixels.
|
||||||
|
# If the position is not set, the window manager will handle the placement.
|
||||||
|
#position:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Window padding (changes require restart)
|
||||||
|
#
|
||||||
|
# Blank space added around the window in pixels. This padding is scaled
|
||||||
|
# by DPI and the specified value is always added at both opposing sides.
|
||||||
|
padding:
|
||||||
|
x: 22
|
||||||
|
y: 22
|
||||||
|
|
||||||
|
# Spread additional padding evenly around the terminal content.
|
||||||
|
dynamic_padding: false
|
||||||
|
|
||||||
|
# Window decorations
|
||||||
|
#
|
||||||
|
# Values for `decorations`:
|
||||||
|
# - full: Borders and title bar
|
||||||
|
# - none: Neither borders nor title bar
|
||||||
|
#
|
||||||
|
# Values for `decorations` (macOS only):
|
||||||
|
# - transparent: Title bar, transparent background and title bar buttons
|
||||||
|
# - buttonless: Title bar, transparent background, but no title bar buttons
|
||||||
|
decorations: full
|
||||||
|
|
||||||
|
# Startup Mode (changes require restart)
|
||||||
|
#
|
||||||
|
# Values for `startup_mode`:
|
||||||
|
# - Windowed
|
||||||
|
# - Maximized
|
||||||
|
# - Fullscreen
|
||||||
|
#
|
||||||
|
# Values for `startup_mode` (macOS only):
|
||||||
|
# - SimpleFullscreen
|
||||||
|
startup_mode: Windowed
|
||||||
|
|
||||||
|
# Window title
|
||||||
|
#title: Alacritty
|
||||||
|
|
||||||
|
# Window class (Linux/BSD only):
|
||||||
|
#class:
|
||||||
|
# Application instance name
|
||||||
|
#instance: Alacritty
|
||||||
|
# General application class
|
||||||
|
#general: Alacritty
|
||||||
|
|
||||||
|
# GTK theme variant (Linux/BSD only)
|
||||||
|
#
|
||||||
|
# Override the variant of the GTK theme. Commonly supported values are `dark` and `light`.
|
||||||
|
# Set this to `None` to use the default theme variant.
|
||||||
|
#gtk_theme_variant: None
|
||||||
|
|
||||||
|
scrolling:
|
||||||
|
# Maximum number of lines in the scrollback buffer.
|
||||||
|
# Specifying '0' will disable scrolling.
|
||||||
|
history: 10000
|
||||||
|
|
||||||
|
# Number of lines the viewport will move for every line scrolled when
|
||||||
|
# scrollback is enabled (history > 0).
|
||||||
|
multiplier: 3
|
||||||
|
|
||||||
|
# Font configuration
|
||||||
|
font:
|
||||||
|
# Normal (roman) font face
|
||||||
|
#normal:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) Menlo
|
||||||
|
# - (Linux/BSD) monospace
|
||||||
|
# - (Windows) Consolas
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Regular
|
||||||
|
|
||||||
|
# Bold font face
|
||||||
|
#bold:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Bold
|
||||||
|
|
||||||
|
# Italic font face
|
||||||
|
#italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Italic
|
||||||
|
|
||||||
|
# Bold italic font face
|
||||||
|
#bold_italic:
|
||||||
|
# Font family
|
||||||
|
#
|
||||||
|
# If the bold italic family is not specified, it will fall back to the
|
||||||
|
# value specified for the normal font.
|
||||||
|
#family: monospace
|
||||||
|
|
||||||
|
# The `style` can be specified to pick a specific face.
|
||||||
|
#style: Bold Italic
|
||||||
|
|
||||||
|
# Point size
|
||||||
|
size: 9.0
|
||||||
|
|
||||||
|
# Offset is the extra space around each character. `offset.y` can be thought of
|
||||||
|
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
|
||||||
|
#offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Glyph offset determines the locations of the glyphs within their cells with
|
||||||
|
# the default being at the bottom. Increasing `x` moves the glyph to the right,
|
||||||
|
# increasing `y` moves the glyph upwards.
|
||||||
|
#glyph_offset:
|
||||||
|
# x: 0
|
||||||
|
# y: 0
|
||||||
|
|
||||||
|
# Thin stroke font rendering (macOS only)
|
||||||
|
#
|
||||||
|
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||||
|
# it is recommended to set `use_thin_strokes` to `false`
|
||||||
|
#
|
||||||
|
# macOS >= 10.14.x:
|
||||||
|
#
|
||||||
|
# If the font quality on non-retina display looks bad then set
|
||||||
|
# `use_thin_strokes` to `true` and enable font smoothing by running the
|
||||||
|
# following command:
|
||||||
|
# `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO`
|
||||||
|
#
|
||||||
|
# This is a global setting and will require a log out or restart to take
|
||||||
|
# effect.
|
||||||
|
#use_thin_strokes: true
|
||||||
|
|
||||||
|
# If `true`, bold text is drawn using the bright color variants.
|
||||||
|
draw_bold_text_with_bright_colors: true
|
||||||
|
|
||||||
|
# Colors (Tomorrow Night Bright)
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
foreground: '#eceff1'
|
||||||
|
background: '#383c4a'
|
||||||
|
|
||||||
|
# Bright and dim foreground colors
|
||||||
|
#
|
||||||
|
# The dimmed foreground color is calculated automatically if it is not present.
|
||||||
|
# If the bright foreground color is not set, or `draw_bold_text_with_bright_colors`
|
||||||
|
# is `false`, the normal foreground color will be used.
|
||||||
|
#dim_foreground: '#9a9a9a'
|
||||||
|
#bright_foreground: '#ffffff'
|
||||||
|
|
||||||
|
# Cursor colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the terminal cursor. If these are
|
||||||
|
# unset, the cursor color will be the inverse of the cell color.
|
||||||
|
cursor:
|
||||||
|
text: '#eceff1'
|
||||||
|
cursor: '#5294e2'
|
||||||
|
|
||||||
|
# Vi mode cursor colors
|
||||||
|
#
|
||||||
|
# Colors for the cursor when the vi mode is active. If these are unset, the
|
||||||
|
# cursor color will be the inverse of the cell color.
|
||||||
|
#vi_mode_cursor:
|
||||||
|
# text: '#000000'
|
||||||
|
# cursor: '#ffffff'
|
||||||
|
|
||||||
|
# Selection colors
|
||||||
|
#
|
||||||
|
# Colors which should be used to draw the selection area. If selection
|
||||||
|
# background is unset, selection color will be the inverse of the cell colors.
|
||||||
|
# If only text is unset the cell text color will remain the same.
|
||||||
|
selection:
|
||||||
|
# text: '#eaeaea'
|
||||||
|
background: '#5294e2'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '#333638'
|
||||||
|
red: '#f41f1c'
|
||||||
|
green: '#8bc34a'
|
||||||
|
yellow: '#ffc107'
|
||||||
|
blue: '#0266f4'
|
||||||
|
magenta: '#cc17cc'
|
||||||
|
cyan: '#10aeba'
|
||||||
|
white: '#8b9396'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '#475760'
|
||||||
|
red: '#e53727'
|
||||||
|
green: '#9ccc65'
|
||||||
|
yellow: '#ffa000'
|
||||||
|
blue: '#81b3f9'
|
||||||
|
magenta: '#a56ecc'
|
||||||
|
cyan: '#5ddae2'
|
||||||
|
white: '#eceff1'
|
||||||
|
|
||||||
|
# Dim colors
|
||||||
|
#
|
||||||
|
# If the dim colors are not set, they will be calculated automatically based
|
||||||
|
# on the `normal` colors.
|
||||||
|
#dim:
|
||||||
|
# black: '#000000'
|
||||||
|
# red: '#8c3336'
|
||||||
|
# green: '#7a8530'
|
||||||
|
# yellow: '#97822e'
|
||||||
|
# blue: '#506d8f'
|
||||||
|
# magenta: '#80638e'
|
||||||
|
# cyan: '#497e7a'
|
||||||
|
# white: '#9a9a9a'
|
||||||
|
|
||||||
|
# Indexed Colors
|
||||||
|
#
|
||||||
|
# The indexed colors include all colors from 16 to 256.
|
||||||
|
# When these are not set, they're filled with sensible defaults.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# `- { index: 16, color: '#ff00ff' }`
|
||||||
|
#
|
||||||
|
#indexed_colors: []
|
||||||
|
|
||||||
|
# Visual Bell
|
||||||
|
#
|
||||||
|
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||||
|
# rung, the terminal background will be set to white and transition back to the
|
||||||
|
# default background color. You can control the rate of this transition by
|
||||||
|
# setting the `duration` property (represented in milliseconds). You can also
|
||||||
|
# configure the transition function by setting the `animation` property.
|
||||||
|
#
|
||||||
|
# Values for `animation`:
|
||||||
|
# - Ease
|
||||||
|
# - EaseOut
|
||||||
|
# - EaseOutSine
|
||||||
|
# - EaseOutQuad
|
||||||
|
# - EaseOutCubic
|
||||||
|
# - EaseOutQuart
|
||||||
|
# - EaseOutQuint
|
||||||
|
# - EaseOutExpo
|
||||||
|
# - EaseOutCirc
|
||||||
|
# - Linear
|
||||||
|
#
|
||||||
|
# Specifying a `duration` of `0` will disable the visual bell.
|
||||||
|
#visual_bell:
|
||||||
|
# animation: EaseOutExpo
|
||||||
|
# duration: 0
|
||||||
|
# color: '#ffffff'
|
||||||
|
|
||||||
|
# Background opacity
|
||||||
|
#
|
||||||
|
# Window opacity as a floating point number from `0.0` to `1.0`.
|
||||||
|
# The value `0.0` is completely transparent and `1.0` is opaque.
|
||||||
|
background_opacity: 0.85
|
||||||
|
|
||||||
|
selection:
|
||||||
|
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
||||||
|
# When set to `true`, selected text will be copied to the primary clipboard.
|
||||||
|
save_to_clipboard: false
|
||||||
|
|
||||||
|
# Allow terminal applications to change Alacritty's window title.
|
||||||
|
dynamic_title: true
|
||||||
|
|
||||||
|
cursor:
|
||||||
|
# Cursor style
|
||||||
|
#
|
||||||
|
# Values for `style`:
|
||||||
|
# - ▇ Block
|
||||||
|
# - _ Underline
|
||||||
|
# - | Beam
|
||||||
|
style: Block
|
||||||
|
|
||||||
|
# Vi mode cursor style
|
||||||
|
#
|
||||||
|
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||||
|
# the style of the active value of the normal cursor.
|
||||||
|
#
|
||||||
|
# See `cursor.style` for available options.
|
||||||
|
#vi_mode_style: None
|
||||||
|
|
||||||
|
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||||
|
# window is not focused.
|
||||||
|
unfocused_hollow: true
|
||||||
|
|
||||||
|
# Live config reload (changes require restart)
|
||||||
|
live_config_reload: true
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set `shell.program` to the path of your favorite shell, e.g. `/bin/fish`.
|
||||||
|
# Entries in `shell.args` are passed unmodified as arguments to the shell.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) /bin/bash --login
|
||||||
|
# - (Linux/BSD) user login shell
|
||||||
|
# - (Windows) powershell
|
||||||
|
#shell:
|
||||||
|
# program: /bin/bash
|
||||||
|
# args:
|
||||||
|
# - --login
|
||||||
|
|
||||||
|
# Startup directory
|
||||||
|
#
|
||||||
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
|
# directory of the parent process will be used.
|
||||||
|
#working_directory: None
|
||||||
|
|
||||||
|
# WinPTY backend (Windows only)
|
||||||
|
#
|
||||||
|
# Alacritty defaults to using the newer ConPTY backend if it is available,
|
||||||
|
# since it resolves a lot of bugs and is quite a bit faster. If it is not
|
||||||
|
# available, the the WinPTY backend will be used instead.
|
||||||
|
#
|
||||||
|
# Setting this option to `true` makes Alacritty use the legacy WinPTY backend,
|
||||||
|
# even if the ConPTY backend is available.
|
||||||
|
#winpty_backend: false
|
||||||
|
|
||||||
|
# Send ESC (\x1b) before characters when alt is pressed.
|
||||||
|
#alt_send_esc: true
|
||||||
|
|
||||||
|
mouse:
|
||||||
|
# Click settings
|
||||||
|
#
|
||||||
|
# The `double_click` and `triple_click` settings control the time
|
||||||
|
# alacritty should wait for accepting multiple clicks as one double
|
||||||
|
# or triple click.
|
||||||
|
#double_click: { threshold: 300 }
|
||||||
|
#triple_click: { threshold: 300 }
|
||||||
|
|
||||||
|
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||||
|
hide_when_typing: false
|
||||||
|
|
||||||
|
url:
|
||||||
|
# URL launcher
|
||||||
|
#
|
||||||
|
# This program is executed when clicking on a text which is recognized as a URL.
|
||||||
|
# The URL is always added to the command as the last parameter.
|
||||||
|
#
|
||||||
|
# When set to `None`, URL launching will be disabled completely.
|
||||||
|
#
|
||||||
|
# Default:
|
||||||
|
# - (macOS) open
|
||||||
|
# - (Linux/BSD) xdg-open
|
||||||
|
# - (Windows) explorer
|
||||||
|
launcher:
|
||||||
|
program: xdg-open
|
||||||
|
args: []
|
||||||
|
|
||||||
|
# URL modifiers
|
||||||
|
#
|
||||||
|
# These are the modifiers that need to be held down for opening URLs when clicking
|
||||||
|
# on them. The available modifiers are documented in the key binding section.
|
||||||
|
#modifiers: None
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
#
|
||||||
|
# Mouse bindings are specified as a list of objects, much like the key
|
||||||
|
# bindings further below.
|
||||||
|
#
|
||||||
|
# To trigger mouse bindings when an application running within Alacritty captures the mouse, the
|
||||||
|
# `Shift` modifier is automatically added as a requirement.
|
||||||
|
#
|
||||||
|
# Each mouse binding will specify a:
|
||||||
|
#
|
||||||
|
# - `mouse`:
|
||||||
|
#
|
||||||
|
# - Middle
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - Numeric identifier such as `5`
|
||||||
|
#
|
||||||
|
# - `action` (see key bindings)
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods` (see key bindings)
|
||||||
|
mouse_bindings:
|
||||||
|
- { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
#
|
||||||
|
# Key bindings are specified as a list of objects. For example, this is the
|
||||||
|
# default paste binding:
|
||||||
|
#
|
||||||
|
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||||
|
#
|
||||||
|
# Each key binding will specify a:
|
||||||
|
#
|
||||||
|
# - `key`: Identifier of the key pressed
|
||||||
|
#
|
||||||
|
# - A-Z
|
||||||
|
# - F1-F24
|
||||||
|
# - Key0-Key9
|
||||||
|
#
|
||||||
|
# A full list with available key codes can be found here:
|
||||||
|
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||||
|
#
|
||||||
|
# Instead of using the name of the keys, the `key` field also supports using
|
||||||
|
# the scancode of the desired key. Scancodes have to be specified as a
|
||||||
|
# decimal number. This command will allow you to display the hex scancodes
|
||||||
|
# for certain keys:
|
||||||
|
#
|
||||||
|
# `showkey --scancodes`.
|
||||||
|
#
|
||||||
|
# Then exactly one of:
|
||||||
|
#
|
||||||
|
# - `chars`: Send a byte sequence to the running application
|
||||||
|
#
|
||||||
|
# The `chars` field writes the specified string to the terminal. This makes
|
||||||
|
# it possible to pass escape sequences. To find escape codes for bindings
|
||||||
|
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||||
|
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||||
|
# to keys. It is therefore required to update the terminfo when changing an
|
||||||
|
# escape sequence.
|
||||||
|
#
|
||||||
|
# - `action`: Execute a predefined action
|
||||||
|
#
|
||||||
|
# - ToggleViMode
|
||||||
|
# - Copy
|
||||||
|
# - Paste
|
||||||
|
# - PasteSelection
|
||||||
|
# - IncreaseFontSize
|
||||||
|
# - DecreaseFontSize
|
||||||
|
# - ResetFontSize
|
||||||
|
# - ScrollPageUp
|
||||||
|
# - ScrollPageDown
|
||||||
|
# - ScrollLineUp
|
||||||
|
# - ScrollLineDown
|
||||||
|
# - ScrollToTop
|
||||||
|
# - ScrollToBottom
|
||||||
|
# - ClearHistory
|
||||||
|
# - Hide
|
||||||
|
# - Minimize
|
||||||
|
# - Quit
|
||||||
|
# - ToggleFullscreen
|
||||||
|
# - SpawnNewInstance
|
||||||
|
# - ClearLogNotice
|
||||||
|
# - ClearSelection
|
||||||
|
# - ReceiveChar
|
||||||
|
# - None
|
||||||
|
#
|
||||||
|
# (`mode: Vi` only):
|
||||||
|
# - Open
|
||||||
|
# - Up
|
||||||
|
# - Down
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - First
|
||||||
|
# - Last
|
||||||
|
# - FirstOccupied
|
||||||
|
# - High
|
||||||
|
# - Middle
|
||||||
|
# - Low
|
||||||
|
# - SemanticLeft
|
||||||
|
# - SemanticRight
|
||||||
|
# - SemanticLeftEnd
|
||||||
|
# - SemanticRightEnd
|
||||||
|
# - WordRight
|
||||||
|
# - WordLeft
|
||||||
|
# - WordRightEnd
|
||||||
|
# - WordLeftEnd
|
||||||
|
# - Bracket
|
||||||
|
# - ToggleNormalSelection
|
||||||
|
# - ToggleLineSelection
|
||||||
|
# - ToggleBlockSelection
|
||||||
|
# - ToggleSemanticSelection
|
||||||
|
#
|
||||||
|
# (macOS only):
|
||||||
|
# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space
|
||||||
|
#
|
||||||
|
# - `command`: Fork and execute a specified command plus arguments
|
||||||
|
#
|
||||||
|
# The `command` field must be a map containing a `program` string and an
|
||||||
|
# `args` array of command line parameter strings. For example:
|
||||||
|
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||||
|
#
|
||||||
|
# And optionally:
|
||||||
|
#
|
||||||
|
# - `mods`: Key modifiers to filter binding actions
|
||||||
|
#
|
||||||
|
# - Command
|
||||||
|
# - Control
|
||||||
|
# - Option
|
||||||
|
# - Super
|
||||||
|
# - Shift
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# Multiple `mods` can be combined using `|` like this:
|
||||||
|
# `mods: Control|Shift`.
|
||||||
|
# Whitespace and capitalization are relevant and must match the example.
|
||||||
|
#
|
||||||
|
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||||
|
#
|
||||||
|
# This is mainly used to send applications the correct escape sequences
|
||||||
|
# when in different modes.
|
||||||
|
#
|
||||||
|
# - AppCursor
|
||||||
|
# - AppKeypad
|
||||||
|
# - Alt
|
||||||
|
#
|
||||||
|
# A `~` operator can be used before a mode to apply the binding whenever
|
||||||
|
# the mode is *not* active, e.g. `~Alt`.
|
||||||
|
#
|
||||||
|
# Bindings are always filled by default, but will be replaced when a new
|
||||||
|
# binding with the same triggers is defined. To unset a default binding, it can
|
||||||
|
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||||
|
# a no-op if you do not wish to receive input characters for that binding.
|
||||||
|
#
|
||||||
|
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||||
|
# at once.
|
||||||
|
key_bindings:
|
||||||
|
- { key: Paste, action: Paste }
|
||||||
|
- { key: Copy, action: Copy }
|
||||||
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
|
#- { key: L, mods: Control, mode: ~Vi, chars: "\x0c" }
|
||||||
|
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||||
|
#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown }
|
||||||
|
#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop, }
|
||||||
|
#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom }
|
||||||
|
|
||||||
|
# Vi Mode
|
||||||
|
#- { key: Space, mods: Shift|Control, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: Space, mods: Shift|Control, action: ToggleViMode }
|
||||||
|
#- { key: Escape, mode: Vi, action: ClearSelection }
|
||||||
|
#- { key: I, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: I, mode: Vi, action: ToggleViMode }
|
||||||
|
#- { key: Y, mods: Control, mode: Vi, action: ScrollLineUp }
|
||||||
|
#- { key: E, mods: Control, mode: Vi, action: ScrollLineDown }
|
||||||
|
#- { key: G, mode: Vi, action: ScrollToTop }
|
||||||
|
#- { key: G, mods: Shift, mode: Vi, action: ScrollToBottom }
|
||||||
|
#- { key: B, mods: Control, mode: Vi, action: ScrollPageUp }
|
||||||
|
#- { key: F, mods: Control, mode: Vi, action: ScrollPageDown }
|
||||||
|
#- { key: U, mods: Control, mode: Vi, action: ScrollHalfPageUp }
|
||||||
|
#- { key: D, mods: Control, mode: Vi, action: ScrollHalfPageDown }
|
||||||
|
#- { key: Y, mode: Vi, action: Copy }
|
||||||
|
#- { key: V, mode: Vi, action: ToggleNormalSelection }
|
||||||
|
#- { key: V, mods: Shift, mode: Vi, action: ToggleLineSelection }
|
||||||
|
#- { key: V, mods: Control, mode: Vi, action: ToggleBlockSelection }
|
||||||
|
#- { key: V, mods: Alt, mode: Vi, action: ToggleSemanticSelection }
|
||||||
|
#- { key: Return, mode: Vi, action: Open }
|
||||||
|
#- { key: K, mode: Vi, action: Up }
|
||||||
|
#- { key: J, mode: Vi, action: Down }
|
||||||
|
#- { key: H, mode: Vi, action: Left }
|
||||||
|
#- { key: L, mode: Vi, action: Right }
|
||||||
|
#- { key: Up, mode: Vi, action: Up }
|
||||||
|
#- { key: Down, mode: Vi, action: Down }
|
||||||
|
#- { key: Left, mode: Vi, action: Left }
|
||||||
|
#- { key: Right, mode: Vi, action: Right }
|
||||||
|
#- { key: Key0, mode: Vi, action: First }
|
||||||
|
#- { key: Key4, mods: Shift, mode: Vi, action: Last }
|
||||||
|
#- { key: Key6, mods: Shift, mode: Vi, action: FirstOccupied }
|
||||||
|
#- { key: H, mods: Shift, mode: Vi, action: High }
|
||||||
|
#- { key: M, mods: Shift, mode: Vi, action: Middle }
|
||||||
|
#- { key: L, mods: Shift, mode: Vi, action: Low }
|
||||||
|
#- { key: B, mode: Vi, action: SemanticLeft }
|
||||||
|
#- { key: W, mode: Vi, action: SemanticRight }
|
||||||
|
#- { key: E, mode: Vi, action: SemanticRightEnd }
|
||||||
|
#- { key: B, mods: Shift, mode: Vi, action: WordLeft }
|
||||||
|
#- { key: W, mods: Shift, mode: Vi, action: WordRight }
|
||||||
|
#- { key: E, mods: Shift, mode: Vi, action: WordRightEnd }
|
||||||
|
#- { key: Key5, mods: Shift, mode: Vi, action: Bracket }
|
||||||
|
|
||||||
|
# (Windows, Linux, and BSD only)
|
||||||
|
- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
- { key: Key0, mods: Control, action: ResetFontSize }
|
||||||
|
- { key: Equals, mods: Control, action: ResetFontSize }
|
||||||
|
- { key: Add, mods: Control, action: IncreaseFontSize }
|
||||||
|
- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
||||||
|
- { key: Minus, mods: Control, action: DecreaseFontSize }
|
||||||
|
|
||||||
|
# (Windows only)
|
||||||
|
#- { key: Return, mods: Alt, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
# (macOS only)
|
||||||
|
#- { key: K, mods: Command, mode: ~Vi, chars: "\x0c" }
|
||||||
|
#- { key: Key0, mods: Command, action: ResetFontSize }
|
||||||
|
#- { key: Equals, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Add, mods: Command, action: IncreaseFontSize }
|
||||||
|
#- { key: Minus, mods: Command, action: DecreaseFontSize }
|
||||||
|
#- { key: K, mods: Command, action: ClearHistory }
|
||||||
|
#- { key: V, mods: Command, action: Paste }
|
||||||
|
#- { key: C, mods: Command, action: Copy }
|
||||||
|
#- { key: H, mods: Command, action: Hide }
|
||||||
|
#- { key: M, mods: Command, action: Minimize }
|
||||||
|
#- { key: Q, mods: Command, action: Quit }
|
||||||
|
#- { key: W, mods: Command, action: Quit }
|
||||||
|
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||||
|
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||||
|
|
||||||
|
debug:
|
||||||
|
# Display the time it takes to redraw each frame.
|
||||||
|
#render_timer: false
|
||||||
|
|
||||||
|
# Keep the log file after quitting Alacritty.
|
||||||
|
#persistent_logging: false
|
||||||
|
|
||||||
|
# Log level
|
||||||
|
#
|
||||||
|
# Values for `log_level`:
|
||||||
|
# - None
|
||||||
|
# - Error
|
||||||
|
# - Warn
|
||||||
|
# - Info
|
||||||
|
# - Debug
|
||||||
|
# - Trace
|
||||||
|
log_level: Info
|
||||||
|
|
||||||
|
# Print all received window events.
|
||||||
|
#print_events: false
|
1
.config/chromium-flags.conf
Normal file
1
.config/chromium-flags.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
--enable-features=NativeNotifications,OverlayScrollbar
|
@ -1,92 +0,0 @@
|
|||||||
# Shadow
|
|
||||||
shadow = true; # Enabled client-side shadows on windows.
|
|
||||||
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
|
|
||||||
no-dnd-shadow = false; # Don't draw shadows on DND windows.
|
|
||||||
clear-shadow = true; # Zero the part of the shadow's mask behind the
|
|
||||||
# window. Fix some weirdness with ARGB windows.
|
|
||||||
shadow-radius = 12; # The blur radius for shadows. (default 12)
|
|
||||||
shadow-offset-x = -16; # The left offset for shadows. (default -15)
|
|
||||||
shadow-offset-y = -16; # The top offset for shadows. (default -15)
|
|
||||||
shadow-opacity = 0.65; # The translucency for shadows. (default .75)
|
|
||||||
# shadow-red = 0.0; # Red color value of shadow. (0.0 - 1.0, defaults to 0)
|
|
||||||
# shadow-green = 0.0; # Green color value of shadow. (0.0 - 1.0, defaults to 0)
|
|
||||||
# shadow-blue = 0.0; # Blue color value of shadow. (0.0 - 1.0, defaults to 0)
|
|
||||||
shadow-exclude = [ "class_g = 'slop'" ]; # Exclude conditions for shadows.
|
|
||||||
shadow-ignore-shaped = false; # Avoid drawing shadow on all shaped windows
|
|
||||||
# (see also: --detect-rounded-corners)
|
|
||||||
|
|
||||||
# Opacity
|
|
||||||
menu-opacity = 0.9; # The opacity for menus. (default 1.0)
|
|
||||||
inactive-opacity = 0.8; # Default opacity of inactive windows. (0.0 - 1.0)
|
|
||||||
active-opacity = 1.0; # Default opacity for active windows. (0.0 - 1.0)
|
|
||||||
frame-opacity = 1.0; # Opacity of window titlebars and borders. (0.1 - 1.0)
|
|
||||||
inactive-opacity-override = true; # Let inactive opacity set by 'inactive-opacity' overrides
|
|
||||||
# value of _NET_WM_OPACITY. Bad choice.
|
|
||||||
opacity-rule = [
|
|
||||||
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
|
||||||
];
|
|
||||||
alpha-step = 0.06; # XRender backend: Step size for alpha pictures. Increasing
|
|
||||||
# it may result in less X resource usage,
|
|
||||||
# Yet f ading may look bad.
|
|
||||||
# inactive-dim = 0.2; # Dim inactive windows. (0.0 - 1.0)
|
|
||||||
#inactive-dim-fixed = true; # Do not let dimness adjust based on window opacity.
|
|
||||||
inactive-opacity-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ];
|
|
||||||
blur-background = true; # Blur background of transparent windows.
|
|
||||||
blur-background-exclude = [ "class_g = 'Peek'", "class_g = 'Onboard'", "class_g = 'slop'" ];
|
|
||||||
blur-background-frame = false; # Blur background of opaque windows with transparent
|
|
||||||
# frames as well.
|
|
||||||
blur-background-fixed = true; # Do not let blur radius adjust based on window opacity.
|
|
||||||
# Exclude conditions for background blur.
|
|
||||||
# python compton-convgen.py --dump-compton gaussian 9 -f=sigma=10
|
|
||||||
blur-kern = "9,9,0.852144,0.882497,0.904837,0.918512,0.923116,0.918512,0.904837,0.882497,0.852144,0.882497,0.913931,0.937067,0.951229,0.955997,0.951229,0.937067,0.913931,0.882497,0.904837,0.937067,0.960789,0.975310,0.980199,0.975310,0.960789,0.937067,0.904837,0.918512,0.951229,0.975310,0.990050,0.995012,0.990050,0.975310,0.951229,0.918512,0.923116,0.955997,0.980199,0.995012,0.995012,0.980199,0.955997,0.923116,0.918512,0.951229,0.975310,0.990050,0.995012,0.990050,0.975310,0.951229,0.918512,0.904837,0.937067,0.960789,0.975310,0.980199,0.975310,0.960789,0.937067,0.904837,0.882497,0.913931,0.937067,0.951229,0.955997,0.951229,0.937067,0.913931,0.882497,0.852144,0.882497,0.904837,0.918512,0.923116,0.918512,0.904837,0.882497,0.852144"
|
|
||||||
|
|
||||||
# Fading
|
|
||||||
fading = true; # Fade windows during opacity changes.
|
|
||||||
# fade-delta = 16; # The time between steps in a fade in milliseconds. (default 10).
|
|
||||||
fade-in-step = 0.025; # Opacity change between steps while fading in. (default 0.028).
|
|
||||||
fade-out-step = 0.02; # Opacity change between steps while fading out. (default 0.03).
|
|
||||||
# no-fading-openclose = true; # Avoid fade windows in/out when opening/closing.
|
|
||||||
# fade-exclude = [ ]; # Exclude conditions for fading.
|
|
||||||
|
|
||||||
# Other
|
|
||||||
backend = "glx" # Backend to use: "xrender" or "glx". GLX backend is typically
|
|
||||||
# much faster but depends on a sane driver.
|
|
||||||
mark-wmwin-focused = true; # Try to detect WM windows and mark them as active.
|
|
||||||
mark-ovredir-focused = true; # Mark all non-WM but override-redirect windows active (e.g. menus).
|
|
||||||
use-ewmh-active-win = true; # Use EWMH _NET_WM_ACTIVE_WINDOW to determine which window is focused
|
|
||||||
# instead of using FocusIn/Out events. Usually more reliable but
|
|
||||||
# depends on a EWMH-compliant WM.
|
|
||||||
detect-rounded-corners = true; # Detect rounded corners and treat them as rectangular when --shadow-ignore-shaped is on.
|
|
||||||
detect-client-opacity = true; # Detect _NET_WM_OPACITY on client windows, useful for window
|
|
||||||
# managers not passing _NET_WM_OPACITY of client windows to frame windows.
|
|
||||||
refresh-rate = 0; # For --sw-opti: Specify refresh rate of the screen. 0 for auto.
|
|
||||||
vsync = "none"; # "none", "drm", "opengl", "opengl-oml", "opengl-swc", "opengl-mswc"
|
|
||||||
# See man page for more details.
|
|
||||||
dbe = false; # Enable DBE painting mode. Rarely needed.
|
|
||||||
paint-on-overlay = true; # Painting on X Composite overlay window. Recommended.
|
|
||||||
sw-opti = false; # Limit compton to repaint at most once every 1 / refresh_rate.
|
|
||||||
# Incompatible with certain VSync methods.
|
|
||||||
unredir-if-possible = false; # Unredirect all windows if a full-screen opaque window is
|
|
||||||
# detected, to maximize performance for full-screen windows.
|
|
||||||
focus-exclude = [ "i:ai:chromium" ]; # A list of conditions of windows that should always be considered focused.
|
|
||||||
detect-transient = true; # Use WM_TRANSIENT_FOR to group windows, and consider windows in
|
|
||||||
# the same group focused at the same time.
|
|
||||||
detect-client-leader = true; # Use WM_CLIENT_LEADER to group windows.
|
|
||||||
invert-color-include = [ ]; # Conditions for windows to be painted with inverted color.
|
|
||||||
|
|
||||||
# GLX backend # GLX backend fine-tune options. See man page for more info.
|
|
||||||
glx-no-stencil = true; # Recommended.
|
|
||||||
glx-copy-from-front = false; # Useful with --glx-swap-method,
|
|
||||||
# glx-use-copysubbuffermesa = true; # Recommended if it works. Breaks VSync.
|
|
||||||
# glx-no-rebind-pixmap = true; # Recommended if it works.
|
|
||||||
glx-swap-method = "undefined"; # See man page.
|
|
||||||
|
|
||||||
# Window type settings
|
|
||||||
wintypes:
|
|
||||||
{
|
|
||||||
tooltip = { fade = true; shadow = false; opacity = 1; focus = true; };
|
|
||||||
# fade: Fade the particular type of windows.
|
|
||||||
# shadow: Give those windows shadow
|
|
||||||
# opacity: Default opacity for the type of windows.
|
|
||||||
# focus: Whether to always consider windows of this type focused.
|
|
||||||
};
|
|
@ -1,5 +1,5 @@
|
|||||||
[global]
|
[global]
|
||||||
font = Noto Sans 10
|
font = sans 9.5
|
||||||
|
|
||||||
# Allow a small subset of html markup:
|
# Allow a small subset of html markup:
|
||||||
# <b>bold</b>
|
# <b>bold</b>
|
||||||
@ -11,7 +11,7 @@
|
|||||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||||
# If markup is not allowed, those tags will be stripped out of the
|
# If markup is not allowed, those tags will be stripped out of the
|
||||||
# message.
|
# message.
|
||||||
markup = yes
|
markup = full
|
||||||
|
|
||||||
# The format of the message. Possible variables are:
|
# The format of the message. Possible variables are:
|
||||||
# %a appname
|
# %a appname
|
||||||
@ -21,7 +21,7 @@
|
|||||||
# %I iconname (without its path)
|
# %I iconname (without its path)
|
||||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||||
# Markup is allowed
|
# Markup is allowed
|
||||||
format = "<b>%s</b>\n%b"
|
format = "<b>%s %p</b>\n%b"
|
||||||
|
|
||||||
# Sort messages by urgency.
|
# Sort messages by urgency.
|
||||||
sort = yes
|
sort = yes
|
||||||
@ -51,7 +51,6 @@
|
|||||||
# Ignore newlines '\n' in notifications.
|
# Ignore newlines '\n' in notifications.
|
||||||
ignore_newline = no
|
ignore_newline = no
|
||||||
|
|
||||||
|
|
||||||
# The geometry of the window:
|
# The geometry of the window:
|
||||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||||
# The geometry of the message window.
|
# The geometry of the message window.
|
||||||
@ -66,16 +65,16 @@
|
|||||||
# screen width minus the width defined in within the geometry option.
|
# screen width minus the width defined in within the geometry option.
|
||||||
|
|
||||||
# 53 = 30 + 23 (bar-height)
|
# 53 = 30 + 23 (bar-height)
|
||||||
geometry = "300x5-30+52"
|
geometry = "360x5-30+30"
|
||||||
|
|
||||||
# Shrink window if it's smaller than the width. Will be ignored if
|
# Shrink window if it's smaller than the width. Will be ignored if
|
||||||
# width is 0.
|
# width is 0.
|
||||||
shrink = no
|
shrink = yes
|
||||||
|
|
||||||
# The transparency of the window. Range: [0; 100].
|
# The transparency of the window. Range: [0; 100].
|
||||||
# This option will only work if a compositing windowmanager is
|
# This option will only work if a compositing windowmanager is
|
||||||
# present (e.g. xcompmgr, compiz, etc.).
|
# present (e.g. xcompmgr, compiz, etc.).
|
||||||
# transparency = 10
|
transparency = 15
|
||||||
|
|
||||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||||
# for longer than idle_threshold seconds.
|
# for longer than idle_threshold seconds.
|
||||||
@ -103,7 +102,7 @@
|
|||||||
sticky_history = yes
|
sticky_history = yes
|
||||||
|
|
||||||
# Maximum amount of notifications kept in history
|
# Maximum amount of notifications kept in history
|
||||||
history_length = 20
|
history_length = 100
|
||||||
|
|
||||||
# Display indicators for URLs (U) and actions (A).
|
# Display indicators for URLs (U) and actions (A).
|
||||||
show_indicators = no
|
show_indicators = no
|
||||||
@ -119,10 +118,10 @@
|
|||||||
separator_height = 2
|
separator_height = 2
|
||||||
|
|
||||||
# Padding between text and separator.
|
# Padding between text and separator.
|
||||||
padding = 12
|
padding = 15
|
||||||
|
|
||||||
# Horizontal padding.
|
# Horizontal padding.
|
||||||
horizontal_padding = 20
|
horizontal_padding = 16
|
||||||
|
|
||||||
# Define a color for the separator.
|
# Define a color for the separator.
|
||||||
# possible values are:
|
# possible values are:
|
||||||
@ -144,12 +143,14 @@
|
|||||||
browser = /usr/bin/chromium
|
browser = /usr/bin/chromium
|
||||||
|
|
||||||
# Align icons left/right/off
|
# Align icons left/right/off
|
||||||
icon_position = off
|
icon_position = left
|
||||||
|
|
||||||
|
# Scale larger icons down to this size, set to 0 to disable
|
||||||
|
max_icon_size = 44
|
||||||
|
|
||||||
# Paths to default icons.
|
# Paths to default icons.
|
||||||
icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
icon_path = /usr/share/icons/Xenlism-Wildfire/Status/:/usr/share/icons/Xenlism-Wildfire/Devices/:/usr/share/icons/Adwaita/32x32/status:/usr/share/icons/Adwaita/32x32/devices
|
||||||
|
frame_width = 0
|
||||||
frame_width = 3
|
|
||||||
frame_color = "#404552"
|
frame_color = "#404552"
|
||||||
|
|
||||||
[shortcuts]
|
[shortcuts]
|
||||||
|
@ -2,43 +2,38 @@
|
|||||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
<match>
|
<match>
|
||||||
<test name="family">
|
<test qual="any" name="family"><string>sans-serif</string></test>
|
||||||
<string>sans-serif</string>
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
</test>
|
|
||||||
<edit name="family" mode="prepend" binding="weak">
|
|
||||||
<string>Noto Sans</string>
|
<string>Noto Sans</string>
|
||||||
<string>Noto Color Emoji</string>
|
<string>Noto Color Emoji</string>
|
||||||
|
<string>FontAwesome 5 Pro Light</string>
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
<match>
|
<match>
|
||||||
<test name="family">
|
<test qual="any" name="family"><string>serif</string></test>
|
||||||
<string>serif</string>
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
</test>
|
|
||||||
<edit name="family" mode="prepend" binding="weak">
|
|
||||||
<string>Noto Serif</string>
|
<string>Noto Serif</string>
|
||||||
<string>Noto Color Emoji</string>
|
<string>Noto Color Emoji</string>
|
||||||
|
<string>FontAwesome 5 Pro Light</string>
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
<match>
|
<match>
|
||||||
<test name="family">
|
<test qual="any" name="family"><string>monospace</string></test>
|
||||||
<string>monospace</string>
|
<edit name="family" mode="prepend" binding="strong">
|
||||||
</test>
|
<string>Source Code Pro</string>
|
||||||
<edit name="family" mode="prepend" binding="weak">
|
|
||||||
<string>Sauce Code Pro</string>
|
|
||||||
<string>Noto Color Emoji</string>
|
<string>Noto Color Emoji</string>
|
||||||
|
<string>FontAwesome 5 Pro Light</string>
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
<match>
|
|
||||||
<test name="family">
|
<match target="font">
|
||||||
<string>Apple Color Emoji</string>
|
<test qual="all" name="family" compare="eq"><string>Noto Sans</string></test>
|
||||||
</test>
|
<edit name="hintstyle" mode="assign"><const>hintnone</const></edit>
|
||||||
<edit name="family" mode="prepend" binding="weak">
|
|
||||||
<string>Noto Color Emoji</string>
|
|
||||||
</edit>
|
|
||||||
</match>
|
</match>
|
||||||
<match target="font">
|
<match target="font">
|
||||||
<edit name="hintstyle" mode="assign">
|
<test qual="all" name="family" compare="eq"><string>Source Code Pro</string></test>
|
||||||
<const>hintfull</const>
|
<edit name="hintstyle" mode="assign"><const>hintfull</const></edit>
|
||||||
</edit>
|
<edit name="lcdfilter" mode="assign"><const>lcddefault</const></edit>
|
||||||
|
<edit name="rgba" mode="assign"><const>rgb</const></edit>
|
||||||
</match>
|
</match>
|
||||||
</fontconfig>
|
</fontconfig>
|
||||||
|
@ -4,8 +4,10 @@
|
|||||||
signingkey = CFBB6A86
|
signingkey = CFBB6A86
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
excludesfile = $HOME/.config/git/gitignore
|
excludesfile = /home/frebib/.config/git/gitignore
|
||||||
pager = diff-so-fancy | less
|
pager = diff-highlight | $PAGER
|
||||||
|
[interactive]
|
||||||
|
diffFilter = diff-highlight
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
[push]
|
[push]
|
||||||
@ -35,8 +37,6 @@
|
|||||||
suppresscc = self
|
suppresscc = self
|
||||||
[diff]
|
[diff]
|
||||||
algorithm = patience
|
algorithm = patience
|
||||||
[interactive]
|
|
||||||
diffFilter = diff-so-fancy --patch-mode
|
|
||||||
[color]
|
[color]
|
||||||
ui = true
|
ui = true
|
||||||
[color "diff"]
|
[color "diff"]
|
||||||
@ -51,7 +51,5 @@
|
|||||||
oldHighlight = red 88
|
oldHighlight = red 88
|
||||||
newNormal = green
|
newNormal = green
|
||||||
newHighlight = green 22
|
newHighlight = green 22
|
||||||
[diff-so-fancy]
|
|
||||||
changeHunkIndicators = false
|
|
||||||
|
|
||||||
# vim: noet
|
# vim: noet
|
||||||
|
35
.config/gopass/config.yml
Normal file
35
.config/gopass/config.yml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
root:
|
||||||
|
askformore: false
|
||||||
|
autoclip: false
|
||||||
|
autoimport: true
|
||||||
|
autosync: true
|
||||||
|
check_recipient_hash: false
|
||||||
|
cliptimeout: 45
|
||||||
|
concurrency: 1
|
||||||
|
editrecipients: false
|
||||||
|
nocolor: false
|
||||||
|
noconfirm: true
|
||||||
|
nopager: false
|
||||||
|
notifications: false
|
||||||
|
path: gpgcli-gitcli-fs+file:///home/frebib/.local/share/pass
|
||||||
|
recipient_hash: {}
|
||||||
|
safecontent: false
|
||||||
|
usesymbols: false
|
||||||
|
mounts:
|
||||||
|
spritsail:
|
||||||
|
askformore: false
|
||||||
|
autoclip: false
|
||||||
|
autoimport: true
|
||||||
|
autosync: true
|
||||||
|
check_recipient_hash: false
|
||||||
|
cliptimeout: 45
|
||||||
|
concurrency: 1
|
||||||
|
editrecipients: false
|
||||||
|
nocolor: false
|
||||||
|
noconfirm: true
|
||||||
|
nopager: false
|
||||||
|
notifications: false
|
||||||
|
path: gpgcli-gitcli-fs+file:///home/frebib/.local/share/pass-spritsail
|
||||||
|
recipient_hash: {}
|
||||||
|
safecontent: false
|
||||||
|
usesymbols: false
|
@ -1,5 +1,15 @@
|
|||||||
VteTerminal,
|
VteTerminal,
|
||||||
TerminalScreen,
|
TerminalScreen,
|
||||||
vte-terminal {
|
vte-terminal {
|
||||||
padding: 6px;
|
padding: 1.8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.window-frame, .window-frame:backdrop {
|
||||||
|
margin: 0;
|
||||||
|
border-style: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.titlebar {
|
||||||
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# ================================================================================== #
|
|
||||||
# Focus the next window on the current workspace in i3, e.g. for binding to Alt+Tab #
|
|
||||||
# Depends: jq, awk, i3wm (obviously) #
|
|
||||||
# Author: Nervengift <dev@nerven.gift> #
|
|
||||||
# License: Don't think this deserves a license, Public Domain #
|
|
||||||
# Known bugs: doesn't work with non-window container focused #
|
|
||||||
# ================================================================================== #
|
|
||||||
|
|
||||||
ws=$(i3-msg -t get_workspaces|jq "map(select(.focused))[]|.name")
|
|
||||||
echo $ws
|
|
||||||
windows=$(i3-msg -t get_tree|jq ".nodes|map(.nodes[])|map(.nodes[])|map(select(.type==\"workspace\" and .name==$ws))[0].nodes|map(recurse(.nodes[]))|map(.window)|.[]|values")
|
|
||||||
echo $windows
|
|
||||||
current=$(i3-msg -t get_tree|jq "recurse(.nodes[])|select(.focused)|.window")
|
|
||||||
echo $current
|
|
||||||
if [ "x$current" != "xnull" ]; then
|
|
||||||
next=$(echo $windows | awk "BEGIN {RS=\" \";FS=\" \"};NR == 1 {w=\$1};{if (f == 1){w=\$1;f=0}else if (\$1 == \"$current\") f=1};END {print w}")
|
|
||||||
i3-msg [id=$next] focus > /dev/null
|
|
||||||
fi
|
|
@ -1,90 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copyright (C) 2012 Stefan Breunig <stefan+measure-net-speed@mathphys.fsk.uni-heidelberg.de>
|
|
||||||
# Copyright (C) 2014 kaueraal
|
|
||||||
# Copyright (C) 2015 Thiago Perrotta <perrotta dot thiago at poli dot ufrj dot br>
|
|
||||||
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# Use the provided interface, otherwise the device used for the default route.
|
|
||||||
if [[ -n $BLOCK_INSTANCE ]]; then
|
|
||||||
INTERFACE=$BLOCK_INSTANCE
|
|
||||||
else
|
|
||||||
INTERFACE=$(ip route | awk '/^default/ { print $5 ; exit }')
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Issue #36 compliant.
|
|
||||||
if ! [ -e "/sys/class/net/${INTERFACE}/operstate" ] || ! [ "`cat /sys/class/net/${INTERFACE}/operstate`" = "up" ]
|
|
||||||
then
|
|
||||||
echo "$INTERFACE down"
|
|
||||||
echo "$INTERFACE down"
|
|
||||||
echo "#FF0000"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# path to store the old results in
|
|
||||||
path="/dev/shm/$(basename $0)-${INTERFACE}"
|
|
||||||
|
|
||||||
# grabbing data for each adapter.
|
|
||||||
read rx < "/sys/class/net/${INTERFACE}/statistics/rx_bytes"
|
|
||||||
read tx < "/sys/class/net/${INTERFACE}/statistics/tx_bytes"
|
|
||||||
|
|
||||||
# get time
|
|
||||||
time=$(date +%s)
|
|
||||||
|
|
||||||
# write current data if file does not exist. Do not exit, this will cause
|
|
||||||
# problems if this file is sourced instead of executed as another process.
|
|
||||||
if ! [[ -f "${path}" ]]; then
|
|
||||||
echo "${time} ${rx} ${tx}" > "${path}"
|
|
||||||
chmod 0666 "${path}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# read previous state and update data storage
|
|
||||||
read old < "${path}"
|
|
||||||
echo "${time} ${rx} ${tx}" > "${path}"
|
|
||||||
|
|
||||||
# parse old data and calc time passed
|
|
||||||
old=(${old//;/ })
|
|
||||||
time_diff=$(( $time - ${old[0]} ))
|
|
||||||
|
|
||||||
# sanity check: has a positive amount of time passed
|
|
||||||
[[ "${time_diff}" -gt 0 ]] || exit
|
|
||||||
|
|
||||||
# calc bytes transferred, and their rate in byte/s
|
|
||||||
rx_diff=$(( $rx - ${old[1]} ))
|
|
||||||
tx_diff=$(( $tx - ${old[2]} ))
|
|
||||||
rx_rate=$(( $rx_diff / $time_diff ))
|
|
||||||
tx_rate=$(( $tx_diff / $time_diff ))
|
|
||||||
|
|
||||||
# shift by 10 bytes to get KiB/s. If the value is larger than
|
|
||||||
# 1024^2 = 1048576, then display MiB/s instead
|
|
||||||
|
|
||||||
# incoming
|
|
||||||
echo -n " "
|
|
||||||
rx_kib=$(( $rx_rate >> 10 ))
|
|
||||||
if [[ "$rx_rate" -gt 1048576 ]]; then
|
|
||||||
printf '%sk' "`echo "scale=1; $rx_kib / 1024" | bc`"
|
|
||||||
else
|
|
||||||
echo -n "${rx_kib}k"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -n " "
|
|
||||||
|
|
||||||
# outgoing
|
|
||||||
echo -n " "
|
|
||||||
tx_kib=$(( $tx_rate >> 10 ))
|
|
||||||
if [[ "$tx_rate" -gt 1048576 ]]; then
|
|
||||||
printf '%sm' "`echo "scale=1; $tx_kib / 1024" | bc`"
|
|
||||||
else
|
|
||||||
echo -n "${tx_kib}k"
|
|
||||||
fi
|
|
@ -1,97 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
|
||||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
|
||||||
#
|
|
||||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
|
||||||
#
|
|
||||||
# This script is meant to use with i3blocks. It parses the output of the "acpi"
|
|
||||||
# command (often provided by a package of the same name) to read the status of
|
|
||||||
# the battery, and eventually its remaining time (to full charge or discharge).
|
|
||||||
#
|
|
||||||
# The color will gradually change for a percentage below 85%, and the urgency
|
|
||||||
# (exit code 33) is set if there is less that 5% remaining.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use Switch;
|
|
||||||
|
|
||||||
my $acpi;
|
|
||||||
my $status;
|
|
||||||
my $percent;
|
|
||||||
my $hours = -1;
|
|
||||||
my $mins;
|
|
||||||
my $full_text;
|
|
||||||
my $short_text;
|
|
||||||
my $bat_number = $ENV{BLOCK_INSTANCE} || 0;
|
|
||||||
|
|
||||||
# read the first line of the "acpi" command output
|
|
||||||
open (ACPI, "acpi -b | grep 'Battery $bat_number' |") or die;
|
|
||||||
$acpi = <ACPI>;
|
|
||||||
close(ACPI);
|
|
||||||
|
|
||||||
# fail on unexpected output
|
|
||||||
if ($acpi !~ /: (\w+), (\d+)%/) {
|
|
||||||
die "$acpi\n";
|
|
||||||
}
|
|
||||||
$status = $1;
|
|
||||||
$percent = $2;
|
|
||||||
|
|
||||||
if ($acpi =~ /, (\d+):(\d+)/) {
|
|
||||||
$hours = $1;
|
|
||||||
$mins = $2;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($status eq 'Discharging') {
|
|
||||||
if ($percent <= 10) {
|
|
||||||
$full_text = "";
|
|
||||||
} elsif ($percent <= 40) {
|
|
||||||
$full_text = "";
|
|
||||||
} elsif ($percent <= 75) {
|
|
||||||
$full_text = "";
|
|
||||||
} else {
|
|
||||||
$full_text = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
} elsif ($status eq 'Charging') {
|
|
||||||
$full_text = '';
|
|
||||||
} else {
|
|
||||||
$full_text = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$full_text .= " $percent%";
|
|
||||||
$short_text = $full_text;
|
|
||||||
|
|
||||||
switch($ENV{BLOCK_BUTTON} || 0) {
|
|
||||||
case "1" {
|
|
||||||
if ($hours lt 0) {
|
|
||||||
$full_text .= " Charged";
|
|
||||||
} else {
|
|
||||||
$full_text .= " ($hours:$mins";
|
|
||||||
if ($status eq 'Discharging') {
|
|
||||||
$full_text .= ")";
|
|
||||||
} else {
|
|
||||||
$full_text .= " until full)";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case "4" { system("light -U -l 1") }
|
|
||||||
case "5" { system("light -A -l 1") }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# print text
|
|
||||||
print "$full_text\n";
|
|
||||||
print "$short_text\n";
|
|
||||||
|
|
||||||
# consider color and urgent flag only on discharge
|
|
||||||
if ($status eq 'Discharging') {
|
|
||||||
|
|
||||||
if ($percent < 20) {
|
|
||||||
print "#FF0000\n";
|
|
||||||
} elsif ($percent < 40) {
|
|
||||||
print "#FFCB00\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
exit(0);
|
|
@ -1,5 +0,0 @@
|
|||||||
case $BLOCK_BUTTON in
|
|
||||||
1) printf " "$(date '+%d/%m/%y') ; exit ;;
|
|
||||||
2|3) i3-sensible-terminal -r i3blocks-clock-term --geometry 68x35 -e "$SHELL -c \"cal -y $(date +'%Y');$SHELL\"" &>/dev/null & ;;
|
|
||||||
*) printf " "$(date '+%H:%M')
|
|
||||||
esac
|
|
@ -1,93 +0,0 @@
|
|||||||
# i3blocks config file
|
|
||||||
#
|
|
||||||
# Please see man i3blocks for a complete reference!
|
|
||||||
# The man page is also hosted at http://vivien.github.io/i3blocks
|
|
||||||
#
|
|
||||||
# List of valid properties:
|
|
||||||
#
|
|
||||||
# align
|
|
||||||
# color
|
|
||||||
# command
|
|
||||||
# full_text
|
|
||||||
# instance
|
|
||||||
# interval
|
|
||||||
# label
|
|
||||||
# min_width
|
|
||||||
# name
|
|
||||||
# separator
|
|
||||||
# separator_block_width
|
|
||||||
# short_text
|
|
||||||
# signal
|
|
||||||
# urgent
|
|
||||||
|
|
||||||
# Global properties
|
|
||||||
#
|
|
||||||
# The top properties below are applied to every block, but can be overridden.
|
|
||||||
# Each block command defaults to the script name to avoid boilerplate.
|
|
||||||
command=~/.config/i3/blocks/$BLOCK_NAME
|
|
||||||
markup=none
|
|
||||||
|
|
||||||
#full_text=
|
|
||||||
align=center
|
|
||||||
color=#F3F4F5
|
|
||||||
separator=false
|
|
||||||
separator_block_width=12
|
|
||||||
|
|
||||||
#[window title]
|
|
||||||
#command=xtitle -s #| sed 's/^$/ /g'"
|
|
||||||
#color=#A6D1FA
|
|
||||||
#align=center
|
|
||||||
#min_width=700
|
|
||||||
#interval=persist
|
|
||||||
|
|
||||||
[volume]
|
|
||||||
interval=persist
|
|
||||||
signal=10
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[iface]
|
|
||||||
label=
|
|
||||||
interval=60
|
|
||||||
signal=15
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[updates]
|
|
||||||
label=
|
|
||||||
interval=600
|
|
||||||
signal=5
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[cpu_usage]
|
|
||||||
label=
|
|
||||||
interval=persist
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[memory]
|
|
||||||
label=
|
|
||||||
interval=10
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[temperature]
|
|
||||||
label=
|
|
||||||
interval=5
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
#[battery]
|
|
||||||
#label=
|
|
||||||
#interval=5
|
|
||||||
|
|
||||||
[keyboard]
|
|
||||||
label=
|
|
||||||
interval=30
|
|
||||||
|
|
||||||
[separator]
|
|
||||||
|
|
||||||
[clock]
|
|
||||||
interval=5
|
|
||||||
min_width=" 00:00"
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# by Paul Colby (http://colby.id.au), no rights reserved ;)
|
|
||||||
# https://github.com/Leo-G/DevopsWiki/wiki/How-Linux-CPU-Usage-Time-and-Percentage-is-calculated
|
|
||||||
|
|
||||||
PREV_TOTAL=0
|
|
||||||
PREV_IDLE=0
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
# Get the total CPU statistics, discarding the 'cpu ' prefix.
|
|
||||||
CPU=(`sed -n 's/^cpu\s//p' /proc/stat`)
|
|
||||||
IDLE=${CPU[3]} # Just the idle CPU time.
|
|
||||||
|
|
||||||
# Calculate the total CPU time.
|
|
||||||
TOTAL=0
|
|
||||||
for VALUE in "${CPU[@]}"; do
|
|
||||||
let "TOTAL=$TOTAL+$VALUE"
|
|
||||||
done
|
|
||||||
|
|
||||||
# Calculate the CPU usage since we last checked.
|
|
||||||
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
|
|
||||||
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
|
|
||||||
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
|
|
||||||
echo -e "$DIFF_USAGE%\n$DIFF_USAGE%"
|
|
||||||
|
|
||||||
# Remember the total and idle CPU times for the next check.
|
|
||||||
PREV_TOTAL="$TOTAL"
|
|
||||||
PREV_IDLE="$IDLE"
|
|
||||||
|
|
||||||
# Wait before checking again.
|
|
||||||
sleep 1
|
|
||||||
done
|
|
@ -1,41 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
DIR="${BLOCK_INSTANCE:-$HOME}"
|
|
||||||
ALERT_LOW="${1:-10}" # color will turn red under this value (default: 10%)
|
|
||||||
|
|
||||||
df -h -P -l "$DIR" | awk -v alert_low=$ALERT_LOW '
|
|
||||||
/\/.*/ {
|
|
||||||
# full text
|
|
||||||
print $4
|
|
||||||
|
|
||||||
# short text
|
|
||||||
print $4
|
|
||||||
|
|
||||||
use=$5
|
|
||||||
|
|
||||||
# no need to continue parsing
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
END {
|
|
||||||
gsub(/%$/,"",use)
|
|
||||||
if (100 - use < alert_low) {
|
|
||||||
# color
|
|
||||||
print "#FF0000"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'
|
|
@ -1,62 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.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 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# Use the provided interface, otherwise the device used for the default route.
|
|
||||||
if [[ -n $BLOCK_INSTANCE ]]; then
|
|
||||||
IF=$BLOCK_INSTANCE
|
|
||||||
else
|
|
||||||
IF=$(ip route | awk '/^default/ { print $5 ; exit }')
|
|
||||||
fi
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
|
|
||||||
# connection (think desktop), the corresponding block should not be displayed.
|
|
||||||
[[ ! -d /sys/class/net/${IF} ]] && exit
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
if [[ -z $IF ]] || [[ "$(cat /sys/class/net/$IF/operstate)" = 'down' ]]; then
|
|
||||||
echo down # full text
|
|
||||||
echo down # short text
|
|
||||||
echo \#FF0000 # color
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
-4) AF=inet ;;
|
|
||||||
-6) AF=inet6 ;;
|
|
||||||
*) AF=inet6? ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# if no interface is found, use the first device with a global scope
|
|
||||||
LOCIP=$(ip addr show $IF | perl -n -e "/$AF ([^\/]+).* scope global/ && print \$1 and exit")
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
|
||||||
1) curl -s https://api.ipify.org;
|
|
||||||
break;;
|
|
||||||
2) curl -s https://api.ipify.org | tee >(xclip -i);
|
|
||||||
break;;
|
|
||||||
0|3) echo "$LOCIP" | tee >(xclip -i);
|
|
||||||
break;;
|
|
||||||
*) echo "$LOCIP"
|
|
||||||
break;;
|
|
||||||
esac
|
|
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
[[ $BLOCK_BUTTON -eq 1 ]] && `$DOTFILES/scripts/togglekeyboard`
|
|
||||||
|
|
||||||
layout=$(setxkbmap -query | grep 'layout:' | awk '{print $2}')
|
|
||||||
variant=$(setxkbmap -query | grep 'variant:' | awk '{print $2}')
|
|
||||||
|
|
||||||
short=`([ "$variant" ] && echo $variant || echo $layout) | cut -c1-2`
|
|
||||||
|
|
||||||
echo -e "$short\n$short" | awk '{print toupper($0)}'
|
|
@ -1,70 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
#
|
|
||||||
# Copyright 2014 Marcelo Cerri <mhcerri at gmail dot 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 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
use Getopt::Long;
|
|
||||||
use File::Basename;
|
|
||||||
|
|
||||||
# Default values
|
|
||||||
my $indicator = $ENV{BLOCK_INSTANCE} || "CAPS";
|
|
||||||
my $color_on = "#00FF00";
|
|
||||||
my $color_off = "#222222";
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
my $program = basename($0);
|
|
||||||
printf "Usage: %s [-c <color on>] [-C <color off>]\n", $program;
|
|
||||||
printf " -c <color on>: hex color to use when indicator is on\n";
|
|
||||||
printf " -C <color off>: hex color to use when indicator is off\n";
|
|
||||||
printf "\n";
|
|
||||||
printf "Note: environment variable \$BLOCK_INSTANCE should be one of:\n";
|
|
||||||
printf " CAPS, NUM (default is CAPS).\n";
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
Getopt::Long::config qw(no_ignore_case);
|
|
||||||
GetOptions("help|h" => \&help,
|
|
||||||
"c=s" => \$color_on,
|
|
||||||
"C=s" => \$color_off) or exit 1;
|
|
||||||
|
|
||||||
# Key mapping
|
|
||||||
my %indicators = (
|
|
||||||
CAPS => 0x00000001,
|
|
||||||
NUM => 0x00000002,
|
|
||||||
);
|
|
||||||
|
|
||||||
# Retrieve key flags
|
|
||||||
my $mask = 0;
|
|
||||||
open(XSET, "xset -q |") or die;
|
|
||||||
while (<XSET>) {
|
|
||||||
if (/LED mask:\s*([0-9]+)/) {
|
|
||||||
$mask = $1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(XSET);
|
|
||||||
|
|
||||||
# Output
|
|
||||||
printf "%s\n", $indicator;
|
|
||||||
printf "%s\n", $indicator;
|
|
||||||
if (($indicators{$indicator} || 0) & $mask) {
|
|
||||||
printf "%s\n", $color_on;
|
|
||||||
} else {
|
|
||||||
printf "%s\n", $color_off;
|
|
||||||
}
|
|
||||||
exit 0
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
load="$(cut -d ' ' -f1 /proc/loadavg)"
|
|
||||||
cpus="$(nproc)"
|
|
||||||
|
|
||||||
# full text
|
|
||||||
echo "$load"
|
|
||||||
|
|
||||||
# short text
|
|
||||||
echo "$load"
|
|
||||||
|
|
||||||
# color if load is too high
|
|
||||||
awk -v cpus=$cpus -v cpuload=$load '
|
|
||||||
BEGIN {
|
|
||||||
if (cpus <= cpuload) {
|
|
||||||
print "#FF0000";
|
|
||||||
exit 33;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
'
|
|
@ -1,76 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
# Copyright (C) 2014 Tony Crisci <tony@dubstepdish.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 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
# Requires playerctl binary to be in your path (except cmus)
|
|
||||||
# See: https://github.com/acrisci/playerctl
|
|
||||||
|
|
||||||
# Set instance=NAME in the i3blocks configuration to specify a music player
|
|
||||||
# (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your
|
|
||||||
# DBus session).
|
|
||||||
|
|
||||||
use Env qw(BLOCK_INSTANCE);
|
|
||||||
|
|
||||||
my @metadata = ();
|
|
||||||
my $player_arg = "";
|
|
||||||
|
|
||||||
if ($BLOCK_INSTANCE) {
|
|
||||||
$player_arg = "--player='$BLOCK_INSTANCE'";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($ENV{'BLOCK_BUTTON'} == 1) {
|
|
||||||
system("playerctl $player_arg previous");
|
|
||||||
} elsif ($ENV{'BLOCK_BUTTON'} == 2) {
|
|
||||||
system("playerctl $player_arg play-pause");
|
|
||||||
} elsif ($ENV{'BLOCK_BUTTON'} == 3) {
|
|
||||||
system("playerctl $player_arg next");
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($player_arg eq '' or $player_arg =~ /cmus$/) {
|
|
||||||
# try cmus first
|
|
||||||
my @cmus = split /^/, qx(cmus-remote -Q);
|
|
||||||
if ($? == 0) {
|
|
||||||
foreach my $line (@cmus) {
|
|
||||||
my @data = split /\s/, $line;
|
|
||||||
if (shift @data eq 'tag') {
|
|
||||||
my $key = shift @data;
|
|
||||||
my $value = join ' ', @data;
|
|
||||||
|
|
||||||
@metadata[0] = $value if $key eq 'artist';
|
|
||||||
@metadata[1] = $value if $key eq 'title';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (@metadata) {
|
|
||||||
# metadata found so we are done
|
|
||||||
print(join ' - ', @metadata);
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# if cmus was given, we are done
|
|
||||||
exit 0 unless $player_arg eq '';
|
|
||||||
}
|
|
||||||
|
|
||||||
my $artist = qx(playerctl $player_arg metadata artist);
|
|
||||||
# exit status will be nonzero when playerctl cannot find your player
|
|
||||||
exit(0) if $?;
|
|
||||||
push(@metadata, $artist) if $artist;
|
|
||||||
|
|
||||||
my $title = qx(playerctl $player_arg metadata title);
|
|
||||||
exit(0) if $?;
|
|
||||||
push(@metadata, $title) if $title;
|
|
||||||
|
|
||||||
print(join(" - ", @metadata)) if @metadata;
|
|
@ -1,65 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
|
|
||||||
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
TYPE="${BLOCK_INSTANCE:-mem}"
|
|
||||||
|
|
||||||
if [ $BLOCK_BUTTON -gt 0 ]; then
|
|
||||||
i3-sensible-terminal -r floating-term --geometry 100x54 -e 'top -d 0.1'
|
|
||||||
fi
|
|
||||||
|
|
||||||
awk -v type=$TYPE '
|
|
||||||
BEGIN {
|
|
||||||
swap_total=1
|
|
||||||
mem_total=1
|
|
||||||
}
|
|
||||||
/^MemTotal:/ {
|
|
||||||
mem_total=$2
|
|
||||||
}
|
|
||||||
/^MemFree:/ {
|
|
||||||
mem_free=$2
|
|
||||||
}
|
|
||||||
/^Buffers:/ {
|
|
||||||
mem_free+=$2
|
|
||||||
}
|
|
||||||
/^Cached:/ {
|
|
||||||
mem_free+=$2
|
|
||||||
}
|
|
||||||
/^SwapTotal:/ {
|
|
||||||
swap_total=$2
|
|
||||||
}
|
|
||||||
/^SwapFree:/ {
|
|
||||||
swap_free=$2
|
|
||||||
}
|
|
||||||
END {
|
|
||||||
if (type == "swap") {
|
|
||||||
swap_perc = (swap_total - swap_free) / swap_total * 100
|
|
||||||
printf("%.0f%\n", swap_perc)
|
|
||||||
printf("%.0f%\n", swap_perc)
|
|
||||||
perc = swap_perc
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
mem_perc = (mem_total - mem_free) / mem_total * 100
|
|
||||||
printf("%.0f%\n", mem_perc)
|
|
||||||
printf("%.0f%\n", mem_perc)
|
|
||||||
perc = mem_perc
|
|
||||||
}
|
|
||||||
|
|
||||||
if (perc > 80)
|
|
||||||
print "#FFCB00"
|
|
||||||
else if (perc > 60)
|
|
||||||
print "#FFCB00"
|
|
||||||
}
|
|
||||||
' /proc/meminfo
|
|
@ -1,149 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
# Made by Pierre Mavro/Deimosfr <deimos@deimos.fr>
|
|
||||||
# Licensed under the terms of the GNU GPL v3, or any later version.
|
|
||||||
# Version: 0.2
|
|
||||||
|
|
||||||
# Usage:
|
|
||||||
# 1. The configuration name of OpenVPN should be familiar for you (home,work...)
|
|
||||||
# 2. The device name in your configuration file should be fully named (tun0,tap1...not only tun or tap)
|
|
||||||
# 3. When you launch one or multiple OpenVPN connexion, be sure the PID file is written in the correct folder (ex: --writepid /run/openvpn/home.pid)
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
use Getopt::Long;
|
|
||||||
|
|
||||||
my $openvpn_enabled='/dev/shm/openvpn_i3blocks_enabled';
|
|
||||||
my $openvpn_disabled='/dev/shm/openvpn_i3blocks_disabled';
|
|
||||||
|
|
||||||
# Print output
|
|
||||||
sub print_output {
|
|
||||||
my $ref_pid_files = shift;
|
|
||||||
my @pid_files = @$ref_pid_files;
|
|
||||||
my $change=0;
|
|
||||||
|
|
||||||
# Total pid files
|
|
||||||
my $total_pid = @pid_files;
|
|
||||||
if ($total_pid == 0) {
|
|
||||||
print "VPN: down\n"x2;
|
|
||||||
# Delete OpenVPN i3blocks temp files
|
|
||||||
if (-f $openvpn_enabled) {
|
|
||||||
unlink $openvpn_enabled or die "Can't delete $openvpn_enabled\n";
|
|
||||||
# Colorize if VPN has just went down
|
|
||||||
print '#FF0000\n';
|
|
||||||
}
|
|
||||||
unless (-f $openvpn_disabled) {
|
|
||||||
open(my $shm, '>', $openvpn_disabled) or die "Can't write $openvpn_disabled\n";
|
|
||||||
}
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if interface device is present
|
|
||||||
my $vpn_found=0;
|
|
||||||
my $pid;
|
|
||||||
my $cmd_line;
|
|
||||||
my @config_name;
|
|
||||||
my @config_path;
|
|
||||||
my $interface;
|
|
||||||
my $current_config_path;
|
|
||||||
my $current_config_name;
|
|
||||||
foreach (@pid_files) {
|
|
||||||
# Get current PID
|
|
||||||
$pid=0;
|
|
||||||
open(PID, '<', $_);
|
|
||||||
while(<PID>) {
|
|
||||||
chomp $_;
|
|
||||||
$pid = $_;
|
|
||||||
}
|
|
||||||
close(PID);
|
|
||||||
# Check if PID has been found
|
|
||||||
if ($pid ==0) {
|
|
||||||
print "Can't get PID $_: $!\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if PID is still alive
|
|
||||||
$cmd_line='/proc/'.$pid.'/cmdline';
|
|
||||||
if (-f $cmd_line) {
|
|
||||||
# Get config name
|
|
||||||
open(CMD_LINE, '<', $cmd_line);
|
|
||||||
while(<CMD_LINE>) {
|
|
||||||
chomp $_;
|
|
||||||
if ($_ =~ /--config\s*(.*\.conf)/) {
|
|
||||||
# Get interface from config file
|
|
||||||
$current_config_path = $1;
|
|
||||||
# Remove unwanted escape chars
|
|
||||||
$current_config_path =~ s/\x{00}//g;
|
|
||||||
$interface = 'null';
|
|
||||||
# Get configuration name
|
|
||||||
if ($current_config_path =~ /(\w+).conf/) {
|
|
||||||
$current_config_name=$1;
|
|
||||||
} else {
|
|
||||||
$current_config_name='unknow';
|
|
||||||
}
|
|
||||||
# Get OpenVPN interface device name
|
|
||||||
open(CONFIG, '<', $current_config_path) or die "Can't read config file '$current_config_path': $!\n";
|
|
||||||
while(<CONFIG>) {
|
|
||||||
chomp $_;
|
|
||||||
if ($_ =~ /dev\s+(\w+)/) {
|
|
||||||
$interface=$1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(CONFIG);
|
|
||||||
# check if interface exist
|
|
||||||
unless ($interface eq 'null') {
|
|
||||||
if (-d "/sys/class/net/$interface") {
|
|
||||||
push @config_name, $current_config_name;
|
|
||||||
$vpn_found=1;
|
|
||||||
# Write enabled file
|
|
||||||
unless (-f $openvpn_enabled) {
|
|
||||||
open(my $shm, '>', $openvpn_enabled) or die "Can't write $openvpn_enabled\n";
|
|
||||||
$change=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(CMD_LINE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check if PID found
|
|
||||||
my $names;
|
|
||||||
my $short_status;
|
|
||||||
if ($vpn_found == 1) {
|
|
||||||
$names = join('/', @config_name);
|
|
||||||
$short_status='up';
|
|
||||||
} else {
|
|
||||||
$short_status='down';
|
|
||||||
$names = $short_status;
|
|
||||||
}
|
|
||||||
|
|
||||||
print "VPN: $names\n";
|
|
||||||
print "VPN: $short_status\n";
|
|
||||||
|
|
||||||
# Print color if there were changes
|
|
||||||
print "#00FF00\n" if ($change == 1);
|
|
||||||
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub check_opts {
|
|
||||||
# Vars
|
|
||||||
my @pid_file=glob '/run/openvpn/*.pid';
|
|
||||||
|
|
||||||
# Set options
|
|
||||||
GetOptions( "help|h" => \&help,
|
|
||||||
"p=s" => \@pid_file);
|
|
||||||
|
|
||||||
print_output(\@pid_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
print "Usage: openvpn [-d pid folder files]\n";
|
|
||||||
print "-d : pid folder files (default /run/openvpn/*.pid)\n";
|
|
||||||
print "Note: devices in configuration file should be named with their number (ex: tun0, tap1)\n";
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
&check_opts;
|
|
@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/perl
|
|
||||||
# Copyright 2014 Pierre Mavro <deimos@deimos.fr>
|
|
||||||
# Copyright 2014 Vivien Didelot <vivien@didelot.org>
|
|
||||||
# Copyright 2014 Andreas Guldstrand <andreas.guldstrand@gmail.com>
|
|
||||||
# Copyright 2014 Benjamin Chretien <chretien at lirmm dot fr>
|
|
||||||
|
|
||||||
# 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
|
||||||
use utf8;
|
|
||||||
use Getopt::Long;
|
|
||||||
|
|
||||||
binmode(STDOUT, ":utf8");
|
|
||||||
|
|
||||||
# default values
|
|
||||||
my $t_warn = 70;
|
|
||||||
my $t_crit = 90;
|
|
||||||
my $chip = "coretemp-isa-0000";
|
|
||||||
my $temperature = -9999;
|
|
||||||
|
|
||||||
sub help {
|
|
||||||
print "Usage: temperature [-w <warning>] [-c <critical>] [--chip <chip>]\n";
|
|
||||||
print "-w <percent>: warning threshold to become yellow\n";
|
|
||||||
print "-c <percent>: critical threshold to become red\n";
|
|
||||||
print "--chip <chip>: sensor chip\n";
|
|
||||||
exit 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
GetOptions("help|h" => \&help,
|
|
||||||
"w=i" => \$t_warn,
|
|
||||||
"c=i" => \$t_crit,
|
|
||||||
"chip=s" => \$chip);
|
|
||||||
|
|
||||||
# Get chip temperature
|
|
||||||
open (SENSORS, "sensors -u $chip |") or die;
|
|
||||||
while (<SENSORS>) {
|
|
||||||
if (/^\s+temp1_input:\s+[\+]*([\-]*\d+\.\d)/) {
|
|
||||||
$temperature = $1;
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close(SENSORS);
|
|
||||||
|
|
||||||
$temperature eq -9999 and die 'Cannot find temperature';
|
|
||||||
|
|
||||||
# Print short_text, full_text
|
|
||||||
print int($temperature)."°c\n" x2;
|
|
||||||
|
|
||||||
# Print color, if needed
|
|
||||||
if ($temperature >= $t_crit) {
|
|
||||||
print "#FF0000\n";
|
|
||||||
exit 33;
|
|
||||||
} elsif ($temperature >= $t_warn) {
|
|
||||||
print "#FFFC00\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
exit 0;
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
CARDS=$(pacmd list-cards | grep -e index: -e alsa.card_name | xargs -n5 | awk '{print $2}')
|
|
||||||
|
|
||||||
if [[ ${#CARDS} != 3 ]]; # there is a space
|
|
||||||
then
|
|
||||||
echo "This script works only with 2 outputs, and you have ..."
|
|
||||||
pacmd list-cards | grep -e index: -e alsa.card_name | xargs -n5
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
i=1
|
|
||||||
for card_index in $CARDS ;
|
|
||||||
do
|
|
||||||
eval CARD$i=$card_index
|
|
||||||
let i+=1
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
LAST_SINK_LINE=$(pacmd list-sink-inputs | grep -e index: -e sink: | xargs -n5 | tail -n1)
|
|
||||||
last_sink_app_index=$( echo $LAST_SINK_LINE | awk '{print $2}' )
|
|
||||||
last_sink_out_index=$( echo $LAST_SINK_LINE | awk '{print $4}' )
|
|
||||||
[[ ${last_sink_out_index} == ${CARD1} ]] && new_sink_out=$CARD2 || new_sink_out=$CARD1
|
|
||||||
|
|
||||||
#echo "$last_sink_app_index > $last_sink_out_index > ${new_sink_out}"
|
|
||||||
|
|
||||||
pacmd move-sink-input ${last_sink_app_index} ${new_sink_out}
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
for p in trizen pacaur yaourt pacman; do
|
|
||||||
if $p --version &>/dev/null; then
|
|
||||||
PAC="$p"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$PAC" ]; then
|
|
||||||
>&2 echo "Error: No Arch package manager found?"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$BLOCK_BUTTON" == 1 ]; then
|
|
||||||
nohup i3-sensible-terminal -r i3blocks-update-term -e "sh -c '$PAC -Syu || exec zsh; pkill -RTMIN+5 i3blocks'" &>/dev/null &
|
|
||||||
disown
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $p = "pacman" ]; then
|
|
||||||
exec 3< <(checkupdates)
|
|
||||||
else
|
|
||||||
exec 3< <({ checkupdates & cower -u & })
|
|
||||||
fi
|
|
||||||
|
|
||||||
count="$(wc -l <&3)"
|
|
||||||
|
|
||||||
if [ -n "$count" -a "$count" -gt 0 ]; then
|
|
||||||
echo $count
|
|
||||||
echo $count
|
|
||||||
fi
|
|
@ -1,182 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Displays the default device, volume, and mute status for i3blocks
|
|
||||||
|
|
||||||
AUDIO_HIGH_SYMBOL=' '
|
|
||||||
|
|
||||||
AUDIO_MED_THRESH=59
|
|
||||||
AUDIO_MED_SYMBOL=' '
|
|
||||||
|
|
||||||
AUDIO_LOW_THRESH=0
|
|
||||||
AUDIO_LOW_SYMBOL=' '
|
|
||||||
|
|
||||||
AUDIO_MUTED_SYMBOL='X'
|
|
||||||
|
|
||||||
AUDIO_INTERVAL=5
|
|
||||||
|
|
||||||
DEFAULT_COLOR="#ffffff"
|
|
||||||
MUTED_COLOR="#a0a0a0"
|
|
||||||
|
|
||||||
LONG_FORMAT=0
|
|
||||||
SHORT_FORMAT=3
|
|
||||||
USE_PERCENT=0
|
|
||||||
USE_ALSA_NAME=0
|
|
||||||
USE_DESCRIPTION=0
|
|
||||||
|
|
||||||
SUBSCRIBE=1
|
|
||||||
|
|
||||||
while getopts F:Sf:padH:M:L:X:T:t:C:c:i:m:s:h opt; do
|
|
||||||
case "$opt" in
|
|
||||||
S) SUBSCRIBE=1 ;;
|
|
||||||
F) LONG_FORMAT="$OPTARG" ;;
|
|
||||||
f) SHORT_FORMAT="$OPTARG" ;;
|
|
||||||
p) USE_PERCENT=0 ;;
|
|
||||||
a) USE_ALSA_NAME=1 ;;
|
|
||||||
d) USE_DESCRIPTION=1 ;;
|
|
||||||
H) AUDIO_HIGH_SYMBOL="$OPTARG" ;;
|
|
||||||
M) AUDIO_MED_SYMBOL="$OPTARG" ;;
|
|
||||||
L) AUDIO_LOW_SYMBOL="$OPTARG" ;;
|
|
||||||
X) AUDIO_MUTED_SYMBOL="$OPTARG" ;;
|
|
||||||
T) AUDIO_MED_THRESH="$OPTARG" ;;
|
|
||||||
t) AUDIO_LOW_THRESH="$OPTARG" ;;
|
|
||||||
C) DEFAULT_COLOR="$OPTARG" ;;
|
|
||||||
c) MUTED_COLOR="$OPTARG" ;;
|
|
||||||
i) AUDIO_INTERVAL="$OPTARG" ;;
|
|
||||||
m) MIXER="$OPTARG" ;;
|
|
||||||
s) SCONTROL="$OPTARG" ;;
|
|
||||||
h) printf \
|
|
||||||
"Usage: volume-pulseaudio [-S] [-F format] [-f format] [-p] [-a|-d] [-H symb] [-M symb]
|
|
||||||
[-L symb] [-X symb] [-T thresh] [-t thresh] [-C color] [-c color] [-i inter]
|
|
||||||
[-m mixer] [-s scontrol] [-h]
|
|
||||||
Options:
|
|
||||||
-F, -f\tOutput format (-F long format, -f short format) to use, amongst:
|
|
||||||
\t0\t symb vol [index:name]\t (default long)
|
|
||||||
\t1\t symb vol [name]
|
|
||||||
\t2\t symb vol [index]\t (default short)
|
|
||||||
\t3\t symb vol
|
|
||||||
-S\tSubscribe to volume events (requires persistent block, always uses long format)
|
|
||||||
-p\tOmit the percent sign (%%) in volume
|
|
||||||
-a\tUse ALSA name if possible
|
|
||||||
-d\tUse device description instead of name if possible
|
|
||||||
-H\tSymbol to use when audio level is high. Default: '$AUDIO_HIGH_SYMBOL'
|
|
||||||
-M\tSymbol to use when audio level is medium. Default: '$AUDIO_MED_SYMBOL'
|
|
||||||
-L\tSymbol to use when audio level is low. Default: '$AUDIO_LOW_SYMBOL'
|
|
||||||
-X\tSymbol to use when audio is muted. Default: '$AUDIO_MUTED_SYMBOL'
|
|
||||||
-T\tThreshold for medium audio level. Default: $AUDIO_MED_THRESH
|
|
||||||
-t\tThreshold for low audio level. Default: $AUDIO_LOW_THRESH
|
|
||||||
-C\tColor for non-muted audio. Default: $DEFAULT_COLOR
|
|
||||||
-c\tColor for muted audio. Default: $MUTED_COLOR
|
|
||||||
-i\tInterval size of volume increase/decrease. Default: $AUDIO_INTERVAL
|
|
||||||
-m\tUse the given mixer.
|
|
||||||
-s\tUse the given scontrol.
|
|
||||||
-h\tShow this help text
|
|
||||||
" && exit 0;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z "$MIXER" ]] ; then
|
|
||||||
MIXER="default"
|
|
||||||
if amixer -D pulse info >/dev/null 2>&1 ; then
|
|
||||||
MIXER="pulse"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$SCONTROL" ]] ; then
|
|
||||||
SCONTROL=$(amixer -D "$MIXER" scontrols | sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" | head -n1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
CAPABILITY=$(amixer -D $MIXER get $SCONTROL | sed -n "s/ Capabilities:.*cvolume.*/Capture/p")
|
|
||||||
|
|
||||||
|
|
||||||
function move_sinks_to_new_default {
|
|
||||||
DEFAULT_SINK=$1
|
|
||||||
pacmd list-sink-inputs | grep index: | grep -o '[0-9]\+' | while read SINK
|
|
||||||
do
|
|
||||||
pacmd move-sink-input $SINK $DEFAULT_SINK
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_default_playback_device_next {
|
|
||||||
inc=${1:-1}
|
|
||||||
num_devices=$(pacmd list-sinks | grep -c index:)
|
|
||||||
sink_arr=($(pacmd list-sinks | grep index: | grep -o '[0-9]\+'))
|
|
||||||
default_sink_index=$(( $(pacmd list-sinks | grep index: | grep -no '*' | grep -o '^[0-9]\+') - 1 ))
|
|
||||||
default_sink_index=$(( ($default_sink_index + $num_devices + $inc) % $num_devices ))
|
|
||||||
default_sink=${sink_arr[$default_sink_index]}
|
|
||||||
pacmd set-default-sink $default_sink
|
|
||||||
move_sinks_to_new_default $default_sink
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$BLOCK_BUTTON" in
|
|
||||||
1) set_default_playback_device_next ;;
|
|
||||||
2) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY toggle ;;
|
|
||||||
3) set_default_playback_device_next -1 ;;
|
|
||||||
4) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_INTERVAL%+ ;;
|
|
||||||
5) amixer -q -D $MIXER sset $SCONTROL $CAPABILITY $AUDIO_INTERVAL%- ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
function print_format {
|
|
||||||
PERCENT="%"
|
|
||||||
[[ $USE_PERCENT == 0 ]] && PERCENT=""
|
|
||||||
case "$1" in
|
|
||||||
1) echo "$SYMBOL$VOL$PERCENT [$NAME]" ;;
|
|
||||||
2) echo "$SYMBOL$VOL$PERCENT [$INDEX]";;
|
|
||||||
3) echo "$SYMBOL$VOL$PERCENT" ;;
|
|
||||||
*) echo "$SYMBOL$VOL$PERCENT [$INDEX:$NAME]" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
function print_block {
|
|
||||||
for name in INDEX NAME VOL MUTED; do
|
|
||||||
read $name
|
|
||||||
done < <(pacmd list-sinks | grep "index:\|name:\|volume: front\|muted:" | grep -A3 '*')
|
|
||||||
INDEX=$(echo "$INDEX" | grep -o '[0-9]\+')
|
|
||||||
VOL=$(echo "$VOL" | grep -o "[0-9]*%" | head -1 )
|
|
||||||
VOL="${VOL%?}"
|
|
||||||
|
|
||||||
NAME=$(echo "$NAME" | sed \
|
|
||||||
's/.*<.*\.\(.*\)>.*/\1/; t;'\
|
|
||||||
's/.*<\(.*\)>.*/\1/; t;'\
|
|
||||||
's/.*/unknown/')
|
|
||||||
|
|
||||||
if [[ $USE_ALSA_NAME == 1 ]] ; then
|
|
||||||
ALSA_NAME=$(pacmd list-sinks |\
|
|
||||||
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
|
|
||||||
grep "alsa.name\|alsa.mixer_name" |\
|
|
||||||
head -n1 |\
|
|
||||||
sed 's/.*= "\(.*\)".*/\1/')
|
|
||||||
NAME=${ALSA_NAME:-$NAME}
|
|
||||||
elif [[ $USE_DESCRIPTION == 1 ]] ; then
|
|
||||||
DESCRIPTION=$(pacmd list-sinks |\
|
|
||||||
awk '/^\s*\*/{f=1}/^\s*index:/{f=0}f' |\
|
|
||||||
grep "device.description" |\
|
|
||||||
head -n1 |\
|
|
||||||
sed 's/.*= "\(.*\)".*/\1/')
|
|
||||||
NAME=${DESCRIPTION:-$NAME}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $MUTED =~ "no" ]] ; then
|
|
||||||
SYMBOL=$AUDIO_HIGH_SYMBOL
|
|
||||||
[[ $VOL -le $AUDIO_MED_THRESH ]] && SYMBOL=$AUDIO_MED_SYMBOL
|
|
||||||
[[ $VOL -le $AUDIO_LOW_THRESH ]] && SYMBOL=$AUDIO_LOW_SYMBOL
|
|
||||||
COLOR=$DEFAULT_COLOR
|
|
||||||
else
|
|
||||||
SYMBOL=$AUDIO_MUTED_SYMBOL
|
|
||||||
COLOR=$MUTED_COLOR
|
|
||||||
VOL=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if [[ $SUBSCRIBE == 1 ]] ; then
|
|
||||||
# print_format "$LONG_FORMAT"
|
|
||||||
# else
|
|
||||||
# print_format "$LONG_FORMAT"
|
|
||||||
print_format "$SHORT_FORMAT"
|
|
||||||
# echo "$COLOR"
|
|
||||||
# fi
|
|
||||||
}
|
|
||||||
|
|
||||||
print_block
|
|
||||||
if [[ $SUBSCRIBE == 1 ]] ; then
|
|
||||||
while read -r EVENT; do
|
|
||||||
print_block
|
|
||||||
done < <(pactl subscribe | stdbuf -oL grep change)
|
|
||||||
fi
|
|
@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# Copyright (C) 2014 Alexander Keller <github@nycroth.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 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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
INTERFACE="${BLOCK_INSTANCE:-wlan0}"
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
# As per #36 -- It is transparent: e.g. if the machine has no battery or wireless
|
|
||||||
# connection (think desktop), the corresponding block should not be displayed.
|
|
||||||
[[ ! -d /sys/class/net/${INTERFACE}/wireless ]] ||
|
|
||||||
[[ "$(cat /sys/class/net/$INTERFACE/operstate)" = 'down' ]] && exit
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
QUALITY=$(grep $INTERFACE /proc/net/wireless | awk '{ print int($3 * 100 / 70) }')
|
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
|
||||||
|
|
||||||
echo $QUALITY% # full text
|
|
||||||
echo $QUALITY% # short text
|
|
||||||
|
|
||||||
# color
|
|
||||||
if [[ $QUALITY -ge 80 ]]; then
|
|
||||||
echo "#00FF00"
|
|
||||||
elif [[ $QUALITY -lt 80 ]]; then
|
|
||||||
echo "#FFF600"
|
|
||||||
elif [[ $QUALITY -lt 60 ]]; then
|
|
||||||
echo "#FFAE00"
|
|
||||||
elif [[ $QUALITY -lt 40 ]]; then
|
|
||||||
echo "#FF0000"
|
|
||||||
fi
|
|
@ -3,25 +3,26 @@
|
|||||||
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
|
set $alt Mod1
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
font pango:Noto Sans 9
|
font pango:sans 9
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+apostrophe kill
|
bindsym $mod+apostrophe kill
|
||||||
bindsym Mod1+F4 kill
|
bindsym $alt+F4 kill
|
||||||
|
|
||||||
# change window focus
|
# change window focus
|
||||||
bindsym $mod+d focus left
|
bindsym $mod+d focus left
|
||||||
bindsym $mod+n focus right
|
|
||||||
bindsym $mod+t focus up
|
|
||||||
bindsym $mod+h focus down
|
bindsym $mod+h focus down
|
||||||
|
bindsym $mod+t focus up
|
||||||
|
bindsym $mod+n focus right
|
||||||
|
|
||||||
# move focused window
|
# move focused window
|
||||||
bindsym $mod+Shift+d move left
|
bindsym $mod+Shift+d move left
|
||||||
bindsym $mod+Shift+n move down
|
bindsym $mod+Shift+h move down
|
||||||
bindsym $mod+Shift+t move up
|
bindsym $mod+Shift+t move up
|
||||||
bindsym $mod+Shift+h move right
|
bindsym $mod+Shift+n move right
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym $mod+m split h
|
bindsym $mod+m split h
|
||||||
@ -73,10 +74,10 @@ bindsym $mod+9 workspace 9
|
|||||||
bindsym $mod+0 workspace 10
|
bindsym $mod+0 workspace 10
|
||||||
|
|
||||||
# move workspaces across screens
|
# move workspaces across screens
|
||||||
bindsym $mod+Mod1+d move workspace to output left
|
bindsym $mod+$alt+d move workspace to output left
|
||||||
bindsym $mod+Mod1+n move workspace to output right
|
bindsym $mod+$alt+n move workspace to output right
|
||||||
bindsym $mod+Mod1+t move workspace to output up
|
bindsym $mod+$alt+t move workspace to output up
|
||||||
bindsym $mod+Mod1+h move workspace to output down
|
bindsym $mod+$alt+h move workspace to output down
|
||||||
|
|
||||||
# move focused container to workspace
|
# move focused container to workspace
|
||||||
bindsym $mod+Shift+1 move container to workspace 1
|
bindsym $mod+Shift+1 move container to workspace 1
|
||||||
@ -106,29 +107,7 @@ client.unfocused $inactive-bg-color $inactive-bg-color $inactive-text-co
|
|||||||
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $bg-color
|
client.focused_inactive $inactive-bg-color $inactive-bg-color $inactive-text-color $bg-color
|
||||||
client.urgent $urgent-bg-color $urgent-bg-color $text-color $bg-color
|
client.urgent $urgent-bg-color $urgent-bg-color $text-color $bg-color
|
||||||
|
|
||||||
bar {
|
exec_always --no-startup-id feh --no-fehbg --no-xinerama --bg-fill $DOTFILES/lakesidesunrise.jpg
|
||||||
status_command i3blocks -c ~/.config/i3/blocks/config
|
|
||||||
|
|
||||||
workspace_buttons yes
|
|
||||||
strip_workspace_numbers yes
|
|
||||||
tray_output primary
|
|
||||||
tray_padding 4
|
|
||||||
height 24
|
|
||||||
|
|
||||||
output $bl
|
|
||||||
output $br
|
|
||||||
output primary
|
|
||||||
position bottom
|
|
||||||
|
|
||||||
colors {
|
|
||||||
separator #757575
|
|
||||||
background #2f343f
|
|
||||||
# border background text
|
|
||||||
focused_workspace $bg-color $bg-color $text-color
|
|
||||||
inactive_workspace $inactive-bg-color $inactive-bg-color $inactive-text-color
|
|
||||||
urgent_workspace $urgent-bg-color $urgent-bg-color $text-color
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Window rules
|
# Window rules
|
||||||
for_window [class="Pinentry"] floating enable
|
for_window [class="Pinentry"] floating enable
|
||||||
@ -140,68 +119,48 @@ for_window [window_role="i3blocks-update-term"] floating enable
|
|||||||
for_window [window_role="i3blocks-clock-term"] floating enable
|
for_window [window_role="i3blocks-clock-term"] floating enable
|
||||||
for_window [title="^rofi$"] floating enable
|
for_window [title="^rofi$"] floating enable
|
||||||
|
|
||||||
new_window pixel 5
|
new_window none
|
||||||
new_float none
|
new_float none
|
||||||
|
|
||||||
gaps inner 7
|
gaps inner 20
|
||||||
gaps outer 2
|
gaps outer 4
|
||||||
#smart_gaps on
|
|
||||||
|
|
||||||
focus_follows_mouse yes
|
focus_follows_mouse yes
|
||||||
|
popup_during_fullscreen smart
|
||||||
|
|
||||||
# keybindings
|
# keybindings
|
||||||
bindsym $mod+Shift+j reload
|
bindsym $mod+Shift+j reload
|
||||||
#bindsym $mod+Shift+p restart
|
bindsym $mod+c exec systemd-run --user --scope --slice=chromium.slice --no-block -- chromium
|
||||||
bindsym $mod+c exec chromium
|
bindsym $mod+b exec systemd-run --user --scope --slice=firefox.slice --no-block -- firefox
|
||||||
bindsym $mod+v exec "i3-sensible-terminal -e \\"$SHELL -c vim;$SHELL\\"
|
bindsym $mod+v exec "i3-sensible-terminal -e \\"$SHELL -c vim;$SHELL\\"
|
||||||
bindsym $mod+Ctrl+v exec "i3-sensible-terminal -r floating-term -e \\"$SHELL -c vim;$SHELL\\"
|
bindsym $mod+Ctrl+v exec "i3-sensible-terminal -r floating-term -e \\"$SHELL -c vim;$SHELL\\"
|
||||||
bindsym Mod1+Tab exec ~/.config/i3/alt-tab.sh
|
|
||||||
bindsym $mod+Return exec i3-sensible-terminal
|
bindsym $mod+Return exec i3-sensible-terminal
|
||||||
bindsym $mod+Ctrl+Return exec i3-sensible-terminal -r floating-term --geometry 96x30
|
bindsym $mod+Ctrl+Return exec i3-sensible-terminal -r floating-term
|
||||||
bindsym $mod+Shift+Return exec i3-sensible-terminal -d "`xcwd`"
|
bindsym $mod+Shift+Return exec i3-sensible-terminal -d "`xcwd`"
|
||||||
bindsym $mod+Ctrl+Shift+Return exec i3-sensible-terminal -r floating-term --geometry 96x30 -d "`xcwd`"
|
bindsym $mod+Ctrl+Shift+Return exec i3-sensible-terminal -r floating-term -d "`xcwd`"
|
||||||
bindsym $mod+l exec ~/.config/i3/lock.sh
|
bindsym $mod+l exec dm-tool switch-to-greeter
|
||||||
# -fg "#CCD3DAE3" -bg "#CC383C4A" -hlbg "#CC5294E2"
|
|
||||||
bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window"
|
bindsym $mod+space exec "pkill rofi; rofi -show run -sidebar-mode -terminal i3-sensible-terminal -normal-window"
|
||||||
bindsym $mod+Shift+p exec rofi-pass
|
bindsym $mod+Shift+p exec rofi-pass --root $(grep path ~/.config/gopass/config.yml | sed -E 's|^.*fs\+file://||g' | tr '\n' ':') | sed 's/:$//g'
|
||||||
bindsym $mod+Shift+e exec rofi-emoji
|
bindsym $mod+Shift+e exec rofi-emoji
|
||||||
bindsym --release Print exec imgur-screenshot
|
bindsym $mod+Shift+i exec rofi-fontawesome
|
||||||
bindsym --release $mod+Print exec imgur-screenshot -f
|
bindsym --release Print exec screenshot
|
||||||
bindsym $mod+Mod1+space exec --no-startup-id ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks
|
bindsym --release $mod+Print exec imgur-screenshot
|
||||||
bindsym $mod+numbersign exec "termite -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ \;\ $SHELL'"
|
bindsym $mod+$alt+space exec --no-startup-id ~/.config/i3/cycleaudio.py && pkill -RTMIN+10 i3blocks
|
||||||
|
bindsym $mod+numbersign exec "i3-sensible-terminal -e 'sh -c xclip\ -o\ |\ gpg\ --decrypt\ 2>&1\ \;\ $SHELL'"
|
||||||
bindsym $mod+r exec "bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'"
|
bindsym $mod+r exec "bash -c 'pwgen -nc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i'"
|
||||||
bindsym $mod+g exec "LINK=$(gist -PRpc); notify-send -c transfer \\"<a href=\\\\"$LINK\\\\">$LINK</a>\\""
|
bindsym $mod+g exec "LINK=$(gist -PRpc); notify-send -c transfer \\"$LINK\\""
|
||||||
|
bindsym --release $mod+i exec sh -c 'sleep 0.5 && xdotool type --delay 400 "$(xclip -o -selection clipboard)"'
|
||||||
|
|
||||||
# Media player controls
|
# Media player controls
|
||||||
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
|
bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause
|
||||||
bindsym XF86AudioPause exec --no-startup-id mpc pause
|
bindsym XF86AudioPause exec --no-startup-id playerctl -a pause
|
||||||
bindsym XF86AudioStop exec --no-startup-id mpc stop
|
bindsym XF86AudioStop exec --no-startup-id playerctl -a stop
|
||||||
bindsym XF86AudioNext exec --no-startup-id mpc next
|
bindsym XF86AudioNext exec --no-startup-id playerctl -a next
|
||||||
bindsym XF86AudioPrev exec --no-startup-id mpc previous
|
bindsym XF86AudioPrev exec --no-startup-id playerctl -a previous
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1000
|
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +1000
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1000
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1000
|
||||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && pkill -RTMIN+12 i3blocks
|
bindsym XF86MonBrightnessUp exec xbacklight -inc 5 && pkill -RTMIN+12 i3blocks
|
||||||
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && pkill -RTMIN+12 i3blocks
|
bindsym XF86MonBrightnessDown exec xbacklight -dec 5 && pkill -RTMIN+12 i3blocks
|
||||||
exec --no-startup-id "ip monitor | while read; do pkill -RTMIN+15 i3blocks; done"
|
|
||||||
|
|
||||||
# app launch shortcuts
|
|
||||||
exec --no-startup-id ~/.fehbg
|
|
||||||
exec --no-startup-id ~/.config/i3/disable-standby-fs.py
|
|
||||||
exec --no-startup-id xautolock -time 5 -locker ~/.config/i3/lock.sh -nocloseout -nocloseerr
|
|
||||||
|
|
||||||
# startup programs
|
|
||||||
exec --no-startup-id pulseaudio
|
|
||||||
exec --no-startup-id nextcloud
|
|
||||||
exec --no-startup-id blueman-applet
|
|
||||||
exec --no-startup-id redshift
|
|
||||||
exec --no-startup-id xbindkeys
|
|
||||||
exec --no-startup-id solaar
|
|
||||||
exec --no-startup-id pullover
|
|
||||||
exec --no-startup-id compton -b --config ~/.config/compton.conf
|
|
||||||
exec --no-startup-id chromium --no-startup-window
|
|
||||||
|
|
||||||
exec i3-msg 'workspace 1; exec sleep 2 && chromium'
|
|
||||||
exec i3-msg 'workspace 2; exec i3-sensible-terminal'
|
|
||||||
|
|
||||||
# vim:ft=i3
|
# vim:ft=i3
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.8 KiB |
@ -1,40 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
icon="$HOME/.config/i3/lock.png"
|
|
||||||
tmpbg='/tmp/screen.png'
|
|
||||||
|
|
||||||
(( $# )) && { icon=$1; }
|
|
||||||
|
|
||||||
PX=0
|
|
||||||
PY=0
|
|
||||||
# lockscreen image info
|
|
||||||
R=$(file $icon | grep -o '[0-9]* x [0-9]*')
|
|
||||||
RX=$(echo $R | cut -d' ' -f 1)
|
|
||||||
RY=$(echo $R | cut -d' ' -f 3)
|
|
||||||
|
|
||||||
RES=$(xrandr --query | grep ' connected primary' | cut -f4 -d' ')
|
|
||||||
|
|
||||||
# monitor position/offset
|
|
||||||
SRX=$(echo $RES | cut -d'x' -f 1) # x pos
|
|
||||||
SRY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 1) # y pos
|
|
||||||
SROX=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 2) # x offset
|
|
||||||
SROY=$(echo $RES | cut -d'x' -f 2 | cut -d'+' -f 3) # y offset
|
|
||||||
PX=$(($SROX + $SRX/2 - $RX/2))
|
|
||||||
PY=$(($SROY + $SRY/2 - $RY/2))
|
|
||||||
|
|
||||||
# screenshot, pixelise and overlay
|
|
||||||
maim | convert - -scale 5% -scale 2000% $icon -geometry +$PX+$PY -composite -matte $tmpbg
|
|
||||||
|
|
||||||
if command mpc 2>&1 1>/dev/null; then
|
|
||||||
playing=$(mpc status | grep playing | wc -l)
|
|
||||||
[[ $playing == 1 ]] && mpc pause
|
|
||||||
fi
|
|
||||||
|
|
||||||
i3lock -i "$tmpbg" -n -e
|
|
||||||
|
|
||||||
if command mpc 2>&1 1>/dev/null; then
|
|
||||||
[[ $playing == 1 ]] && mpc play
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
rm "$tmpbg"
|
|
@ -1,9 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
option=$(echo " lock| logout| sleep| hibernate| power off| reboot| windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 8 -lines 6 -location 3 -tokenize false -matching normal | xargs)
|
option=$(echo "lock|logout|sleep|hibernate|power off|reboot|windows" | rofi -sep "|" -dmenu -i -p "" -auto-select -hide-scrollbar -monitor 0 -width 10 -lines 7 -location 3 -tokenize false -matching normal | xargs)
|
||||||
|
|
||||||
case $option in
|
case $option in
|
||||||
lock) ./lock.sh;;
|
lock) dm-tool switch-to-greeter;;
|
||||||
logout) i3-msg exit;;
|
logout) i3-msg exit;;
|
||||||
sleep) systemctl suspend;;
|
sleep) systemctl suspend;;
|
||||||
hibernate) systemctl hibernate;;
|
hibernate) systemctl hibernate;;
|
||||||
|
16
.config/latexmk/latexmkrc
Normal file
16
.config/latexmk/latexmkrc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
$clean_ext = "bbl run.xml eps-converted-to.pdf";
|
||||||
|
$pdf_mode = 1;
|
||||||
|
$pdf_previewer = 'evince';
|
||||||
|
$latex = 'xetex -shell-escape';
|
||||||
|
$pdflatex = 'xelatex -shell-escape';
|
||||||
|
|
||||||
|
add_cus_dep('glo', 'gls', 0, 'run_makeglossaries');
|
||||||
|
add_cus_dep('acn', 'acr', 0, 'run_makeglossaries');
|
||||||
|
sub run_makeglossaries {
|
||||||
|
if ( $silent ) {
|
||||||
|
system "makeglossaries -q '$_[0]'";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
system "makeglossaries '$_[0]'";
|
||||||
|
};
|
||||||
|
}
|
29
.config/mailnag/mailnag.cfg
Normal file
29
.config/mailnag/mailnag.cfg
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
[spamfilterplugin]
|
||||||
|
filter_text = viagra
|
||||||
|
|
||||||
|
[core]
|
||||||
|
imap_idle_timeout = 10
|
||||||
|
enabled_plugins = dbusplugin, libnotifyplugin, soundplugin
|
||||||
|
poll_interval = 10
|
||||||
|
credentialstore = auto
|
||||||
|
connectivity_test = auto
|
||||||
|
autostart = 1
|
||||||
|
|
||||||
|
[soundplugin]
|
||||||
|
soundfile = mailnag.ogg
|
||||||
|
|
||||||
|
[libnotifyplugin]
|
||||||
|
notification_mode = 2
|
||||||
|
max_visible_mails = 10
|
||||||
|
|
||||||
|
[account1]
|
||||||
|
enabled = 1
|
||||||
|
name = frebib.net
|
||||||
|
user = me@frebib.net
|
||||||
|
password =
|
||||||
|
server = imappro.zoho.com
|
||||||
|
port = 993
|
||||||
|
ssl = 1
|
||||||
|
imap = 1
|
||||||
|
idle = 0
|
||||||
|
folder = INBOX, Spam
|
42
.config/mimeapps.list
Normal file
42
.config/mimeapps.list
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
[Default Applications]
|
||||||
|
|
||||||
|
# eog for images
|
||||||
|
image/bmp=eog.desktop
|
||||||
|
image/gif=eog.desktop
|
||||||
|
image/jpeg=eog.desktop
|
||||||
|
image/jpg=eog.desktop
|
||||||
|
image/pjpeg=eog.desktop
|
||||||
|
image/png=eog.desktop
|
||||||
|
image/svg+xml-compressed=eog.desktop
|
||||||
|
image/svg+xml=eog.desktop
|
||||||
|
image/tiff=eog.desktop
|
||||||
|
image/x-bmp=eog.desktop
|
||||||
|
image/x-gray=eog.desktop
|
||||||
|
image/x-icb=eog.desktop
|
||||||
|
image/x-ico=eog.desktop
|
||||||
|
image/x-png=eog.desktop
|
||||||
|
image/x-portable-anymap=eog.desktop
|
||||||
|
image/x-portable-bitmap=eog.desktop
|
||||||
|
image/x-portable-graymap=eog.desktop
|
||||||
|
image/x-portable-pixmap=eog.desktop
|
||||||
|
|
||||||
|
# evince for pdfs
|
||||||
|
application/pdf=evince.desktop
|
||||||
|
|
||||||
|
# vim for textual files
|
||||||
|
application/x-shellscript=vim.desktop
|
||||||
|
text/english=vim.desktop
|
||||||
|
text/plain=vim.desktop
|
||||||
|
text/x-makefile=vim.desktop
|
||||||
|
|
||||||
|
# Chromium for web/html
|
||||||
|
text/html=chromium.desktop
|
||||||
|
x-scheme-handler/about=chromium.desktop
|
||||||
|
x-scheme-handler/http=chromium.desktop
|
||||||
|
x-scheme-handler/https=chromium.desktop
|
||||||
|
x-scheme-handler/unknown=chromium.desktop
|
||||||
|
|
||||||
|
# Various desktop applications
|
||||||
|
inode/directory=nautilus.desktop
|
||||||
|
x-scheme-handler/magnet=deluge.desktop
|
||||||
|
x-scheme-handler/tg=telegramdesktop.desktop
|
3
.config/npm/npmrc
Normal file
3
.config/npm/npmrc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
prefix=${XDG_DATA_HOME}/npm
|
||||||
|
cache=${XDG_CACHE_HOME}/npm
|
||||||
|
tmp=${XDG_RUNTIME_DIR}/npm
|
100
.config/picom.conf
Normal file
100
.config/picom.conf
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
# Logging
|
||||||
|
log-level = "debug";
|
||||||
|
log-file = "/home/frebib/.local/share/picom.log";
|
||||||
|
|
||||||
|
# Shadow
|
||||||
|
shadow = true;
|
||||||
|
shadow-radius = 24;
|
||||||
|
shadow-offset-x = -24;
|
||||||
|
shadow-offset-y = -24;
|
||||||
|
shadow-opacity = 0.6;
|
||||||
|
# shadow-red = 0.0;
|
||||||
|
# shadow-green = 0.0;
|
||||||
|
# shadow-blue = 0.0;
|
||||||
|
shadow-exclude = [
|
||||||
|
"class_g = 'slop'",
|
||||||
|
"class_g = 'Conky'",
|
||||||
|
"class_g ?= 'Notify-osd'",
|
||||||
|
"class_g = 'Cairo-clock'",
|
||||||
|
"name = 'Notification'",
|
||||||
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
|
];
|
||||||
|
# shadow-exclude = "n:e:Notification";
|
||||||
|
# shadow-exclude-reg = "x10+0+0";
|
||||||
|
xinerama-shadow-crop = true;
|
||||||
|
|
||||||
|
# Opacity
|
||||||
|
frame-opacity = 1.0;
|
||||||
|
# active-opacity = 0.8;
|
||||||
|
inactive-opacity = 0.6;
|
||||||
|
inactive-opacity-override = true;
|
||||||
|
# inactive-dim = 0.2;
|
||||||
|
# inactive-dim-fixed = true;
|
||||||
|
opacity-rule = [
|
||||||
|
"0:_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Blurring
|
||||||
|
blur:
|
||||||
|
{
|
||||||
|
method = "dual_kawase";
|
||||||
|
strength = 8;
|
||||||
|
};
|
||||||
|
blur-background-frame = true;
|
||||||
|
blur-background-fixed = true;
|
||||||
|
blur-background-exclude = [
|
||||||
|
"class_g = 'Peek'",
|
||||||
|
"class_g = 'Onboard'",
|
||||||
|
"class_g = 'slop'",
|
||||||
|
"class_g = 'Polybar'",
|
||||||
|
"window_type = 'dock'",
|
||||||
|
"window_type = 'desktop'",
|
||||||
|
"_GTK_FRAME_EXTENTS@:c"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Fading
|
||||||
|
fading = true;
|
||||||
|
fade-delta = 10;
|
||||||
|
fade-in-step = 0.03;
|
||||||
|
fade-out-step = 0.03;
|
||||||
|
no-fading-openclose = false;
|
||||||
|
no-fading-destroyed-argb = false;
|
||||||
|
# fade-exclude = [ ];
|
||||||
|
|
||||||
|
# Other
|
||||||
|
backend = "glx";
|
||||||
|
mark-wmwin-focused = true;
|
||||||
|
mark-ovredir-focused = true;
|
||||||
|
use-ewmh-active-win = false;
|
||||||
|
detect-rounded-corners = true;
|
||||||
|
detect-client-opacity = true;
|
||||||
|
refresh-rate = 0;
|
||||||
|
vsync = true;
|
||||||
|
# sw-opti = true;
|
||||||
|
# unredir-if-possible = true;
|
||||||
|
# unredir-if-possible-delay = 5000;
|
||||||
|
# unredir-if-possible-exclude = [ ];
|
||||||
|
focus-exclude = [
|
||||||
|
"i:ai:chromium",
|
||||||
|
"class_g = 'Firefox'",
|
||||||
|
];
|
||||||
|
detect-transient = true;
|
||||||
|
detect-client-leader = true;
|
||||||
|
invert-color-include = [ ];
|
||||||
|
# resize-damage = 1;
|
||||||
|
|
||||||
|
# GLX backend
|
||||||
|
glx-no-stencil = true;
|
||||||
|
glx-no-rebind-pixmap = true;
|
||||||
|
xrender-sync-fence = true;
|
||||||
|
#use-damage = true;
|
||||||
|
|
||||||
|
# Window type settings
|
||||||
|
wintypes:
|
||||||
|
{
|
||||||
|
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
|
||||||
|
dock = { shadow = false; }
|
||||||
|
dnd = { shadow = false; }
|
||||||
|
popup_menu = { opacity = 0.8; }
|
||||||
|
dropdown_menu = { opacity = 0.8; }
|
||||||
|
};
|
318
.config/polybar/config
Normal file
318
.config/polybar/config
Normal file
@ -0,0 +1,318 @@
|
|||||||
|
[colours]
|
||||||
|
background = transparent
|
||||||
|
text = #eceff1
|
||||||
|
icon = #147a82
|
||||||
|
warning = #ffcb00
|
||||||
|
critical = #bd2c40
|
||||||
|
urgent = #e53935
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
format-foreground = ${colours.text}
|
||||||
|
format-background = ${colours.background}
|
||||||
|
format-spacing = 0
|
||||||
|
format-margin = 2.5
|
||||||
|
format-offset = 0
|
||||||
|
|
||||||
|
screenchange-reload = true
|
||||||
|
|
||||||
|
[bar/i3bar]
|
||||||
|
monitor = ${env:MONITOR:HDMI-0}
|
||||||
|
dpi = ${xrdb:Xft.dpi:96}
|
||||||
|
fixed-center = false
|
||||||
|
enable-ipc = true
|
||||||
|
|
||||||
|
width = 100%
|
||||||
|
#offset-x = 18px
|
||||||
|
height = 16pt
|
||||||
|
bottom = true
|
||||||
|
radius = 0
|
||||||
|
|
||||||
|
font-0 = sans:pixelsize=9;2
|
||||||
|
font-1 = FontAwesome5ProLight:pixelsize=10;2
|
||||||
|
|
||||||
|
foreground = ${colours.text}
|
||||||
|
background = ${colours.background}
|
||||||
|
|
||||||
|
padding-left = 0
|
||||||
|
padding-right = 2pt
|
||||||
|
|
||||||
|
border-size = 0
|
||||||
|
border-left-size = 16pt
|
||||||
|
border-right-size = 16pt
|
||||||
|
border-bottom-size = 8pt
|
||||||
|
|
||||||
|
line-size = 0
|
||||||
|
line-colour = #f00
|
||||||
|
|
||||||
|
modules-left = i3
|
||||||
|
modules-center =
|
||||||
|
# modules-right = volume updates weather xkeyboard wlan gateway eth memory cpu xbacklight battery temperature date
|
||||||
|
modules-right = volume updates weather wlan gateway eth memory cpu xbacklight battery temperature date
|
||||||
|
|
||||||
|
tray-position = right
|
||||||
|
tray-detached = false
|
||||||
|
tray-background = ${colours.background}
|
||||||
|
#tray-offset-x = -20
|
||||||
|
#tray-offset-y = 0
|
||||||
|
tray-maxsize = 16
|
||||||
|
tray-padding = 8pt
|
||||||
|
tray-scale = 1.0
|
||||||
|
|
||||||
|
cursor-click = pointer
|
||||||
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
|
||||||
|
[module/updates]
|
||||||
|
type = custom/script
|
||||||
|
exec = $XDG_CONFIG_HOME/polybar/update.sh
|
||||||
|
tail = true
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
click-left = i3-msg exec -- i3-sensible-terminal -r i3blocks-update-term -e "yay && kill -USR1 %pid% || kill --USR1 %pid%"
|
||||||
|
|
||||||
|
[module/weather]
|
||||||
|
type = custom/script
|
||||||
|
exec = $XDG_CONFIG_HOME/polybar/weather.sh
|
||||||
|
interval = 120
|
||||||
|
click-left = i3-msg exec "i3-sensible-terminal -r floating-term -e 'sh -c \"xdotool getactivewindow windowsize 910 680 && curl wttr.in && sleep infinity\"'"
|
||||||
|
|
||||||
|
[module/gateway]
|
||||||
|
type = custom/script
|
||||||
|
exec = for v in 4 6; do ip -$v r show default | xargs -l1 sh -c 'fping --retry=1 --quiet --iface "$4" "$2"'; done && echo || echo '%{F#f41f1c}%{F-}'
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
[module/xkeyboard]
|
||||||
|
type = internal/xkeyboard
|
||||||
|
|
||||||
|
format = <label-layout> <label-indicator>
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
format-prefix-underline = ${colours.background}
|
||||||
|
|
||||||
|
label-layout = %name%
|
||||||
|
label-indicator = %name%
|
||||||
|
|
||||||
|
|
||||||
|
[module/i3]
|
||||||
|
type = internal/i3
|
||||||
|
format = <label-state> <label-mode>
|
||||||
|
index-sort = true
|
||||||
|
wrapping-scroll = false
|
||||||
|
|
||||||
|
; Only show workspaces on the same output as the bar
|
||||||
|
; pin-workspaces = true
|
||||||
|
|
||||||
|
label-mode-padding = 2
|
||||||
|
label-mode-foreground = ${colours.text}
|
||||||
|
label-mode-background = ${colours.background}
|
||||||
|
|
||||||
|
; focused = Active workspace on focused monitor
|
||||||
|
label-focused = %index%
|
||||||
|
label-focused-padding = ${self.label-mode-padding}
|
||||||
|
label-focused-foreground = ${colours.text}
|
||||||
|
label-focused-background = ${colours.background}
|
||||||
|
label-focused-underline = ${colours.background}
|
||||||
|
|
||||||
|
; unfocused = Inactive workspace on any monitor
|
||||||
|
label-unfocused = ${self.label-focused}
|
||||||
|
label-unfocused-padding = ${self.label-focused-padding}
|
||||||
|
label-unfocused-foreground= ${colours.icon}
|
||||||
|
label-unfocused-underline = ${self.label-focused-underline}
|
||||||
|
|
||||||
|
; visible = Active workspace on unfocused monitor
|
||||||
|
label-visible = ${self.label-focused}
|
||||||
|
label-visible-foreground= ${colours.icon}
|
||||||
|
label-visible-padding = ${self.label-focused-padding}
|
||||||
|
label-visible-background = ${self.label-focused-background}
|
||||||
|
label-visible-underline = ${self.label-focused-underline}
|
||||||
|
|
||||||
|
; urgent = Workspace with urgency hint set
|
||||||
|
label-urgent = ${self.label-focused}
|
||||||
|
label-urgent-foreground = ${colours.urgent}
|
||||||
|
label-urgent-padding = ${self.label-focused-padding}
|
||||||
|
|
||||||
|
|
||||||
|
[module/xbacklight]
|
||||||
|
type = internal/xbacklight
|
||||||
|
|
||||||
|
label = %percentage%
|
||||||
|
format = <label>
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
|
||||||
|
[module/backlight-acpi]
|
||||||
|
inherit = module/xbacklight
|
||||||
|
type = internal/backlight
|
||||||
|
card = intel_backlight
|
||||||
|
|
||||||
|
|
||||||
|
[module/cpu]
|
||||||
|
type = internal/cpu
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
format-underline = ${colours.background}
|
||||||
|
label = %percentage%%
|
||||||
|
|
||||||
|
|
||||||
|
[module/memory]
|
||||||
|
type = internal/memory
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
label = %percentage_used%%
|
||||||
|
|
||||||
|
|
||||||
|
[module/wlan]
|
||||||
|
type = internal/network
|
||||||
|
interface = wlp1s0
|
||||||
|
interval = 3.0
|
||||||
|
|
||||||
|
format-connected = <ramp-signal> <label-connected>
|
||||||
|
format-connected-underline = ${colours.background}
|
||||||
|
label-connected = %essid%
|
||||||
|
|
||||||
|
format-disconnected =
|
||||||
|
;format-disconnected = <label-disconnected>
|
||||||
|
;format-disconnected-underline = ${self.format-connected-underline}
|
||||||
|
;label-disconnected = %ifname% disconnected
|
||||||
|
;label-disconnected-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
ramp-signal-0 =
|
||||||
|
ramp-signal-1 =
|
||||||
|
ramp-signal-2 =
|
||||||
|
ramp-signal-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
|
||||||
|
[module/eth]
|
||||||
|
type = internal/network
|
||||||
|
interface = eth0
|
||||||
|
interval = 3.0
|
||||||
|
|
||||||
|
label-connected = %local_ip%
|
||||||
|
format-connected-prefix = " "
|
||||||
|
format-connected-prefix-foreground = ${colours.icon}
|
||||||
|
format-connected-underline = ${colours.background}
|
||||||
|
|
||||||
|
;format-disconnected = RIP
|
||||||
|
;format-disconnected = <label-disconnected>
|
||||||
|
;format-disconnected-underline = ${self.format-connected-underline}
|
||||||
|
;label-disconnected = %ifname% disconnected
|
||||||
|
label-disconnected-foreground = ${colours.critical}
|
||||||
|
|
||||||
|
|
||||||
|
[module/date]
|
||||||
|
type = internal/date
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
label = %{A3:i3-sensible-terminal -r i3blocks-clock-term -e "sh -c \"xdotool getactivewindow windowsize 500 600; cal -y $(date +%Y); stty -echo; exec sleep infinity\"" &:}%date% %time%%{A}
|
||||||
|
|
||||||
|
time = %H:%M
|
||||||
|
time-alt = %a %e %b %Y %H:%M:%S
|
||||||
|
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
|
||||||
|
[module/volume]
|
||||||
|
type = internal/pulseaudio
|
||||||
|
|
||||||
|
label-volume = %percentage%
|
||||||
|
format-volume = %{A3:pavucontrol:}<ramp-volume> <label-volume>%{A}
|
||||||
|
format-muted = %{A3:pavucontrol:}<label-muted>%{A}
|
||||||
|
|
||||||
|
label-volume-foreground = ${root.foreground}
|
||||||
|
format-muted-foreground = ${colours.icon}
|
||||||
|
ramp-volume-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
label-muted = ""
|
||||||
|
ramp-volume-0 = ""
|
||||||
|
ramp-volume-1 = ""
|
||||||
|
ramp-volume-2 = ""
|
||||||
|
ramp-volume-3 = ""
|
||||||
|
ramp-volume-4 = ""
|
||||||
|
ramp-volume-5 = ""
|
||||||
|
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
battery = BAT0
|
||||||
|
adapter = AC0
|
||||||
|
full-at = 98
|
||||||
|
|
||||||
|
format-full = <label-full>
|
||||||
|
format-charging = <label-charging>
|
||||||
|
format-discharging = <ramp-capacity> <label-discharging>
|
||||||
|
|
||||||
|
format-full-underline = ${self.format-charging-underline}
|
||||||
|
format-charging-underline = ${colours.background}
|
||||||
|
format-discharging-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
|
format-full-prefix = " "
|
||||||
|
format-charging-prefix = " "
|
||||||
|
|
||||||
|
ramp-capacity-0 =
|
||||||
|
ramp-capacity-1 =
|
||||||
|
ramp-capacity-2 =
|
||||||
|
ramp-capacity-3 =
|
||||||
|
ramp-capacity-4 =
|
||||||
|
|
||||||
|
format-full-prefix-foreground = ${colours.icon}
|
||||||
|
format-charging-prefix-foreground = ${colours.icon}
|
||||||
|
ramp-capacity-foreground = ${colours.icon}
|
||||||
|
ramp-capacity-0-foreground = ${colours.critical}
|
||||||
|
ramp-capacity-1-foreground = ${colours.warning}
|
||||||
|
|
||||||
|
|
||||||
|
[module/temperature]
|
||||||
|
type = internal/temperature
|
||||||
|
thermal-zone = 2
|
||||||
|
warn-temperature = 70
|
||||||
|
|
||||||
|
format = <ramp> <label>
|
||||||
|
format-warn = <ramp> <label-warn>
|
||||||
|
|
||||||
|
label = %temperature-c%
|
||||||
|
label-warn = %temperature-c%
|
||||||
|
label-warn-foreground = ${colours.background}
|
||||||
|
|
||||||
|
ramp-0 =
|
||||||
|
ramp-1 =
|
||||||
|
ramp-2 =
|
||||||
|
ramp-3 =
|
||||||
|
ramp-4 =
|
||||||
|
ramp-5 =
|
||||||
|
ramp-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
|
||||||
|
[module/powermenu]
|
||||||
|
type = custom/menu
|
||||||
|
|
||||||
|
expand-right = true
|
||||||
|
|
||||||
|
label-open =
|
||||||
|
label-close = cancel
|
||||||
|
label-separator = |
|
||||||
|
label-open-foreground = ${colours.icon}
|
||||||
|
label-close-foreground = ${colours.background}
|
||||||
|
label-separator-foreground = ${colours.icon}
|
||||||
|
|
||||||
|
menu-0-0 = reboot
|
||||||
|
menu-0-0-exec = menu-open-1
|
||||||
|
menu-0-1 = power off
|
||||||
|
menu-0-1-exec = menu-open-2
|
||||||
|
|
||||||
|
menu-1-0 = cancel
|
||||||
|
menu-1-0-exec = menu-open-0
|
||||||
|
menu-1-1 = reboot
|
||||||
|
menu-1-1-exec = sudo reboot
|
||||||
|
|
||||||
|
menu-2-0 = power off
|
||||||
|
menu-2-0-exec = sudo poweroff
|
||||||
|
menu-2-1 = cancel
|
||||||
|
menu-2-1-exec = menu-open-0
|
||||||
|
|
||||||
|
; vim:ft=dosini
|
11
.config/polybar/update.sh
Executable file
11
.config/polybar/update.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
dothething() { count=$( (checkupdates & yay -Qum) 2>/dev/null | wc -l); test $count -gt 0 && echo $count || echo; }
|
||||||
|
|
||||||
|
trap 'true' HUP USR1
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
dothething
|
||||||
|
sleep 120 &
|
||||||
|
wait
|
||||||
|
done
|
136
.config/polybar/weather.sh
Executable file
136
.config/polybar/weather.sh
Executable file
@ -0,0 +1,136 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
get_icon_day() {
|
||||||
|
case $1 in
|
||||||
|
210) echo ;; # light thunderstorm
|
||||||
|
211) echo ;; # thunderstorm
|
||||||
|
500) echo ;; # light rain
|
||||||
|
721) echo ;; # haze
|
||||||
|
800) echo ;; # clear sky
|
||||||
|
801) echo ;; # few clouds
|
||||||
|
802) echo ;; # scattered clouds
|
||||||
|
803) echo ;; # broken clouds
|
||||||
|
804) echo ;; # overcast clouds
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
get_icon_night() {
|
||||||
|
case $1 in
|
||||||
|
210) echo ;; # light thunderstorm
|
||||||
|
211) echo ;; # thunderstorm
|
||||||
|
500) echo ;; # light rain
|
||||||
|
800) echo ;; # clear sky
|
||||||
|
801) echo ;; # few clouds
|
||||||
|
802) echo ;; # scattered clouds
|
||||||
|
803) echo ;; # broken clouds
|
||||||
|
804) echo ;; # overcast clouds
|
||||||
|
*) return 1;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
get_icon() {
|
||||||
|
case $1 in
|
||||||
|
d) fn=get_icon_day;;
|
||||||
|
n) fn=get_icon_night;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if $fn $2; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $2 in
|
||||||
|
200) echo ;; # thunderstorm with light rain
|
||||||
|
201) echo ;; # thunderstorm with rain
|
||||||
|
202) echo ;; # thunderstorm with heavy rain
|
||||||
|
210) echo ;; # light thunderstorm
|
||||||
|
211) echo ;; # thunderstorm
|
||||||
|
212) echo ;; # heavy thunderstorm
|
||||||
|
221) echo ;; # ragged thunderstorm
|
||||||
|
230) echo ;; # thunderstorm with light drizzle
|
||||||
|
231) echo ;; # thunderstorm with drizzle
|
||||||
|
232) echo ;; # thunderstorm with heavy drizzle
|
||||||
|
300) echo ;; # light intensity drizzle
|
||||||
|
301) echo ;; # drizzle
|
||||||
|
302) echo ;; # heavy intensity drizzle
|
||||||
|
310) echo ;; # light intensity drizzle rain
|
||||||
|
311) echo ;; # drizzle rain
|
||||||
|
312) echo ;; # heavy intensity drizzle rain
|
||||||
|
313) echo ;; # shower rain and drizzle
|
||||||
|
314) echo ;; # heavy shower rain and drizzle
|
||||||
|
321) echo ;; # shower drizzle
|
||||||
|
500) echo ;; # light rain
|
||||||
|
501) echo ;; # moderate rain
|
||||||
|
502) echo ;; # heavy intensity rain
|
||||||
|
503) echo ;; # very heavy rain
|
||||||
|
504) echo ;; # extreme rain
|
||||||
|
511) echo ;; # freezing rain
|
||||||
|
520) echo ;; # light intensity shower rain
|
||||||
|
521) echo ;; # shower rain
|
||||||
|
522) echo ;; # heavy intensity shower rain
|
||||||
|
531) echo ;; # ragged shower rain
|
||||||
|
600) echo ;; # light snow
|
||||||
|
601) echo ;; # snow
|
||||||
|
602) echo ;; # heavy snow
|
||||||
|
611) echo ;; # sleet
|
||||||
|
612) echo ;; # shower sleet
|
||||||
|
615) echo ;; # light rain and snow
|
||||||
|
616) echo ;; # rain and snow
|
||||||
|
620) echo ;; # light shower snow
|
||||||
|
621) echo ;; # shower snow
|
||||||
|
622) echo ;; # heavy shower snow
|
||||||
|
701) echo ;; # mist
|
||||||
|
711) echo ;; # smoke
|
||||||
|
721) echo ;; # haze
|
||||||
|
741) echo ;; # fog
|
||||||
|
762) echo ;; # volcanic ash
|
||||||
|
781) echo ;; # tornado
|
||||||
|
# 731) echo ;; # sand, dust whirls
|
||||||
|
# 751) echo ;; # sand
|
||||||
|
# 761) echo ;; # dust
|
||||||
|
# 771) echo ;; # squalls
|
||||||
|
*) echo ;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
KEY="$OPENWEATHERMAP_API_KEY"
|
||||||
|
CITY=""
|
||||||
|
UNITS="metric"
|
||||||
|
|
||||||
|
SYMBOL="°"
|
||||||
|
ICON_COL="147a82"
|
||||||
|
|
||||||
|
API="https://api.openweathermap.org/data/2.5"
|
||||||
|
|
||||||
|
if [ ! -z $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 [ ! -z "$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")
|
||||||
|
else
|
||||||
|
echo "%{F#$ICON_COL}%{F-}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$weather" ]; then
|
||||||
|
# weather_desc=$(echo "$weather" | jq -r ".weather[0].description")
|
||||||
|
weather_temp=$(echo "$weather" | jq '.main.temp' | cut -d "." -f 1)
|
||||||
|
weather_code=$(echo "$weather" | jq -r '.weather[0].id')
|
||||||
|
time_of_day=$(echo "$weather" | jq -r '.weather[0].icon | split("") | last')
|
||||||
|
|
||||||
|
icon=$(get_icon "$time_of_day" "$weather_code")
|
||||||
|
|
||||||
|
echo "%{F#$ICON_COL}$icon%{F-} $weather_temp$SYMBOL"
|
||||||
|
fi
|
16
.config/procps/toprc
Normal file
16
.config/procps/toprc
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
top's Config File (Linux processes with windows)
|
||||||
|
Id:i, Mode_altscr=0, Mode_irixps=0, Delay_time=0.100, Curwin=0
|
||||||
|
Def fieldscur=<3D>&K<><4B><EFBFBD><EFBFBD><EFBFBD>@<40><><EFBFBD>56<35>F<EFBFBD>')*+,-./0128<>?ABCGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghij
|
||||||
|
winflags=163638, sortindx=21, maxtasks=0, graph_cpus=1, graph_mems=1
|
||||||
|
summclr=1, msgsclr=1, headclr=3, taskclr=1
|
||||||
|
Job fieldscur=<3D><><EFBFBD><EFBFBD><EFBFBD>(<28><>Ļ<EFBFBD>@<<3C><>)*+,-./012568>?ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
|
||||||
|
winflags=163124, sortindx=0, maxtasks=0, graph_cpus=2, graph_mems=0
|
||||||
|
summclr=6, msgsclr=6, headclr=7, taskclr=6
|
||||||
|
Mem fieldscur=<3D><><EFBFBD><<3C><><EFBFBD><EFBFBD><EFBFBD>MBN<42>D34<33><34>&'()*+,-./0125689FGHIJKLOPQRSTUVWXYZ[\]^_`abcdefghij
|
||||||
|
winflags=163124, sortindx=21, maxtasks=0, graph_cpus=2, graph_mems=0
|
||||||
|
summclr=5, msgsclr=5, headclr=4, taskclr=5
|
||||||
|
Usr fieldscur=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)+,-./1234568;<=>?@ABCFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
|
||||||
|
winflags=163124, sortindx=3, maxtasks=0, graph_cpus=2, graph_mems=0
|
||||||
|
summclr=3, msgsclr=3, headclr=2, taskclr=3
|
||||||
|
Fixed_widest=0, Summ_mscale=2, Task_mscale=1, Zero_suppress=0
|
||||||
|
|
42
.config/rofi/arc-dark.rasi
Normal file
42
.config/rofi/arc-dark.rasi
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
* {
|
||||||
|
background-color: transparent;
|
||||||
|
text-color: #D3DAE3;
|
||||||
|
border-color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
border: 0.3em;
|
||||||
|
border-color: #2f343f;
|
||||||
|
padding: 0.8em;
|
||||||
|
background-color: rgba(56, 60, 74, 0.95);
|
||||||
|
transparency: "real";
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
padding: 0 0 0.3em;
|
||||||
|
border: 0 0 0.1em;
|
||||||
|
}
|
||||||
|
prompt {
|
||||||
|
padding: 0 0.4em 0 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
padding: 0.3em 0;
|
||||||
|
}
|
||||||
|
element {
|
||||||
|
padding: 0.1em 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: 0 0 0.1em;
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
button.selected.normal {
|
||||||
|
border-color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
element.selected.normal {
|
||||||
|
background-color: rgb(64, 132, 214);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim: ft=css sw=2 */
|
@ -1,26 +0,0 @@
|
|||||||
!-----------------------------
|
|
||||||
! Rofi config
|
|
||||||
!-----------------------------
|
|
||||||
|
|
||||||
! State: 'bg', 'fg', 'bgalt' 'hlbg', 'hlfg'
|
|
||||||
rofi.color-window: #F2383C4A, #2F343F
|
|
||||||
rofi.color-normal: #00383C4A, #D3DAE3, #00383C4A, #5294E2, #ECEFF1
|
|
||||||
rofi.bc: #CC383C4A
|
|
||||||
rofi.bw: 5
|
|
||||||
rofi.padding: 8
|
|
||||||
rofi.lines: 12
|
|
||||||
rofi.width: 40
|
|
||||||
rofi.font: Noto Sans 14
|
|
||||||
rofi.line-margin: 6
|
|
||||||
rofi.sep: |
|
|
||||||
rofi.prompt: >
|
|
||||||
rofi.ssh-command: {terminal} -e "{ssh-client} {host}"
|
|
||||||
rofi.separator-style: solid
|
|
||||||
rofi.kb-row-tab: Shift+Tab
|
|
||||||
rofi.kb-row-select: Tab
|
|
||||||
|
|
||||||
rofi.matching: glob
|
|
||||||
rofi.tokenize: true
|
|
||||||
rofi.normal-window: true
|
|
||||||
|
|
||||||
! vim: ft=xdefaults
|
|
145
.config/rofi/config.rasi
Normal file
145
.config/rofi/config.rasi
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
configuration {
|
||||||
|
theme: "arc-dark";
|
||||||
|
font: "sans 14";
|
||||||
|
dpi: 0;
|
||||||
|
width: 35;
|
||||||
|
lines: 10;
|
||||||
|
|
||||||
|
/* show-icons: true; */
|
||||||
|
separator-style: "solid";
|
||||||
|
modi: "window,run,ssh";
|
||||||
|
kb-row-tab: "Shift-Tab";
|
||||||
|
kb-row-select: "Tab";
|
||||||
|
terminal: "i3-sensible-terminal";
|
||||||
|
|
||||||
|
matching: "glob";
|
||||||
|
tokenize: true;
|
||||||
|
|
||||||
|
/* columns: 1;*/
|
||||||
|
/* bw: 1;*/
|
||||||
|
/* location: 0;*/
|
||||||
|
/* padding: 5;*/
|
||||||
|
/* yoffset: 0;*/
|
||||||
|
/* xoffset: 0;*/
|
||||||
|
/* fixed-num-lines: true;*/
|
||||||
|
/* ssh-client: "ssh";*/
|
||||||
|
/* ssh-command: "{terminal} -e {ssh-client} {host}";*/
|
||||||
|
/* run-command: "{cmd}";*/
|
||||||
|
/* run-list-command: "";*/
|
||||||
|
/* run-shell-command: "{terminal} -e {cmd}";*/
|
||||||
|
/* window-command: "xkill -id {window}";*/
|
||||||
|
/* window-match-fields: "all";*/
|
||||||
|
/* drun-icon-theme: ;*/
|
||||||
|
/* drun-match-fields: "name,generic,exec,categories";*/
|
||||||
|
/* disable-history: false;*/
|
||||||
|
/* sort: false;*/
|
||||||
|
/* levenshtein-sort: false;*/
|
||||||
|
/* case-sensitive: false;*/
|
||||||
|
/* cycle: true;*/
|
||||||
|
/* sidebar-mode: false;*/
|
||||||
|
/* eh: 1;*/
|
||||||
|
/* auto-select: false;*/
|
||||||
|
/* parse-hosts: false;*/
|
||||||
|
/* parse-known-hosts: true;*/
|
||||||
|
/* combi-modi: "window,run";*/
|
||||||
|
/* m: "-5";*/
|
||||||
|
/* line-margin: 2;*/
|
||||||
|
/* line-padding: 1;*/
|
||||||
|
/* filter: ;*/
|
||||||
|
/* hide-scrollbar: false;*/
|
||||||
|
/* fullscreen: false;*/
|
||||||
|
/* fake-transparency: false;*/
|
||||||
|
/* dpi: -1;*/
|
||||||
|
/* threads: 0;*/
|
||||||
|
/* scrollbar-width: 8;*/
|
||||||
|
/* scroll-method: 0;*/
|
||||||
|
/* fake-background: "screenshot";*/
|
||||||
|
/* window-format: "{w} {i}{c} {t}";*/
|
||||||
|
/* click-to-exit: true;*/
|
||||||
|
/* show-match: true;*/
|
||||||
|
/* color-normal: ;*/
|
||||||
|
/* color-urgent: ;*/
|
||||||
|
/* color-active: ;*/
|
||||||
|
/* color-window: ;*/
|
||||||
|
/* max-history-size: 25;*/
|
||||||
|
/* combi-hide-mode-prefix: false;*/
|
||||||
|
/* pid: "/run/user/1000/rofi.pid";*/
|
||||||
|
/* display-window: ;*/
|
||||||
|
/* display-windowcd: ;*/
|
||||||
|
/* display-run: ;*/
|
||||||
|
/* display-ssh: ;*/
|
||||||
|
/* display-drun: ;*/
|
||||||
|
/* display-combi: ;*/
|
||||||
|
/* display-keys: ;*/
|
||||||
|
/* kb-primary-paste: "Control+V,Shift+Insert";*/
|
||||||
|
/* kb-secondary-paste: "Control+v,Insert";*/
|
||||||
|
/* kb-clear-line: "Control+w";*/
|
||||||
|
/* kb-move-front: "Control+a";*/
|
||||||
|
/* kb-move-end: "Control+e";*/
|
||||||
|
/* kb-move-word-back: "Alt+b";*/
|
||||||
|
/* kb-move-word-forward: "Alt+f";*/
|
||||||
|
/* kb-move-char-back: "Left,Control+b";*/
|
||||||
|
/* kb-move-char-forward: "Right,Control+f";*/
|
||||||
|
/* kb-remove-word-back: "Control+Alt+h,Control+BackSpace";*/
|
||||||
|
/* kb-remove-word-forward: "Control+Alt+d";*/
|
||||||
|
/* kb-remove-char-forward: "Delete,Control+d";*/
|
||||||
|
/* kb-remove-char-back: "BackSpace,Control+h";*/
|
||||||
|
/* kb-remove-to-eol: "Control+k";*/
|
||||||
|
/* kb-remove-to-sol: "Control+u";*/
|
||||||
|
/* kb-accept-entry: "Control+j,Control+m,Return,KP_Enter";*/
|
||||||
|
/* kb-accept-custom: "Control+Return";*/
|
||||||
|
/* kb-accept-alt: "Shift+Return";*/
|
||||||
|
/* kb-delete-entry: "Shift+Delete";*/
|
||||||
|
/* kb-mode-next: "Shift+Right,Control+Tab";*/
|
||||||
|
/* kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab";*/
|
||||||
|
/* kb-row-left: "Control+Page_Up";*/
|
||||||
|
/* kb-row-right: "Control+Page_Down";*/
|
||||||
|
/* kb-row-up: "Up,Control+p,ISO_Left_Tab";*/
|
||||||
|
/* kb-row-down: "Down,Control+n";*/
|
||||||
|
/* kb-page-prev: "Page_Up";*/
|
||||||
|
/* kb-page-next: "Page_Down";*/
|
||||||
|
/* kb-row-first: "Home,KP_Home";*/
|
||||||
|
/* kb-row-last: "End,KP_End";*/
|
||||||
|
/* kb-screenshot: "Alt+S";*/
|
||||||
|
/* kb-toggle-case-sensitivity: "grave,dead_grave";*/
|
||||||
|
/* kb-toggle-sort: "Alt+grave";*/
|
||||||
|
/* kb-cancel: "Escape,Control+g,Control+bracketleft";*/
|
||||||
|
/* kb-custom-1: "Alt+1";*/
|
||||||
|
/* kb-custom-2: "Alt+2";*/
|
||||||
|
/* kb-custom-3: "Alt+3";*/
|
||||||
|
/* kb-custom-4: "Alt+4";*/
|
||||||
|
/* kb-custom-5: "Alt+5";*/
|
||||||
|
/* kb-custom-6: "Alt+6";*/
|
||||||
|
/* kb-custom-7: "Alt+7";*/
|
||||||
|
/* kb-custom-8: "Alt+8";*/
|
||||||
|
/* kb-custom-9: "Alt+9";*/
|
||||||
|
/* kb-custom-10: "Alt+0";*/
|
||||||
|
/* kb-custom-11: "Alt+exclam";*/
|
||||||
|
/* kb-custom-12: "Alt+at";*/
|
||||||
|
/* kb-custom-13: "Alt+numbersign";*/
|
||||||
|
/* kb-custom-14: "Alt+dollar";*/
|
||||||
|
/* kb-custom-15: "Alt+percent";*/
|
||||||
|
/* kb-custom-16: "Alt+dead_circumflex";*/
|
||||||
|
/* kb-custom-17: "Alt+ampersand";*/
|
||||||
|
/* kb-custom-18: "Alt+asterisk";*/
|
||||||
|
/* kb-custom-19: "Alt+parenleft";*/
|
||||||
|
/* kb-select-1: "Super+1";*/
|
||||||
|
/* kb-select-2: "Super+2";*/
|
||||||
|
/* kb-select-3: "Super+3";*/
|
||||||
|
/* kb-select-4: "Super+4";*/
|
||||||
|
/* kb-select-5: "Super+5";*/
|
||||||
|
/* kb-select-6: "Super+6";*/
|
||||||
|
/* kb-select-7: "Super+7";*/
|
||||||
|
/* kb-select-8: "Super+8";*/
|
||||||
|
/* kb-select-9: "Super+9";*/
|
||||||
|
/* kb-select-10: "Super+0";*/
|
||||||
|
/* ml-row-left: "ScrollLeft";*/
|
||||||
|
/* ml-row-right: "ScrollRight";*/
|
||||||
|
/* ml-row-up: "ScrollUp";*/
|
||||||
|
/* ml-row-down: "ScrollDown";*/
|
||||||
|
/* me-select-entry: "MousePrimary";*/
|
||||||
|
/* me-accept-entry: "MouseDPrimary";*/
|
||||||
|
/* me-accept-custom: "Control+MouseDPrimary";*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* vim: ft=css sw=2 */
|
10
.config/systemd/user/autocutsel-primary.service
Normal file
10
.config/systemd/user/autocutsel-primary.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=autocutsel -selection primary
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/autocutsel -selection PRIMARY
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
||||||
|
|
10
.config/systemd/user/autocutsel.service
Normal file
10
.config/systemd/user/autocutsel.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=autocutsel
|
||||||
|
PartOf=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/autocutsel
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
||||||
|
|
1
.config/systemd/user/basic.target.wants/profile.service
Symbolic link
1
.config/systemd/user/basic.target.wants/profile.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/profile.service
|
12
.config/systemd/user/blueman-applet.service
Normal file
12
.config/systemd/user/blueman-applet.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Bluetooth Applet
|
||||||
|
After=graphical-session.target bluetooth.service
|
||||||
|
Requires=graphical-session.target bluetooth.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/blueman-applet
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
1
.config/systemd/user/default.target
Symbolic link
1
.config/systemd/user/default.target
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/basic.target
|
1
.config/systemd/user/default.target.wants/dunst.service
Symbolic link
1
.config/systemd/user/default.target.wants/dunst.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/dunst.service
|
1
.config/systemd/user/default.target.wants/redshift.service
Symbolic link
1
.config/systemd/user/default.target.wants/redshift.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/redshift.service
|
1
.config/systemd/user/desktop.target.wants/blueman-applet.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/blueman-applet.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/blueman-applet.service
|
1
.config/systemd/user/desktop.target.wants/dunst.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/dunst.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/dunst.service
|
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/networkmanager-applet.service
|
1
.config/systemd/user/desktop.target.wants/nextcloud.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/nextcloud.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/nextcloud.service
|
1
.config/systemd/user/desktop.target.wants/picom.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/picom.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/picom.service
|
1
.config/systemd/user/desktop.target.wants/polybar@i3bar.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/polybar@i3bar.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/polybar@.service
|
1
.config/systemd/user/desktop.target.wants/solaar.service
Symbolic link
1
.config/systemd/user/desktop.target.wants/solaar.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/solaar.service
|
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/xdg-user-dirs-update.service
|
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/autocutsel-primary.service
|
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/autocutsel.service
|
1
.config/systemd/user/graphical-session.target.wants/i3.service
Symbolic link
1
.config/systemd/user/graphical-session.target.wants/i3.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/i3.service
|
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/xautolock.service
|
14
.config/systemd/user/i3.service
Normal file
14
.config/systemd/user/i3.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=i3 - an improved dynamic, tiling window manager
|
||||||
|
Requires=xorg.target
|
||||||
|
Before=graphical-session.target
|
||||||
|
After=profile.service xprofile.service xorg.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/i3
|
||||||
|
ExecReload=/bin/sh -c 'i3-msg restart; systemctl is-active --user -q picom && systemctl --user restart picom'
|
||||||
|
ExecStop=/bin/systemctl --user stop desktop.target
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
12
.config/systemd/user/networkmanager-applet.service
Normal file
12
.config/systemd/user/networkmanager-applet.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=NetworkManager Applet
|
||||||
|
After=graphical-session.target NetworkManager.service
|
||||||
|
Requires=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/nm-applet
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
14
.config/systemd/user/nextcloud.service
Normal file
14
.config/systemd/user/nextcloud.service
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Nextcloud Client
|
||||||
|
Requires=graphical-session.target
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/nextcloud --background
|
||||||
|
ExecReload=/bin/kill -HUP $MAINPID
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
12
.config/systemd/user/picom.service
Normal file
12
.config/systemd/user/picom.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=A lightweight compositor for X11
|
||||||
|
Requires=graphical-session.target
|
||||||
|
After=graphical-session.target xorg.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/picom --experimental-backends --dbus
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
12
.config/systemd/user/polybar@.service
Normal file
12
.config/systemd/user/polybar@.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Polybar
|
||||||
|
Requires=graphical-session.target
|
||||||
|
After=graphical-session.target pulseaudio.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/polybar --reload --log=warning %i
|
||||||
|
Restart=always
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
10
.config/systemd/user/profile.service
Normal file
10
.config/systemd/user/profile.service
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Load profile environment into session
|
||||||
|
Before=graphical-session-pre.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/bash -c '. $HOME/.config/dotfiles/.profile && systemctl --user import-environment'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=basic.target
|
@ -1,10 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Lock X session using i3lock
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=%i
|
|
||||||
Environment=DISPLAY=:0
|
|
||||||
ExecStart=sh -c '~/.config/i3/lock.sh'
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=sleep.target
|
|
13
.config/systemd/user/sleep-lock-lightdm.service
Normal file
13
.config/systemd/user/sleep-lock-lightdm.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Lock X LightDM session before sleeping
|
||||||
|
Requires=graphical-session.target
|
||||||
|
Before=sleep.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=/usr/bin/dm-tool switch-to-greeter
|
||||||
|
# Ensure enough time for the session to lock before sleeping
|
||||||
|
ExecStartPost=/usr/bin/sleep 1
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sleep.target
|
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/sleep-lock-lightdm.service
|
1
.config/systemd/user/sockets.target.wants/pulseaudio.socket
Symbolic link
1
.config/systemd/user/sockets.target.wants/pulseaudio.socket
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/usr/lib/systemd/user/pulseaudio.socket
|
13
.config/systemd/user/solaar.service
Normal file
13
.config/systemd/user/solaar.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Solaar Logitech status applet
|
||||||
|
Requires=graphical-session.target
|
||||||
|
After=graphical-session.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/solaar --restart-on-wake-up -d
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=desktop.target
|
12
.config/systemd/user/xautolock.service
Normal file
12
.config/systemd/user/xautolock.service
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Lock desktop session after inactivity
|
||||||
|
Requires=xorg.target
|
||||||
|
After=xorg.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/xautolock -time 5 -locker 'dm-tool switch-to-greeter' -detectsleep -resetsaver -secure
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
11
.config/systemd/user/xbindkeys.service
Normal file
11
.config/systemd/user/xbindkeys.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=XBindKeys
|
||||||
|
Requires=profile.service
|
||||||
|
After=profile.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/xbindkeys -n -f $XDG_CONFIG_HOME/X11/xbindkeysrc
|
||||||
|
KillMode=process
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=graphical-session.target
|
3
.config/systemd/user/xorg.target
Normal file
3
.config/systemd/user/xorg.target
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Graphical desktop environment
|
||||||
|
Requires=basic.target
|
1
.config/systemd/user/xorg.target.wants/xprofile.service
Symbolic link
1
.config/systemd/user/xorg.target.wants/xprofile.service
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
/home/frebib/.config/systemd/user/xprofile.service
|
13
.config/systemd/user/xprofile.service
Normal file
13
.config/systemd/user/xprofile.service
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Load Xorg configuration
|
||||||
|
PartOf=xorg.target
|
||||||
|
Requires=profile.service
|
||||||
|
After=xorg.target profile.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
RemainAfterExit=yes
|
||||||
|
ExecStart=/usr/bin/bash -cx '. $XDG_CONFIG_HOME/X11/xprofile && systemctl --user import-environment'
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=xorg.target
|
@ -1,5 +1,5 @@
|
|||||||
[options]
|
[options]
|
||||||
font = SauceCodePro 9
|
font = monospace 9
|
||||||
scrollback_lines = 1000000
|
scrollback_lines = 1000000
|
||||||
cursor_blink = off
|
cursor_blink = off
|
||||||
size_hints = true
|
size_hints = true
|
||||||
@ -7,7 +7,7 @@ size_hints = true
|
|||||||
[colors]
|
[colors]
|
||||||
cursor = #5294E2
|
cursor = #5294E2
|
||||||
foreground = #ECEFF1
|
foreground = #ECEFF1
|
||||||
background = rgba(56, 60, 74, 0.95)
|
background = rgba(56, 60, 74, 0.85)
|
||||||
highlight = #5294E2
|
highlight = #5294E2
|
||||||
|
|
||||||
# Colour order:
|
# Colour order:
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
# absolute path. No other format is supported.
|
# absolute path. No other format is supported.
|
||||||
#
|
#
|
||||||
XDG_DESKTOP_DIR="$HOME/documents"
|
XDG_DESKTOP_DIR="$HOME"
|
||||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
XDG_MUSIC_DIR="$HOME/music"
|
XDG_MUSIC_DIR="$HOME/music"
|
||||||
|
9
.config/vim/.gitignore
vendored
9
.config/vim/.gitignore
vendored
@ -1,7 +1,8 @@
|
|||||||
/bundle/
|
/.netrwhist
|
||||||
|
/autoload/plug.vim
|
||||||
|
/plug/
|
||||||
/spell/
|
/spell/
|
||||||
/swapfiles/
|
/swapfiles/
|
||||||
/viminfo
|
|
||||||
/viminf*.tmp
|
|
||||||
/vim-latex
|
/vim-latex
|
||||||
/.netrwhist
|
/viminf*.tmp
|
||||||
|
/viminfo
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
set nocompatible " be iMproved, required
|
set nocompatible " be iMproved, required
|
||||||
|
|
||||||
" Reconfigure Vim to be clean!
|
" Reconfigure Vim to be clean!
|
||||||
set rtp+=~/.config/vim
|
set undodir=$XDG_CACHE_HOME/vim/undo//
|
||||||
set directory=.,~/.config/vim
|
set directory=$XDG_CACHE_HOME/vim/swap//
|
||||||
set viminfo+=n~/.config/vim/viminfo
|
set backupdir=$XDG_CACHE_HOME/vim/backup//
|
||||||
set directory=$HOME/.config/vim/swapfiles//
|
set viminfo+='1000,n$XDG_CACHE_HOME/vim/viminfo
|
||||||
|
set runtimepath-=$HOME/.vim
|
||||||
|
set runtimepath^=$XDG_CONFIG_HOME/vim,$VIMRUNTIME,$XDG_CONFIG_HOME/vim/after
|
||||||
|
let g:netrw_home=$XDG_CACHE_HOME.'/vim'
|
||||||
|
|
||||||
syntax enable
|
silent !mkdir -p $XDG_CACHE_HOME/vim/swap $XDG_CACHE_HOME/vim/undo $XDG_CACHE_HOME/vim/backup
|
||||||
filetype plugin on
|
|
||||||
|
|
||||||
set tabstop=4
|
set tabstop=4
|
||||||
set shiftwidth=0 " Use tabstop
|
set shiftwidth=0 " Use tabstop
|
||||||
@ -40,12 +42,16 @@ let mapleader="\<space>"
|
|||||||
" Autosave settings
|
" Autosave settings
|
||||||
function! SaveIfExist()
|
function! SaveIfExist()
|
||||||
if @% != "" && filereadable(@%) && !&readonly && &modified
|
if @% != "" && filereadable(@%) && !&readonly && &modified
|
||||||
|
SyntasticCheck
|
||||||
write
|
write
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
set autowrite
|
set autowrite
|
||||||
autocmd CursorHold,CursorHoldI,InsertLeave,FocusGained,FocusLost * call SaveIfExist()
|
autocmd CursorHold,CursorHoldI,InsertLeave,FocusGained,FocusLost * call SaveIfExist()
|
||||||
|
|
||||||
|
" Auto-resize split on window resize
|
||||||
|
autocmd VimResized * wincmd =
|
||||||
|
|
||||||
" Search options
|
" Search options
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set ignorecase
|
set ignorecase
|
||||||
@ -76,34 +82,41 @@ set cul cuc
|
|||||||
highlight CursorLine cterm=NONE ctermbg=8
|
highlight CursorLine cterm=NONE ctermbg=8
|
||||||
highlight CursorColumn cterm=NONE ctermbg=8
|
highlight CursorColumn cterm=NONE ctermbg=8
|
||||||
|
|
||||||
" set the runtime path to include Vundle and initialize
|
if empty(glob('$XDG_CONFIG_HOME/vim/autoload/plug.vim'))
|
||||||
set rtp+=~/.config/vim/bundle/Vundle.vim
|
silent !curl -fsSLo $XDG_CONFIG_HOME/vim/autoload/plug.vim --create-dirs
|
||||||
call vundle#begin()
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
call vundle#rc('~/.config/vim/bundle')
|
autocmd VimEnter * PlugInstall --sync | source $VIMRC
|
||||||
|
endif
|
||||||
|
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
call plug#begin('$XDG_CONFIG_HOME/vim/plug')
|
||||||
Plugin 'Valloric/YouCompleteMe'
|
|
||||||
Plugin 'scrooloose/syntastic'
|
|
||||||
Plugin 'scrooloose/nerdtree'
|
|
||||||
Plugin 'tpope/vim-sensible'
|
|
||||||
Plugin 'tpope/vim-fugitive'
|
|
||||||
Plugin 'tpope/vim-rhubarb'
|
|
||||||
Plugin 'tpope/vim-abolish'
|
|
||||||
Plugin 'tpope/vim-surround'
|
|
||||||
Plugin 'tpope/vim-repeat'
|
|
||||||
Plugin 'tpope/vim-commentary'
|
|
||||||
Plugin 'majutsushi/tagbar'
|
|
||||||
Plugin 'airblade/vim-gitgutter'
|
|
||||||
Plugin 'ryanoasis/vim-devicons'
|
|
||||||
Plugin 'vim-airline/vim-airline'
|
|
||||||
Plugin 'vim-airline/vim-airline-themes'
|
|
||||||
Plugin 'chr4/nginx.vim'
|
|
||||||
Plugin 'PotatoesMaster/i3-vim-syntax'
|
|
||||||
Plugin 'lervag/vimtex'
|
|
||||||
Plugin 'JamshedVesuna/vim-markdown-preview'
|
|
||||||
Plugin 'junegunn/fzf.vim'
|
|
||||||
|
|
||||||
call vundle#end()
|
Plug 'Valloric/YouCompleteMe'
|
||||||
|
Plug 'scrooloose/syntastic'
|
||||||
|
Plug 'scrooloose/nerdtree', { 'on': 'NERTreeToggle' }
|
||||||
|
Plug 'tpope/vim-sensible'
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
Plug 'tpope/vim-rhubarb'
|
||||||
|
Plug 'tpope/vim-abolish'
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
Plug 'tpope/vim-repeat'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
|
Plug 'majutsushi/tagbar'
|
||||||
|
Plug 'airblade/vim-gitgutter'
|
||||||
|
Plug 'ryanoasis/vim-devicons'
|
||||||
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Plug 'vim-airline/vim-airline-themes'
|
||||||
|
Plug 'lervag/vimtex'
|
||||||
|
Plug 'JamshedVesuna/vim-markdown-preview'
|
||||||
|
Plug 'junegunn/fzf.vim'
|
||||||
|
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
|
||||||
|
|
||||||
|
" Syntax Highlighting
|
||||||
|
Plug 'chr4/nginx.vim'
|
||||||
|
Plug 'PotatoesMaster/i3-vim-syntax'
|
||||||
|
Plug 'puppetlabs/puppet-syntax-vim'
|
||||||
|
Plug 'arrufat/vala.vim'
|
||||||
|
|
||||||
|
call plug#end()
|
||||||
|
|
||||||
" Change to dvorak-mapped keys
|
" Change to dvorak-mapped keys
|
||||||
let g:use_dvorak = 1
|
let g:use_dvorak = 1
|
||||||
@ -115,17 +128,32 @@ if !exists('g:ycm_semantic_triggers')
|
|||||||
endif
|
endif
|
||||||
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
|
let g:ycm_semantic_triggers.tex = g:vimtex#re#youcompleteme
|
||||||
"let g:vimtex_view_method='zathura'
|
"let g:vimtex_view_method='zathura'
|
||||||
let g:tex_flavor='latex'
|
let g:tex_flavor='xelatex'
|
||||||
let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying
|
let g:vimtex_indent_enabled = 0 " auto-indentation is wrong and annoying
|
||||||
|
let g:syntastic_tex_checkers = ['chktex']
|
||||||
autocmd FileType tex silent VimtexCompile
|
autocmd FileType tex silent VimtexCompile
|
||||||
autocmd FileType tex setlocal spell
|
autocmd FileType tex setlocal spell
|
||||||
autocmd FileType tex TagbarOpen
|
augroup vimtex
|
||||||
|
autocmd!
|
||||||
|
autocmd BufWritePost tex call vimtex#toc#refresh()
|
||||||
|
autocmd BufWritePost tex call vimtex#labels#refresh()
|
||||||
|
autocmd BufWritePost tex silent VimtexCompile
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
|
||||||
" Vim-Airline config
|
" Vim-Airline config
|
||||||
let g:Powerline_symbols = 'fancy'
|
let g:Powerline_symbols = 'fancy'
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
let g:airline_theme='solarized'
|
let g:airline_theme='solarized'
|
||||||
let g:airline#extensions#tabline#enabled = 1
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
let g:syntastic_always_populate_loc_list = 1
|
||||||
|
let g:syntastic_auto_loc_list = 1
|
||||||
|
let g:syntastic_check_on_open = 1
|
||||||
|
let g:syntastic_check_on_wq = 0
|
||||||
|
|
||||||
|
set statusline+=%#warningmsg#
|
||||||
|
set statusline+=%{SyntasticStatuslineFlag()}
|
||||||
|
set statusline+=%*
|
||||||
|
|
||||||
" vim-markdown plugin
|
" vim-markdown plugin
|
||||||
let vim_markdown_preview_toggle=0
|
let vim_markdown_preview_toggle=0
|
||||||
@ -149,10 +177,12 @@ let g:tagbar_singleclick = 1
|
|||||||
let g:tagbar_autopreview = 1
|
let g:tagbar_autopreview = 1
|
||||||
|
|
||||||
" NERDTree configuration
|
" NERDTree configuration
|
||||||
map <leader><space> :NERDTreeToggle<CR>
|
map <leader><tab> :NERDTreeToggle<CR>
|
||||||
|
|
||||||
" FZF configurationn
|
" FZF configurationn
|
||||||
map <leader><tab> :Files<CR>
|
map <leader><space> :Files<CR>
|
||||||
|
map <leader>b :Buffers<CR>
|
||||||
|
map <leader>l :Lines<CR>
|
||||||
|
|
||||||
" Disable mouse
|
" Disable mouse
|
||||||
set mouse=nicr
|
set mouse=nicr
|
||||||
@ -192,10 +222,6 @@ if (exists("g:use_dvorak") && g:use_dvorak == 1)
|
|||||||
noremap h j
|
noremap h j
|
||||||
noremap t k
|
noremap t k
|
||||||
noremap n l
|
noremap n l
|
||||||
noremap D H
|
|
||||||
noremap H J
|
|
||||||
noremap T K
|
|
||||||
noremap N L
|
|
||||||
|
|
||||||
noremap gh gj
|
noremap gh gj
|
||||||
noremap gt gk
|
noremap gt gk
|
||||||
@ -250,7 +276,20 @@ if (exists("g:use_dvorak") && g:use_dvorak == 1)
|
|||||||
\ 'x': ['tsd', 'tsD'],
|
\ 'x': ['tsd', 'tsD'],
|
||||||
\}
|
\}
|
||||||
|
|
||||||
let NERDTreeMapOpenInTab='\t'
|
" NERDTree configuration
|
||||||
|
let NERDTreeMapOpenInTab='\t' " prevent t opening file
|
||||||
|
|
||||||
|
" Also remap keys in :Explore
|
||||||
|
augroup netrw_dvorak_fix
|
||||||
|
autocmd!
|
||||||
|
autocmd filetype netrw call Fix_netrw_maps_for_dvorak()
|
||||||
|
augroup END
|
||||||
|
function! Fix_netrw_maps_for_dvorak()
|
||||||
|
noremap <buffer> d h
|
||||||
|
noremap <buffer> h j
|
||||||
|
noremap <buffer> t k
|
||||||
|
noremap <buffer> n l
|
||||||
|
endfunction
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -265,5 +304,8 @@ com! WQA wqa
|
|||||||
" Write with sudo
|
" Write with sudo
|
||||||
cmap w!! w !sudo tee > /dev/null %
|
cmap w!! w !sudo tee > /dev/null %
|
||||||
|
|
||||||
|
" Unmap ex-mode
|
||||||
|
map Q <nop>
|
||||||
|
|
||||||
autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et
|
autocmd FileType markdown setlocal ts=2 sts=2 sw=2 et
|
||||||
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et
|
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 et
|
||||||
|
4
.config/zsh/.gitignore
vendored
Normal file
4
.config/zsh/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
/antigen/
|
||||||
|
/log/
|
||||||
|
/histfile
|
||||||
|
/.zcompdump*
|
174
.config/zsh/.zshrc
Normal file
174
.config/zsh/.zshrc
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
unsetopt MULTIBYTE
|
||||||
|
|
||||||
|
# Config and cache directory paths
|
||||||
|
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
|
ZSH_DIR="$CONFIG_DIR/zsh"
|
||||||
|
LOG_DIR="$ZSH_DIR/log"
|
||||||
|
mkdir -p "$LOG_DIR"
|
||||||
|
|
||||||
|
HISTFILE="$ZSH_DIR/histfile"
|
||||||
|
HISTSIZE=999999
|
||||||
|
SAVEHIST=999999
|
||||||
|
|
||||||
|
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
||||||
|
|
||||||
|
# Only set tty if running interactively
|
||||||
|
if exists tty && tty -s 1>/dev/null 2>/dev/null; then
|
||||||
|
# Resolve at shell runtime
|
||||||
|
export GPG_TTY="$(tty)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Configure less and add colours
|
||||||
|
export LESS="-RI"
|
||||||
|
export PAGER="less"
|
||||||
|
export MANPAGER="less -+N"
|
||||||
|
# Disable histfile
|
||||||
|
export LESSHISTFILE=-
|
||||||
|
|
||||||
|
if exists tput; then
|
||||||
|
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
|
||||||
|
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
|
||||||
|
export LESS_TERMCAP_me=$(tput sgr0)
|
||||||
|
export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue
|
||||||
|
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
|
||||||
|
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
|
||||||
|
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
|
||||||
|
export LESS_TERMCAP_mr=$(tput rev)
|
||||||
|
export LESS_TERMCAP_mh=$(tput dim)
|
||||||
|
export LESS_TERMCAP_ZN=$(tput ssubm)
|
||||||
|
export LESS_TERMCAP_ZV=$(tput rsubm)
|
||||||
|
export LESS_TERMCAP_ZO=$(tput ssupm)
|
||||||
|
export LESS_TERMCAP_ZW=$(tput rsupm)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set some useful ZSH/Bash options
|
||||||
|
setopt sharehistory histignorealldups histignorespace histreduceblanks
|
||||||
|
setopt pathdirs autocd autopushd extendedglob nullglob alwaystoend interactivecomments dvorak
|
||||||
|
|
||||||
|
# Completion initialisation
|
||||||
|
autoload -U compinit ; compinit
|
||||||
|
autoload -U bashcompinit ; bashcompinit
|
||||||
|
|
||||||
|
# gopass completion
|
||||||
|
if exists gopass; then
|
||||||
|
source <(gopass completion bash)
|
||||||
|
fi
|
||||||
|
|
||||||
|
zstyle ':completion:*:sudo|_::' environ PATH="/sbin:/usr/sbin:$PATH" HOME="/root"
|
||||||
|
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
|
||||||
|
zstyle ':completion:*' rehash true
|
||||||
|
zstyle ':completion:*' menu select
|
||||||
|
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
|
||||||
|
zstyle ':compinstall' filename "${ZDOTDIR:-~}/.zshrc"
|
||||||
|
|
||||||
|
# Pre-load vi-mode edit-command-line before antigen plugins are loaded
|
||||||
|
autoload -z edit-command-line
|
||||||
|
zle -N edit-command-line
|
||||||
|
|
||||||
|
export WORDCHARS='*?_[]~=&;!#$%^(){}'
|
||||||
|
x-bash-backward-kill-word(){ WORDCHARS='' zle kill-word; }
|
||||||
|
zle -N x-bash-backward-kill-word
|
||||||
|
|
||||||
|
# Load antigen & plugins
|
||||||
|
ADOTDIR="$ZSH_DIR/antigen" # Antigen directory
|
||||||
|
ANTIGEN_LOG="$LOG_DIR/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log"
|
||||||
|
antigen_src="$ADOTDIR/antigen.zsh"
|
||||||
|
if [ ! -f "$antigen_src" ]; then
|
||||||
|
git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
|
||||||
|
fi
|
||||||
|
source "$antigen_src"
|
||||||
|
|
||||||
|
antigen bundle zsh-users/zsh-completions
|
||||||
|
antigen bundle zsh-users/zsh-autosuggestions
|
||||||
|
antigen bundle zsh-users/zsh-syntax-highlighting@feature/redrawhook
|
||||||
|
antigen bundle mafredri/zsh-async
|
||||||
|
|
||||||
|
antigen apply
|
||||||
|
|
||||||
|
# Vim mode!
|
||||||
|
bindkey -v
|
||||||
|
export KEYTIMEOUT=25
|
||||||
|
|
||||||
|
# Set some key-binds
|
||||||
|
bindkey "^[[1;3C" forward-word
|
||||||
|
bindkey "^[[1;5C" forward-word
|
||||||
|
bindkey "^[[1;3D" backward-word
|
||||||
|
bindkey "^[[1;5D" backward-word
|
||||||
|
bindkey "^[[7~" beginning-of-line
|
||||||
|
bindkey "^[[8~" end-of-line
|
||||||
|
bindkey "^[[3~" delete-char
|
||||||
|
bindkey "^[[3;3~" delete-word
|
||||||
|
bindkey '^[^[[3~' x-bash-backward-kill-word
|
||||||
|
bindkey '^[^[[3^' x-bash-backward-kill-word
|
||||||
|
bindkey '^[[A' fzf-history-widget # Up (fzf)
|
||||||
|
bindkey '^[[B' fzf-history-widget # Down (fzf)
|
||||||
|
bindkey '^F' fzf-file-widget # Ctrl+F file search (fzf)
|
||||||
|
|
||||||
|
bindkey "^V" edit-command-line
|
||||||
|
bindkey -M vicmd "^V" edit-command-line
|
||||||
|
|
||||||
|
bindkey -M vicmd d vi-backward-char
|
||||||
|
bindkey -M vicmd h vi-down-line-or-history
|
||||||
|
bindkey -M vicmd t vi-up-line-or-history
|
||||||
|
bindkey -M vicmd n vi-forward-char
|
||||||
|
bindkey -M vicmd k vi-delete
|
||||||
|
bindkey -M vicmd K vi-kill-eol
|
||||||
|
bindkey -M vicmd j vi-find-next-char-skip
|
||||||
|
bindkey -M vicmd l vi-repeat-search
|
||||||
|
|
||||||
|
|
||||||
|
ZSH_AUTOSUGGEST_USE_ASYNC=true
|
||||||
|
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=128
|
||||||
|
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
|
||||||
|
|
||||||
|
default='fg=12'
|
||||||
|
prog='fg=blue'
|
||||||
|
ZSH_HIGHLIGHT_STYLES=()
|
||||||
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets root line)
|
||||||
|
ZSH_HIGHLIGHT_STYLES[root]='bg=red'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[default]=$default
|
||||||
|
ZSH_HIGHLIGHT_STYLES[arg0]=$prog
|
||||||
|
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=yellow'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[alias]=$prog
|
||||||
|
ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=green'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[builtin]='fg=4'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[function]=$prog
|
||||||
|
ZSH_HIGHLIGHT_STYLES[command]=$prog
|
||||||
|
ZSH_HIGHLIGHT_STYLES[precommand]='fg=4'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=green'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[path]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[path_separator]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=208'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[globbing]='fg=red'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[comment]='fg=7'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[history-expansion]=$default
|
||||||
|
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]=$default
|
||||||
|
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]=$default
|
||||||
|
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=magenta'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=yellow'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=yellow'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=yellow'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=cyan'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[assign]='fg=green'
|
||||||
|
ZSH_HIGHLIGHT_STYLES[redirection]='fg=cyan,bold'
|
||||||
|
|
||||||
|
source "$DOTFILES/aliases"
|
||||||
|
|
||||||
|
# Source secret keys and values into environment
|
||||||
|
if [ -f "$XDG_CONFIG_HOME/secrets" ]; then
|
||||||
|
set -o allexport
|
||||||
|
source $XDG_CONFIG_HOME/secrets
|
||||||
|
set +o allexport
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load some manual plugins
|
||||||
|
source "$ZSH_DIR/plugins/sudo.zsh"
|
||||||
|
source "$ZSH_DIR/plugins/fish-theme.zsh"
|
||||||
|
source "$ZSH_DIR/plugins/git-rprompt.zsh"
|
||||||
|
[ -f '/usr/share/fzf/key-bindings.zsh' ] && source /usr/share/fzf/key-bindings.zsh
|
||||||
|
[ -f '/usr/share/doc/pkgfile/command-not-found.zsh' ] && source /usr/share/doc/pkgfile/command-not-found.zsh
|
||||||
|
[ -r '/usr/share/z/z.sh' ] && source /usr/share/z/z.sh
|
@ -1,63 +1,7 @@
|
|||||||
# ZSH Theme emulating the Fish shell's default prompt.
|
# ZSH Theme emulating the Fish shell's default prompt.
|
||||||
|
|
||||||
_fishy_collapsed_wd() {
|
_fishy_collapsed_wd() {
|
||||||
echo $(pwd | perl -pe '
|
pwd | sed -E 's|^'$HOME'|~|;s|(.*)/|\1%|;s|((^\|/)\.?[^/%]{1})[^/%]*|\1|g;s|(.*)%|\1/|'
|
||||||
BEGIN {
|
|
||||||
binmode STDIN, ":encoding(UTF-8)";
|
|
||||||
binmode STDOUT, ":encoding(UTF-8)";
|
|
||||||
}; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g
|
|
||||||
')
|
|
||||||
}
|
|
||||||
|
|
||||||
git_prompt_info() {
|
|
||||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
|
||||||
}
|
|
||||||
git_prompt_status() {
|
|
||||||
# Get the status of the working tree
|
|
||||||
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
|
||||||
STATUS=""
|
|
||||||
if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^A ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
|
||||||
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
|
||||||
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
|
||||||
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
|
||||||
elif $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
|
||||||
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_STASHED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$STATUS"
|
|
||||||
fi
|
|
||||||
if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then
|
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$STATUS"
|
|
||||||
fi
|
|
||||||
echo $STATUS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Required for dynamic prompt
|
# Required for dynamic prompt
|
||||||
@ -67,17 +11,4 @@ local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
|||||||
PROMPT="%n@%m %F{$user_color}\$(_fishy_collapsed_wd)%f%(!.#.>) "
|
PROMPT="%n@%m %F{$user_color}\$(_fishy_collapsed_wd)%f%(!.#.>) "
|
||||||
PROMPT2='%F{red}\ %f'
|
PROMPT2='%F{red}\ %f'
|
||||||
|
|
||||||
local return_status="%F{red}%(?..%?)%f"
|
RPROMPT='%F{red}%(?.. %?)%f'
|
||||||
RPROMPT='${return_status}$(git_prompt_info)$(git_prompt_status)%{$reset_color%}'
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX=" "
|
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg_bold[green]%}+"
|
|
||||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg_bold[blue]%}!"
|
|
||||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg_bold[red]%}-"
|
|
||||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg_bold[magenta]%}>"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg_bold[yellow]%}#"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg_bold[cyan]%}?"
|
|
||||||
|
74
.config/zsh/plugins/git-rprompt.zsh
Normal file
74
.config/zsh/plugins/git-rprompt.zsh
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# ZSH RPROMPT containing simple Git status
|
||||||
|
|
||||||
|
git_prompt_info() {
|
||||||
|
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
|
}
|
||||||
|
git_prompt_status() {
|
||||||
|
# Get the status of the working tree
|
||||||
|
INDEX=$(command git status --porcelain -b 2> /dev/null)
|
||||||
|
RESET='%f'
|
||||||
|
STATUS=""
|
||||||
|
if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^A ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$RESET$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^M ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_ADDED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$RESET$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$RESET$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^ T ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$RESET$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$RESET$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(command git rev-parse --verify refs/stash >/dev/null 2>&1); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_STASHED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^## .*ahead' &> /dev/null); then
|
||||||
|
AHEAD=$(echo "$INDEX" | sed -nE 's/.*ahead\s([0-9]*).*/\1/p')
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_AHEAD$AHEAD$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^## .*behind' &> /dev/null); then
|
||||||
|
BEHIND=$(echo "$INDEX" | sed -nE 's/.*behind\s([0-9]*).*/\1/p')
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_BEHIND$BEHIND$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
if $(echo "$INDEX" | grep '^## .*diverged' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DIVERGED$RESET$STATUS"
|
||||||
|
fi
|
||||||
|
echo $STATUS
|
||||||
|
}
|
||||||
|
|
||||||
|
# Required for dynamic prompt
|
||||||
|
setopt prompt_subst
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX=" "
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD="%F{green}↑"
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND="%F{red}↓"
|
||||||
|
|
||||||
|
ZSH_THEME_GIT_PROMPT_ADDED="%F{green}+"
|
||||||
|
ZSH_THEME_GIT_PROMPT_MODIFIED="%F{blue}~"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DELETED="%F{red}-"
|
||||||
|
ZSH_THEME_GIT_PROMPT_RENAMED="%F{magenta}>"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNMERGED="%F{yellow}#"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%F{cyan}?"
|
||||||
|
|
||||||
|
RPROMPT="\$(git_prompt_info)\$(git_prompt_status)%{\$reset_color%}$RPROMPT"
|
@ -4,14 +4,11 @@ sudo-command-line() {
|
|||||||
[[ -z $BUFFER ]] && zle up-history
|
[[ -z $BUFFER ]] && zle up-history
|
||||||
if [[ $BUFFER == sudo\ * ]]; then
|
if [[ $BUFFER == sudo\ * ]]; then
|
||||||
LBUFFER="${LBUFFER#sudo }"
|
LBUFFER="${LBUFFER#sudo }"
|
||||||
elif [[ $BUFFER == $EDITOR\ * ]] || [[ $BUFFER == vi\ * ]]; then
|
elif [[ $BUFFER == $EDITOR\ * ]] || [[ $BUFFER == vi\ * ]] || [[ $BUFFER == vim\ * ]]; then
|
||||||
LBUFFER="${LBUFFER#$EDITOR }"
|
LBUFFER="s$LBUFFER"
|
||||||
LBUFFER="${LBUFFER#vi }"
|
elif [[ $BUFFER == sudoedit\ * ]] || [[ $BUFFER == svi\ * ]]|| [[ $BUFFER == svim\ * ]]; then
|
||||||
LBUFFER="svi $LBUFFER"
|
|
||||||
elif [[ $BUFFER == sudoedit\ * ]] || [[ $BUFFER == svi\ * ]]; then
|
|
||||||
LBUFFER="${LBUFFER#sudoedit }"
|
LBUFFER="${LBUFFER#sudoedit }"
|
||||||
LBUFFER="${LBUFFER#svi }"
|
LBUFFER="${LBUFFER#s}"
|
||||||
LBUFFER="$EDITOR $LBUFFER"
|
|
||||||
else
|
else
|
||||||
LBUFFER="sudo $LBUFFER"
|
LBUFFER="sudo $LBUFFER"
|
||||||
fi
|
fi
|
||||||
|
2
.fehbg
2
.fehbg
@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
'feh' '--no-xinerama' '--bg-fill' '/home/frebib/pictures/lakesidesunrise.jpg'
|
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,10 @@
|
|||||||
bookmarks
|
bookmarks
|
||||||
.config/secrets
|
.config/secrets
|
||||||
|
|
||||||
|
.config/gtk-2.0/gtkfilechooser.ini
|
||||||
.config/imgur-screenshot/credentials.conf
|
.config/imgur-screenshot/credentials.conf
|
||||||
|
.config/mailnag/mailnag.dat
|
||||||
|
.config/zsh/.zshrc.zwc
|
||||||
|
|
||||||
*.log
|
*.log
|
||||||
.xournal/recent-files
|
.xournal/recent-files
|
||||||
|
89
.profile
89
.profile
@ -2,70 +2,55 @@ export LC_ALL=en_GB.UTF-8
|
|||||||
export LANG=en_GB.UTF-8
|
export LANG=en_GB.UTF-8
|
||||||
export LC_NUMERIC=en_GB
|
export LC_NUMERIC=en_GB
|
||||||
|
|
||||||
export CONFIG_DIR="$HOME/.config"
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
export XDG_CONFIG_HOME="$CONFIG_DIR"
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||||
|
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
|
export XDG_LOCAL_HOME="$HOME/.local"
|
||||||
|
|
||||||
|
mkdir -p "$XDG_CONFIG_HOME" "$XDG_CACHE_HOME" "$XDG_DATA_HOME" "$XDG_LOCAL_HOME"
|
||||||
|
|
||||||
case "$(basename "$(readlink -f /proc/$$/exe)")" in
|
case "$(basename "$(readlink -f /proc/$$/exe)")" in
|
||||||
zsh) thisfile="$(readlink -f "${(%):-%N}")";;
|
zsh) thisfile="$(readlink -f "${(%):-%N}")";;
|
||||||
bash) thisfile="$(readlink -f "${BASH_SOURCE[0]}")";;
|
bash) thisfile="$(readlink -f "${BASH_SOURCE[0]}")";;
|
||||||
*) thisfile="$(find /proc/$$/fd/ | xargs readlink -f | grep .profile | head -n1)";;
|
*) thisfile="$(find /proc/$$/fd/ | xargs -n1 -r readlink -f | grep profile | head -n1)";;
|
||||||
esac
|
esac
|
||||||
export DOTFILES="$(dirname "${thisfile:-$CONFIG_DIR/dotfiles}")"
|
|
||||||
export PATH="${PATH}:$DOTFILES/scripts"
|
|
||||||
export XDG_CURRENT_DESKTOP="GNOME" # Fixes xdg-open
|
|
||||||
|
|
||||||
# Allow Vim to load from ~/.config/vim
|
|
||||||
export VIMDIR="$CONFIG_DIR/vim"
|
|
||||||
export MYVIMRC="$VIMDIR/vimrc"
|
|
||||||
export VIMINIT=":so $MYVIMRC"
|
|
||||||
|
|
||||||
export EDITOR="vim"
|
export EDITOR="vim"
|
||||||
export VISUAL="vim"
|
export VISUAL="vim"
|
||||||
export MANPAGER="less -+N"
|
|
||||||
export TERMINAL="termite"
|
# Override paths for non-compliant programs
|
||||||
export BROWSER="chromium"
|
# https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
|
||||||
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel"
|
|
||||||
export QT_QPA_PLATFORMTHEME=gtk2
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||||
export GOPATH="$HOME/.cache/go"
|
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
||||||
|
export GOPATH="$XDG_DATA_HOME/go"
|
||||||
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/settings.ini"
|
||||||
|
export NPM_CONFIG_USERCONFIG=$XDG_CONFIG_HOME/npm/npmrc
|
||||||
|
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
|
||||||
|
export PYTHONHISTFILE="$XDG_DATA_HOME/python/histfile"
|
||||||
|
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
|
||||||
|
export TERMINFO="$XDG_DATA_HOME/terminfo"
|
||||||
|
export TERMINFO_DIRS="$XDG_DATA_HOME/terminfo:/usr/share/terminfo"
|
||||||
|
export VIMDIR="$XDG_CONFIG_HOME/vim"
|
||||||
|
export VIMRC="$VIMDIR/vimrc"
|
||||||
|
export VIMINIT=":so $VIMRC"
|
||||||
|
export WEECHAT_HOME="$XDG_CONFIG_HOME/weechat"
|
||||||
|
export XINITRC="$XDG_CONFIG_HOME/X11/xinitrc"
|
||||||
|
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||||
|
|
||||||
|
export DOTFILES="$(dirname "${thisfile:-$XDG_CONFIG_HOME/dotfiles/.profile}")"
|
||||||
|
export PATH="${PATH}:/sbin:/usr/sbin:$DOTFILES/scripts:$GOPATH/bin"
|
||||||
|
|
||||||
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
||||||
|
|
||||||
export LESS="-RI"
|
|
||||||
export PAGER="less $LESS"
|
|
||||||
if exists tput; then
|
|
||||||
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
|
|
||||||
export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
|
|
||||||
export LESS_TERMCAP_me=$(tput sgr0)
|
|
||||||
export LESS_TERMCAP_so=$(tput bold; tput setaf 4) # blue
|
|
||||||
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
|
|
||||||
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
|
|
||||||
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
|
|
||||||
export LESS_TERMCAP_mr=$(tput rev)
|
|
||||||
export LESS_TERMCAP_mh=$(tput dim)
|
|
||||||
export LESS_TERMCAP_ZN=$(tput ssubm)
|
|
||||||
export LESS_TERMCAP_ZV=$(tput rsubm)
|
|
||||||
export LESS_TERMCAP_ZO=$(tput ssupm)
|
|
||||||
export LESS_TERMCAP_ZW=$(tput rsupm)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Source secret keys and values into environment
|
|
||||||
if [ -f "$CONFIG_DIR/secrets" ]; then
|
|
||||||
set -o allexport
|
|
||||||
source $CONFIG_DIR/secrets
|
|
||||||
set +o allexport
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Merge system clipboards
|
|
||||||
if [ -n "$DISPLAY" ] && exists autocutsel && ! pidof autocutsel 1>/dev/null; then
|
|
||||||
autocutsel -fork
|
|
||||||
autocutsel -selection PRIMARY -fork
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && exists dbus-launch; then
|
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && exists dbus-launch; then
|
||||||
eval $(dbus-launch --sh-syntax --exit-with-session)
|
eval $(dbus-launch --sh-syntax --exit-with-session)
|
||||||
dbus-update-activation-environment --systemd DISPLAY
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start the gnome-keyring if it's installed
|
# Execute this after updating dbus/systemd environment
|
||||||
if exists gnome-keyring-daemon; then
|
# Source secret keys and values into environment
|
||||||
export $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh,gnupg)
|
if [ -f "$XDG_CONFIG_HOME/secrets" ]; then
|
||||||
|
set -o allexport
|
||||||
|
source $XDG_CONFIG_HOME/secrets
|
||||||
|
set +o allexport
|
||||||
fi
|
fi
|
||||||
|
124
.zshrc
124
.zshrc
@ -1,124 +0,0 @@
|
|||||||
unsetopt MULTIBYTE
|
|
||||||
|
|
||||||
# Config and cache directory paths
|
|
||||||
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
|
|
||||||
ZSH_DIR="$CONFIG_DIR/zsh"
|
|
||||||
ZSH_CACHE_DIR="$CONFIG_DIR/oh-my-zsh/cache"
|
|
||||||
ADOTDIR="$ZSH_DIR/antigen" # Antigen directory
|
|
||||||
LOG_DIR="$ZSH_DIR/log"
|
|
||||||
ANTIGEN_LOG="$LOG_DIR/antigen-$(date +"%Y_%m_%d_%I_%M_%p").log"
|
|
||||||
|
|
||||||
mkdir -p "$ZSH_CACHE_DIR" "$ZSH_DIR" "$LOG_DIR"
|
|
||||||
|
|
||||||
HISTFILE="$ZSH_DIR/histfile"
|
|
||||||
HISTSIZE=999999
|
|
||||||
SAVEHIST=999999
|
|
||||||
|
|
||||||
exists() { which $@ 0<&- 1>/dev/null 2>/dev/null; }
|
|
||||||
|
|
||||||
# Only set tty if running interactively
|
|
||||||
if exists tty && tty -s; then
|
|
||||||
# Resolve at shell runtime
|
|
||||||
export GPG_TTY="$(tty)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set some useful ZSH/Bash options
|
|
||||||
setopt sharehistory histignorealldups histignorespace histreduceblanks
|
|
||||||
setopt pathdirs autocd autopushd extendedglob alwaystoend dvorak
|
|
||||||
|
|
||||||
# Completion initialisation
|
|
||||||
autoload -U compinit ; compinit
|
|
||||||
autoload -U bashcompinit ; bashcompinit
|
|
||||||
|
|
||||||
# gopass completion
|
|
||||||
if exists gopass; then
|
|
||||||
source <(gopass completion bash)
|
|
||||||
fi
|
|
||||||
|
|
||||||
zstyle ':completion:*:sudo|_::' environ PATH="/sbin:/usr/sbin:$PATH" HOME="/root"
|
|
||||||
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
|
|
||||||
zstyle ':completion:*' rehash true
|
|
||||||
zstyle ':completion:*' menu select
|
|
||||||
zstyle ':completion:*' list-colors "${(@s.:.)LS_COLORS}"
|
|
||||||
zstyle ':compinstall' filename "$HOME/.zshrc"
|
|
||||||
|
|
||||||
|
|
||||||
# Load antigen & plugins
|
|
||||||
antigen_src="$ADOTDIR/antigen.zsh"
|
|
||||||
if [ ! -f "$antigen_src" ]; then
|
|
||||||
git clone https://github.com/zsh-users/antigen.git "$ADOTDIR"
|
|
||||||
fi
|
|
||||||
source "$antigen_src"
|
|
||||||
|
|
||||||
antigen bundle zsh-users/zsh-completions
|
|
||||||
antigen bundle zsh-users/zsh-autosuggestions
|
|
||||||
antigen bundle Tarrasch/zsh-syntax-highlighting
|
|
||||||
antigen bundle zsh-users/zsh-history-substring-search
|
|
||||||
|
|
||||||
antigen apply
|
|
||||||
|
|
||||||
|
|
||||||
# Set some key-binds
|
|
||||||
bindkey -e
|
|
||||||
bindkey "^[[1;3C" forward-word
|
|
||||||
bindkey "^[[1;5C" forward-word
|
|
||||||
bindkey "^[[1;3D" backward-word
|
|
||||||
bindkey "^[[1;5D" backward-word
|
|
||||||
bindkey "^[[7~" beginning-of-line
|
|
||||||
bindkey "^[[8~" end-of-line
|
|
||||||
bindkey "^[[3~" delete-char
|
|
||||||
bindkey "^[[3;3~" delete-word
|
|
||||||
|
|
||||||
export WORDCHARS='*?_[]~=&;!#$%^(){}'
|
|
||||||
x-bash-backward-kill-word(){
|
|
||||||
WORDCHARS='' zle kill-word
|
|
||||||
}
|
|
||||||
zle -N x-bash-backward-kill-word
|
|
||||||
bindkey '^[^[[3~' x-bash-backward-kill-word
|
|
||||||
bindkey '^[^[[3^' x-bash-backward-kill-word
|
|
||||||
|
|
||||||
bindkey '^[[A' history-substring-search-up
|
|
||||||
bindkey '^[[B' history-substring-search-down
|
|
||||||
|
|
||||||
|
|
||||||
ZSH_AUTOSUGGEST_CLEAR_WIDGETS=("${(@)ZSH_AUTOSUGGEST_CLEAR_WIDGETS:#(up|down)-line-or-history}")
|
|
||||||
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-substring-search-up history-substring-search-down)
|
|
||||||
|
|
||||||
HISTORY_SUBSTRING_SEARCH_FUZZY=true
|
|
||||||
HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=true
|
|
||||||
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='underline'
|
|
||||||
|
|
||||||
typeset -A ZSH_HIGHLIGHT_STYLES
|
|
||||||
ZSH_HIGHLIGHT_STYLES[default]='fg=12'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=red,bold'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=yellow'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[alias]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=green,underline'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[builtin]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[function]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[command]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[precommand]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=cyan'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=green'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[path]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=yellow,bold'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[globbing]='fg=red'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[comment]='fg=7'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[history-expansion]='fg=blue'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=12'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=12'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=magenta'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=yellow'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=yellow'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=yellow'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=cyan'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=cyan'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=cyan'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[assign]='fg=green'
|
|
||||||
ZSH_HIGHLIGHT_STYLES[redirection]='fg=cyan'
|
|
||||||
|
|
||||||
source "$DOTFILES/aliases"
|
|
||||||
|
|
||||||
# Load some manual plugins
|
|
||||||
source "$ZSH_DIR/plugins/sudo.zsh"
|
|
||||||
source "$ZSH_DIR/plugins/fish-theme.zsh"
|
|
21
README.md
21
README.md
@ -1,17 +1,10 @@
|
|||||||
These are the configs I use on my Arch Linux installation at home. They can be use and changed as much or as little as you please
|
# frebib/dotfiles
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
To quickly get started, clone this repo and run the setup scripts.
|
To get started, clone this repo and link the relevant files/directories
|
||||||
|
|
||||||
git clone https://github.com/frebib/dotfiles.git ~/.config/dotfiles
|
```shell
|
||||||
cd ~/.config/dotfiles
|
git clone https://github.com/frebib/dotfiles.git ~/.config/dotfiles
|
||||||
|
ln -sfv .config/dotfiles/.config/* .config/
|
||||||
You can put the `dotfiles` directory anywhere, just be sure to update the `$DOTFILES` envvar in `.profile`
|
ln -sfv .config/dotfiles/.profile .zprofile
|
||||||
|
```
|
||||||
To link all the configuration files, run the init-dotfiles script:
|
|
||||||
|
|
||||||
**Be warned that this will destroy your current configs without warning**
|
|
||||||
|
|
||||||
scripts/init-dotfiles.sh
|
|
||||||
|
|
||||||
To install all of my packages & programs, check out my other repo <https://github.com/frebib/arch-install/> and the [`userinstall`](https://github.com/frebib/arch-install/blob/master/userinstall) script
|
|
||||||
|
227
aliases
227
aliases
@ -1,16 +1,42 @@
|
|||||||
#!/usr/bin/zsh
|
# Global aliases for ZSH
|
||||||
|
if alias -g 2>/dev/null; then
|
||||||
|
alias -g ...=../..
|
||||||
|
alias -g ....=../../..
|
||||||
|
alias -g .....=../../../..
|
||||||
|
alias -g ......=../../../../..
|
||||||
|
alias -g H='| head'
|
||||||
|
alias -g T='| tail'
|
||||||
|
alias -g G='| grep'
|
||||||
|
alias -g L="| less"
|
||||||
|
alias -g C="| wc -l"
|
||||||
|
alias -g S="| sort"
|
||||||
|
alias -g U="| uniq"
|
||||||
|
alias -g count="| wc -l"
|
||||||
|
alias -g NO="1> /dev/null"
|
||||||
|
alias -g NE="2> /dev/null"
|
||||||
|
alias -g NUL="&> /dev/null"
|
||||||
|
alias -g BG="&;disown"
|
||||||
|
alias -g COL="| column -t"
|
||||||
|
alias -g CLIP="| xclip -i -selection primary -f | xclip -i -selection clipboard"
|
||||||
|
fi
|
||||||
|
|
||||||
# Common Aliases
|
# File default aliases
|
||||||
alias -g ...=../..
|
if alias -s 2>/dev/null; then
|
||||||
alias -g ....=../../..
|
alias -s pdf="open"
|
||||||
alias -g .....=../../../..
|
alias -s zip="unzip -l"
|
||||||
alias -g ......=../../../../..
|
alias -s rar="unrar l"
|
||||||
|
alias -s tar="tar tf"
|
||||||
|
alias -s gz="tar tf"
|
||||||
|
alias -s jar="java -jar"
|
||||||
|
alias -s git="git clone --recursive"
|
||||||
|
fi
|
||||||
|
|
||||||
alias ..la="cd ..;la"
|
alias ..la="cd ..;la"
|
||||||
alias ..ll="cd..;ll"
|
alias ..ll="cd..;ll"
|
||||||
alias ..l="..ll"
|
alias ..l="..ll"
|
||||||
|
|
||||||
alias l=ll
|
alias l=ll
|
||||||
|
alias ls='ls --color=auto'
|
||||||
alias ll="ls -lFh --group-directories-first"
|
alias ll="ls -lFh --group-directories-first"
|
||||||
alias la="ls -lAFh --group-directories-first"
|
alias la="ls -lAFh --group-directories-first"
|
||||||
alias lt='ls -lAFh --sort=time'
|
alias lt='ls -lAFh --sort=time'
|
||||||
@ -19,99 +45,96 @@ alias al=la # No, I don't need the Mono Assembly Linker
|
|||||||
|
|
||||||
alias md="mkdir -p"
|
alias md="mkdir -p"
|
||||||
alias rd="rmdir -p"
|
alias rd="rmdir -p"
|
||||||
mcd(){ mkdir -p $@ && cd $@; }
|
|
||||||
alias -- -='cd -'
|
alias -- -='cd -'
|
||||||
alias cdt='cd `mktemp -d`'
|
alias cdt='cd `mktemp -d`'
|
||||||
alias grep='grep --color'
|
|
||||||
alias -g H='| head'
|
|
||||||
alias -g T='| tail'
|
|
||||||
alias -g G='| grep'
|
|
||||||
alias -g L="| less"
|
|
||||||
alias -g C="| wc -l"
|
|
||||||
alias -g S="| sort"
|
|
||||||
alias -g U="| uniq"
|
|
||||||
alias -g count="| wc -l"
|
|
||||||
alias -g NO="1> /dev/null"
|
|
||||||
alias -g NE="2> /dev/null"
|
|
||||||
alias -g NUL="&> /dev/null"
|
|
||||||
alias -g BG="&;disown"
|
|
||||||
alias -g COL="| column -t"
|
|
||||||
alias -g CLIP="| xclip -i -selection primary -f | xclip -i -selection clipboard"
|
|
||||||
calc() { bc -l <<< "$@"; }
|
|
||||||
|
|
||||||
alias svi=sudoedit
|
alias svi=sudoedit
|
||||||
|
alias svim=sudoedit
|
||||||
# This will enable us to use aliases in sudo.
|
# This will enable us to use aliases in sudo.
|
||||||
# (If alias finishes with a space or tab, the shell will check if the next command is also aliased.)
|
# (If alias finishes with a space or tab, the shell will check if the next command is also aliased.)
|
||||||
# Source: https://github.com/mayah/home/blob/master/.zsh/zshrc.d/alias.zsh
|
# Source: https://github.com/mayah/home/blob/master/.zsh/zshrc.d/alias.zsh
|
||||||
alias sudo='sudo -E '
|
alias sudo='sudo '
|
||||||
alias open=xdg-open
|
alias open=xdg-open
|
||||||
|
|
||||||
# Command rewrites
|
# Command rewrites
|
||||||
alias ls='ls --color=always'
|
|
||||||
alias rm='rm -i'
|
alias rm='rm -i'
|
||||||
alias mv='mv -i'
|
alias mv='mv -i'
|
||||||
alias cp='cp -ir'
|
alias cp='cp -ir'
|
||||||
alias pacman='pacman --color=always'
|
|
||||||
alias pacaur='pacaur --color=always'
|
|
||||||
alias tree='tree --dirsfirst -C -F'
|
|
||||||
alias make="make -j$(nproc)"
|
|
||||||
alias dd='dd status=progress'
|
alias dd='dd status=progress'
|
||||||
alias env='env | sort'
|
|
||||||
alias ssh="ssh -tt"
|
alias ssh="ssh -tt"
|
||||||
alias vim="vim --servername vim -p"
|
alias wget="wget --hsts-file=$XDG_DATA_HOME/wget/hsts-file"
|
||||||
alias vi=vim
|
alias vi=vim
|
||||||
alias grip='grip --user=frebib --pass=$GRIP_API_KEY'
|
alias grip='grip --user=frebib --pass=$GRIP_API_KEY'
|
||||||
alias acme.sh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
|
alias acme.sh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
|
||||||
alias acmesh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
|
alias acmesh='$XDG_CONFIG_HOME/acme.sh/acme.sh --home $XDG_CONFIG_HOME/acme.sh --config-home $XDG_CONFIG_HOME/acme.sh --log $XDG_CONFIG_HOME/acme.sh/acme.sh.log'
|
||||||
exists gopass && alias pass='gopass'
|
alias alpine-sdk='docker run -ti --rm \
|
||||||
alias abuild='docker run -ti --rm \
|
|
||||||
-e USER \
|
-e USER \
|
||||||
|
-e UID="$(id -u)" \
|
||||||
-e PWD \
|
-e PWD \
|
||||||
-e HOME \
|
-e HOME \
|
||||||
-w $PWD \
|
-w $PWD \
|
||||||
-v $PWD:$PWD \
|
-v $PWD:$PWD \
|
||||||
-v ~/.abuild:$HOME/.abuild \
|
-v ~/.abuild:$HOME/.abuild \
|
||||||
frebib/alpine-sdk:edge abuild'
|
-v ~/.abuild/distfiles:/var/cache/distfiles \
|
||||||
|
frebib/alpine-sdk:edge'
|
||||||
|
alias abuild='alpine-sdk abuild'
|
||||||
|
alias abuild-sign='alpine-sdk abuild-sign'
|
||||||
|
alias apk='alpine-sdk apk'
|
||||||
|
alias hddtemps='find /sys/block/ -name sd\* | sed "s|sys/block|dev|g" | sudo xargs hddtemp | sort -t: -k3'
|
||||||
|
alias stripansi='sed -r "s/\x1B\[(([0-9]+)(;[0-9]+)*)?[m,K,H,f,J]//g"'
|
||||||
|
alias calc="noglob bc -l <<<" # noglob allows * without quoting
|
||||||
|
|
||||||
|
exists pacman && \
|
||||||
|
alias pacman='pacman --color=always'
|
||||||
|
exists yay && \
|
||||||
|
alias p='yay'
|
||||||
|
exists tree && \
|
||||||
|
alias tree='tree --dirsfirst -C -F'
|
||||||
|
exists make && \
|
||||||
|
alias make="make -j$(nproc)"
|
||||||
|
exists gopass && \
|
||||||
|
alias pass='gopass'
|
||||||
|
echo | busybox grep --color '' >/dev/null 2>&1 && \
|
||||||
|
alias grep='grep --color'
|
||||||
|
vim --version 2>/dev/null | command grep -q +clientserver && \
|
||||||
|
alias vim="vim --servername vim -p"
|
||||||
|
|
||||||
|
# Function aliases
|
||||||
|
env() { command env $@ | stripansi | sort; }
|
||||||
|
mcd(){ mkdir -p -- $@ && cd -- $@; }
|
||||||
|
randstr() { tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w $1 | head -n 1; }
|
||||||
|
|
||||||
# System aliases
|
# System aliases
|
||||||
alias s="sudo systemctl"
|
alias sc="systemctl"
|
||||||
|
alias ssc="sudo systemctl"
|
||||||
|
alias scu="systemctl --user"
|
||||||
alias j=journalctl
|
alias j=journalctl
|
||||||
alias p=pacaur
|
|
||||||
alias ps='ps aux'
|
alias ps='ps aux'
|
||||||
alias catn='tail -n +1 --'
|
alias catn='tail -n +1 --'
|
||||||
alias kl='killall -s 9'
|
alias kl='killall -s 9'
|
||||||
alias chx='chmod +x'
|
alias chx='chmod +x'
|
||||||
|
|
||||||
# File default aliases
|
|
||||||
pdf() {
|
|
||||||
evince $@ NE BG
|
|
||||||
}
|
|
||||||
alias -s pdf=pdf
|
|
||||||
alias -s zip="unzip -l"
|
|
||||||
alias -s rar="unrar l"
|
|
||||||
alias -s tar="tar tf"
|
|
||||||
alias -s gz="tar tf"
|
|
||||||
alias -s jar="java -jar"
|
|
||||||
alias -s git="git clone --recursive"
|
|
||||||
|
|
||||||
# Git Aliases
|
# Git Aliases
|
||||||
alias g=git
|
alias g=git
|
||||||
alias gignore='$EDITOR .gitignore'
|
alias gignore='$EDITOR .gitignore'
|
||||||
alias gitc='$EDITOR ~/.config/git/config'
|
alias gitc='$EDITOR $XDG_CONFIG_HOME/git/config'
|
||||||
alias ggignore='$EDITOR ~/.config/git/gitignore'
|
alias ggignore='$EDITOR $XDG_CONFIG_HOME/git/gitignore'
|
||||||
alias gcl="git clone --recursive"
|
alias gcl="git clone --recursive"
|
||||||
alias gco="git checkout"
|
alias gco="git checkout"
|
||||||
alias gcom="git checkout master"
|
alias gcom="git checkout master"
|
||||||
alias ga="git add"
|
alias ga="git add"
|
||||||
alias gap="git add -p"
|
alias gap="git add -p"
|
||||||
|
alias gau="git add -u"
|
||||||
|
alias gaN="git add -N"
|
||||||
alias gaa="ga -A"
|
alias gaa="ga -A"
|
||||||
alias grm="git rm"
|
alias grm="git rm"
|
||||||
alias gc="git commit"
|
alias gc="git commit"
|
||||||
alias gcm="gc -m"
|
alias gcm="gc -m"
|
||||||
gcmst() { git stash -u -k && git commit -m "$1" && git stash pop; }
|
gcmst() { git stash -u -k && git commit -m "$1" && git stash pop; }
|
||||||
alias gca="git commit --amend"
|
alias gca="git commit --amend --date=\"$(date -R)\""
|
||||||
alias gcan="git commit --amend --no-edit"
|
alias gcn="git commit --no-edit"
|
||||||
alias gcam="git commit --amend -m"
|
alias gcan="gca --no-edit"
|
||||||
|
alias gcam="gca -m"
|
||||||
alias gst="git status"
|
alias gst="git status"
|
||||||
|
|
||||||
alias gm="git merge"
|
alias gm="git merge"
|
||||||
@ -119,32 +142,33 @@ alias gma="git merge --abort"
|
|||||||
alias grb="git rebase"
|
alias grb="git rebase"
|
||||||
alias grba="grb --abort"
|
alias grba="grb --abort"
|
||||||
alias grbc="grb --continue"
|
alias grbc="grb --continue"
|
||||||
|
alias grbsk="grb --skip"
|
||||||
|
alias grbsh="grb --show-current"
|
||||||
|
alias grbom="git rebase origin/master"
|
||||||
|
|
||||||
alias gf="git fetch"
|
alias gf="git fetch"
|
||||||
alias gp="git push"
|
alias gp="git push"
|
||||||
alias gpf="gp --force"
|
alias gpf="gp --force"
|
||||||
alias gpsu="git push --set-upstream"
|
alias gpsu="git push --set-upstream"
|
||||||
|
alias gpoH="git push origin HEAD"
|
||||||
alias gpsuom="git push --set-upstream origin master"
|
alias gpsuom="git push --set-upstream origin master"
|
||||||
alias gpall="git remote | xargs -L1 git push"
|
alias gpall="git remote | xargs -L1 git push"
|
||||||
alias gl="git pull --rebase"
|
alias gl="git pull --rebase"
|
||||||
alias glp="gl && gp"
|
alias glp="gl && gp"
|
||||||
gd() {
|
alias gd="git diff --patch-with-stat"
|
||||||
local commit=$1
|
alias gdni="gd --no-index"
|
||||||
if [ -z "$commit" ] || [ ${commit:0:1} != '@' ]; then
|
alias gds="gd --staged"
|
||||||
git diff $@
|
alias gsh="git show --format=fuller --patch-with-stat"
|
||||||
else
|
alias glg="git log --color --format=fuller --stat"
|
||||||
git diff "@~${commit:1}^!"
|
alias glgp="git log --color --format=fuller --patch-with-stat"
|
||||||
fi
|
alias glog="git log --color --oneline --decorate --graph"
|
||||||
}
|
|
||||||
alias gds="git diff --staged"
|
|
||||||
alias gsh="git show"
|
|
||||||
alias glg="git log --stat --color"
|
|
||||||
alias glog="git log --oneline --decorate --color --graph"
|
|
||||||
|
|
||||||
alias grst="git reset"
|
alias grst="git reset"
|
||||||
alias gundo="git reset @~1"
|
alias gundo="git reset --keep @~1"
|
||||||
alias gclean="git clean"
|
alias gclean="git clean"
|
||||||
alias gbr="git branch"
|
alias gbr="git branch"
|
||||||
|
alias gtg="git tag"
|
||||||
|
alias gbl="git blame"
|
||||||
alias gr="git remote"
|
alias gr="git remote"
|
||||||
alias grv="git remote -v"
|
alias grv="git remote -v"
|
||||||
alias gra="gr add"
|
alias gra="gr add"
|
||||||
@ -160,8 +184,11 @@ alias gstv="gsta show -p stash@{0}"
|
|||||||
|
|
||||||
# Docker aliases
|
# Docker aliases
|
||||||
alias d=docker
|
alias d=docker
|
||||||
alias dps='docker ps'
|
alias dps="docker ps --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.label-schema.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'"
|
||||||
alias dpsa='docker ps -a'
|
alias dpsa="docker ps -a --format='table {{.ID}}\t{{.Image}}\t{{.Label \"org.label-schema.version\"}}\t{{.Networks}}\t{{.RunningFor}}\t{{.Status}}\t{{.Names}}' | sed '1s/version/VERSION/'"
|
||||||
|
alias dnets="docker network ls -q | xargs docker inspect | jq '.[] | select(.Name != \"host\" and .Name != \"none\") | [.] | map(.Name + \"\t\" + (.IPAM.Config | map(.Subnet) | join(\"\t\")))[]' -r | sort -V -k2,3 | column -t"
|
||||||
|
daddrs() { docker inspect ${1:-bridge} | jq '.[0].Containers | map(.Name + "\t" + .IPv4Address + "\t" + .IPv6Address)[]' -r | sort -V -k2,3 | column -t; }
|
||||||
|
alias din='docker inspect'
|
||||||
alias drm='docker rm'
|
alias drm='docker rm'
|
||||||
alias drmi='docker rmi'
|
alias drmi='docker rmi'
|
||||||
alias dim='docker images'
|
alias dim='docker images'
|
||||||
@ -169,21 +196,25 @@ alias dbl='docker build --pull'
|
|||||||
alias dbl.='docker build --pull .'
|
alias dbl.='docker build --pull .'
|
||||||
alias drun='docker run -ti'
|
alias drun='docker run -ti'
|
||||||
alias dkl='docker kill'
|
alias dkl='docker kill'
|
||||||
dklrm() { docker kill $@ ; docker rm $@ }
|
dklrm() { docker kill $@ ; docker rm $@; }
|
||||||
alias dst='docker stop'
|
alias dst='docker stop'
|
||||||
alias drst='docker restart'
|
alias drst='docker restart'
|
||||||
alias dnet='docker network'
|
alias dnet='docker network'
|
||||||
alias dvol='docker volume'
|
alias dvol='docker volume'
|
||||||
alias dlg='docker logs -f'
|
alias dlg='docker logs -f'
|
||||||
alias dalpine='docker run -ti --rm alpine /bin/sh'
|
alias dalpine='docker run -ti --rm spritsail/alpine /bin/sh'
|
||||||
alias drm-stopped='docker container prune'
|
alias drm-stopped='docker container prune'
|
||||||
alias drmi-untag='docker image prune'
|
alias drmi-untag='docker image prune'
|
||||||
alias dprune='docker system prune -f'
|
alias dprune='docker system prune -f'
|
||||||
alias dsh='_CMD=dsh _dsh exec'
|
dsh() { do_dsh 2 exec $@; return $?; }
|
||||||
alias drsh='_CMD=drsh _dsh run --rm --entrypoint='
|
_dsh() { __docker_complete_running_containers $@; }
|
||||||
_dsh() {
|
drsh() { do_dsh 4 run --rm --entrypoint= $@; return $?; }
|
||||||
if [ $# -lt 2 ]; then
|
_drsh() { __docker_container_subcommand $@; }
|
||||||
echo "Usage: ${_CMD:-$0} [user@]container [program [args]]" >&2
|
do_dsh() {
|
||||||
|
local minargs=$1
|
||||||
|
shift
|
||||||
|
if [ $# -lt $minargs ]; then
|
||||||
|
echo "Usage: ${funcstack[2]} [user@]container [program [args]]" >&2
|
||||||
return 64
|
return 64
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -216,18 +247,20 @@ _dsh() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$prog" ]; then
|
if [ -z "$prog" ]; then
|
||||||
set -o pipefail
|
shell_args=()
|
||||||
local rm=
|
|
||||||
if [ "$dowhat" = 'run' ]; then
|
if [ "$dowhat" = 'run' ]; then
|
||||||
rm='--rm --entrypoint='
|
shell_args=(--rm --entrypoint=)
|
||||||
fi
|
fi
|
||||||
for shell in bash sh; do
|
for shell in bash sh; do
|
||||||
if shell_path="$(eval "docker $dowhat $rm $host which $shell" <&- | sed 's|[\r\n]||g')"; then
|
shell_path="$(set -o pipefail; docker $dowhat ${shell_args[@]} "$host" which "$shell" <&- | sed 's|[\r\n]||g')"
|
||||||
|
retval=$?
|
||||||
|
if [ $retval -eq 0 ]; then
|
||||||
prog="$shell_path"
|
prog="$shell_path"
|
||||||
break
|
break
|
||||||
|
elif [ $retval -ge 125 ]; then
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
set +o pipefail
|
|
||||||
if [ -z "$prog" ]; then
|
if [ -z "$prog" ]; then
|
||||||
echo "Warning: No shell found in path.. trying /bin/sh" >&2
|
echo "Warning: No shell found in path.. trying /bin/sh" >&2
|
||||||
prog=/bin/sh
|
prog=/bin/sh
|
||||||
@ -237,41 +270,37 @@ _dsh() {
|
|||||||
docker $dowhat ${docker_args[@]} -ti $usercmd $host $(xargs <<< $prog)
|
docker $dowhat ${docker_args[@]} -ti $usercmd $host $(xargs <<< $prog)
|
||||||
}
|
}
|
||||||
|
|
||||||
alias dm='docker-machine'
|
|
||||||
dm-con() {
|
|
||||||
eval $(docker-machine env $1)
|
|
||||||
}
|
|
||||||
alias dmc=dm-con
|
|
||||||
|
|
||||||
alias dc='docker-compose'
|
alias dc='docker-compose'
|
||||||
|
alias dm='docker-machine'
|
||||||
|
dmc() { eval $(docker-machine env $1); }
|
||||||
|
|
||||||
# ZFS aliases
|
# ZFS aliases
|
||||||
alias zfs='sudo zfs'
|
alias zfs='sudo zfs'
|
||||||
alias zpool='sudo zpool'
|
alias zpool='sudo zpool'
|
||||||
alias z=zfs
|
alias z=zfs
|
||||||
alias zp=zpool
|
alias zp=zpool
|
||||||
|
zl() { (set -o pipefail; command zfs list $@ | grep -Ev 'docker/[0-9a-f]{64}' | column -t -R 2,3,4); return $?; }
|
||||||
|
_zl() { _zfs "list $@"; }
|
||||||
|
|
||||||
# General Aliases
|
# General Aliases
|
||||||
alias ssha='eval `ssh-agent` ; ssh-add'
|
alias ssha='eval `ssh-agent` ; ssh-add'
|
||||||
alias aliases="$EDITOR $DOTFILES/aliases ; exec zsh"
|
alias aliases="$EDITOR $DOTFILES/aliases ; exec zsh"
|
||||||
alias vimrc="$EDITOR $MYVIMRC"
|
alias vimrc="$EDITOR $VIMRC"
|
||||||
alias zshrc="$EDITOR ~/.zshrc ; exec zsh"
|
alias zshrc="$EDITOR ${ZDOTDIR:-$HOME}/.zshrc ; exec zsh"
|
||||||
alias gitrc="$EDITOR ~/.config/git/config"
|
alias gitrc="$EDITOR $XDG_CONFIG_HOME/git/config"
|
||||||
alias xinitrc="$EDITOR ~/.xinitrc"
|
alias xinitrc="$EDITOR $XDG_CONFIG_HOME/X11/xinitrc"
|
||||||
alias xresources="$EDITOR ~/.Xresources ; xrdb merge ~/.Xresources"
|
alias xresources="$EDITOR $XDG_CONFIG_HOME/X11/xresources ; xrdb merge $XDG_CONFIG_HOME/X11/xresources"
|
||||||
alias xsession="$EDITOR ~/.xsession"
|
|
||||||
alias sshc="$EDITOR ~/.ssh/config"
|
alias sshc="$EDITOR ~/.ssh/config"
|
||||||
alias dotfiles="cd $DOTFILES"
|
alias dotfiles="cd $DOTFILES"
|
||||||
alias i3c="$EDITOR ~/.config/i3/config ; i3-msg restart"
|
alias i3c="$EDITOR $XDG_CONFIG_HOME/i3/config; systemctl --user reload i3"
|
||||||
alias i3bc="$EDITOR ~/.config/i3/blocks/config ; i3-msg restart"
|
alias polybarc="$EDITOR $XDG_CONFIG_HOME/polybar/config; systemctl --user restart polybar@i3bar"
|
||||||
i3b() {
|
|
||||||
$EDITOR ~/.config/i3/blocks/$@
|
|
||||||
}
|
|
||||||
alias sf=screenfetch
|
alias sf=screenfetch
|
||||||
alias nf=neofetch
|
alias nf=neofetch
|
||||||
randstr() { tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w $1 | head -n 1; }
|
|
||||||
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"
|
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"
|
||||||
|
|
||||||
alias lab="ssh -tt tw '~/ctl' 2>/dev/null"
|
# Networking aliases
|
||||||
|
alias ipa="ip a"
|
||||||
|
alias addrs="ip a | grep inet | grep -ve fe80 -e '127\\.0\\.0\\.1/8' -e '::1/128' | sort -n | sed 's/^\\s*//'"
|
||||||
|
|
||||||
# vim: ft=sh
|
# vim: ft=sh
|
||||||
|
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user