mirror of
https://github.com/dcarrillo/dotfiles.git
synced 2024-12-22 12:48:01 +00:00
First commit
This commit is contained in:
commit
9f98ffc84d
72
.config/polybar/bar.ini
Normal file
72
.config/polybar/bar.ini
Normal file
@ -0,0 +1,72 @@
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
include-file = ~/.config/polybar/modules.ini
|
||||
|
||||
[colors]
|
||||
|
||||
background = #263238
|
||||
background-alt = #444
|
||||
foreground = #DFDFDF
|
||||
foreground-alt = #555
|
||||
primary = #F5A70A
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
; bar colors
|
||||
bn = #43a047
|
||||
bm = #fdd835
|
||||
bd = #e53935
|
||||
|
||||
[bar/top]
|
||||
monitor = ${env:MONITOR:}
|
||||
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
radius-top = 0.0
|
||||
radius-bottom = 0.0
|
||||
|
||||
border-bottom-size = 3
|
||||
border-color = ${colors.primary}
|
||||
padding = 1
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
separator =
|
||||
dim-value = 1.0
|
||||
locale = es_ES.UTF-8
|
||||
tray-position = none
|
||||
tray-detached = false
|
||||
tray-maxsize = 32
|
||||
tray-background = ${root.background}
|
||||
tray-offset-x = 0
|
||||
tray-offset-y = 0
|
||||
tray-padding = 10
|
||||
tray-scale = 1.0
|
||||
|
||||
width = 100%
|
||||
enable-ipc = true
|
||||
dpi = 96
|
||||
height = 36
|
||||
fixed-center = true
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
font-0 = "Droid Sans Mono:size=16;1"
|
||||
; https://fontawesome.com/cheatsheet/free
|
||||
font-1 = "FontAwesome:size=16;2"
|
||||
font-2 = "Material Icons:size=16;1"
|
||||
font-3 = NotoSans-Regular:size=18:weight=bold;2
|
||||
font-4 = NotoSans-Regular:size=18:weight=bold;-7
|
||||
|
||||
modules-left = windows spotify
|
||||
modules-center = date
|
||||
modules-right = updates cpu_bar memory_bar network_manager vpn wireless wired alsa_bar
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
13
.config/polybar/launch.sh
Executable file
13
.config/polybar/launch.sh
Executable file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
killall -q polybar
|
||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||
|
||||
export TERMINAL_CMD="tilix --profile orange --new-process -e"
|
||||
export WM_CONTROL="wmctrl -a"
|
||||
|
||||
for monitor in $(polybar --list-monitors | cut -d":" -f1); do
|
||||
export MONITOR=$monitor
|
||||
polybar top -c ~/.config/polybar/bar.ini >/dev/null &
|
||||
done
|
||||
|
152
.config/polybar/modules.ini
Normal file
152
.config/polybar/modules.ini
Normal file
@ -0,0 +1,152 @@
|
||||
[module/windows]
|
||||
type = custom/text
|
||||
content =" "
|
||||
click-left = rofi -modi window -show window -theme orange -show-icons -location 1 -yoffset +45 -xoffset +20
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online-prefix = " "
|
||||
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
|
||||
label-song-maxlen = 30
|
||||
label-song-ellipsis = true
|
||||
|
||||
[module/cpu_bar]
|
||||
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/cpu_usage.py
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o %CPU' &:} %{A-}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
interval = 5
|
||||
|
||||
[module/memory_bar]
|
||||
type = internal/memory
|
||||
format = <bar-used>
|
||||
format-prefix = "%{A1:$TERMINAL_CMD 'top -o RES' &:}RAM %{A-}"
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
|
||||
bar-used-width = 10
|
||||
bar-used-gradient = false
|
||||
bar-used-indicator =
|
||||
bar-used-indicator-foreground = ${colors.foreground}
|
||||
bar-used-indicator-font = 0
|
||||
bar-used-fill = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-used-foreground-0 = ${colors.bn}
|
||||
bar-used-foreground-1 = ${colors.bn}
|
||||
bar-used-foreground-2 = ${colors.bn}
|
||||
bar-used-foreground-3 = ${colors.bm}
|
||||
bar-used-foreground-4 = ${colors.bm}
|
||||
bar-used-foreground-5 = ${colors.bm}
|
||||
bar-used-foreground-6 = ${colors.bd}
|
||||
bar-used-foreground-7 = ${colors.bd}
|
||||
bar-used-foreground-8 = ${colors.bd}
|
||||
bar-used-empty = "%{A1:$TERMINAL_CMD 'top -o RES' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-used-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
|
||||
[module/network_manager]
|
||||
type = custom/text
|
||||
content = ""
|
||||
content-font = 2
|
||||
; since I'm in zsh, bash invocation is necessary even if the shebang is set
|
||||
click-left = /usr/bin/bash ~/.config/polybar/scripts/nmcli_manager
|
||||
|
||||
[module/wireless]
|
||||
type = internal/network
|
||||
interface = wlp4s0
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%essid%%{A-}"
|
||||
format-disconnected =
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = ${colors.foreground}
|
||||
|
||||
[module/wired]
|
||||
type = internal/network
|
||||
interface = enp3s0
|
||||
|
||||
accumulate-stats = true
|
||||
unknown-as-up = true
|
||||
|
||||
format-connected = <label-connected>
|
||||
format-connected-prefix =
|
||||
format-disconnected = <label-disconnected>
|
||||
|
||||
label-connected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}%downspeed:8% %upspeed:8% %{A-}"
|
||||
label-disconnected = "%{A1:/usr/bin/bash ~/.config/polybar/scripts/nmcli_manager:}Not connected%{A-}"
|
||||
|
||||
[module/vpn]
|
||||
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/check_vpn
|
||||
interval = 5
|
||||
|
||||
[module/spotify]
|
||||
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/spotify.py
|
||||
interval = 5
|
||||
format-prefix = " "
|
||||
format-font = 1
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 1
|
||||
|
||||
date = "%d de %B"
|
||||
date-alt = "%d de %B de %Y"
|
||||
|
||||
time = %H:%M
|
||||
time-alt = %H:%M:%S
|
||||
|
||||
label = %{F#f5a70a}%{T4}%time%%{F-}%{T-} | %date%
|
||||
|
||||
[module/alsa_bar]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{A-}"
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
format-muted-prefix = ""
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = sound muted
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = ${colors.bn}
|
||||
bar-volume-foreground-1 = ${colors.bn}
|
||||
bar-volume-foreground-2 = ${colors.bn}
|
||||
bar-volume-foreground-3 = ${colors.bn}
|
||||
bar-volume-foreground-4 = ${colors.bn}
|
||||
bar-volume-foreground-5 = ${colors.bn}
|
||||
bar-volume-foreground-6 = ${colors.bm}
|
||||
bar-volume-foreground-7 = ${colors.bm}
|
||||
|
||||
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator =
|
||||
bar-volume-fill = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-volume-empty = "%{A3:$TERMINAL_CMD 'pulsemixer' &:}%{T5}_%{T-}%{A-}"
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
click-right = $TERMINAL_CMD 'pulsemixer'
|
||||
|
||||
[module/updates]
|
||||
type = custom/script
|
||||
exec = ~/.config/polybar/scripts/check_updates
|
||||
tail = true
|
||||
interval = 5
|
||||
click-left = $TERMINAL_CMD "yay -Suy --noconfirm" &
|
||||
|
8
.config/polybar/scripts/check_updates
Executable file
8
.config/polybar/scripts/check_updates
Executable file
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while true; do
|
||||
UPDATES=$(checkupdates 2>/dev/null | wc -l)
|
||||
|
||||
[[ $UPDATES -gt 0 ]] && echo " $UPDATES" && sleep 30
|
||||
[[ $UPDATES -eq 0 ]] && echo "" && sleep 300
|
||||
done
|
12
.config/polybar/scripts/check_vpn
Executable file
12
.config/polybar/scripts/check_vpn
Executable file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
OUTPUT=""
|
||||
|
||||
openvpn=$(pgrep -c openvpn$)
|
||||
[[ $openvpn -gt 0 ]] && OUTPUT=$(eval printf "%.0s" {1..$openvpn})
|
||||
|
||||
openfortivpn=$(pgrep -c openfortivpn$)
|
||||
[[ $openfortivpn -gt 0 ]] && OUTPUT=${OUTPUT}$(eval printf '%.0s' {1..$openfortivpn})
|
||||
|
||||
echo $OUTPUT | sed -e 's/\(.\)/\1 /g'
|
||||
|
43
.config/polybar/scripts/cpu_usage.py
Executable file
43
.config/polybar/scripts/cpu_usage.py
Executable file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
colors = {
|
||||
'us': '#43A047', # us, user : time running un-niced user processes
|
||||
'sy': '#87CEFA', # sy, system : time running kernel processes
|
||||
'ni': '#FFFFFF', # ni, nice : time running niced user processes
|
||||
'wa': '#E53935', # wa, IO-wait : time waiting for I/O completion
|
||||
'hi': '#66CDAA', # hi : time spent servicing hardware interrupts
|
||||
'si': '#7FFFD4', # si : time spent servicing software interrupts
|
||||
'st': '#7B2B4E', # st : time stolen from this vm by the hypervisor
|
||||
'id': '#555555'
|
||||
}
|
||||
|
||||
|
||||
def show_cpu_usage():
|
||||
new_env = dict(os.environ)
|
||||
new_env['LANG'] = 'en_US.UTF-8' # ensure that the decimal separator is a point
|
||||
top = subprocess.run(["top", "-bn1"], capture_output=True, env=new_env)
|
||||
|
||||
raw_cpu_usages = top.stdout.decode("utf-8").split('\n')[2]
|
||||
cpu_usage = str.replace(raw_cpu_usages, '%Cpu(s):', '')
|
||||
|
||||
bar = ''
|
||||
global_count = 0
|
||||
for usage in cpu_usage.split(','):
|
||||
value, key = str.lstrip(usage).split(' ')
|
||||
count = round(float(value) / 10)
|
||||
if count > 0 and key != 'id':
|
||||
global_count += count
|
||||
bar += '%{F' + colors[key] + '}' + '_' * count + '%{F-}'
|
||||
|
||||
padding = ''
|
||||
if global_count < 10:
|
||||
padding = '%{F' + colors['id'] + '}' + '_' * (10 - global_count) + '%{F-}'
|
||||
|
||||
print("%{A1:$TERMINAL_CMD 'top -o %CPU' &:}%{T5}" + bar + padding + "%{T-}%{A-}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
show_cpu_usage()
|
77
.config/polybar/scripts/nmcli_manager
Executable file
77
.config/polybar/scripts/nmcli_manager
Executable file
@ -0,0 +1,77 @@
|
||||
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# nmcli connection switching from a rofi menu.
|
||||
# When a network is selected its status is switched from UP to DOWN or vice versa.
|
||||
#
|
||||
# WARNING, connection name can't contain a # or | symbol
|
||||
#
|
||||
|
||||
ROFI="rofi -dmenu
|
||||
-sep #
|
||||
-i -p Network:
|
||||
-theme orange
|
||||
-location 3
|
||||
-yoffset +45
|
||||
-xoffset -80
|
||||
-width 30
|
||||
"
|
||||
|
||||
function build_rofi_menu()
|
||||
{
|
||||
local menu
|
||||
local name
|
||||
local dtype
|
||||
local device
|
||||
local option
|
||||
|
||||
while read -r line
|
||||
do
|
||||
name="$(cut -d':' -f1 <<< $line)"
|
||||
dtype="$(cut -d':' -f2 <<< $line)"
|
||||
device="$(cut -d':' -f3 <<< $line)"
|
||||
|
||||
[[ -z $device ]] && status=DOWN || status=UP
|
||||
dtype=${dtype##*-}
|
||||
option="$name $dtype is $status"
|
||||
|
||||
option=$(printf '%-45s | %s | %s\n' "$name" $dtype $status)
|
||||
menu="$menu # $option"
|
||||
done < <(nmcli -c no --terse -f NAME,TYPE,DEVICE connection show)
|
||||
|
||||
echo "$(cut -c 3- <<< $menu)"
|
||||
}
|
||||
|
||||
function switch_connections()
|
||||
{
|
||||
local name="$1"
|
||||
local status=$2
|
||||
|
||||
if [[ "$status" == "UP" ]]; then
|
||||
nmcli connection down "$name"
|
||||
else
|
||||
nmcli connection up "$name"
|
||||
fi
|
||||
}
|
||||
|
||||
function main()
|
||||
{
|
||||
local menu
|
||||
local choice
|
||||
local name
|
||||
local stat
|
||||
|
||||
menu=$(build_rofi_menu)
|
||||
choice=$($ROFI <<< $menu)
|
||||
[[ $? -ne 0 ]] && return 1
|
||||
|
||||
name=$(cut -d '|' -f 1 <<< $choice | awk '{$1=$1;print}')
|
||||
stat=$(cut -d '|' -f 3 <<< $choice | awk '{$1=$1;print}')
|
||||
|
||||
switch_connections "$name" $stat
|
||||
}
|
||||
|
||||
|
||||
main
|
||||
|
34
.config/polybar/scripts/spotify.py
Executable file
34
.config/polybar/scripts/spotify.py
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import dbus
|
||||
|
||||
bus_name = 'org.mpris.MediaPlayer2.spotify'
|
||||
|
||||
|
||||
def get_spotify_song():
|
||||
output = ''
|
||||
|
||||
try:
|
||||
session_bus = dbus.SessionBus()
|
||||
spotify_bus = session_bus.get_object(bus_name, '/org/mpris/MediaPlayer2')
|
||||
spotify_properties = dbus.Interface(spotify_bus, 'org.freedesktop.DBus.Properties')
|
||||
metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata")
|
||||
|
||||
artist = metadata['xesam:artist'][0]
|
||||
title = metadata['xesam:title']
|
||||
|
||||
window_title = artist + ' - ' + title
|
||||
output = "%{A1:$WM_CONTROL '" + window_title + "' &:}" + window_title + "%{A-}"
|
||||
except dbus.DBusException as e:
|
||||
if (e.get_dbus_message() == f'The name {bus_name} was not provided by any .service files'):
|
||||
pass
|
||||
else:
|
||||
output = e.get_dbus_message()
|
||||
except Exception as e:
|
||||
output = str(e)
|
||||
|
||||
print(output)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
get_spotify_song()
|
155
.config/rofi/orange.rasi
Normal file
155
.config/rofi/orange.rasi
Normal file
@ -0,0 +1,155 @@
|
||||
/**
|
||||
* ROFI Color theme
|
||||
* User: mbfraga
|
||||
* Copyright: Martin B. Fraga
|
||||
*
|
||||
* Slight modification by dcarrillo
|
||||
*/
|
||||
|
||||
/* global settings and color variables */
|
||||
* {
|
||||
maincolor: #ed8712;
|
||||
highlight: bold #ed8712;
|
||||
urgentcolor: #e53714;
|
||||
|
||||
fgwhite: #cfcfcf;
|
||||
blackdarkest: #263238;
|
||||
blackwidget: #262626;
|
||||
blackentry: #292929;
|
||||
blackselect: #303030;
|
||||
darkgray: #848484;
|
||||
scrollbarcolor: #FFCB81;
|
||||
font: "Droid Sans Mono 16";
|
||||
background-color: @blackdarkest;
|
||||
}
|
||||
|
||||
window {
|
||||
background-color: @blackdarkest;
|
||||
border-radius: 5px;
|
||||
// anchor: north;
|
||||
// location: north;
|
||||
// y-offset: 20%;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @blackdarkest;
|
||||
spacing:0px;
|
||||
children: [inputbar, message, mode-switcher, listview];
|
||||
}
|
||||
|
||||
message {
|
||||
border-radius: 5px;
|
||||
padding: 6px 10px;
|
||||
background-color:@blackwidget;
|
||||
}
|
||||
|
||||
textbox {
|
||||
text-color:@darkgray;
|
||||
background-color:@blackwidget;
|
||||
}
|
||||
|
||||
listview {
|
||||
border-radius: 5px;
|
||||
fixed-height: false;
|
||||
dynamic: true;
|
||||
scrollbar: true;
|
||||
spacing: 0px;
|
||||
padding: 1px 0px 0px 0px;
|
||||
margin: 0px 0px 1px 0px;
|
||||
background: @blackdarkest;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 2px 15px;
|
||||
}
|
||||
|
||||
element normal.normal {
|
||||
padding: 0px 15px;
|
||||
background-color: @blackentry;
|
||||
text-color: @fgwhite;
|
||||
}
|
||||
|
||||
element normal.urgent {
|
||||
background-color: @blackentry;
|
||||
text-color: @urgentcolor;
|
||||
}
|
||||
|
||||
element normal.active {
|
||||
background-color: @blackentry;
|
||||
text-color: @maincolor;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
border-radius: 5px;
|
||||
background-color: @blackselect;
|
||||
text-color: @fgwhite;
|
||||
}
|
||||
|
||||
element selected.urgent {
|
||||
background-color: @urgentcolor;
|
||||
text-color: @blackdarkest;
|
||||
}
|
||||
|
||||
element selected.active {
|
||||
background-color: @maincolor;
|
||||
text-color: @blackdarkest;
|
||||
}
|
||||
|
||||
element alternate.normal {
|
||||
background-color: @blackentry;
|
||||
text-color: @fgwhite;
|
||||
}
|
||||
|
||||
element alternate.urgent {
|
||||
background-color: @blackentry;
|
||||
text-color: @urgentcolor;
|
||||
}
|
||||
|
||||
element alternate.active {
|
||||
background-color: @blackentry;
|
||||
text-color: @maincolor;
|
||||
}
|
||||
|
||||
scrollbar {
|
||||
background-color: @blackwidget;
|
||||
handle-color: @scrollbarcolor;
|
||||
handle-width: 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
background-color: @blackwidget;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: @blackwidget;
|
||||
text-color: @darkgray;
|
||||
}
|
||||
|
||||
button selected {
|
||||
text-color: @maincolor;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
background-color: @blackdarkest;
|
||||
border-radius: 5px;
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
padding:6px 9px;
|
||||
background-color: @maincolor;
|
||||
text-color:@blackwidget;
|
||||
}
|
||||
|
||||
entry {
|
||||
padding:6px 10px;
|
||||
background-color:@blackwidget;
|
||||
text-color:@fgwhite;
|
||||
}
|
||||
|
||||
case-indicator {
|
||||
padding:6px 10px;
|
||||
text-color:@maincolor;
|
||||
background-color:@blackwidget;
|
||||
}
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.vscode/
|
201
.zpreztorc
Normal file
201
.zpreztorc
Normal file
@ -0,0 +1,201 @@
|
||||
#
|
||||
# Sets Prezto options.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# General
|
||||
#
|
||||
|
||||
# Set case-sensitivity for completion, history lookup, etc.
|
||||
# zstyle ':prezto:*:*' case-sensitive 'yes'
|
||||
|
||||
# Color output (auto set to 'no' on dumb terminals).
|
||||
zstyle ':prezto:*:*' color 'yes'
|
||||
|
||||
# Set the Zsh modules to load (man zshmodules).
|
||||
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||
|
||||
# Set the Zsh functions to load (man zshcontrib).
|
||||
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
|
||||
|
||||
# Set the Prezto modules to load (browse modules).
|
||||
# The order matters.
|
||||
zstyle ':prezto:load' pmodule \
|
||||
'environment' \
|
||||
'terminal' \
|
||||
'editor' \
|
||||
'history' \
|
||||
'directory' \
|
||||
'spectrum' \
|
||||
'utility' \
|
||||
'completion' \
|
||||
'syntax-highlighting' \
|
||||
'prompt' \
|
||||
'python' \
|
||||
'git' \
|
||||
'openstack' \
|
||||
'aws' \
|
||||
'yank'
|
||||
|
||||
#
|
||||
# Autosuggestions
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:autosuggestions:color' found ''
|
||||
|
||||
#
|
||||
# Editor
|
||||
#
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
zstyle ':prezto:module:editor' key-bindings 'emacs'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
# zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||
|
||||
# Allow the zsh prompt context to be shown.
|
||||
#zstyle ':prezto:module:editor' ps-context 'yes'
|
||||
|
||||
#
|
||||
# Git
|
||||
#
|
||||
|
||||
# Ignore submodules when they are 'dirty', 'untracked', 'all', or 'none'.
|
||||
# zstyle ':prezto:module:git:status:ignore' submodules 'all'
|
||||
|
||||
#
|
||||
# GNU Utility
|
||||
#
|
||||
|
||||
# Set the command prefix on non-GNU systems.
|
||||
# zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||
|
||||
#
|
||||
# History Substring Search
|
||||
#
|
||||
|
||||
# Set the query found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' found ''
|
||||
|
||||
# Set the query not found color.
|
||||
# zstyle ':prezto:module:history-substring-search:color' not-found ''
|
||||
|
||||
# Set the search globbing flags.
|
||||
# zstyle ':prezto:module:history-substring-search' globbing-flags ''
|
||||
|
||||
#
|
||||
# Pacman
|
||||
#
|
||||
|
||||
# Set the Pacman frontend.
|
||||
# zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||
|
||||
#
|
||||
# Prompt
|
||||
#
|
||||
|
||||
# Set the prompt theme to load.
|
||||
# Setting it to 'random' loads a random theme.
|
||||
# Auto set to 'off' on dumb terminals.
|
||||
zstyle ':prezto:module:prompt' theme 'sorinmod'
|
||||
|
||||
# Set how themes that use promptpwd function display the pwd, can be 'short', 'long', or 'full'
|
||||
# zstyle ':prezto:module:prompt' pwd-length 'short'
|
||||
|
||||
#
|
||||
# Ruby
|
||||
#
|
||||
|
||||
# Auto switch the Ruby version on directory change.
|
||||
# zstyle ':prezto:module:ruby:chruby' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Python
|
||||
#
|
||||
|
||||
# Auto switch the Python virtualenv on directory change.
|
||||
zstyle ':prezto:module:python:virtualenv' auto-switch 'yes'
|
||||
|
||||
#
|
||||
# Screen
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:screen:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:screen:auto-start' remote 'yes'
|
||||
|
||||
#
|
||||
# SSH
|
||||
#
|
||||
|
||||
# Set the SSH identities to load into the agent.
|
||||
# zstyle ':prezto:module:ssh:load' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||
|
||||
#
|
||||
# Syntax Highlighting
|
||||
#
|
||||
|
||||
# Set syntax highlighters.
|
||||
# By default, only the main highlighter is enabled.
|
||||
zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||
'main' \
|
||||
'brackets' \
|
||||
'pattern' \
|
||||
'line' \
|
||||
'root'
|
||||
#
|
||||
# Set syntax highlighting styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' styles \
|
||||
# 'builtin' 'bg=blue' \
|
||||
# 'command' 'bg=blue' \
|
||||
# 'function' 'bg=blue'
|
||||
#
|
||||
# Set syntax pattern styles.
|
||||
# zstyle ':prezto:module:syntax-highlighting' pattern \
|
||||
# 'rm*-rf*' 'fg=white,bold,bg=red'
|
||||
|
||||
#
|
||||
# Terminal
|
||||
#
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the window title format.
|
||||
# zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
|
||||
|
||||
# Set the tab title format.
|
||||
zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
|
||||
|
||||
# Set the terminal multiplexer title format.
|
||||
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
|
||||
|
||||
#
|
||||
# Tmux
|
||||
#
|
||||
|
||||
# Auto start a session when Zsh is launched in a local terminal.
|
||||
# zstyle ':prezto:module:tmux:auto-start' local 'yes'
|
||||
|
||||
# Auto start a session when Zsh is launched in a SSH connection.
|
||||
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
|
||||
|
||||
# Integrate with iTerm2.
|
||||
# zstyle ':prezto:module:tmux:iterm' integrate 'yes'
|
||||
|
||||
# Set the default session name:
|
||||
# zstyle ':prezto:module:tmux:session' name 'YOUR DEFAULT SESSION NAME'
|
||||
|
||||
#
|
||||
# AWS
|
||||
#
|
||||
|
||||
zstyle ':prezto:module:aws' output 'table'
|
||||
zstyle ':prezto:module:aws' profile 'default'
|
||||
|
64
.zshrc
Normal file
64
.zshrc
Normal file
@ -0,0 +1,64 @@
|
||||
# Source Prezto.
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
fi
|
||||
|
||||
# ZSH customs
|
||||
|
||||
export PATH=$PATH:~/bin
|
||||
setopt clobber
|
||||
zstyle ':completion:*' rehash true
|
||||
|
||||
##### aliases ######
|
||||
|
||||
alias ccat="pygmentize -O style=native -g "
|
||||
alias chromium-socks='chromium --proxy-server=socks://localhost:3000'
|
||||
alias curlmobile='curl -A "Mozilla/5.0 (Linux; U; Android 2.3.6; en-us; Nexus S Build/GRK39F) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1" '
|
||||
alias curlr='curl -o /dev/null -w "\n\nCode: \t%{http_code}\n\nDNS: \t%{time_namelookup}\nConnect:\t%{time_connect}\nStartTransfer:\t%{time_starttransfer} (PreTransfer:%{time_pretransfer})\nTotal: \t%{time_total}\n\n"'
|
||||
alias duh='du -sch .[!.]* *'
|
||||
alias gb="git checkout \$(git branch -vv | fzf +m | awk '{print \$1}')"
|
||||
alias open='xdg-open'
|
||||
alias yayU='yay -Suy --noconfirm'
|
||||
|
||||
##### tilix #####
|
||||
|
||||
if [ $TILIX_ID ] || [ $VTE_VERSION ] ; then
|
||||
source /etc/profile.d/vte.sh
|
||||
fi
|
||||
|
||||
##### editor #####
|
||||
|
||||
export EDITOR='vim'
|
||||
export VISUAL='vim'
|
||||
export PAGER='less'
|
||||
|
||||
##### venvs ######
|
||||
|
||||
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python
|
||||
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv
|
||||
export WORKON_HOME=~/.virtualenvs
|
||||
source /usr/bin/virtualenvwrapper.sh
|
||||
|
||||
##### fzf #####
|
||||
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
source /usr/share/fzf/completion.zsh
|
||||
|
||||
fzf-file-widget-hidden () {
|
||||
fd --type f --hidden --follow --exclude .git --exclude .cache | fzf
|
||||
}
|
||||
|
||||
export FZF_DEFAULT_COMMAND="fd --type f --follow"
|
||||
export FZF_DEFAULT_OPTS="-m --reverse --bind 'ctrl-o:execute(xdg-open {})+abort,ctrl-e:execute({})+abort,ctrl-y:execute(echo {} | xclip -selection clipboard -in)+abort'"
|
||||
export FZF_CTRL_T_OPTS="--no-height --preview '[[ \$(file --mime {}) =~ binary ]] && echo {} is a binary file || pygmentize {} 2> /dev/null | head -500'"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
|
||||
bindkey '^P' fzf-file-widget
|
||||
zle -N fzf-file-widget-hidden
|
||||
bindkey '^H' fzf-file-widget-hidden
|
||||
|
||||
## SSH agent
|
||||
|
||||
if [ -z $SSH_AUTH_SOCK ] && [ -S "${XDG_RUNTIME_DIR}/ssh-agent.socket" ]; then
|
||||
export SSH_AUTH_SOCK="${XDG_RUNTIME_DIR}/ssh-agent.socket"
|
||||
fi
|
104
dconf/tilix.ini
Normal file
104
dconf/tilix.ini
Normal file
@ -0,0 +1,104 @@
|
||||
# dconf dump /com/gexperts/Tilix/ > tilix.ini
|
||||
# dconf load /com/gexperts/Tilix/ < tilix.ini
|
||||
|
||||
[/]
|
||||
enable-wide-handle=false
|
||||
prompt-on-close=true
|
||||
prompt-on-delete-profile=true
|
||||
quake-hide-lose-focus=true
|
||||
quake-specific-monitor=0
|
||||
sidebar-on-right=false
|
||||
terminal-title-show-when-single=false
|
||||
terminal-title-style='none'
|
||||
theme-variant='light'
|
||||
unsafe-paste-alert=false
|
||||
use-overlay-scrollbar=true
|
||||
warn-vte-config-issue=false
|
||||
window-style='disable-csd-hide-toolbar'
|
||||
|
||||
[keybindings]
|
||||
session-add-down='<Primary><Shift>o'
|
||||
session-add-right='<Primary><Shift>e'
|
||||
session-open='disabled'
|
||||
session-synchronize-input='<Primary><Alt>r'
|
||||
|
||||
[profiles]
|
||||
list=['2b7c4080-0ddd-46c5-8f23-563fd3ba789d', '61be1191-edef-4f84-b2f5-0dfadcc5ad61']
|
||||
|
||||
[profiles/2b7c4080-0ddd-46c5-8f23-563fd3ba789d]
|
||||
background-color='#073642'
|
||||
background-transparency-percent=0
|
||||
badge-color='#AC7EA8'
|
||||
badge-color-set=true
|
||||
bold-color-set=false
|
||||
cursor-blink-mode='on'
|
||||
cursor-colors-set=false
|
||||
cursor-shape='underline'
|
||||
dim-transparency-percent=0
|
||||
font='Roboto Mono 9'
|
||||
foreground-color='#BABABDBDB6B6'
|
||||
highlight-colors-set=false
|
||||
palette=['#073642', '#CC0000', '#4D9A05', '#C3A000', '#3464A3', '#754F7B', '#05979A', '#D3D6CF', '#000000', '#EF2828', '#89E234', '#FBE84F', '#729ECF', '#AC7EA8', '#34E2E2', '#EDEDEB']
|
||||
scrollback-unlimited=true
|
||||
terminal-bell='none'
|
||||
use-system-font=false
|
||||
use-theme-colors=false
|
||||
visible-name='Por defecto'
|
||||
|
||||
[profiles/61be1191-edef-4f84-b2f5-0dfadcc5ad61]
|
||||
allow-bold=true
|
||||
automatic-switch=@as []
|
||||
background-color='#002B36'
|
||||
background-transparency-percent=25
|
||||
backspace-binding='ascii-delete'
|
||||
badge-color='#ffffff'
|
||||
badge-color-set=false
|
||||
badge-font='Monospace 12'
|
||||
badge-position='northeast'
|
||||
badge-text=''
|
||||
badge-use-system-font=true
|
||||
bold-color='#ffffff'
|
||||
bold-color-set=false
|
||||
bold-is-bright=true
|
||||
cell-height-scale=1.0
|
||||
cell-width-scale=1.0
|
||||
cjk-utf8-ambiguous-width='narrow'
|
||||
cursor-background-color='#000000'
|
||||
cursor-blink-mode='on'
|
||||
cursor-colors-set=false
|
||||
cursor-foreground-color='#ffffff'
|
||||
cursor-shape='underline'
|
||||
custom-command=''
|
||||
custom-hyperlinks=@as []
|
||||
default-size-columns=80
|
||||
default-size-rows=24
|
||||
delete-binding='delete-sequence'
|
||||
dim-transparency-percent=19
|
||||
draw-margin=80
|
||||
encoding='UTF-8'
|
||||
exit-action='close'
|
||||
font='Roboto Mono 9'
|
||||
foreground-color='#FCFCAFAF3E3E'
|
||||
highlight-background-color='#000000'
|
||||
highlight-colors-set=false
|
||||
highlight-foreground-color='#ffffff'
|
||||
login-shell=false
|
||||
notify-silence-enabled=false
|
||||
notify-silence-threshold=0
|
||||
palette=['#073642', '#DC322F', '#4E4E9A9A0606', '#F5F579790000', '#26268B8BD2D2', '#D33682', '#2AA198', '#EEE8D5', '#002B36', '#CB4B16', '#586E75', '#657B83', '#34346565A4A4', '#6C71C4', '#F5F579790000', '#FDF6E3']
|
||||
rewrap-on-resize=true
|
||||
scroll-on-keystroke=true
|
||||
scroll-on-output=false
|
||||
scrollback-lines=8192
|
||||
scrollback-unlimited=true
|
||||
select-by-word-chars='-,./?%&#:_'
|
||||
shortcut='disabled'
|
||||
show-scrollbar=true
|
||||
terminal-bell='none'
|
||||
terminal-title='${id}: ${title}'
|
||||
text-blink-mode='always'
|
||||
triggers=@as []
|
||||
use-custom-command=false
|
||||
use-system-font=false
|
||||
use-theme-colors=false
|
||||
visible-name='orange'
|
26
install.sh
Executable file
26
install.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd $(dirname $0)
|
||||
|
||||
echo "Installing dot files..."
|
||||
|
||||
rsync --exclude "dconf/" \
|
||||
--exclude ".vscode/" \
|
||||
--exclude "install.sh" \
|
||||
--exclude "LICENSE" \
|
||||
--exclude "README.md" \
|
||||
-hla --no-perms . ~
|
||||
|
||||
echo ""
|
||||
|
||||
if which dconf >/dev/null 2>&1; then
|
||||
echo -e "[INFO] Loading tilix config..."
|
||||
dconf load /com/gexperts/Tilix/ < dconf/tilix.ini
|
||||
else
|
||||
echo "[WARNING] dconf command not found"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
|
||||
cd - > /dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user