├── xorg ├── .Xresources ├── .xinitrc ├── .Xresources.dark └── .Xresources.light ├── nvim └── .config │ └── nvim │ ├── lua │ ├── autocmds.lua │ ├── options.lua │ ├── configs │ │ ├── lspconfig.lua │ │ ├── conform.lua │ │ └── lazy.lua │ ├── mappings.lua │ ├── chadrc.lua │ └── plugins │ │ └── init.lua │ ├── .stylua.toml │ ├── init.lua │ └── lazy-lock.json ├── top └── .toprc ├── bash ├── .bash_profile ├── .bashrc └── .shell_prompt.sh ├── compton └── .compton.conf ├── gnupg └── .gnupg │ └── gpg-agent.conf ├── new_mail.sh ├── watson_status.sh ├── checkmail.sh ├── systemd └── .config │ └── systemd │ └── user │ ├── checkmail.service │ ├── mpcparty.service │ ├── mpd.service │ ├── background.timer │ ├── grafana.service │ ├── checkmail.timer │ ├── background.service │ └── mpd-notification.service ├── mutt ├── .mutt │ ├── virtualmailboxes │ ├── account_gmail │ ├── local-date.py │ ├── tiny.pl │ ├── mailcap │ ├── mutt-colors-solarized-dark-16.muttrc │ └── mutt-colors-solarized-dark-256.muttrc └── .muttrc ├── .gitignore ├── wiki2html.sh ├── polybar └── .config │ └── polybar │ ├── scripts │ ├── memory.sh │ └── cpu.sh │ ├── launch.sh │ ├── vpn-networkmanager-status.sh │ └── config.ini ├── mpd └── .mpd │ ├── README.md │ └── mpd.conf ├── nsxiv └── .config │ └── nsxiv │ └── exec │ ├── image-info │ └── key-handler ├── i3 └── .config │ └── i3 │ ├── rofi_powermenu.sh │ ├── sound_change.sh │ ├── brightness.sh │ ├── mediaplayer │ └── config ├── R └── .Rprofile ├── BingDownloadImage.sh ├── ncmpcpp └── .ncmpcpp │ ├── bindings │ ├── config │ └── README.md ├── dunst └── .config │ └── dunst │ ├── lock-notifier.sh │ └── dunstrc ├── README.md ├── git └── .gitconfig ├── tmux ├── .tmux.theme └── .tmux.conf ├── cower └── .config │ └── cower │ └── config ├── ranger └── .config │ └── ranger │ ├── mime.types │ └── rifle.conf ├── termite └── .config │ └── termite │ ├── config │ ├── configGruv │ ├── configSolarizedLight │ └── configSolarizedDark ├── autolock.sh ├── notmuch └── .notmuch-config ├── watson_dmenu └── vim └── .vimrc /xorg/.Xresources: -------------------------------------------------------------------------------- 1 | .Xresources.dark -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/autocmds.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.autocmds" 2 | -------------------------------------------------------------------------------- /top/.toprc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cristianpb/dotfiles/HEAD/top/.toprc -------------------------------------------------------------------------------- /bash/.bash_profile: -------------------------------------------------------------------------------- 1 | if [ -f ~/.bashrc ]; then 2 | source ~/.bashrc 3 | fi 4 | -------------------------------------------------------------------------------- /compton/.compton.conf: -------------------------------------------------------------------------------- 1 | mark-ovredir-focused = true; 2 | inactive-opacity = 1; 3 | menu-opacity = 0.9; 4 | opacity-rule = [ "80:class_g = 'URxvt'" ]; 5 | #"50:name *= 'i3lock'" 6 | -------------------------------------------------------------------------------- /gnupg/.gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | enable-ssh-support 2 | max-cache-ttl 60480000 3 | default-cache-ttl 60480000 4 | pinentry-program /usr/bin/pinentry 5 | allow-preset-passphrase 6 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.options" 2 | 3 | -- add yours here! 4 | 5 | -- local o = vim.o 6 | -- o.cursorlineopt ='both' -- to enable cursorline! 7 | -------------------------------------------------------------------------------- /nvim/.config/nvim/.stylua.toml: -------------------------------------------------------------------------------- 1 | column_width = 120 2 | line_endings = "Unix" 3 | indent_type = "Spaces" 4 | indent_width = 2 5 | quote_style = "AutoPreferDouble" 6 | call_parentheses = "None" 7 | -------------------------------------------------------------------------------- /new_mail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | countG=$(ls $HOME/.mail/gmail/Inbox/new | wc -l) 4 | count=$((countG + countM)) 5 | 6 | if [[ -n "$count" && "$count" -gt 0 ]]; then 7 | echo " ${count}" 8 | else 9 | echo "" 10 | fi 11 | -------------------------------------------------------------------------------- /watson_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | watson_status=$(watson status -p) 4 | no_project="No project started" 5 | 6 | echo "$watson_status" 7 | 8 | #if [ "$watson_status" == "$no_project" ]; then 9 | # echo "Nothing" 10 | #fi 11 | -------------------------------------------------------------------------------- /checkmail.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | STATE=`nmcli networking connectivity` 4 | mailsync="mbsync --quiet gmail " 5 | 6 | if [ $STATE = 'full' ] 7 | then 8 | $mailsync 9 | exit 0 10 | fi 11 | echo "No internet connection." 12 | exit 0 13 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/checkmail.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=check mail 3 | RefuseManualStart=no 4 | RefuseManualStop=yes 5 | 6 | [Service] 7 | Type=oneshot 8 | ExecStart=%h/.dotfiles/checkmail.sh 9 | ExecStartPost=/usr/bin/notmuch new 10 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/lspconfig.lua: -------------------------------------------------------------------------------- 1 | require("nvchad.configs.lspconfig").defaults() 2 | 3 | local servers = { "html", "cssls", "pyright", "ruff", "lua_ls" } 4 | vim.lsp.enable(servers) 5 | 6 | -- read :h vim.lsp.config for changing options of lsp servers 7 | -------------------------------------------------------------------------------- /mutt/.mutt/virtualmailboxes: -------------------------------------------------------------------------------- 1 | virtual-mailboxes "inbox" "notmuch://?query=tag:inbox" 2 | virtual-mailboxes "archive" "notmuch://?query=tag:archive" 3 | virtual-mailboxes "sent" "notmuch://?query=tag:sent" 4 | virtual-mailboxes "newsletters" "notmuch://?query=tag:newsletters" 5 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/mpcparty.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=MPCParty 3 | After=mpd.service 4 | 5 | [Service] 6 | Type=simple 7 | Restart=always 8 | ExecStart=/usr/bin/node %h/Documents/node/MPCParty/server.js 9 | 10 | [Install] 11 | WantedBy=default.target 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ranger/config/ranger/bookmarks 2 | ranger/config/ranger/history 3 | ranger/config/ranger/tagged 4 | mutt/.mutt/alias 5 | mutt/.mutt/cache 6 | mutt/.mutt/mailboxes 7 | mpd/.mpd/mpd.db 8 | mpd/.mpd/mpd.pid 9 | mpd/.mpd/mpdstate 10 | ncmpcpp/.ncmpcpp/error.log 11 | APIs 12 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/mpd.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Music Player Daemon 3 | After=network.target sound.target 4 | 5 | [Service] 6 | ExecStart=/usr/bin/mpd --no-daemon %h/.mpd/mpd.conf 7 | ExecStop=/usr/bin/pkill mpd 8 | 9 | [Install] 10 | WantedBy=default.target 11 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/background.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Change background every day 3 | RefuseManualStart=no 4 | RefuseManualStop=no 5 | 6 | [Timer] 7 | Persistent=false 8 | OnBootSec=5min 9 | OnUnitActiveSec=1d 10 | Unit=background.service 11 | 12 | [Install] 13 | WantedBy=default.target 14 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/grafana.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Grafana service 3 | 4 | [Service] 5 | ExecStart=/usr/bin/grafana-server --config "%h/.config/grafana/grafana.ini" --homepath "/usr/share/grafana" 6 | ExecStop=/usr/bin/pkill grafana-server 7 | 8 | [Install] 9 | WantedBy=default.target 10 | -------------------------------------------------------------------------------- /wiki2html.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | env HUGO_baseURL="file:///home/${USER}/Documents/vimwiki/_site/" \ 4 | hugo --themesDir ~/Documents/ -t vimwiki \ 5 | --config ~/Documents/vimwiki/config.toml \ 6 | --contentDir ~/Documents/vimwiki/content \ 7 | -d ~/Documents/vimwiki/_site --quiet > /dev/null 8 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/memory.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case "$1" in 4 | --popup) 5 | notify-send "Memory (%)" "$(ps axch -o cmd:10,pmem k -pmem | head | awk '$0=$0"%"' )" 6 | ;; 7 | *) 8 | echo "$(free -h --si | awk '/^Mem:/ {print $3 "/" $2}')" 9 | ;; 10 | esac 11 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/checkmail.timer: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Check Mail every fifteen minutes 3 | RefuseManualStart=no 4 | RefuseManualStop=no 5 | 6 | [Timer] 7 | Persistent=false 8 | OnBootSec= 5min 9 | OnUnitActiveSec= 10min 10 | Unit=checkmail.service 11 | 12 | [Install] 13 | WantedBy=default.target 14 | -------------------------------------------------------------------------------- /xorg/.xinitrc: -------------------------------------------------------------------------------- 1 | # Paste using middle clic 2 | syndaemon -i 0.5 -t -K -R -d 3 | # Hide pointer when no needed 4 | #unclutter & 5 | # SSH agent 6 | eval "$(ssh-agent -s)" 7 | # Network Manager applet 8 | #>> /dev/null which nm-applet && nm-applet & 9 | #>> /dev/null which blueman-applet && blueman-applet & 10 | exec i3 11 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/background.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Change screen image 3 | RefuseManualStart=no 4 | RefuseManualStop=yes 5 | 6 | [Service] 7 | Environment="DISPLAY=:0" 8 | Type=oneshot 9 | ExecStart=/usr/bin/bash %h/.dotfiles/BingDownloadImage.sh 10 | ExecStartPost=/usr/bin/feh --bg-scale %h/Pictures/Wallpaper/wallpaper.jpg 11 | -------------------------------------------------------------------------------- /systemd/.config/systemd/user/mpd-notification.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=MPD Notification 3 | After=mpd.service 4 | 5 | [Service] 6 | Type=simple 7 | Restart=always 8 | ExecStart=/usr/bin/mpd-notification -m %h/Music_clean/ -s 100 -t 4 9 | RestartSec=30 10 | ExecStop=/usr/bin/pkill mpd-notification 11 | 12 | [Install] 13 | WantedBy=default.target 14 | -------------------------------------------------------------------------------- /polybar/.config/polybar/scripts/cpu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | case "$1" in 4 | --popup) 5 | notify-send "CPU time (%)" "$(ps axch -o cmd:10,pcpu k -pcpu | head | awk '$0=$0"%"' )" 6 | ;; 7 | *) 8 | echo " $(grep 'cpu ' /proc/stat | awk '{cpu_usage=($2+$4)*100/($2+$4+$5)} END {printf "%0.0f%", cpu_usage}')" 9 | ;; 10 | esac 11 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/conform.lua: -------------------------------------------------------------------------------- 1 | local options = { 2 | formatters_by_ft = { 3 | lua = { "stylua" }, 4 | -- css = { "prettier" }, 5 | -- html = { "prettier" }, 6 | }, 7 | 8 | -- format_on_save = { 9 | -- -- These options will be passed to conform.format() 10 | -- timeout_ms = 500, 11 | -- lsp_fallback = true, 12 | -- }, 13 | } 14 | 15 | return options 16 | -------------------------------------------------------------------------------- /mpd/.mpd/README.md: -------------------------------------------------------------------------------- 1 | # Music Player Daemon (MPD) server 2 | 3 | * Create mpd service file `~/.config/systemd/user/mpd.service` 4 | 5 | ``` 6 | [Unit] 7 | Description=Music Player Daemon 8 | After=network.target sound.target 9 | 10 | [Service] 11 | ExecStart=/usr/bin/mpd --no-daemon /home/arch/.mpdconf 12 | 13 | [Install] 14 | WantedBy=default.target 15 | ``` 16 | 17 | * enable service `systemctl --user enable mpd.service` 18 | -------------------------------------------------------------------------------- /polybar/.config/polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Terminate already running bar instances 4 | killall -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -x polybar >/dev/null; do sleep 1; done 8 | 9 | source ~/.dotfiles/APIs 10 | # Launch bar1 and bar2 11 | for m in $(polybar --list-monitors | cut -d":" -f1); do 12 | MONITOR=$m polybar --reload top & 13 | done 14 | 15 | echo "Bars launched..." 16 | -------------------------------------------------------------------------------- /polybar/.config/polybar/vpn-networkmanager-status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | COLOR_CONNECTED="#a5fb8f" 4 | COLOR_CONNECTING="#FAE3B0" 5 | COLOR_DISCONNECTED="#f087bd" 6 | 7 | vpn="$(nmcli -t -f name,type connection show --order name --active 2>/dev/null | grep wireguard | head -1 | cut -d ':' -f 1)" 8 | 9 | if [ -n "$vpn" ]; then 10 | echo "%{F$COLOR_CONNECTED}%{F-}" 11 | else 12 | echo "%{F$COLOR_DISCONNECTED} No VPN%{F-}" && nmcli con up id VPNNP-cbe213 13 | fi 14 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/mappings.lua: -------------------------------------------------------------------------------- 1 | require "nvchad.mappings" 2 | 3 | -- add yours here 4 | 5 | local map = vim.keymap.set 6 | 7 | map("n", ";", ":", { desc = "CMD enter command mode" }) 8 | map("i", "jk", "") 9 | 10 | map("n", "", vim.cmd.bnext, { desc = "󰽙 Next buffer" }) 11 | map("n", "", vim.cmd.bprevious, { desc = "󰽙 Previous buffer" }) 12 | 13 | map("n", "", ":NvimTreeToggle", { desc = "NvimTree Toggle" }) 14 | 15 | -- map({ "n", "i", "v" }, "", " w ") 16 | -------------------------------------------------------------------------------- /mpd/.mpd/mpd.conf: -------------------------------------------------------------------------------- 1 | # See: /usr/share/doc/mpd/mpdconf.example 2 | 3 | pid_file "~/.mpd/mpd.pid" 4 | db_file "~/.mpd/mpd.db" 5 | state_file "~/.mpd/mpdstate" 6 | playlist_directory "~/.mpd/playlists" 7 | music_directory "~/Music/" 8 | restore_paused "yes" 9 | port "6600" 10 | audio_output { 11 | type "pulse" 12 | name "pulse audio" 13 | } 14 | audio_output { 15 | type "fifo" 16 | name "my_fifo" 17 | path "/tmp/mpd.fifo" 18 | format "44100:16:2" 19 | } 20 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/chadrc.lua: -------------------------------------------------------------------------------- 1 | -- This file needs to have same structure as nvconfig.lua 2 | -- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua 3 | -- Please read that file to know all available options :( 4 | 5 | ---@type ChadrcConfig 6 | local M = {} 7 | 8 | M.base46 = { 9 | theme = "onedark", 10 | 11 | -- hl_override = { 12 | -- Comment = { italic = true }, 13 | -- ["@comment"] = { italic = true }, 14 | -- }, 15 | } 16 | 17 | -- M.nvdash = { load_on_startup = true } 18 | -- M.ui = { 19 | -- tabufline = { 20 | -- lazyload = false 21 | -- } 22 | --} 23 | 24 | return M 25 | -------------------------------------------------------------------------------- /nsxiv/.config/nsxiv/exec/image-info: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Example for ~/.config/sxiv/exec/image-info 4 | # Called by sxiv(1) whenever an image gets loaded, 5 | # with the name of the image file as its first argument. 6 | # The output is displayed in sxiv's status bar. 7 | 8 | s=" | " # field separator 9 | 10 | filename=$(basename "$1") 11 | filesize=$(du -Hh "$1" | cut -f 1) 12 | 13 | # The '[0]' stands for the first frame of a multi-frame file, e.g. gif. 14 | geometry=$(identify -format '%wx%h' "$1[0]") 15 | 16 | tags=$(exiv2 -q pr -pi "$1" | awk '$1~"Keywords" { printf("%s,", $4); }') 17 | tags=${tags%,} 18 | 19 | echo "${filesize}${s}${geometry}${tags:+$s}${tags}${s}${filename}" 20 | -------------------------------------------------------------------------------- /i3/.config/i3/rofi_powermenu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | action=$(echo -e "Lock Screen\nLogout\nShutdown\nSuspend\nScreenshot\nReboot" | rofi -dmenu -p "power:") 3 | 4 | if [[ "$action" == "Lock Screen" ]] 5 | then 6 | $HOME/.dotfiles/blur.sh 7 | fi 8 | 9 | if [[ "$action" == "Logout" ]] 10 | then 11 | i3-msg exit 12 | fi 13 | 14 | if [[ "$action" == "Shutdown" ]] 15 | then 16 | shutdown now 17 | fi 18 | 19 | if [[ "$action" == "Suspend" ]] 20 | then 21 | systemctl suspend 22 | fi 23 | 24 | if [[ "$action" == "Screenshot" ]] 25 | then 26 | scrot -s ~/Images/`date +%Y-%m-%d_%H:%M:%S`.png 27 | fi 28 | 29 | 30 | if [[ "$action" == "Reboot" ]] 31 | then 32 | reboot 33 | fi 34 | -------------------------------------------------------------------------------- /R/.Rprofile: -------------------------------------------------------------------------------- 1 | options(repos=structure(c(CRAN="https://cran.univ-paris1.fr/"))) 2 | library('colorout') 3 | setOutputColors256( 4 | normal = 39, 5 | number = 51, 6 | string = 79, 7 | const = 75, 8 | error = c(1, 0, 1), 9 | warn = c(1, 0, 100), 10 | verbose = FALSE 11 | ) 12 | library('setwidth') 13 | # Copy this to your .Rprofile 14 | #library('colorout') 15 | #setOutputColors256( 16 | # normal = 40, 17 | # number = 214, 18 | # string = 85, 19 | # const = 35, 20 | # stderror = 45, 21 | # error = c(1, 0, 1), 22 | # warn = c(1, 0, 100), 23 | # verbose = F 24 | #) 25 | -------------------------------------------------------------------------------- /BingDownloadImage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #Market options: en-US, zh-CN, ja-JP, en-AU, en-UK, de-DE, en-NZ 3 | #Resolution options: 1366×768, 1920×1080, 1920×1200 4 | Market="en-US" 5 | Resolution="1920x1080" 6 | Directory="$HOME/Pictures/Wallpaper/" 7 | FileName="wallpaper.jpg" 8 | FileNamepng="wallpaper.png" 9 | 10 | if [ ! -f /tmp/foo.txt ]; then 11 | echo "Creating folder"; mkdir -pv "$Directory"; 12 | fi 13 | 14 | URL=($(curl -s 'http://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1&mkt='"$Market" | python -c "import json,sys;obj=json.load(sys.stdin);print(obj['images'][0]['urlbase']);")) 15 | ImageURL="http://www.bing.com"/$URL"_"$Resolution".jpg" 16 | echo "Downloading Bing image to: $Directory" 17 | curl -so "$Directory"/$FileName "$ImageURL" 18 | magick "$Directory"/$FileName "$Directory"/$FileNamepng 19 | -------------------------------------------------------------------------------- /ncmpcpp/.ncmpcpp/bindings: -------------------------------------------------------------------------------- 1 | # the t key isn't used and it's easier to press than /, so lets use it 2 | def_key "t" 3 | find 4 | def_key "t" 5 | find_item_forward 6 | 7 | def_key "+" 8 | show_clock 9 | def_key "=" 10 | volume_up 11 | 12 | def_key "j" 13 | scroll_down 14 | def_key "k" 15 | scroll_up 16 | 17 | def_key "ctrl-b" 18 | page_up 19 | #push_characters "kkkkkkkkkkkkkkk" 20 | def_key "ctrl-f" 21 | page_down 22 | #push_characters "jjjjjjjjjjjjjjj" 23 | 24 | def_key "h" 25 | previous_column 26 | def_key "l" 27 | next_column 28 | 29 | def_key "." 30 | show_lyrics 31 | 32 | def_key "n" 33 | next_found_item 34 | def_key "N" 35 | previous_found_item 36 | 37 | # not used but bound 38 | def_key "J" 39 | move_sort_order_down 40 | def_key "K" 41 | move_sort_order_up 42 | -------------------------------------------------------------------------------- /mutt/.mutt/account_gmail: -------------------------------------------------------------------------------- 1 | color status cyan default 2 | 3 | # Name to use in header 4 | set realname = "Cristian Perez" 5 | 6 | # Signature 7 | set signature="~/.mutt/signature" 8 | 9 | # Set folders 10 | set spoolfile = "+gmail/Inbox" 11 | set mbox = "+gmail/archives" 12 | set postponed = "+gmail/drafts" 13 | set record = "+gmail/sent" 14 | set trash = "+gmail/trash" 15 | 16 | set from = "felipebrokate@gmail.com" 17 | 18 | macro index "unset wait_keynotify-send 'Sync gmail'; mbsync --quiet --quiet gmail | xargs notify-send 'Gmail synced' &" "run mbsync to sync mail for this account" 19 | 20 | # looks like you must explicitly do this to make sure you 21 | # don't save local copies of sent mail >:( 22 | unset record 23 | 24 | macro index,pager A \ 25 | "+gmail/archives" \ 26 | "move message to the archive" 27 | -------------------------------------------------------------------------------- /dunst/.config/dunst/lock-notifier.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | for p in $(seq 0 2 100); do 6 | dunstify --icon preferences-desktop-screensaver \ 7 | -h int:value:$p \ 8 | -h 'string:hlcolor:#ff4444' \ 9 | -h string:x-dunst-stack-tag:progress-lock \ 10 | --timeout=500 "about to lock screen ..." "move or use corners" 11 | sleep 0.05 12 | done 13 | 14 | 15 | 16 | 17 | #!/bin/sh 18 | 19 | set -e 20 | 21 | primary=$(xrandr | grep " primary" | cut -f1 -d " " | head -n 1) 22 | 23 | # decreasing brightness 24 | trap "xrandr --output $primary --gamma 1" EXIT 25 | for g in $(LANG=C seq 1 -0.02 0.4) ; do 26 | xrandr --output $primary --brightness $g 27 | sleep 0.01 28 | done 29 | 30 | # increasing brightness 31 | for g in $(LANG=C seq 0.4 +0.02 1) ; do 32 | xrandr --output $primary --brightness $g 33 | sleep 0.01 34 | done 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | 3 | This dotfiles have my installation instruction for Arch Linux and the configuration for my essential programs. The `master` branch contains a configuration for Arch linux, `ubuntu` for ubuntu OS and the `OSX` branch contains instruction to configure OSX programs such as mutt, mbsync, pass. 4 | 5 | ![dofiles](http://dotshare.it/public/images/uploads/8372.png) 6 | ![dofiles](http://dotshare.it/public/images/uploads/8287.png) 7 | ![dofiles](http://dotshare.it/public/images/uploads/8371.png) 8 | 9 | ## Install 10 | 11 | Fetch dotfiles from github: 12 | 13 | ``` 14 | git clone https://github.com/cristianpb/dotfiles ~/.dotfiles 15 | ``` 16 | 17 | Manually install files: 18 | 19 | ``` 20 | stow vim 21 | ``` 22 | 23 | Automatic install: 24 | 25 | ``` 26 | for d in $(ls -d */ | cut -f1 -d '/'); 27 | do 28 | ( stow "$d" ) 29 | done 30 | ``` 31 | 32 | ## Dependencies 33 | 34 | `stow neovim pynvim bash-completion` 35 | -------------------------------------------------------------------------------- /i3/.config/i3/sound_change.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # changeVolume 3 | 4 | # Arbitrary but unique message tag 5 | msgTag="myvolume" 6 | 7 | # Change the volume using alsa(might differ if you use PulseAudio) 8 | amixer -c 0 set Master "$@" > /dev/null 9 | 10 | # Query amixer for the current volume and whether or not the speaker is muted 11 | volume="$(amixer -c 0 get Master | tail -1 | awk '{print $4}' | sed 's/[^0-9]*//g')" 12 | mute="$(amixer -c 0 get Master | tail -1 | awk '{print $6}' | sed 's/[^a-z]*//g')" 13 | if [[ $volume == 0 || "$mute" == "off" ]]; then 14 | # Show the sound muted notification 15 | dunstify -a "changeVolume" -u low -i audio-volume-muted -h string:x-dunst-stack-tag:$msgTag "Volume muted" 16 | else 17 | # Show the volume notification 18 | dunstify -a "changeVolume" -u low -i audio-volume-high -h string:x-dunst-stack-tag:$msgTag \ 19 | -h int:value:"$volume" "Volume: ${volume}%" 20 | fi 21 | 22 | # Play the volume changed sound 23 | canberra-gtk-play -i audio-volume-change -d "changeVolume" 24 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/configs/lazy.lua: -------------------------------------------------------------------------------- 1 | return { 2 | defaults = { lazy = true }, 3 | install = { colorscheme = { "nvchad" } }, 4 | 5 | ui = { 6 | icons = { 7 | ft = "", 8 | lazy = "󰂠 ", 9 | loaded = "", 10 | not_loaded = "", 11 | }, 12 | }, 13 | 14 | performance = { 15 | rtp = { 16 | disabled_plugins = { 17 | "2html_plugin", 18 | "tohtml", 19 | "getscript", 20 | "getscriptPlugin", 21 | "gzip", 22 | "logipat", 23 | "netrw", 24 | "netrwPlugin", 25 | "netrwSettings", 26 | "netrwFileHandlers", 27 | "matchit", 28 | "tar", 29 | "tarPlugin", 30 | "rrhelper", 31 | "spellfile_plugin", 32 | "vimball", 33 | "vimballPlugin", 34 | "zip", 35 | "zipPlugin", 36 | "tutor", 37 | "rplugin", 38 | "syntax", 39 | "synmenu", 40 | "optwin", 41 | "compiler", 42 | "bugreport", 43 | "ftplugin", 44 | }, 45 | }, 46 | }, 47 | } 48 | -------------------------------------------------------------------------------- /mutt/.mutt/local-date.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Copyright 2011 by Brian C. Lane 4 | """ 5 | import sys 6 | import email 7 | 8 | raw_msg = sys.stdin.read() 9 | msg = email.message_from_string(raw_msg) 10 | date = msg.get('Date', None) 11 | if date: 12 | from email.utils import mktime_tz, parsedate_tz, formatdate 13 | 14 | try: 15 | # Convert to local TZ 16 | tz_tuple = parsedate_tz(date) 17 | epoch_time = mktime_tz(tz_tuple) 18 | msg.add_header('Local-Date', formatdate( epoch_time, localtime=True )) 19 | 20 | #from cStringIO import StringIO 21 | try: 22 | from StringIO import StringIO 23 | except ImportError: 24 | from io import StringIO 25 | from email.generator import Generator 26 | fp = StringIO() 27 | g = Generator(fp, mangle_from_=False, maxheaderlen=200) 28 | g.flatten(msg) 29 | sys.stdout.write(fp.getvalue()) 30 | except: 31 | import traceback 32 | print(traceback.format_exc()) 33 | sys.stdout.write(raw_msg) 34 | else: 35 | # just write it out 36 | sys.stdout.write(raw_msg) 37 | -------------------------------------------------------------------------------- /git/.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | editor = vim 3 | excludesfile = ~/.gitignore 4 | [color] 5 | ui = auto 6 | [help] 7 | autocorrect = 1 8 | [alias] 9 | co = checkout 10 | db = "!f() { [ -n \"$1\" ] && git branch -d $1 && git push origin :$1; }; f" 11 | dbf = "!f() { [ -n \"$1\" ] && git branch -D $1 && git push origin :$1; }; f" 12 | dc = diff --cached 13 | lg = log --oneline --decorate --all --graph -30 14 | pr = !git push -u && hub pull-request 15 | st = status 16 | tg = "!f() { [ -n \"$1\" ] && git tag -s -m $1 $1; }; f" 17 | up = !git fetch origin && git rebase origin/master 18 | co-pr = "!f() { git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1; }; f" 19 | merge-pr = "!f() { git fetch origin pull/$1/head:pr/$1 && git merge pr/$1; }; f" 20 | recommit = "!f() { git commit --amend --no-edit; }; f" 21 | #[merge] 22 | # ff = only 23 | [pull] 24 | rebase = true 25 | [push] 26 | default = current 27 | [status] 28 | branch = 1 29 | short = 1 30 | [user] 31 | email = 18708179+cristianpb@users.noreply.github.com 32 | name = cristianpb 33 | signingkey = 12B63BB95CBF4D90F5EBC02613BD3280B582F924 34 | [commit] 35 | gpgsign = true 36 | -------------------------------------------------------------------------------- /nvim/.config/nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" 2 | vim.g.mapleader = "," 3 | 4 | 5 | -- bootstrap lazy and all plugins 6 | local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" 7 | 8 | if not vim.uv.fs_stat(lazypath) then 9 | local repo = "https://github.com/folke/lazy.nvim.git" 10 | vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } 11 | end 12 | 13 | vim.opt.rtp:prepend(lazypath) 14 | 15 | local lazy_config = require "configs.lazy" 16 | 17 | -- load plugins 18 | require("lazy").setup({ 19 | { 20 | "NvChad/NvChad", 21 | lazy = false, 22 | branch = "v2.5", 23 | import = "nvchad.plugins", 24 | }, 25 | { import = "plugins" }, 26 | }, lazy_config) 27 | 28 | -- load theme 29 | dofile(vim.g.base46_cache .. "defaults") 30 | dofile(vim.g.base46_cache .. "statusline") 31 | 32 | require "options" 33 | require "autocmds" 34 | 35 | vim.schedule(function() 36 | require "mappings" 37 | end) 38 | 39 | vim.keymap.set('t', '', [[]]) 40 | --vim.keymap.set('n', ':bnext', [[]]) 41 | 42 | --vim.keymap.set("n", "", vim.cmd.bnext, { desc = "󰽙 Next buffer" }) 43 | --vim.keymap.set("n", "", vim.cmd.bprevious, { desc = "󰽙 Previous buffer" }) 44 | 45 | 46 | -------------------------------------------------------------------------------- /nsxiv/.config/nsxiv/exec/key-handler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Example for $XDG_CONFIG_HOME/sxiv/exec/key-handler 4 | # Called by sxiv(1) after the external prefix key (C-x by default) is pressed. 5 | # The next key combo is passed as its first argument. Passed via stdin are the 6 | # images to act upon, one path per line: all marked images, if in thumbnail 7 | # mode and at least one image has been marked, otherwise the current image. 8 | # sxiv(1) blocks until this script terminates. It then checks which images 9 | # have been modified and reloads them. 10 | 11 | # The key combo argument has the following form: "[C-][M-][S-]KEY", 12 | # where C/M/S indicate Ctrl/Meta(Alt)/Shift modifier states and KEY is the X 13 | # keysym as listed in /usr/include/X11/keysymdef.h without the "XK_" prefix. 14 | 15 | #!/bin/sh 16 | while read file 17 | do 18 | case "$1" in 19 | "C-d") 20 | mv "$file" ~/.trash ;; 21 | "C-r") 22 | convert -rotate 90 "$file" "$file" ;; 23 | "C-c") 24 | echo -n "$file" | xclip -selection clipboard ;; 25 | "C-w") 26 | nitrogen --save --set-zoom-fill "$file" ;; 27 | esac 28 | done 29 | 30 | #"C-c") echo -n "$file" | xclip -selection clipboard ;; 31 | #"C-r") while read file; do rawtherapee "$file" & done ;; 32 | -------------------------------------------------------------------------------- /tmux/.tmux.theme: -------------------------------------------------------------------------------- 1 | # This tmux statusbar config was created by tmuxline.vim 2 | # on Sat, 07 Nov 2020 3 | 4 | set -g status-justify "centre" 5 | set -g status "on" 6 | set -g status-left-style "none" 7 | set -g message-command-style "fg=#a89984,bg=#504945" 8 | set -g status-right-style "none" 9 | set -g pane-active-border-style "fg=#a89984" 10 | set -g status-style "none,bg=#3c3836" 11 | set -g message-style "fg=#a89984,bg=#504945" 12 | set -g pane-border-style "fg=#504945" 13 | set -g status-right-length "100" 14 | set -g status-left-length "100" 15 | setw -g window-status-activity-style "underscore,fg=#a89984,bg=#3c3836" 16 | setw -g window-status-separator "" 17 | setw -g window-status-style "none,fg=#a89984,bg=#3c3836" 18 | set -g status-left "#[fg=#282828,bg=#a89984] #S #[fg=#a89984,bg=#504945,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#504945] #(~/.dotfiles/new_mail.sh) #[fg=#504945,bg=#3c3836,nobold,nounderscore,noitalics]" 19 | set -g status-right "#[fg=#a89984,bg=#3c3836,nobold,nounderscore,noitalics]#[fg=#282828,bg=#a89984] %R " 20 | setw -g window-status-format "#[fg=#3c3836,bg=#3c3836,nobold,nounderscore,noitalics]#[default] #W #[fg=#3c3836,bg=#3c3836,nobold,nounderscore,noitalics]" 21 | setw -g window-status-current-format "#[fg=#3c3836,bg=#504945,nobold,nounderscore,noitalics]#[fg=#a89984,bg=#504945] #F #W #[fg=#504945,bg=#3c3836,nobold,nounderscore,noitalics]" 22 | -------------------------------------------------------------------------------- /mutt/.mutt/tiny.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | ################################### 3 | # By: Ventz Petkov # 4 | # Date: 01-05-11 # 5 | # Last: 01-02-13 # 6 | # Parses HTML + Long URLs in MUTT # 7 | ################################### 8 | 9 | use URI::Escape; 10 | $file = $ARGV[0]; 11 | @text = (); 12 | 13 | # Only shorten URLs at least this length or more 14 | $tinyurltrigger = 40; 15 | 16 | # If we pass a 2nd argument, it means we want to force HTML check a 'text/plain' file 17 | if(defined($ARGV[1])) { open(FP, $file); for() { push(@text, $_); } close(FP); } 18 | # Otherwise, treat as HTML first 19 | else { @text = `elinks -dump -dump-charset iso-8859-15 -default-mime-type text/html $file`; } 20 | 21 | 22 | # Note: using while (instead of for) b/c for supposedly loads 23 | # everything into memory - no reason to load large emails into memory 24 | 25 | while (my $line = shift @text) { 26 | next if($line =~ /mailto:/); 27 | if($line =~ /(\w+:\/\/\S+)/) { 28 | my $link = $1; 29 | chomp($link); 30 | $size = length($link); 31 | if($size >= $tinyurltrigger) { 32 | eval { 33 | my $alarm = 5; 34 | alarm $alarm; 35 | my $link = uri_escape($link); 36 | $tinyurl=`wget -q -O - http://tinyurl.com/api-create.php?url=$link`; 37 | alarm 0; 38 | }; 39 | 40 | if ($@) { 41 | $line =~ s/(\w+:\/\/\S+)/$link (wget TimeOut)/; } 42 | else { $line =~ s/(\w+:\/\/\S+)/$tinyurl\n\t[>> $link <<]/; } 43 | } 44 | } 45 | print "$line"; 46 | } 47 | 48 | 49 | exit 0; 50 | -------------------------------------------------------------------------------- /cower/.config/cower/config: -------------------------------------------------------------------------------- 1 | # 2 | #mple cower config file 3 | # 4 | # All options here can be overriden with flags on the command line. All options 5 | # are case sensitive. This file will be read per user, and should be located at 6 | # $XDG_CONFIG_HOME/cower/config or $HOME/.config/cower/config. 7 | # 8 | 9 | # Use color in the output. This takes an optional arg of auto/never/always, 10 | # identical to the command line arg --color. If no arg is specified, this is 11 | # assumed to mean auto. 12 | Color = always 13 | 14 | # Connection timeout to be passed to curl. Setting this to 0 will disable 15 | # timeouts. 16 | #ConnectTimeout = 17 | 18 | # Always ignore out of date packages. This can be overridden on the command line 19 | # with --no-ignore-ood. 20 | #IgnoreOOD 21 | 22 | # Ignore the specified packages when checking for updates. Multiple arguments 23 | # to this option should be space delimited. Similar to the --ignore option, 24 | # this is in addition to any packages found in pacman's config. 25 | IgnorePkg = libdbusmenu-glib tor-browser-en libdbusmenu-gtk3 qt5-quick1 mongodb wiredtiger 26 | 27 | # Ignore the specified binary repos when checking for updates. Multiple arguments 28 | # to this option should be space delimited. 29 | #IgnoreRepo = 30 | 31 | # Absolute path to download and extract to. Parameter and tilde expansions are 32 | # honored here. 33 | TargetDir = /home/arch/.builds/ 34 | 35 | # Max number of threads cower will use. This is synonymous with the max number 36 | # of concurrent connections that will be opened to the AUR. 37 | #MaxThreads = 38 | 39 | # vim: set noet syn=conf 40 | -------------------------------------------------------------------------------- /ranger/.config/ranger/mime.types: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # 3 | # MIME-TYPES and the extensions that represent them 4 | # 5 | # This file contains additional mimetypes which I think ranger should have 6 | # by default. You can also use ~/.mime.types to add own types. 7 | # 8 | # Mimetypes are used for colorschemes and the builtin filetype detection 9 | # to execute files with the right program. 10 | # 11 | # You can find the official list of Media Types assigned by IANA here, 12 | # https://www.iana.org/assignments/media-types/media-types.xhtml 13 | # We deviate from these in certain cases when formats lack an official type 14 | # or the type is too generic, application/* for a video format for example. 15 | # In such cases we try to adhere to what file(1) returns. 16 | # 17 | ############################################################################### 18 | 19 | application/javascript js 20 | 21 | audio/musepack mpc mpp mp+ 22 | audio/ogg oga ogg spx opus 23 | audio/wavpack wv wvc 24 | audio/webm weba 25 | audio/x-ape ape 26 | audio/x-dsdiff dsf dff 27 | audio/x-flac flac 28 | 29 | image/vnd.djvu djvu 30 | image/webp webp 31 | 32 | message/rfc822 eml 33 | 34 | text/plain hs lhs rs ts tsx 35 | text/x-ruby rb 36 | text/x-shellscript sh 37 | 38 | video/ogg ogv ogm 39 | video/webm webm 40 | video/x-flv flv 41 | video/x-matroska mkv 42 | video/x-msvideo divx 43 | -------------------------------------------------------------------------------- /i3/.config/i3/brightness.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MON="eDP-1" # Discover monitor name with: xrandr | grep " connected" 4 | STEP=5 # Step Up/Down brightnes by: 5 = ".05", 10 = ".10", etc. 5 | 6 | CurrBright=$( xrandr --verbose --current | grep ^"$MON" -A5 | tail -n1 ) 7 | CurrBright="${CurrBright##* }" # Get brightness level with decimal place 8 | 9 | Left=${CurrBright%%"."*} # Extract left of decimal point 10 | Right=${CurrBright#*"."} # Extract right of decimal point 11 | 12 | MathBright="0" 13 | [[ "$Left" != 0 && "$STEP" -lt 10 ]] && STEP=10 # > 1.0, only .1 works 14 | [[ "$Left" != 0 ]] && MathBright="$Left"00 # 1.0 becomes "100" 15 | [[ "${#Right}" -eq 1 ]] && Right="$Right"0 # 0.5 becomes "50" 16 | MathBright=$(( MathBright + Right )) 17 | 18 | [[ "$1" == "Up" || "$1" == "+" ]] && MathBright=$(( MathBright + STEP )) 19 | [[ "$1" == "Down" || "$1" == "-" ]] && MathBright=$(( MathBright - STEP )) 20 | [[ "${MathBright:0:1}" == "-" ]] && MathBright=0 # Negative not allowed 21 | [[ "$MathBright" -gt 999 ]] && MathBright=999 # Can't go over 9.99 22 | 23 | if [[ "${#MathBright}" -eq 3 ]] ; then 24 | MathBright="$MathBright"000 # Pad with lots of zeros 25 | CurrBright="${MathBright:0:1}.${MathBright:1:2}" 26 | else 27 | MathBright="$MathBright"000 # Pad with lots of zeros 28 | CurrBright=".${MathBright:0:2}" 29 | fi 30 | 31 | xrandr --output "$MON" --brightness "$CurrBright" # Set new brightness 32 | 33 | # Display current brightness 34 | printf "Monitor $MON " 35 | echo $( xrandr --verbose --current | grep ^"$MON" -A5 | tail -n1 ) 36 | -------------------------------------------------------------------------------- /termite/.config/termite/config: -------------------------------------------------------------------------------- 1 | [options] 2 | scroll_on_output = false 3 | scroll_on_keystroke = true 4 | audible_bell = false 5 | mouse_autohide = true 6 | allow_bold = true 7 | dynamic_title = true 8 | urgent_on_bell = true 9 | clickable_url = true 10 | font = InconsolataGo Nerd Font 12 11 | scrollback_lines = 10000 12 | search_wrap = true 13 | #icon_name = terminal 14 | #geometry = 640x480 15 | 16 | # "system", "on" or "off" 17 | cursor_blink = system 18 | 19 | # "block", "underline" or "ibeam" 20 | cursor_shape = block 21 | 22 | # $BROWSER is used by default if set, with xdg-open as a fallback 23 | #browser = xdg-open 24 | 25 | # set size hints for the window 26 | #size_hints = false 27 | 28 | # Hide links that are no longer valid in url select overlay mode 29 | filter_unmatched_urls = true 30 | 31 | # emit escape sequences for extra modified keys 32 | #modify_other_keys = false 33 | 34 | [hints] 35 | #font = Monospace 12 36 | foreground = #dcdccc 37 | background = #3f3f3f 38 | active_foreground = #e68080 39 | active_background = #3f3f3f 40 | padding = 2 41 | border = #3f3f3f 42 | border_width = 0.5 43 | roundness = 2.0 44 | 45 | # if unset, will reverse foreground and background 46 | #highlight = #839496 47 | 48 | # Gruv 49 | 50 | [colors] 51 | foreground = #ebdbb2 52 | foreground_bold = #eee8d5 53 | #foreground_dim = #888888 54 | background = #282828 55 | cursor = #93a1a1 56 | 57 | # colors from color0 to color254 can be set 58 | color0 = #282828 59 | color1 = #cc241d 60 | color2 = #98971a 61 | color3 = #d79921 62 | color4 = #458588 63 | color5 = #b16286 64 | color6 = #689d6a 65 | color7 = #a89984 66 | color8 = #928374 67 | color9 = #fb4934 68 | color10 = #b8bb26 69 | color11 = #fabd2f 70 | color12 = #83a598 71 | color13 = #d3869b 72 | color14 = #8ec07c 73 | color15 = #ebdbb2 74 | 75 | # vim: ft=dosini cms=#%s 76 | -------------------------------------------------------------------------------- /termite/.config/termite/configGruv: -------------------------------------------------------------------------------- 1 | [options] 2 | scroll_on_output = false 3 | scroll_on_keystroke = true 4 | audible_bell = false 5 | mouse_autohide = true 6 | allow_bold = true 7 | dynamic_title = true 8 | urgent_on_bell = true 9 | clickable_url = true 10 | font = InconsolataGo Nerd Font 12 11 | scrollback_lines = 10000 12 | search_wrap = true 13 | #icon_name = terminal 14 | #geometry = 640x480 15 | 16 | # "system", "on" or "off" 17 | cursor_blink = system 18 | 19 | # "block", "underline" or "ibeam" 20 | cursor_shape = block 21 | 22 | # $BROWSER is used by default if set, with xdg-open as a fallback 23 | #browser = xdg-open 24 | 25 | # set size hints for the window 26 | #size_hints = false 27 | 28 | # Hide links that are no longer valid in url select overlay mode 29 | filter_unmatched_urls = true 30 | 31 | # emit escape sequences for extra modified keys 32 | #modify_other_keys = false 33 | 34 | [hints] 35 | #font = Monospace 12 36 | foreground = #dcdccc 37 | background = #3f3f3f 38 | active_foreground = #e68080 39 | active_background = #3f3f3f 40 | padding = 2 41 | border = #3f3f3f 42 | border_width = 0.5 43 | roundness = 2.0 44 | 45 | # if unset, will reverse foreground and background 46 | #highlight = #839496 47 | 48 | # Gruv 49 | 50 | [colors] 51 | foreground = #ebdbb2 52 | foreground_bold = #eee8d5 53 | #foreground_dim = #888888 54 | background = #282828 55 | cursor = #93a1a1 56 | 57 | # colors from color0 to color254 can be set 58 | color0 = #282828 59 | color1 = #cc241d 60 | color2 = #98971a 61 | color3 = #d79921 62 | color4 = #458588 63 | color5 = #b16286 64 | color6 = #689d6a 65 | color7 = #a89984 66 | color8 = #928374 67 | color9 = #fb4934 68 | color10 = #b8bb26 69 | color11 = #fabd2f 70 | color12 = #83a598 71 | color13 = #d3869b 72 | color14 = #8ec07c 73 | color15 = #ebdbb2 74 | 75 | # vim: ft=dosini cms=#%s 76 | -------------------------------------------------------------------------------- /termite/.config/termite/configSolarizedLight: -------------------------------------------------------------------------------- 1 | [options] 2 | scroll_on_output = false 3 | scroll_on_keystroke = true 4 | audible_bell = false 5 | mouse_autohide = true 6 | allow_bold = true 7 | dynamic_title = true 8 | urgent_on_bell = true 9 | clickable_url = true 10 | font = InconsolataGo Nerd Font 12 11 | scrollback_lines = 10000 12 | search_wrap = true 13 | #icon_name = terminal 14 | #geometry = 640x480 15 | 16 | # "system", "on" or "off" 17 | cursor_blink = system 18 | 19 | # "block", "underline" or "ibeam" 20 | cursor_shape = block 21 | 22 | # $BROWSER is used by default if set, with xdg-open as a fallback 23 | #browser = xdg-open 24 | 25 | # set size hints for the window 26 | #size_hints = false 27 | 28 | # Hide links that are no longer valid in url select overlay mode 29 | filter_unmatched_urls = true 30 | 31 | # emit escape sequences for extra modified keys 32 | #modify_other_keys = false 33 | 34 | [hints] 35 | #font = Monospace 12 36 | foreground = #dcdccc 37 | background = #3f3f3f 38 | active_foreground = #e68080 39 | active_background = #3f3f3f 40 | padding = 2 41 | border = #3f3f3f 42 | border_width = 0.5 43 | roundness = 2.0 44 | 45 | # if unset, will reverse foreground and background 46 | #highlight = #839496 47 | 48 | # Solarized light color scheme 49 | 50 | [colors] 51 | foreground = #657b83 52 | foreground_bold = #073642 53 | #foreground_dim = #888888 54 | background = #fdf6e3 55 | cursor = #586e75 56 | 57 | # colors from color0 to color254 can be set 58 | color0 = #073642 59 | color1 = #dc322f 60 | color2 = #859900 61 | color3 = #b58900 62 | color4 = #268bd2 63 | color5 = #d33682 64 | color6 = #2aa198 65 | color7 = #eee8d5 66 | color8 = #002b36 67 | color9 = #cb4b16 68 | color10 = #586e75 69 | color11 = #657b83 70 | color12 = #839496 71 | color13 = #6c71c4 72 | color14 = #93a1a1 73 | color15 = #fdf6e3 74 | 75 | # vim: ft=dosini cms=#%s 76 | -------------------------------------------------------------------------------- /termite/.config/termite/configSolarizedDark: -------------------------------------------------------------------------------- 1 | [options] 2 | scroll_on_output = false 3 | scroll_on_keystroke = true 4 | audible_bell = false 5 | mouse_autohide = true 6 | allow_bold = true 7 | dynamic_title = true 8 | urgent_on_bell = true 9 | clickable_url = true 10 | font = InconsolataGo Nerd Font 12 11 | scrollback_lines = 10000 12 | search_wrap = true 13 | #icon_name = terminal 14 | #geometry = 640x480 15 | 16 | # "system", "on" or "off" 17 | cursor_blink = system 18 | 19 | # "block", "underline" or "ibeam" 20 | cursor_shape = block 21 | 22 | # $BROWSER is used by default if set, with xdg-open as a fallback 23 | #browser = xdg-open 24 | 25 | # set size hints for the window 26 | #size_hints = false 27 | 28 | # Hide links that are no longer valid in url select overlay mode 29 | filter_unmatched_urls = true 30 | 31 | # emit escape sequences for extra modified keys 32 | #modify_other_keys = false 33 | 34 | [hints] 35 | #font = Monospace 12 36 | foreground = #dcdccc 37 | background = #3f3f3f 38 | active_foreground = #e68080 39 | active_background = #3f3f3f 40 | padding = 2 41 | border = #3f3f3f 42 | border_width = 0.5 43 | roundness = 2.0 44 | 45 | # if unset, will reverse foreground and background 46 | #highlight = #839496 47 | 48 | # Solarized dark color scheme 49 | 50 | [colors] 51 | #foreground = #839496 52 | foreground = #ebdbb2 53 | foreground_bold = #eee8d5 54 | #foreground_dim = #888888 55 | #background = #002b36 56 | background = #282828 57 | cursor = #93a1a1 58 | # 59 | # colors from color0 to color254 can be set 60 | color0 = #073642 61 | color1 = #dc322f 62 | color2 = #859900 63 | color3 = #b58900 64 | color4 = #268bd2 65 | color5 = #d33682 66 | color6 = #2aa198 67 | color7 = #eee8d5 68 | color8 = #002b36 69 | color9 = #cb4b16 70 | color10 = #586e75 71 | #color11 = #657b83 72 | color11 = #268bd2 73 | color12 = #839496 74 | color13 = #6c71c4 75 | #color14 = #93a1a1 76 | color14 = #b58900 77 | color15 = #fdf6e3 78 | 79 | # vim: ft=dosini cms=#%s 80 | -------------------------------------------------------------------------------- /tmux/.tmux.conf: -------------------------------------------------------------------------------- 1 | # make tmux display things in 256 colors 2 | set -g default-terminal "screen-256color" 3 | 4 | # Stop stupid delay (particularly in vim) 5 | set -sg escape-time 0 #ms 6 | 7 | # Vim like bindings for moving between panes and windows 8 | bind h select-pane -L 9 | bind j select-pane -D 10 | bind k select-pane -U 11 | bind l select-pane -R 12 | bind C-h select-window -t :- 13 | bind C-l select-window -t :+ 14 | 15 | # Clipboard integration 16 | setw -g mode-keys vi 17 | bind-key -T copy-mode-vi 'v' send -X begin-selection 18 | bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -i -sel clip > /dev/null" 19 | bind-key v run "xclip -o -sel clip | tmux load-buffer - ; tmux paste-buffer" 20 | 21 | #bind -Tcopy-mode C-Up send -X scroll-up 22 | #bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up 23 | #unbind p 24 | #bind p paste-buffer 25 | #bind C-p run "xclip -o | tmux load-buffer - ; tmux paste-buffer" 26 | #bind C-y run "tmux show-buffer | xclip -i" 27 | 28 | # Open new windows in pwd 29 | bind c new-window -c "#{pane_current_path}" 30 | bind '"' split-window -c "#{pane_current_path}" 31 | bind % split-window -h -c "#{pane_current_path}" 32 | 33 | # Resize to the smallest *viewing* client (not smallest *attached* client) 34 | setw -g aggressive-resize on 35 | 36 | # Activity notifications 37 | set -g bell-action current 38 | 39 | # set scrollback history to 10000 (10k) 40 | set -g history-limit 10000 41 | 42 | # Tmux existing theme 43 | # :TmuxlineSnapshot .tmux.theme! 44 | if-shell "test -f ~/.tmux.theme" "source ~/.tmux.theme" 45 | 46 | # Smart pane switching with awareness of Vim splits. 47 | # See: https://github.com/christoomey/vim-tmux-navigator 48 | is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ 49 | | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" 50 | bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L" 51 | bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D" 52 | bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U" 53 | bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R" 54 | bind-key -n C-\ if-shell "$is_vim" "send-keys C-\\" "select-pane -l" 55 | 56 | # Rename window 57 | set-option -g set-titles on 58 | set-option -g set-titles-string "#S / #W" 59 | -------------------------------------------------------------------------------- /ncmpcpp/.ncmpcpp/config: -------------------------------------------------------------------------------- 1 | % egrep -v '^#' .ncmpcpp/config 2 | mpd_music_dir = "/home/arch/Music/" 3 | 4 | #mpd_host = "127.0.0.1" 5 | mpd_port = "6600" 6 | 7 | 8 | ####songs#### 9 | #([cyan,date],[cyan, length], [cyan,title] | [cyan,date],[blue,title],[cyan]) 10 | song_list_format = "{$7%a $7%l $7%t}|{$7%a $5%t $7}" 11 | #([red,artist],[magenta],[red,length]) 12 | song_status_format = "$2%a $6 $2%l" 13 | #([cyan,length],[blue,title],[end current color]) 14 | song_library_format = "$7%l $5%t$9" 15 | #([magenta,blue,magenta]|[blue] 16 | now_playing_prefix = "{ $6◀$5●$6▶}|{$5●}" 17 | #now_playing_prefix = "{ $2●}" 18 | #([blue],[cyan,artist],[blue,title],[yellow,album],[magenta,length] 19 | song_columns_list_format = "(4)[]{} (15)[cyan]{a} (30)[blue]{t} (46)[white]{b} (5)[magenta]{l}" 20 | 21 | ####misc#### 22 | playlist_separate_albums = "no" 23 | playlist_display_mode = "columns" (classic/columns) 24 | browser_display_mode = "columns" 25 | volume_change_step = "5" 26 | progressbar_look = "─╼·" 27 | user_interface = "alternative" 28 | data_fetching_delay = "yes" 29 | media_library_primary_tag = "artist" 30 | default_find_mode = "wrapped" 31 | header_visibility = "no" 32 | statusbar_visibility = "yes" 33 | titles_visibility = "no" 34 | header_text_scrolling = "yes" 35 | cyclic_scrolling = "yes" 36 | startup_screen = "media_library" 37 | ask_before_clearing_playlists = "yes" 38 | clock_display_seconds = "yes" 39 | display_volume_level = "yes" 40 | display_bitrate = "yes" 41 | display_remaining_time = "yes" 42 | ignore_leading_the = "no" 43 | mouse_support = "no" 44 | #use_console_editor = "yes" 45 | autocenter_mode = "yes" 46 | 47 | ####colors#### 48 | colors_enabled = "yes" 49 | empty_tag_color = "blue" 50 | #header_window_color = "red" 51 | volume_color = "black" 52 | state_line_color = "black" 53 | color1 = "blue" 54 | color2 = "blue" 55 | current_item_prefix = "$(green)$r" 56 | current_item_suffix = "$/r$(end)" 57 | current_item_inactive_column_prefix = "$(white)$r" 58 | current_item_inactive_column_suffix = "$/r$(end)" 59 | main_window_color = "blue" 60 | progressbar_color = "magenta" 61 | progressbar_elapsed_color = "cyan" 62 | statusbar_color = "green" 63 | alternative_ui_separator_color = "red" 64 | window_border_color = "green" 65 | active_window_border = "cyan" 66 | discard_colors_if_item_is_selected = "no" 67 | -------------------------------------------------------------------------------- /autolock.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | # This script is intended to be run as the xautolock locker and notifier. 6 | # It requires i3lock, and dunst is optional. 7 | 8 | # Copy or link this script as /usr/bin/slock to let xfce4-session run it. 9 | if [ "$(basename "$0")" = "slock" ]; then 10 | cmd=lock 11 | else 12 | cmd=${1:-lock} 13 | fi 14 | 15 | # Is the screen already locked? 16 | locked() { pkill -0 --euid "$(id -u)" --exact i3lock; } 17 | 18 | # Return 0 if suspend is acceptable. 19 | suspend_ok() { 20 | [ -n "$(2>/dev/null mpc current)" ] && return 1 21 | return 0 22 | } 23 | 24 | # Print the given message with a timestamp. 25 | info() { printf '%s\t%s\n' "$(date)" "$*"; } 26 | 27 | log() { 28 | if [ -n "${LOCK_LOG:-}" ]; then 29 | info >>"$LOCK_LOG" "$@" 30 | else 31 | info "$@" 32 | fi 33 | } 34 | 35 | # Control the dunst daemon, if it is running. 36 | dunst() { 37 | pkill -0 --exact dunst || return 0 38 | 39 | case ${1:-} in 40 | stop) 41 | log "Stopping notifications and locking screen." 42 | pkill -USR1 --euid "$(id -u)" --exact dunst 43 | ;; 44 | resume) 45 | log "...Resuming notifications." 46 | pkill -USR2 --euid "$(id -u)" --exact dunst 47 | ;; 48 | *) 49 | echo "dunst argument required: stop or resume" 50 | return 1 51 | ;; 52 | esac 53 | } 54 | 55 | blur() { 56 | IMAGE=/tmp/i3lock.png 57 | SCREENSHOT="scrot $IMAGE" # 0.46s 58 | 59 | # Get the screenshot, add the blur and lock the screen with it 60 | $SCREENSHOT 61 | convert $IMAGE -scale 10% -scale 1000% $IMAGE 62 | i3lock -i $IMAGE --nofork -f 63 | rm $IMAGE 64 | watson stop 65 | } 66 | 67 | case "$cmd" in 68 | lock) 69 | dunst stop 70 | 71 | # Fork both i3lock and its monitor to avoid blocking xautolock. 72 | blur & 73 | 74 | pid="$!" 75 | log "Waiting for PID $pid to end..." 76 | while 2>/dev/null kill -0 "$pid"; do 77 | sleep 1 78 | done 79 | 80 | dunst resume 81 | ;; 82 | 83 | notify) 84 | # Notification should not be issued while locked even if dunst is paused. 85 | locked && exit 86 | 87 | log "Sending notification." 88 | # grep finds either Xautolock.notify or Xautolock*notify 89 | secs="$(xrdb -query | grep -m1 '^Xautolock.notify' | cut -f2)" 90 | test -n "$secs" && secs="Locking in $secs seconds" 91 | 92 | notify-send --urgency="normal" --app-name="xautolock" \ 93 | --icon='/usr/share/icons/Adwaita/48x48/emblems/emblem-readonly.png' \ 94 | -- "Screen Lock" "$secs" 95 | ;; 96 | 97 | suspend) 98 | if suspend_ok; then 99 | log "Suspending system." 100 | systemctl suspend 101 | else 102 | log "Deferring suspend." 103 | fi 104 | ;; 105 | 106 | debug) 107 | log "$@" 108 | ;; 109 | 110 | *) 111 | log "Unrecognized option: $1" 112 | esac 113 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" }, 3 | "NvChad": { "branch": "v2.5", "commit": "29ebe31ea6a4edf351968c76a93285e6e108ea08" }, 4 | "base46": { "branch": "v3.0", "commit": "cee12a263602cc97652d3dd55f0fc5e171012967" }, 5 | "cmp-async-path": { "branch": "main", "commit": "0ed1492f59e730c366d261a5ad822fa37e44c325" }, 6 | "cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" }, 7 | "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, 8 | "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, 9 | "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, 10 | "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, 11 | "emoji.nvim": { "branch": "main", "commit": "5c68359b56d2470583832b6b2b559566c5b39dc8" }, 12 | "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, 13 | "gitsigns.nvim": { "branch": "main", "commit": "736f51d2bb684c06f39a2032f064d7244f549981" }, 14 | "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, 15 | "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, 16 | "mason-lspconfig.nvim": { "branch": "main", "commit": "7f0bf635082bb9b7d2b37766054526a6ccafdb85" }, 17 | "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, 18 | "menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" }, 19 | "minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" }, 20 | "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, 21 | "nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" }, 22 | "nvim-lspconfig": { "branch": "master", "commit": "9141be4c1332afc83bdf1b0278dbb030f75ff8e3" }, 23 | "nvim-tree.lua": { "branch": "master", "commit": "dd2364d6802f7f57a98acb8b545ed484c6697626" }, 24 | "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, 25 | "nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" }, 26 | "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, 27 | "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, 28 | "ui": { "branch": "v3.0", "commit": "dc4950f5bd4117e2da108b681506c908b93d4a62" }, 29 | "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, 30 | "vimwiki": { "branch": "dev", "commit": "72792615e739d0eb54a9c8f7e0a46a6e2407c9e8" }, 31 | "volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" }, 32 | "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } 33 | } 34 | -------------------------------------------------------------------------------- /notmuch/.notmuch-config: -------------------------------------------------------------------------------- 1 | # .notmuch-config - Configuration file for the notmuch mail system 2 | # 3 | # For more information about notmuch, see https://notmuchmail.org 4 | 5 | # Database configuration 6 | # 7 | # The only value supported here is 'path' which should be the top-level 8 | # directory where your mail currently exists and to where mail will be 9 | # delivered in the future. Files should be individual email messages. 10 | # Notmuch will store its database within a sub-directory of the path 11 | # configured here named ".notmuch". 12 | # 13 | [database] 14 | path=/home/arch/.mail 15 | 16 | # User configuration 17 | # 18 | # Here is where you can let notmuch know how you would like to be 19 | # addressed. Valid settings are 20 | # 21 | # name Your full name. 22 | # primary_email Your primary email address. 23 | # other_email A list (separated by ';') of other email addresses 24 | # at which you receive email. 25 | # 26 | # Notmuch will use the various email addresses configured here when 27 | # formatting replies. It will avoid including your own addresses in the 28 | # recipient list of replies, and will set the From address based on the 29 | # address to which the original email was addressed. 30 | # 31 | [user] 32 | name=Cristian 33 | primary_email=felipebrokate@gmail.com 34 | other_email=cperez@kernix.com; 35 | 36 | # Configuration for "notmuch new" 37 | # 38 | # The following options are supported here: 39 | # 40 | # tags A list (separated by ';') of the tags that will be 41 | # added to all messages incorporated by "notmuch new". 42 | # 43 | # ignore A list (separated by ';') of file and directory names 44 | # that will not be searched for messages by "notmuch new". 45 | # 46 | # NOTE: *Every* file/directory that goes by one of those 47 | # names will be ignored, independent of its depth/location 48 | # in the mail store. 49 | # 50 | [new] 51 | tags=unread;inbox; 52 | ignore=spam;trash; 53 | 54 | # Search configuration 55 | # 56 | # The following option is supported here: 57 | # 58 | # exclude_tags 59 | # A ;-separated list of tags that will be excluded from 60 | # search results by default. Using an excluded tag in a 61 | # query will override that exclusion. 62 | # 63 | [search] 64 | exclude_tags=deleted;spam; 65 | 66 | # Maildir compatibility configuration 67 | # 68 | # The following option is supported here: 69 | # 70 | # synchronize_flags Valid values are true and false. 71 | # 72 | # If true, then the following maildir flags (in message filenames) 73 | # will be synchronized with the corresponding notmuch tags: 74 | # 75 | # Flag Tag 76 | # ---- ------- 77 | # D draft 78 | # F flagged 79 | # P passed 80 | # R replied 81 | # S unread (added when 'S' flag is not present) 82 | # 83 | # The "notmuch new" command will notice flag changes in filenames 84 | # and update tags, while the "notmuch tag" and "notmuch restore" 85 | # commands will notice tag changes and update flags in filenames 86 | # 87 | [maildir] 88 | synchronize_flags=true 89 | 90 | # Cryptography related configuration 91 | # 92 | # The following option is supported here: 93 | # 94 | # gpg_path 95 | # binary name or full path to invoke gpg. 96 | # 97 | [crypto] 98 | gpg_path=gpg 99 | -------------------------------------------------------------------------------- /ncmpcpp/.ncmpcpp/README.md: -------------------------------------------------------------------------------- 1 | # Mpd client 2 | 3 | ## MCP Party client (web mdp client) 4 | 5 | * Clone mpcparty `git clone https://github.com/jplsek/MPCParty`. By default at `~/Documents/node/` 6 | 7 | * Install dependencies `npm install` 8 | 9 | * You can test using `npm start` 10 | 11 | * Create a service at `~/.config/systemd/user/mpcparty.service` 12 | 13 | ``` 14 | # mpcparty.service 15 | 16 | [Unit] 17 | Description=MPCParty 18 | After=mpd.service 19 | 20 | [Service] 21 | ExecStart=/usr/bin/node /home/arch/Documents/node/MPCParty/server.js 22 | Restart=always 23 | 24 | [Install] 25 | WantedBy=multi-user.target 26 | ``` 27 | 28 | * Enable service `systemctl --user enable mpcparty.service` 29 | 30 | 31 | ## Album notification http://dotshare.it/dots/1533/ 32 | 33 | Find album in folder and send notification 34 | 35 | ```bash 36 | MUSIC_DIR=/home/cris/Music_clean #path to your music dir 37 | 38 | COVER=/tmp/cover.jpg 39 | 40 | function reset_background 41 | { 42 | printf "\e]20;;100x100+1000+1000\a" 43 | } 44 | 45 | { 46 | title="$(mpc --format %title% current)" 47 | artist="$(mpc --format %artist% current)" 48 | album="$(mpc --format %album% current)" 49 | file="$(mpc --format %file% current)" 50 | album_dir="${file%/*}" 51 | [[ -z "$album_dir" ]] && exit 1 52 | album_dir="$MUSIC_DIR/$album_dir" 53 | 54 | covers="$(find "$album_dir" -type d -exec find {} -maxdepth 1 -type f -iregex ".*/.*\(${album}\|cover\|folder\|artwork\|front\).*[.]\(jpe?g\|png\|gif\|bmp\)" \; )" 55 | src="$(echo -n "$covers" | head -n1)" 56 | rm -f "$COVER" 57 | if [[ -n "$src" ]] ; then 58 | #resize the image's width to 300px 59 | convert "$src" -resize 100x "$COVER" 60 | if [[ -f "$COVER" ]] ; then 61 | #scale down the cover to 30% of the original 62 | #printf "\e]20;${COVER};70x70+0+00:op=keep-aspect\a" 63 | notify-send --urgency=low --expire-time=5000 --app-name=ncmpcpp \ 64 | --icon="$COVER" "$album" "$artist\n$title" 65 | else 66 | reset_background 67 | fi 68 | else 69 | reset_background 70 | fi 71 | } & 72 | ``` 73 | 74 | 75 | ## Vim bindings https://gist.github.com/Soft/959188 76 | 77 | ```python 78 | # ~/.ncmpcpp/bindings 79 | # the t key isn't used and it's easier to press than /, so lets use it 80 | def_key "t" 81 | find 82 | def_key "t" 83 | find_item_forward 84 | 85 | def_key "+" 86 | show_clock 87 | def_key "=" 88 | volume_up 89 | 90 | def_key "j" 91 | scroll_down 92 | def_key "k" 93 | scroll_up 94 | 95 | def_key "ctrl-u" 96 | page_up 97 | #push_characters "kkkkkkkkkkkkkkk" 98 | def_key "ctrl-d" 99 | page_down 100 | #push_characters "jjjjjjjjjjjjjjj" 101 | 102 | def_key "h" 103 | previous_column 104 | def_key "l" 105 | next_column 106 | 107 | def_key "." 108 | show_lyrics 109 | 110 | def_key "n" 111 | next_found_item 112 | def_key "N" 113 | previous_found_item 114 | 115 | # not used but bound 116 | def_key "J" 117 | move_sort_order_down 118 | def_key "K" 119 | move_sort_order_up 120 | ``` 121 | 122 | -------------------------------------------------------------------------------- /xorg/.Xresources.dark: -------------------------------------------------------------------------------- 1 | ! Enable the extended coloring options 2 | rofi.color-enabled: true 3 | ! bg border separator 4 | rofi.color-window: #282828, #a89984, #a89984 5 | ! bg fg bg-alt hl-bg hl-fg 6 | rofi.color-normal: #282828, #ebdbb2, #32302f, #665c54, #fbf1c7 7 | rofi.color-active: #d79921, #282828, #d79921, #fabd2f, #282828 8 | rofi.color-urgent: #cc241d, #282828, #cc241d, #fb4934, #282828 9 | 10 | rofi.separator-style: solid 11 | rofi.sidebar-mode: true 12 | rofi.bw: 1 13 | rofi.columns: 1 14 | rofi.padding: 16 15 | 16 | rofi.yoffset: 0 17 | rofi.fake-transparency: false 18 | rofi.location: 0 19 | rofi.width: 50 20 | rofi.font: Hasklig 12 21 | rofi.lines: 15 22 | rofi.fixed-num-lines: true 23 | 24 | xscreensaver.splash: false 25 | xscreensaver.Dialog.foreground: #ebdbb2 26 | xscreensaver.Dialog.background: #282828 27 | xscreensaver.Dialog.topShadowColor: #0a0a0a 28 | xscreensaver.Dialog.bottomShadowColor: #161616 29 | xscreensaver.Dialog.Button.foreground: #ebdbb2 30 | xscreensaver.Dialog.Button.background: #282828 31 | xscreensaver.Dialog.borderWidth: 0 32 | xscreensaver.Dialog.internalBorderWidth: 0 33 | xscreensaver.passwd.thermometer.background: #282828 34 | xscreensaver.passwd.thermometer.foreground: #fbf1c7 35 | xscreensaver.passwd.thermometer.width: 8 36 | 37 | Xautolock.time: 5 38 | Xautolock.locker: $HOME/.dotfiles/autolock.sh lock 39 | Xautolock.notify: 30 40 | Xautolock.notifier: $HOME/.dotfiles/autolock.sh notify 41 | Xautolock.detectsleep: true 42 | Xautolock.secure: true 43 | Xautolock.noclose: true 44 | 45 | URxvt.depth: 32 46 | URxvt.geometry: 64x18 47 | URxvt.transparent: false 48 | URxvt.fading: 0 49 | ! URxvt.urgentOnBell: true 50 | ! URxvt.visualBell: true 51 | URxvt.loginShell: true 52 | URxvt.saveLines: 1000 53 | URxvt.internalBorder: 3 54 | URxvt.lineSpace: 0 55 | 56 | ! Fonts 57 | !URxvt*font: xft:Ubuntu Mono:size=11,xft:Hasklig:size=11 58 | !URxvt*boldFont: xft:Ubuntu Mono:bold:size=11,xft:Hasklig:bold:size=11 59 | 60 | ! Fix font space 61 | URxvt*letterSpace: -1 62 | 63 | ! Scrollbar 64 | URxvt.scrollStyle: rxvt 65 | URxvt.scrollBar: false 66 | 67 | ! Perl extensions 68 | URxvt.perl-ext-common: default,matcher 69 | URxvt.matcher.button: 1 70 | URxvt.urlLauncher: google-chrome 71 | 72 | ! Cursor 73 | URxvt.cursorBlink: true 74 | URxvt.cursorColor: #657b83 75 | URxvt.cursorUnderline: false 76 | 77 | ! Pointer 78 | URxvt.pointerBlank: true 79 | 80 | !urxvt color scheme: 81 | URxvt*background: #2D2D2D 82 | URxvt*foreground: #F8F8F2 83 | 84 | URxvt*colorUL: #86a2b0 85 | 86 | !! Transparency (0-1): 87 | st.alpha: 0.92 88 | 89 | !! Set a default font and font size as below: 90 | st.font: Deja Vu Sans Mono-10; 91 | 92 | ! st.termname: st-256color 93 | st.borderpx: 0 94 | 95 | !! gruvbox: */ 96 | *.background: #282828 97 | *.foreground: #ebdbb2 98 | *.cursorColor: #ebdbb2 99 | 100 | *.color0: #1d2021 101 | *.color1: #cc241d 102 | *.color2: #98971a 103 | *.color3: #d79921 104 | *.color4: #458588 105 | *.color5: #b16286 106 | *.color6: #689d6a 107 | *.color7: #a89984 108 | *.color8: #928374 109 | *.color9: #fb4934 110 | *.color10: #b8bb26 111 | *.color11: #fabd2f 112 | *.color12: #83a598 113 | *.color13: #d3869b 114 | *.color14: #8ec07c 115 | *.color15: #ebdbb2 116 | 117 | /* !! gruvbox light: */ 118 | !*.background: #ebdbb2 119 | !*.foreground: #282828 120 | !*.cursorColor: #282828 121 | 122 | !*.color0: #fbf1c7 123 | !*.color1: #cc241d 124 | !*.color2: #98971a 125 | !*.color3: #d79921 126 | !*.color4: #458588 127 | !*.color5: #b16286 128 | !*.color6: #689d6a 129 | !*.color7: #7c6f64 130 | !*.color8: #928374 131 | !*.color9: #9d0006 132 | !*.color10: #79740e 133 | !*.color11: #b57614 134 | !*.color12: #076678 135 | !*.color13: #8f3f71 136 | !*.color14: #427b58 137 | !*.color15: #3c3836 138 | -------------------------------------------------------------------------------- /xorg/.Xresources.light: -------------------------------------------------------------------------------- 1 | ! Enable the extended coloring options 2 | rofi.color-enabled: true 3 | ! bg border separator 4 | rofi.color-window: #282828, #a89984, #a89984 5 | ! bg fg bg-alt hl-bg hl-fg 6 | rofi.color-normal: #282828, #ebdbb2, #32302f, #665c54, #fbf1c7 7 | rofi.color-active: #d79921, #282828, #d79921, #fabd2f, #282828 8 | rofi.color-urgent: #cc241d, #282828, #cc241d, #fb4934, #282828 9 | 10 | rofi.separator-style: solid 11 | rofi.sidebar-mode: true 12 | rofi.bw: 1 13 | rofi.columns: 1 14 | rofi.padding: 16 15 | 16 | rofi.yoffset: 0 17 | rofi.fake-transparency: false 18 | rofi.location: 0 19 | rofi.width: 50 20 | rofi.font: Hasklig 12 21 | rofi.lines: 15 22 | rofi.fixed-num-lines: true 23 | 24 | xscreensaver.splash: false 25 | xscreensaver.Dialog.foreground: #ebdbb2 26 | xscreensaver.Dialog.background: #282828 27 | xscreensaver.Dialog.topShadowColor: #0a0a0a 28 | xscreensaver.Dialog.bottomShadowColor: #161616 29 | xscreensaver.Dialog.Button.foreground: #ebdbb2 30 | xscreensaver.Dialog.Button.background: #282828 31 | xscreensaver.Dialog.borderWidth: 0 32 | xscreensaver.Dialog.internalBorderWidth: 0 33 | xscreensaver.passwd.thermometer.background: #282828 34 | xscreensaver.passwd.thermometer.foreground: #fbf1c7 35 | xscreensaver.passwd.thermometer.width: 8 36 | 37 | Xautolock.time: 5 38 | Xautolock.locker: $HOME/.dotfiles/autolock.sh lock 39 | Xautolock.notify: 30 40 | Xautolock.notifier: $HOME/.dotfiles/autolock.sh notify 41 | Xautolock.detectsleep: true 42 | Xautolock.secure: true 43 | Xautolock.noclose: true 44 | 45 | URxvt.depth: 32 46 | URxvt.geometry: 64x18 47 | URxvt.transparent: false 48 | URxvt.fading: 0 49 | ! URxvt.urgentOnBell: true 50 | ! URxvt.visualBell: true 51 | URxvt.loginShell: true 52 | URxvt.saveLines: 1000 53 | URxvt.internalBorder: 3 54 | URxvt.lineSpace: 0 55 | 56 | ! Fonts 57 | !URxvt*font: xft:Ubuntu Mono:size=11,xft:Hasklig:size=11 58 | !URxvt*boldFont: xft:Ubuntu Mono:bold:size=11,xft:Hasklig:bold:size=11 59 | 60 | ! Fix font space 61 | URxvt*letterSpace: -1 62 | 63 | ! Scrollbar 64 | URxvt.scrollStyle: rxvt 65 | URxvt.scrollBar: false 66 | 67 | ! Perl extensions 68 | URxvt.perl-ext-common: default,matcher 69 | URxvt.matcher.button: 1 70 | URxvt.urlLauncher: google-chrome 71 | 72 | ! Cursor 73 | URxvt.cursorBlink: true 74 | URxvt.cursorColor: #657b83 75 | URxvt.cursorUnderline: false 76 | 77 | ! Pointer 78 | URxvt.pointerBlank: true 79 | 80 | !urxvt color scheme: 81 | URxvt*background: #2D2D2D 82 | URxvt*foreground: #F8F8F2 83 | 84 | URxvt*colorUL: #86a2b0 85 | 86 | !! Transparency (0-1): 87 | st.alpha: 0.92 88 | 89 | !! Set a default font and font size as below: 90 | st.font: Deja Vu Sans Mono-10; 91 | 92 | ! st.termname: st-256color 93 | st.borderpx: 0 94 | 95 | !! gruvbox: */ 96 | !*.background: #282828 97 | !*.foreground: #ebdbb2 98 | !*.cursorColor: #ebdbb2 99 | 100 | !*.color0: #1d2021 101 | !*.color1: #cc241d 102 | !*.color2: #98971a 103 | !*.color3: #d79921 104 | !*.color4: #458588 105 | !*.color5: #b16286 106 | !*.color6: #689d6a 107 | !*.color7: #a89984 108 | !*.color8: #928374 109 | !*.color9: #fb4934 110 | !*.color10: #b8bb26 111 | !*.color11: #fabd2f 112 | !*.color12: #83a598 113 | !*.color13: #d3869b 114 | !*.color14: #8ec07c 115 | !*.color15: #ebdbb2 116 | 117 | /* !! gruvbox light: */ 118 | *.background: #ebdbb2 119 | *.foreground: #282828 120 | *.cursorColor: #282828 121 | 122 | *.color0: #fbf1c7 123 | *.color1: #cc241d 124 | *.color2: #98971a 125 | *.color3: #d79921 126 | *.color4: #458588 127 | *.color5: #b16286 128 | *.color6: #689d6a 129 | *.color7: #7c6f64 130 | *.color8: #928374 131 | *.color9: #9d0006 132 | *.color10: #79740e 133 | *.color11: #b57614 134 | *.color12: #076678 135 | *.color13: #8f3f71 136 | *.color14: #427b58 137 | *.color15: #3c3836 138 | -------------------------------------------------------------------------------- /nvim/.config/nvim/lua/plugins/init.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "stevearc/conform.nvim", 4 | -- event = 'BufWritePre', -- uncomment for format on save 5 | opts = require "configs.conform", 6 | }, 7 | 8 | -- These are some examples, uncomment them if you want to see them work! 9 | { 10 | "neovim/nvim-lspconfig", 11 | config = function() 12 | require "configs.lspconfig" 13 | end, 14 | }, 15 | { 16 | "tpope/vim-fugitive", 17 | lazy = false, 18 | }, 19 | { 20 | "williamboman/mason.nvim", 21 | lazy = false, 22 | config = function() 23 | require("mason").setup({ 24 | PATH = "prepend", -- "skip" seems to cause the spawning error 25 | ui = { 26 | icons = { 27 | package_pending = " ", 28 | package_installed = " ", 29 | package_uninstalled = " ", 30 | }, 31 | }, 32 | max_concurrent_installers = 10, 33 | }) 34 | end, 35 | }, 36 | --{ 37 | -- "williamboman/mason-lspconfig.nvim", 38 | -- lazy = false, 39 | -- opts = { 40 | -- auto_install = true, 41 | -- }, 42 | -- config = function() 43 | -- vim.lsp.config('ruff', { 44 | -- init_options = { 45 | -- settings = { 46 | -- -- Ruff language server settings go here 47 | -- } 48 | -- } 49 | -- }) 50 | -- vim.lsp.enable('ruff') 51 | -- end, 52 | --}, 53 | { 54 | "williamboman/mason-lspconfig.nvim", 55 | lazy = false, 56 | opts = { 57 | auto_install = true, 58 | }, 59 | config = function() 60 | require("mason-lspconfig").setup({ 61 | ensure_installed = { 62 | "pyright", 63 | "ruff", 64 | }, 65 | }) 66 | end, 67 | }, 68 | { 69 | "neovim/nvim-lspconfig", 70 | lazy = false, 71 | }, 72 | { 73 | "allaman/emoji.nvim", 74 | version = "1.0.0", -- optionally pin to a tag 75 | ft = {"markdown", "gitcommit", "vimwiki", "mail"}, -- adjust to your needs 76 | dependencies = { 77 | -- util for handling paths 78 | "nvim-lua/plenary.nvim", 79 | -- optional for nvim-cmp integration 80 | "hrsh7th/nvim-cmp", 81 | -- optional for telescope integration 82 | --"nvim-telescope/telescope.nvim", 83 | -- optional for fzf-lua integration via vim.ui.select 84 | --"ibhagwan/fzf-lua", 85 | }, 86 | opts = { 87 | -- default is false, also needed for blink.cmp integration! 88 | enable_cmp_integration = true, 89 | -- optional if your plugin installation directory 90 | -- is not vim.fn.stdpath("data") .. "/lazy/ 91 | -- plugin_path = vim.fn.expand("$HOME/plugins/"), 92 | }, 93 | config = function(_, opts) 94 | require("emoji").setup(opts) 95 | -- optional for telescope integration 96 | local ts = require('telescope').load_extension 'emoji' 97 | vim.keymap.set('n', 'se', ts.emoji, { desc = '[S]earch [E]moji' }) 98 | end, 99 | }, 100 | { 101 | -- The plugin location on GitHub 102 | "vimwiki/vimwiki", 103 | --lazy = false, 104 | -- The event that triggers the plugin 105 | --event = "BufEnter *.md", 106 | ---- The keys that trigger the plugin 107 | keys = { "ww", "ww", "wt" }, 108 | -- The configuration for the plugin 109 | init = function () --replace 'config' with 'init' 110 | vim.g.vimwiki_list = {{ 111 | auto_export=1, 112 | automatic_nested_syntaxes=1, 113 | path_html='$HOME/Documents/vimwiki/_site', 114 | path='~/Documents/vimwiki/content', 115 | template_path='$HOME/Documents/vimwiki/templates/', 116 | syntax='markdown', 117 | ext='.md', 118 | template_default='markdown', 119 | custom_wiki2html='$HOME/.dotfiles/wiki2html.sh', 120 | template_ext='.html' 121 | }} 122 | end 123 | } 124 | 125 | -- test new blink 126 | -- { import = "nvchad.blink.lazyspec" }, 127 | 128 | -- { 129 | -- "nvim-treesitter/nvim-treesitter", 130 | -- opts = { 131 | -- ensure_installed = { 132 | -- "vim", "lua", "vimdoc", 133 | -- "html", "css" 134 | -- }, 135 | -- }, 136 | -- }, 137 | } 138 | -------------------------------------------------------------------------------- /i3/.config/i3/mediaplayer: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | # Copyright (C) 2014 Tony Crisci 3 | # Copyright (C) 2015 Thiago Perrotta 4 | 5 | # This program is free software: you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation, either version 3 of the License, or 8 | # (at your option) any later version. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | 18 | # Requires playerctl binary to be in your path (except cmus) 19 | # See: https://github.com/acrisci/playerctl 20 | 21 | # Set instance=NAME in the i3blocks configuration to specify a music player 22 | # (playerctl will attempt to connect to org.mpris.MediaPlayer2.[NAME] on your 23 | # DBus session). 24 | 25 | use Time::HiRes qw(usleep); 26 | use Env qw(BLOCK_INSTANCE); 27 | 28 | use constant DELAY => 50; # Delay in ms to let network-based players (spotify) reflect new data. 29 | use constant SPOTIFY_STR => 'spotify'; 30 | 31 | my @metadata = (); 32 | my $player_arg = ""; 33 | 34 | if ($BLOCK_INSTANCE) { 35 | $player_arg = "--player='$BLOCK_INSTANCE'"; 36 | } 37 | 38 | sub buttons { 39 | my $method = shift; 40 | 41 | if($method eq 'mpd') { 42 | if ($ENV{'BLOCK_BUTTON'} == 1) { 43 | system("mpc prev"); 44 | } elsif ($ENV{'BLOCK_BUTTON'} == 2) { 45 | system("mpc toggle"); 46 | } elsif ($ENV{'BLOCK_BUTTON'} == 3) { 47 | system("mpc next"); 48 | } elsif ($ENV{'BLOCK_BUTTON'} == 4) { 49 | system("mpc volume +10"); 50 | } elsif ($ENV{'BLOCK_BUTTON'} == 5) { 51 | system("mpc volume -10"); 52 | } 53 | } elsif ($method eq 'cmus') { 54 | if ($ENV{'BLOCK_BUTTON'} == 1) { 55 | system("cmus-remote --prev"); 56 | } elsif ($ENV{'BLOCK_BUTTON'} == 2) { 57 | system("cmus-remote --pause"); 58 | } elsif ($ENV{'BLOCK_BUTTON'} == 3) { 59 | system("cmus-remote --next"); 60 | } 61 | } elsif ($method eq 'playerctl') { 62 | if ($ENV{'BLOCK_BUTTON'} == 1) { 63 | system("playerctl $player_arg previous"); 64 | usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR; 65 | } elsif ($ENV{'BLOCK_BUTTON'} == 2) { 66 | system("playerctl $player_arg play-pause"); 67 | } elsif ($ENV{'BLOCK_BUTTON'} == 3) { 68 | system("playerctl $player_arg next"); 69 | usleep(DELAY * 1000) if $BLOCK_INSTANCE eq SPOTIFY_STR; 70 | } 71 | } 72 | } 73 | 74 | sub cmus { 75 | my @cmus = split /^/, qx(cmus-remote -Q); 76 | if ($? == 0) { 77 | foreach my $line (@cmus) { 78 | my @data = split /\s/, $line; 79 | if (shift @data eq 'tag') { 80 | my $key = shift @data; 81 | my $value = join ' ', @data; 82 | 83 | @metadata[0] = $value if $key eq 'artist'; 84 | @metadata[1] = $value if $key eq 'title'; 85 | } 86 | } 87 | 88 | if (@metadata) { 89 | buttons('cmus'); 90 | 91 | # metadata found so we are done 92 | print(join ' - ', @metadata); 93 | exit 0; 94 | } 95 | } 96 | } 97 | 98 | sub mpd { 99 | my $data = qx(mpc current); 100 | if (not $data eq '') { 101 | buttons("mpd"); 102 | print($data); 103 | exit 0; 104 | } 105 | } 106 | 107 | sub playerctl { 108 | buttons('playerctl'); 109 | 110 | my $artist = qx(playerctl $player_arg metadata artist); 111 | # exit status will be nonzero when playerctl cannot find your player 112 | exit(0) if $? || $artist eq '(null)'; 113 | 114 | push(@metadata, $artist) if $artist; 115 | 116 | my $title = qx(playerctl $player_arg metadata title); 117 | exit(0) if $? || $title eq '(null)'; 118 | 119 | push(@metadata, $title) if $title; 120 | 121 | print(join(" - ", @metadata)) if @metadata; 122 | } 123 | 124 | if ($player_arg eq '' or $player_arg =~ /mpd/) { 125 | mpd; 126 | } 127 | if ($player_arg =~ /cmus/) { 128 | cmus; 129 | } 130 | playerctl; 131 | 132 | -------------------------------------------------------------------------------- /watson_dmenu: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Watson start/stop/status dmenu script. 3 | 4 | Add dmenu formatting options and default terminal if desired to 5 | ~/.config/watson/config 6 | 7 | [dmenu] 8 | dmenu_command = rofi -font "DejaVu Sans Mono 14" -width 60 9 | 10 | See the README for additional configuration options. 11 | 12 | """ 13 | import itertools 14 | import locale 15 | import os 16 | import shlex 17 | import sys 18 | from os.path import expanduser 19 | from subprocess import Popen, PIPE, STDOUT 20 | try: 21 | import configparser as configparser 22 | except ImportError: 23 | import ConfigParser as configparser 24 | 25 | ENV = os.environ.copy() 26 | ENC = locale.getpreferredencoding() 27 | 28 | 29 | def dmenu_cmd(num_lines, prompt=""): 30 | """Parse ~/.config/watson/config if it exists and add options to the dmenu 31 | command 32 | 33 | Args: args - num_lines: number of lines to display 34 | prompt: prompt to show 35 | Returns: command invocation (as a list of strings) for 36 | dmenu -l -p -i ... 37 | 38 | """ 39 | dmenu_command = "dmenu" 40 | conf = configparser.ConfigParser() 41 | conf.read(expanduser("~/.config/watson/config")) 42 | try: 43 | args = conf.items('dmenu') 44 | except configparser.NoSectionError: 45 | conf = False 46 | if not conf: 47 | res = [dmenu_command, "-i", "-l", str(num_lines), "-p", str(prompt)] 48 | else: 49 | args_dict = dict(args) 50 | dmenu_args = [] 51 | if "dmenu_command" in args_dict: 52 | command = shlex.split(args_dict["dmenu_command"]) 53 | dmenu_command = command[0] 54 | dmenu_args = command[1:] 55 | del args_dict["dmenu_command"] 56 | if "p" in args_dict and prompt == "Watson": 57 | prompt = args_dict["p"] 58 | del args_dict["p"] 59 | elif "p" in args_dict: 60 | del args_dict["p"] 61 | if "rofi" in dmenu_command: 62 | lines = "-i -dmenu -lines" 63 | else: 64 | lines = "-i -l" 65 | extras = (["-" + str(k), str(v)] for (k, v) in args_dict.items()) 66 | res = [dmenu_command, str(num_lines), "-p", str(prompt)] 67 | res.extend(dmenu_args) 68 | res += list(itertools.chain.from_iterable(extras)) 69 | res[1:1] = lines.split() 70 | return res 71 | 72 | 73 | def get_selection(options, prompt="Watson"): 74 | """Combine the arg lists and send to dmenu for selection. 75 | 76 | Args: args - options: list of strings 77 | Returns: selection (string) 78 | 79 | """ 80 | inp_bytes = "\n".join(options).encode(ENC) 81 | sel = Popen(dmenu_cmd(len(options), prompt=prompt), 82 | stdin=PIPE, 83 | stdout=PIPE).communicate(input=inp_bytes)[0].decode(ENC) 84 | if not sel.rstrip(): 85 | sys.exit() 86 | return sel.rstrip() 87 | 88 | 89 | def run_watson(options): 90 | """Run Watson with arguments 91 | 92 | Args: options - list of strings 93 | Returns: Watson return text - string 94 | 95 | """ 96 | cli = ["watson"] + options 97 | res = Popen(cli, stdout=PIPE, stderr=STDOUT, env=ENV).communicate()[0] 98 | return res.decode(ENC) 99 | 100 | 101 | def run(): 102 | options = ("start", "stop", "status", "restart") 103 | sel = get_selection(options) 104 | if sel == "start": 105 | projects = run_watson(["projects"]).split() 106 | tags = [""] + run_watson(["tags"]).split() 107 | project = get_selection(projects, "Project") 108 | tag = get_selection(tags, "Tag") 109 | tag = ["+{}".format(tag)] if tag != "" else "" 110 | while tag: 111 | new_tag = get_selection(tags, "Tag") 112 | if new_tag != "": 113 | tag += ["+{}".format(new_tag)] 114 | else: 115 | break 116 | cli = ["start"] + [project] 117 | if tag: 118 | cli += tag 119 | res = run_watson(cli) 120 | get_selection([res]) 121 | elif sel == "stop": 122 | res = run_watson(["stop"]) 123 | get_selection([res]) 124 | elif sel == "status": 125 | res = run_watson(["status"]) 126 | get_selection([res]) 127 | elif sel == "restart": 128 | res = run_watson(["restart"]) 129 | get_selection([res]) 130 | else: 131 | sys.exit() 132 | 133 | 134 | if __name__ == '__main__': 135 | run() 136 | -------------------------------------------------------------------------------- /mutt/.muttrc: -------------------------------------------------------------------------------- 1 | # Sidebar Patch -------------------------------------- 2 | set sidebar_visible 3 | set sidebar_short_path 4 | set sidebar_folder_indent 5 | set sidebar_width = 25 6 | set sidebar_divider_char = ' | ' 7 | set sidebar_indent_string = ' '' 8 | set sidebar_format = "%B %* [%?N?%N / ?%S]" 9 | color sidebar_new color221 color233 10 | 11 | # Sidebar Navigation --------------------------------- 12 | #bind index,pager sidebar-next 13 | #bind index,pager sidebar-prev 14 | #bind index,pager sidebar-open 15 | bind index,pager b sidebar-toggle-visible # b toggles sidebar visibility 16 | set index_format="%4C %Z %?X?A&-? %{%d/%b/%y} %-12.12L %?M?(#%03M)&(%4c)? %?y?(%.20Y) ?%s" 17 | set display_filter="$HOME/.dotfiles/mutt/.mutt/local-date.py" 18 | 19 | # Status Bar ----------------------------------------- 20 | set status_chars = " *%A" 21 | set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" 22 | 23 | # Header Options ------------------------------------- 24 | ignore * # ignore all headers 25 | unignore from: to: cc: date: subject: # show only these 26 | unhdr_order * # some distros order things by default 27 | hdr_order from: to: cc: date: subject: # and in this order 28 | 29 | # Account Settings ----------------------------------- 30 | #set wait_key = no # shut up, mutt 31 | #set timeout = 3 # idle time before scanning 32 | #set mail_check = 0 # minimum time between scans 33 | set beep_new # bell on new mails 34 | #set pipe_decode # strip headers and eval mimes when piping 35 | #set thorough_search # strip headers and eval mimes before searching 36 | #unset move # gmail does that 37 | set delete # don't ask, just do 38 | unset confirmappend # don't ask, just do! 39 | set quit # don't ask, just do!! 40 | set text_flowed=yes # Format-Flowed 41 | 42 | # look and feel 43 | set pager_index_lines = 8 44 | set pager_context = 5 45 | set pager_stop 46 | set menu_scroll 47 | set smart_wrap 48 | set tilde 49 | unset markers 50 | 51 | ## Speed up folder switch 52 | set sleep_time = 0 53 | set mbox_type=Maildir 54 | #set imap_check_subscribed 55 | 56 | # Paths 57 | set folder = "~/.mail" 58 | set header_cache = ~/.mutt/cache/headers 59 | set message_cachedir = ~/.mutt/cache/bodies 60 | set certificate_file = ~/.mutt/cache/certificates 61 | set tmpdir = /tmp 62 | 63 | # Mailboxes to show in the sidebar. 64 | mailboxes =ALL-INBOXES 65 | mailboxes =gmail/Inbox =ministere/Inbox 66 | mailboxes ="===================" 67 | mailboxes =gmail 68 | mailboxes =gmail/archives =gmail/sent =gmail/drafts =gmail/spam =gmail/trash 69 | mailboxes =ministere 70 | mailboxes =ministere/archives =ministere/sent =ministere/drafts =ministere/spam =ministere/trash 71 | 72 | ## url view 73 | #macro pager \cu 'urlview' 'Follow links with urlview' 74 | macro pager \Cu "|urlscan" "call urlview to open links" 75 | 76 | 77 | macro index \ 78 | "unset wait_keynotmuch-mutt --prompt search`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`" \ 79 | "notmuch: search mail" 80 | macro index \ 81 | "unset wait_keynotmuch-mutt thread`echo ${XDG_CACHE_HOME:-$HOME/.cache}/notmuch/mutt/results`set wait_key" \ 82 | "notmuch: reconstruct thread" 83 | macro index \ 84 | "unset wait_keynotmuch-mutt tag -inbox" \ 85 | "notmuch: remove message from inbox" 86 | 87 | # format 88 | set send_charset = "utf-8:iso-8859-1:us-ascii" 89 | set charset = "utf-8" 90 | set rfc2047_parameters 91 | 92 | macro compose v "^Uidentity\_" "Select from" 93 | 94 | set spoolfile = "+gmail/Inbox" 95 | folder-hook 'gmail/*' 'source ~/.mutt/account_gmail' 96 | folder-hook 'ministere/*' 'source ~/.mutt/account_ministere' 97 | 98 | macro index,pager " =gmail/Inbox" "go Gmail" 99 | macro index,pager " =ministere/Inbox" "go Ministere" 100 | 101 | ## Default account 102 | source "~/.mutt/account_gmail" 103 | 104 | ## Keybindings 105 | bind pager q exit 106 | bind pager / search 107 | #bind pager previous-line 108 | #bind pager next-line 109 | bind pager k previous-line 110 | bind pager j next-line 111 | bind pager gg top 112 | bind pager G bottom 113 | bind index gg first-entry 114 | bind index G last-entry 115 | bind pager K previous-undeleted 116 | bind pager J next-undeleted 117 | bind index K previous-unread 118 | bind index J next-unread 119 | bind index,pager R group-reply 120 | bind index,pager \Cp sidebar-prev 121 | bind index,pager \Cn sidebar-next 122 | bind index,pager \Ci sidebar-open 123 | 124 | ## Mailcap 125 | set mailcap_path = ~/.mutt/mailcap 126 | alternative_order text/plain text/html 127 | auto_view text/html 128 | auto_view text/calendar application/ics 129 | set markers=no # Delete the + sign on new lines 130 | 131 | ## Sorting index by thread 132 | set sort=threads #sort by threads 133 | set sort_aux = last-date-received 134 | 135 | # Fetch mail shortcut 136 | macro generic,index,pager "unset wait_keynotify-send 'Sync gmail'; mbsync --quiet --quiet --all | xargs notify-send 'Gmail synced' &" "Fetch messages" 137 | set print_command="~/Documents/Script/mutt_print.sh" 138 | #bind index,pager u bounce-message 139 | 140 | # Pre-fills the "From" address when replying to emails, based on the email a account that received the original mail 141 | set reverse_name 142 | set envelope_from 143 | 144 | # Conf msmtp 145 | set sendmail="/usr/bin/msmtp" 146 | set use_from=yes 147 | set envelope_from=yes 148 | 149 | # Signature 150 | set sig_on_top=yes 151 | 152 | ## Security 153 | source /usr/share/doc/mutt/samples/gpg.rc 154 | set pgp_use_gpg_agent = yes 155 | set pgp_timeout = 3600 # how long to cache the pass-phrase 156 | set crypt_autosign = no # automatically sign all outgoing mail 157 | set crypt_replyencrypt = yes # automatically encrypt replies to encrypted messages 158 | set pgp_sign_as = "B212E65B" # my Key ID 159 | 160 | ## Paths 161 | source ~/.mutt/mutt-colors-solarized-dark-16.muttrc 162 | source ~/.mutt/alias 163 | set alias_file = ~/.mutt/alias # where to store aliases 164 | -------------------------------------------------------------------------------- /bash/.bashrc: -------------------------------------------------------------------------------- 1 | # 2 | # ~/.bashrc 3 | # 4 | 5 | ####################################################################### 6 | # General # 7 | ####################################################################### 8 | # If not running interactively, don't do anything 9 | [[ $- != *i* ]] && return 10 | 11 | # Handy Extract Program 12 | function extract() 13 | { 14 | if [ -f $1 ] ; then 15 | case $1 in 16 | *.tar.bz2) tar xvjf $1 ;; 17 | *.tar.gz) tar xvzf $1 ;; 18 | *.bz2) bunzip2 $1 ;; 19 | *.rar) unrar x $1 ;; 20 | *.gz) gunzip $1 ;; 21 | *.tar) tar xvf $1 ;; 22 | *.tbz2) tar xvjf $1 ;; 23 | *.tgz) tar xvzf $1 ;; 24 | *.zip) unzip $1 ;; 25 | *.Z) uncompress $1 ;; 26 | *.7z) 7z x $1 ;; 27 | *) echo "'$1' cannot be extracted via >extract<" ;; 28 | esac 29 | else 30 | echo "'$1' is not a valid file!" 31 | fi 32 | } 33 | 34 | # Creates an archive (*.tar.gz) from given directory. 35 | function maketar() { tar cvzf "${1%%/}.tar.gz" "${1%%/}/"; } 36 | 37 | # Create a ZIP archive of a file or folder. 38 | function makezip() { zip -r "${1%%/}.zip" "$1" ; } 39 | 40 | # Engligh dictionary definition (dict - the client for the dictionary server) 41 | function def { sdcv --data-dir ~/Documents/Script/EnglishDic/ -n "$1" | less; } 42 | 43 | # English thesaurus 44 | function syn { sdcv "$1" --data-dir ~/Documents/Script/EnglishDic/ -u "Moby Thesaurus II"; } 45 | 46 | # French dictionary definition 47 | function sig { sdcv --data-dir ~/Documents/Script/FrenchDic/ -n "$1" | less; } 48 | 49 | # Wakeup function 50 | function levantese() { sudo rtcwake -vm no -a -t $(date +%s -d "${1%%/}") ; } 51 | 52 | # Ranger shortcut to avoid open several ranger instances 53 | rg() { 54 | if [ -z "$RANGER_LEVEL" ] 55 | then 56 | ranger 57 | else 58 | exit 59 | fi 60 | } 61 | 62 | ####################################################################### 63 | # Aliases # 64 | ####################################################################### 65 | # ls aliases 66 | alias ll='ls -alF' 67 | alias la='ls -A' 68 | alias l='ls -CF' 69 | alias ls='ls --color' 70 | 71 | # Backup aliases 72 | alias pc2toshibaDocuments='sudo rsync -e "sudo -u cris" -avzh --progress /home/arch/Documents/ /run/media/arch/Toshiba2/Documents' 73 | alias pc2toshibaMusic='sudo rsync -e "sudo -u arch" -avzh --delete --progress /home/arch/Music_clean/ /run/media/arch/Toshiba/Music_clean/' 74 | alias pc2toshibaPictures='sudo rsync -e "sudo -u arch" -avzh --progress /home/arch/Images/ /run/media/arch/Toshiba2/Pictures/' 75 | alias pc2toshibaMail='sudo rsync -e "sudo -u arch" -avzh --progress /home/arch/.mail/ /run/media/arch/Toshiba2/Mail/' 76 | alias pc2toshibaVideos='sudo rsync -e "sudo -u cris" -avzh --progress /home/cris/Videos/ /run/media/cris/Toshiba2/Videos/' 77 | alias toshiba2pcDocuments='rsync -avzh --delete --progress /run/media/cris/Toshiba2/Clases/ /home/cris/Documents/' 78 | alias toshiba2pcMusic='sudo rsync -e "sudo -u arch" -avzh --progress /run/media/arch/Toshiba/Music/ /home/arch/Music/' 79 | alias toshiba2pcPictures='rsync -avzh --delete --progress /run/media/cris/Toshiba2/Pictures/ /home/cris/Images/' 80 | # sudo rsync -e "sudo -u arch" -avzh --progress /run/media/arch/Toshiba2/Clases/Papeles /home/arch/Documents/ 81 | 82 | ####################################################################### 83 | # Shortcuts # 84 | ####################################################################### 85 | 86 | # Install cower aur packages 87 | function cowerup() { cower -df "${1%%/}" ; cd ~/.builds/"${1%%/}" ; makepkg -si; cd ~ ; } 88 | 89 | # Turn on nvidia card 90 | alias bbon='sudo tee /proc/acpi/bbswitch <<< ON' 91 | 92 | # Turn off nvidia card 93 | alias bboff='sudo rmmod nvidia_uvm; sudo rmmod nvidia; sudo tee /proc/acpi/bbswitch <<< OFF;' 94 | 95 | # Music suite ncmpcpp 96 | alias ncm='ncmpcpp' 97 | 98 | # Compile latex on background 99 | alias ltx="grep -l '\\documentclass' *tex | xargs latexmk -pdf -pvc -silent > /dev/null 2>&1 &" 100 | 101 | # Unmount disk 102 | alias udisk='udisksctl unmount -b /dev/sdb1;udisksctl unmount -b /dev/dm-0;udisksctl lock -b /dev/sdb2;udisksctl power-off -b /dev/sdb;' 103 | 104 | # Mount disk 105 | alias mdisk='udisksctl unlock -b /dev/sdb2;udisksctl mount -b /dev/dm-0;' 106 | 107 | # Keyboard light up 108 | alias ledu='sudo ~/.config/i3/leds_up.sh' 109 | 110 | # Keyboard light down 111 | alias ledd='sudo ~/.config/i3/leds_down.sh' 112 | 113 | ####################################################################### 114 | # Config # 115 | ####################################################################### 116 | ######################### 117 | # Set text editor vim # 118 | ######################### 119 | export EDITOR=nvim 120 | alias vi='nvim' 121 | alias vim='nvim' 122 | 123 | ###################### 124 | # Add CUDA to path # 125 | ###################### 126 | export PATH=/opt/cuda/bin:$PATH 127 | export LD_LIBRARY_PATH=/opt/cuda/lib64:$LD_LIBRARY_PATH 128 | 129 | ############### 130 | # gpg-agent # 131 | ############### 132 | # GPG variables 133 | GPG_TTY=$(tty) 134 | export GPG_TTY 135 | 136 | ############# 137 | # Termite # 138 | ############# 139 | if [[ $TERM == xterm-termite ]]; then 140 | . /etc/profile.d/vte.sh 141 | __vte_prompt_command 142 | fi 143 | 144 | # Termite change conf 145 | alias tdark='cp ~/.config/termite/configSolarizedDark ~/.config/termite/config' 146 | alias tlight='cp ~/.config/termite/configSolarizedLight ~/.config/termite/config' 147 | alias tgruv='cp ~/.config/termite/configGruv ~/.config/termite/config' 148 | 149 | # Compatibility for ssh connection 150 | #export TERM=xterm-256color 151 | 152 | ############ 153 | # Ranger # 154 | ############ 155 | # Disable loading of global config 156 | export RANGER_LOAD_DEFAULT_RC=FALSE 157 | 158 | ######### 159 | # NVM # 160 | ######### 161 | 162 | source /usr/share/nvm/init-nvm.sh 163 | 164 | ############ 165 | # Others # 166 | ############ 167 | # Source API tokens 168 | source ~/.dotfiles/APIs 169 | 170 | alias milab='~/go/bin/slack-term -token "$SLACK_MILAB_TOKEN"' 171 | alias eig='~/go/bin/slack-term -token "$SLACK_EIG_TOKEN"' 172 | alias graf='grafana-server --config=/home/arch/.config/grafana/grafana.ini --homepath=/usr/share/grafana' 173 | 174 | export PATH=/home/$HOME/.local/bin:$PATH 175 | 176 | # Use bash-completion, if available 177 | [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && \ 178 | . /usr/share/bash-completion/bash_completion 179 | 180 | # Load shell prompt line 181 | source ~/.shell_prompt.sh 182 | 183 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" 184 | -------------------------------------------------------------------------------- /i3/.config/i3/config: -------------------------------------------------------------------------------- 1 | # Please see http://i3wm.org/docs/userguide.html for a complete reference! 2 | 3 | set $mod Mod4 4 | 5 | # Font for window titles. Will also be used by the bar unless a different font 6 | # is used in the bar {} block below. 7 | font pango:Inconsolata 8 8 | 9 | # Disable focus mouse, touchpad is annoying 10 | focus_follows_mouse no 11 | 12 | # Use Mouse+$mod to drag floating windows to their wanted position 13 | floating_modifier $mod 14 | 15 | # start a terminal 16 | #bindsym $mod+Return exec i3-sensible-terminal 17 | bindsym $mod+Return exec st 18 | 19 | # kill focused window 20 | bindsym $mod+Shift+A kill 21 | 22 | ########################### 23 | # Rofi program launcher # 24 | ########################### 25 | # start passmenu 26 | bindsym $mod+i exec rofi-pass 27 | # start watsondmenu 28 | bindsym $mod+w exec ~/.dotfiles/watson_dmenu 29 | bindsym $mod+Tab exec --no-startup-id rofi -show window 30 | bindsym $mod+d exec --no-startup-id rofi -show drun -show-icons 31 | bindsym $mod+Shift+d exec --no-startup-id rofi -show run 32 | bindsym $mod+Shift+q exec ~/.config/i3/rofi_powermenu.sh 33 | bindsym $mod+Shift+u exec ~/.local/bin/keepmenu 34 | bindsym Control+space exec dunstctl close 35 | bindsym Control+Shift+space exec dunstctl close-all 36 | bindsym Control+egrave exec dunstctl history-pop 37 | #bindsym XF86WakeUp exec ~/.config/i3/rofi_powermenu.sh 38 | 39 | # change focus 40 | bindsym $mod+h focus left 41 | bindsym $mod+j focus down 42 | bindsym $mod+k focus up 43 | bindsym $mod+l focus right 44 | 45 | # alternatively, you can use the cursor keys: 46 | bindsym $mod+Left focus left 47 | bindsym $mod+Down focus down 48 | bindsym $mod+Up focus up 49 | bindsym $mod+Right focus right 50 | 51 | # move focused window 52 | bindsym $mod+Shift+h move left 53 | bindsym $mod+Shift+j move down 54 | bindsym $mod+Shift+k move up 55 | bindsym $mod+Shift+l move right 56 | 57 | # alternatively, you can use the cursor keys: 58 | bindsym $mod+Shift+Left move left 59 | bindsym $mod+Shift+Down move down 60 | bindsym $mod+Shift+Up move up 61 | bindsym $mod+Shift+Right move right 62 | 63 | # split in horizontal orientation 64 | #bindsym $mod+% split h 65 | 66 | # split in vertical orientation 67 | #bindsym $mod+" split v 68 | 69 | # enter fullscreen mode for the focused container 70 | bindsym $mod+f fullscreen toggle 71 | 72 | # change container layout (stacked, tabbed, toggle split) 73 | bindsym $mod+s layout stacking 74 | bindsym $mod+z layout tabbed 75 | bindsym $mod+e layout toggle split 76 | 77 | # toggle tiling / floating 78 | bindsym $mod+Shift+space floating toggle 79 | 80 | # change focus between tiling / floating windows 81 | bindsym $mod+space focus mode_toggle 82 | 83 | # focus the parent container 84 | bindsym $mod+q focus parent 85 | 86 | # focus the child container 87 | #bindsym $mod+d focus child 88 | 89 | ################ 90 | # workspaces # 91 | ################ 92 | 93 | # Custom workspaces names 94 | set $workspace1 "1 " 95 | set $workspace2 "2 " 96 | set $workspace3 "3 " 97 | set $workspace4 "4 " 98 | set $workspace5 "5 " 99 | set $workspace6 "6 " 100 | set $workspace7 "7 " 101 | set $workspace8 "8 " 102 | set $workspace9 "9 " 103 | set $workspace10 "10 " 104 | 105 | # switch to workspace 106 | bindsym $mod+ampersand workspace $workspace1 107 | bindsym $mod+eacute workspace $workspace2 108 | bindsym $mod+quotedbl workspace $workspace3 109 | bindsym $mod+apostrophe workspace $workspace4 110 | bindsym $mod+parenleft workspace $workspace5 111 | bindsym $mod+minus workspace $workspace6 112 | bindsym $mod+egrave workspace $workspace7 113 | bindsym $mod+underscore workspace $workspace8 114 | bindsym $mod+ccedilla workspace $workspace9 115 | bindsym $mod+agrave workspace $workspace10 116 | 117 | # move focused container to workspace 118 | bindsym $mod+Shift+ampersand move container to workspace $workspace1 119 | bindsym $mod+Shift+eacute move container to workspace $workspace2 120 | bindsym $mod+Shift+quotedbl move container to workspace $workspace3 121 | bindsym $mod+Shift+apostrophe move container to workspace $workspace4 122 | bindsym $mod+Shift+parenleft move container to workspace $workspace5 123 | bindsym $mod+Shift+minus move container to workspace $workspace6 124 | bindsym $mod+Shift+egrave move container to workspace $workspace7 125 | bindsym $mod+Shift+underscore move container to workspace $workspace8 126 | bindsym $mod+Shift+ccedilla move container to workspace $workspace9 127 | bindsym $mod+Shift+agrave move container to workspace $workspace10 128 | 129 | # Assign apps to workspaces 130 | assign [class="Rhythmbox"] $workspace10 131 | for_window [class="Spotify"] move to workspace $workspace10 132 | assign [class="firefox"] $workspace2 133 | assign [class="Chromium"] $workspace3 134 | 135 | # reload the configuration file 136 | bindsym $mod+Shift+c reload 137 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 138 | bindsym $mod+Shift+r restart 139 | # exit i3 (logs you out of your X session) 140 | bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" 141 | 142 | ######################################################### 143 | # resize window (you can also use the mouse for that) # 144 | ######################################################### 145 | 146 | mode "resize" { 147 | # These bindings trigger as soon as you enter the resize mode 148 | 149 | # Pressing left will shrink the window’s width. 150 | # Pressing right will grow the window’s width. 151 | # Pressing up will shrink the window’s height. 152 | # Pressing down will grow the window’s height. 153 | bindsym h resize shrink width 10 px or 10 ppt 154 | bindsym j resize grow height 10 px or 10 ppt 155 | bindsym k resize shrink height 10 px or 10 ppt 156 | bindsym l resize grow width 10 px or 10 ppt 157 | 158 | # same bindings, but for the arrow keys 159 | bindsym Left resize shrink width 10 px or 10 ppt 160 | bindsym Down resize grow height 10 px or 10 ppt 161 | bindsym Up resize shrink height 10 px or 10 ppt 162 | bindsym Right resize grow width 10 px or 10 ppt 163 | 164 | # back to normal: Enter or Escape 165 | bindsym Return mode "default" 166 | bindsym Escape mode "default" 167 | } 168 | 169 | bindsym $mod+r mode "resize" 170 | 171 | ############# 172 | # polybar # 173 | ############# 174 | exec_always --no-startup-id $HOME/.config/polybar/launch.sh 175 | 176 | ############################### 177 | # Custom Keyboard Shortcuts # 178 | ############################### 179 | # Disable title and border 180 | new_window 1pixel 181 | 182 | # Lock screen. --dpms option will turn off all displays right after locking. 183 | bindsym Mod4+Control+l exec $HOME/.dotfiles/autolock.sh lock 184 | 185 | # Pulse Audio controls 186 | bindsym XF86AudioRaiseVolume exec --no-startup-id $HOME/.config/i3/sound_change.sh && pactl set-sink-volume @DEFAULT_SINK@ +5% #increase sound volume 187 | bindsym XF86AudioLowerVolume exec --no-startup-id $HOME/.config/i3/sound_change.sh && pactl set-sink-volume @DEFAULT_SINK@ -5% #decrease sound volume 188 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle # mute sound 189 | bindsym XF86AudioMicMute exec amixer sset Capture toggle # mute mic key 190 | 191 | # Sreen brightness controls 192 | bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness 193 | bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness 194 | 195 | # Touchpad controls 196 | #bindsym XF86TouchpadToggle exec ~/.config/i3/toggletouchpad.sh # toggle touchpad 197 | 198 | # Print Screen 199 | bindsym Print exec flameshot full -p ~/Pictures/Screenshots/`date +%Y-%m-%d_%H:%M:%S`.png 200 | 201 | # Media player controls 202 | #bindsym XF86AudioPlay exec playerctl play 203 | #bindsym XF86AudioPause exec playerctl pause 204 | #bindsym XF86AudioNext exec playerctl next 205 | #bindsym XF86AudioPrev exec playerctl previous 206 | bindsym $mod+F2 exec mpc prev 207 | bindsym $mod+F3 exec mpc next 208 | bindsym $mod+F1 exec mpc toggle 209 | 210 | # Keyboard Brightness 211 | bindsym XF86KbdBrightnessDown exec "~/.config/i3/leds_down.sh" 212 | bindsym XF86KbdBrightnessUp exec "~/.config/i3/leds_up.sh" 213 | 214 | # Display 215 | bindsym XF86Display exec "autorandr -c" 216 | bindsym $mod+F8 exec "autorandr -c" 217 | 218 | # Wallpaper! 219 | exec_always feh --bg-scale ~/Pictures/Wallpaper/wallpaper.jpg 220 | 221 | # Startup programs 222 | exec --no-startup-id nm-applet 223 | exec --no-startup-id blueman-applet 224 | exec --no-startup-id unclutter 225 | exec --no-startup-id udiskie 226 | exec --no-startup-id compton 227 | exec --no-startup-id dunst 228 | exec --no-startup-id xautolock 229 | exec --no-startup-id autorandr -c 230 | exec --no-startup-id redshift -l 48.85341:2.3488 & 231 | exec "sh -c 'sleep 300; exec ~/.dotfiles/BingDownloadImage.sh && feh --bg-scale ~/Pictures/Wallpaper/wallpaper.jpg'" 232 | -------------------------------------------------------------------------------- /bash/.shell_prompt.sh: -------------------------------------------------------------------------------- 1 | # 2 | # This shell prompt config file was created by promptline.vim 3 | # 4 | function __promptline_host { 5 | local only_if_ssh="0" 6 | 7 | if [ $only_if_ssh -eq 0 -o -n "${SSH_CLIENT}" ]; then 8 | if [[ -n ${ZSH_VERSION-} ]]; then print %m; elif [[ -n ${FISH_VERSION-} ]]; then hostname -s; else printf "%s" \\h; fi 9 | fi 10 | } 11 | 12 | function __promptline_last_exit_code { 13 | 14 | [[ $last_exit_code -gt 0 ]] || return 1; 15 | 16 | printf "%s" "$last_exit_code" 17 | } 18 | function __promptline_ps1 { 19 | local slice_prefix slice_empty_prefix slice_joiner slice_suffix is_prompt_empty=1 20 | 21 | # section "a" header 22 | slice_prefix="${a_bg}${sep}${a_fg}${a_bg}${space}" slice_suffix="$space${a_sep_fg}" slice_joiner="${a_fg}${a_bg}${alt_sep}${space}" slice_empty_prefix="${a_fg}${a_bg}${space}" 23 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 24 | # section "a" slices 25 | __promptline_wrapper "$(__promptline_host)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 26 | 27 | # section "b" header 28 | slice_prefix="${b_bg}${sep}${b_fg}${b_bg}${space}" slice_suffix="$space${b_sep_fg}" slice_joiner="${b_fg}${b_bg}${alt_sep}${space}" slice_empty_prefix="${b_fg}${b_bg}${space}" 29 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 30 | # section "b" slices 31 | __promptline_wrapper "$(__promptline_cwd)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 32 | 33 | # section "c" header 34 | slice_prefix="${c_bg}${sep}${c_fg}${c_bg}${space}" slice_suffix="$space${c_sep_fg}" slice_joiner="${c_fg}${c_bg}${alt_sep}${space}" slice_empty_prefix="${c_fg}${c_bg}${space}" 35 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 36 | # section "c" slices 37 | __promptline_wrapper "$(__promptline_vcs_branch)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 38 | 39 | # section "z" header 40 | slice_prefix="${z_bg}${sep}${z_fg}${z_bg}${space}" slice_suffix="$space${z_sep_fg}" slice_joiner="${z_fg}${z_bg}${alt_sep}${space}" slice_empty_prefix="${z_fg}${z_bg}${space}" 41 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 42 | # section "z" slices 43 | __promptline_wrapper "${VIRTUAL_ENV##*/}" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 44 | 45 | # section "warn" header 46 | slice_prefix="${warn_bg}${sep}${warn_fg}${warn_bg}${space}" slice_suffix="$space${warn_sep_fg}" slice_joiner="${warn_fg}${warn_bg}${alt_sep}${space}" slice_empty_prefix="${warn_fg}${warn_bg}${space}" 47 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 48 | # section "warn" slices 49 | __promptline_wrapper "$(__promptline_last_exit_code)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 50 | 51 | # close sections 52 | printf "%s" "${reset_bg}${sep}$reset$space" 53 | } 54 | function __promptline_vcs_branch { 55 | local branch 56 | local branch_symbol=" " 57 | 58 | # git 59 | if hash git 2>/dev/null; then 60 | if branch=$( { git symbolic-ref --quiet HEAD || git rev-parse --short HEAD; } 2>/dev/null ); then 61 | branch=${branch##*/} 62 | printf "%s" "${branch_symbol}${branch:-unknown}" 63 | return 64 | fi 65 | fi 66 | return 1 67 | } 68 | function __promptline_cwd { 69 | local dir_limit="3" 70 | local truncation="⋯" 71 | local first_char 72 | local part_count=0 73 | local formatted_cwd="" 74 | local dir_sep="  " 75 | local tilde="~" 76 | 77 | local cwd="${PWD/#$HOME/$tilde}" 78 | 79 | # get first char of the path, i.e. tilde or slash 80 | [[ -n ${ZSH_VERSION-} ]] && first_char=$cwd[1,1] || first_char=${cwd::1} 81 | 82 | # remove leading tilde 83 | cwd="${cwd#\~}" 84 | 85 | while [[ "$cwd" == */* && "$cwd" != "/" ]]; do 86 | # pop off last part of cwd 87 | local part="${cwd##*/}" 88 | cwd="${cwd%/*}" 89 | 90 | formatted_cwd="$dir_sep$part$formatted_cwd" 91 | part_count=$((part_count+1)) 92 | 93 | [[ $part_count -eq $dir_limit ]] && first_char="$truncation" && break 94 | done 95 | 96 | printf "%s" "$first_char$formatted_cwd" 97 | } 98 | function __promptline_left_prompt { 99 | local slice_prefix slice_empty_prefix slice_joiner slice_suffix is_prompt_empty=1 100 | 101 | # section "a" header 102 | slice_prefix="${a_bg}${sep}${a_fg}${a_bg}${space}" slice_suffix="$space${a_sep_fg}" slice_joiner="${a_fg}${a_bg}${alt_sep}${space}" slice_empty_prefix="${a_fg}${a_bg}${space}" 103 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 104 | # section "a" slices 105 | __promptline_wrapper "$(__promptline_host)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 106 | 107 | # section "b" header 108 | slice_prefix="${b_bg}${sep}${b_fg}${b_bg}${space}" slice_suffix="$space${b_sep_fg}" slice_joiner="${b_fg}${b_bg}${alt_sep}${space}" slice_empty_prefix="${b_fg}${b_bg}${space}" 109 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 110 | # section "b" slices 111 | __promptline_wrapper "$(__promptline_cwd)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 112 | 113 | # section "c" header 114 | slice_prefix="${c_bg}${sep}${c_fg}${c_bg}${space}" slice_suffix="$space${c_sep_fg}" slice_joiner="${c_fg}${c_bg}${alt_sep}${space}" slice_empty_prefix="${c_fg}${c_bg}${space}" 115 | [ $is_prompt_empty -eq 1 ] && slice_prefix="$slice_empty_prefix" 116 | # section "c" slices 117 | __promptline_wrapper "$(__promptline_vcs_branch)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; is_prompt_empty=0; } 118 | 119 | # close sections 120 | printf "%s" "${reset_bg}${sep}$reset$space" 121 | } 122 | function __promptline_wrapper { 123 | # wrap the text in $1 with $2 and $3, only if $1 is not empty 124 | # $2 and $3 typically contain non-content-text, like color escape codes and separators 125 | 126 | [[ -n "$1" ]] || return 1 127 | printf "%s" "${2}${1}${3}" 128 | } 129 | function __promptline_right_prompt { 130 | local slice_prefix slice_empty_prefix slice_joiner slice_suffix 131 | 132 | # section "warn" header 133 | slice_prefix="${warn_sep_fg}${rsep}${warn_fg}${warn_bg}${space}" slice_suffix="$space${warn_sep_fg}" slice_joiner="${warn_fg}${warn_bg}${alt_rsep}${space}" slice_empty_prefix="" 134 | # section "warn" slices 135 | __promptline_wrapper "$(__promptline_last_exit_code)" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; } 136 | 137 | # section "z" header 138 | slice_prefix="${z_sep_fg}${rsep}${z_fg}${z_bg}${space}" slice_suffix="$space${z_sep_fg}" slice_joiner="${z_fg}${z_bg}${alt_rsep}${space}" slice_empty_prefix="" 139 | # section "z" slices 140 | __promptline_wrapper "${VIRTUAL_ENV##*/}" "$slice_prefix" "$slice_suffix" && { slice_prefix="$slice_joiner"; } 141 | 142 | # close sections 143 | printf "%s" "$reset" 144 | } 145 | function __promptline { 146 | local last_exit_code="${PROMPTLINE_LAST_EXIT_CODE:-$?}" 147 | 148 | local esc=$'[' end_esc=m 149 | if [[ -n ${ZSH_VERSION-} ]]; then 150 | local noprint='%{' end_noprint='%}' 151 | elif [[ -n ${FISH_VERSION-} ]]; then 152 | local noprint='' end_noprint='' 153 | else 154 | local noprint='\[' end_noprint='\]' 155 | fi 156 | local wrap="$noprint$esc" end_wrap="$end_esc$end_noprint" 157 | local space=" " 158 | local sep="" 159 | local rsep="" 160 | local alt_sep="" 161 | local alt_rsep="" 162 | local reset="${wrap}0${end_wrap}" 163 | local reset_bg="${wrap}49${end_wrap}" 164 | local a_fg="${wrap}38;5;0${end_wrap}" 165 | local a_bg="${wrap}48;5;7${end_wrap}" 166 | local a_sep_fg="${wrap}38;5;7${end_wrap}" 167 | local b_fg="${wrap}38;5;7${end_wrap}" 168 | local b_bg="${wrap}48;5;239${end_wrap}" 169 | local b_sep_fg="${wrap}38;5;239${end_wrap}" 170 | local c_fg="${wrap}38;5;7${end_wrap}" 171 | local c_bg="${wrap}48;5;237${end_wrap}" 172 | local c_sep_fg="${wrap}38;5;237${end_wrap}" 173 | local warn_fg="${wrap}38;5;0${end_wrap}" 174 | local warn_bg="${wrap}48;5;208${end_wrap}" 175 | local warn_sep_fg="${wrap}38;5;208${end_wrap}" 176 | local z_fg="${wrap}38;5;0${end_wrap}" 177 | local z_bg="${wrap}48;5;7${end_wrap}" 178 | local z_sep_fg="${wrap}38;5;7${end_wrap}" 179 | if [[ -n ${ZSH_VERSION-} ]]; then 180 | PROMPT="$(__promptline_left_prompt)" 181 | RPROMPT="$(__promptline_right_prompt)" 182 | elif [[ -n ${FISH_VERSION-} ]]; then 183 | if [[ -n "$1" ]]; then 184 | [[ "$1" = "left" ]] && __promptline_left_prompt || __promptline_right_prompt 185 | else 186 | __promptline_ps1 187 | fi 188 | else 189 | PS1="$(__promptline_ps1)" 190 | fi 191 | } 192 | 193 | if [[ -n ${ZSH_VERSION-} ]]; then 194 | if [[ ! ${precmd_functions[(r)__promptline]} == __promptline ]]; then 195 | precmd_functions+=(__promptline) 196 | fi 197 | elif [[ -n ${FISH_VERSION-} ]]; then 198 | __promptline "$1" 199 | else 200 | if [[ ! "$PROMPT_COMMAND" == *__promptline* ]]; then 201 | PROMPT_COMMAND='__promptline;'$'\n'"$PROMPT_COMMAND" 202 | fi 203 | fi 204 | -------------------------------------------------------------------------------- /mutt/.mutt/mailcap: -------------------------------------------------------------------------------- 1 | text/html; w3m -I %{charset} -T text/html; copiousoutput; 2 | #text/html; elinks -dump -dump-color-mode 3 \ 3 | # dump-charset utf-8 -default-mime-type text/htm %s; \ 4 | # copiousoutput 5 | text/html; /usr/bin/firefox %s >/dev/null 2>&1; needsterminal 6 | #text/html; elinks -dump %s; nametemplate=%s.html; copiousoutput 7 | ###text/html; ~/.mutt/tiny.pl %s ; copiousoutput ; nametemplate=%s.html 8 | ###text/plain; ~/.mutt/tiny.pl %s 't' ; copiousoutput ; nametemplate=%s.html 9 | image/*; nsxiv %s 10 | application/pdf; { set -m \; /bin/mv -T %s %s.mv \; ( zathura %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 11 | audio/* ; /usr/bin/mplayer %s ; copiousoutput 12 | video/* ; /usr/bin/mplayer %s ; copiousoutput 13 | text/calendar; mutt-ics; copiousoutput 14 | application/ics; mutt-ics; copiousoutput 15 | 16 | # Open Office Stuff 17 | application/vnd.oasis.opendocument.database; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 18 | application/vnd.oasis.opendocument.chart; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 19 | application/vnd.oasis.opendocument.spreadsheet; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 20 | application/vnd.oasis.opendocument.spreadsheet-template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 21 | application/vnd.oasis.opendocument.graphics; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 22 | application/vnd.oasis.opendocument.graphics-template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 23 | application/vnd.oasis.opendocument.presentation; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 24 | application/vnd.oasis.opendocument.presentation-template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 25 | application/vnd.oasis.opendocument.formula; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 26 | application/vnd.oasis.opendocument.text; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 27 | application/vnd.oasis.opendocument.text-master; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 28 | application/vnd.oasis.opendocument.text-template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 29 | application/vnd.oasis.opendocument.text-web; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 30 | application/vnd.sun.xml.base; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 31 | application/vnd.sun.xml.calc; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 32 | application/vnd.sun.xml.calc.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 33 | application/vnd.sun.xml.draw; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 34 | application/vnd.sun.xml.draw.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 35 | application/vnd.stardivision.calc; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 36 | application/vnd.stardivision.chart; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 37 | application/vnd.stardivision.draw; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 38 | application/vnd.stardivision.impress; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 39 | application/vnd.stardivision.math; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 40 | application/vnd.stardivision.writer-global; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 41 | application/vnd.stardivision.writer; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 42 | application/vnd.sun.xml.impress; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 43 | application/vnd.sun.xml.impress.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 44 | application/vnd.sun.xml.math; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 45 | application/vnd.sun.xml.writer; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 46 | application/vnd.sun.xml.writer.global; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 47 | application/vnd.sun.xml.writer.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 48 | text/csv; { set -m \; /bin/mv -T %s %s.mv \; ( loffice --calc %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 49 | text/spreadsheet; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 50 | application/x-quattropro; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 51 | application/x-dbf; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 52 | application/vnd.ms-excel.sheet.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 53 | application/vnd.ms-excel.template.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 54 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 55 | application/vnd.openxmlformats-officedocument.spreadsheetml.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 56 | application/vnd.lotus-1-2-3; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 57 | application/vnd.ms-excel; { set -m \; /bin/mv -T %s %s.mv \; ( soffice --calc %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 58 | application/msexcel; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 59 | application/x-dbase; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 60 | text/x-csv; { set -m \; /bin/mv -T %s %s.mv \; ( loffice --calc %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 61 | application/vnd.ms-powerpoint.presentation.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 62 | application/vnd.ms-powerpoint.slideshow.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 63 | application/vnd.ms-powerpoint.template.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 64 | application/vnd.openxmlformats-officedocument.presentationml.presentation; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 65 | application/vnd.openxmlformats-officedocument.presentationml.slideshow; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 66 | application/vnd.openxmlformats-officedocument.presentationml.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 67 | application/vnd.ms-powerpoint; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 68 | application/mspowerpoint; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 69 | text/mathml; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 70 | application/rtf; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 71 | application/x-extension-txt; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 72 | application/x-t602; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 73 | application/vnd.wordperfect; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 74 | application/vnd.ms-word.document.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 75 | application/vnd.ms-word.template.macroEnabled.12; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 76 | application/vnd.openxmlformats-officedocument.wordprocessingml.document; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 77 | application/vnd.openxmlformats-officedocument.wordprocessingml.template; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 78 | application/msword; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 79 | application/vnd.ms-works; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 80 | application/wordperfect; { set -m \; /bin/mv -T %s %s.mv \; ( soffice %s.mv >/dev/null 2>&1 \; /bin/rm %s.mv \; ) & } \; disown -a 81 | -------------------------------------------------------------------------------- /mutt/.mutt/mutt-colors-solarized-dark-16.muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=muttrc 2 | 3 | # 4 | # 5 | # make sure that you are using mutt linked against slang, not ncurses, or 6 | # suffer the consequences of weird color issues. use "mutt -v" to check this. 7 | 8 | # custom body highlights ----------------------------------------------- 9 | # highlight my name and other personally relevant strings 10 | #color body yellow default "(ethan|schoonover)" 11 | # custom index highlights ---------------------------------------------- 12 | # messages which mention my name in the body 13 | #color index yellow default "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" 14 | #color index J_cream brightwhite "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" 15 | #color index yellow cyan "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" 16 | #color index yellow J_magent "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" 17 | ## messages which are in reference to my mails 18 | #color index J_magent default "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" 19 | #color index J_magent brightwhite "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" 20 | #color index J_magent cyan "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" 21 | #color index J_magent red "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" 22 | 23 | # for background in 16 color terminal, valid background colors include: 24 | # base03, bg, black, any of the non brights 25 | 26 | # basic colors --------------------------------------------------------- 27 | color normal brightyellow default 28 | color error red default 29 | color tilde black default 30 | color message cyan default 31 | color markers red white 32 | color attachment white default 33 | color search brightmagenta default 34 | #color status J_black J_status 35 | color status brightyellow black 36 | color indicator brightblack yellow 37 | color tree yellow default # arrow in threads 38 | 39 | # basic monocolor screen 40 | mono bold bold 41 | mono underline underline 42 | mono indicator reverse 43 | mono error bold 44 | 45 | # index ---------------------------------------------------------------- 46 | 47 | #color index red default "~D(!~p|~p)" # deleted 48 | #color index black default ~F # flagged 49 | #color index brightred default ~= # duplicate messages 50 | #color index brightgreen default "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest 51 | #color index J_base default "~A~N!~T!~p!~Q!~F!~D" # the rest, new 52 | color index red default "~A" # all messages 53 | color index brightred default "~E" # expired messages 54 | color index blue default "~N" # new messages 55 | color index blue default "~O" # old messages 56 | color index brightmagenta default "~Q" # messages that have been replied to 57 | color index brightgreen default "~R" # read messages 58 | color index blue default "~U" # unread messages 59 | color index blue default "~U~$" # unread, unreferenced messages 60 | color index brightyellow default "~v" # messages part of a collapsed thread 61 | color index brightyellow default "~P" # messages from me 62 | color index cyan default "~p!~F" # messages to me 63 | color index cyan default "~N~p!~F" # new messages to me 64 | color index cyan default "~U~p!~F" # unread messages to me 65 | color index brightgreen default "~R~p!~F" # messages to me 66 | color index red default "~F" # flagged messages 67 | color index red default "~F~p" # flagged messages to me 68 | color index red default "~N~F" # new flagged messages 69 | color index red default "~N~F~p" # new flagged messages to me 70 | color index red default "~U~F~p" # new flagged messages to me 71 | color index black red "~D" # deleted messages 72 | color index brightcyan default "~v~(!~N)" # collapsed thread with no unread 73 | color index yellow default "~v~(~N)" # collapsed thread with some unread 74 | color index green default "~N~v~(~N)" # collapsed thread with unread parent 75 | # statusbg used to indicated flagged when foreground color shows other status 76 | # for collapsed thread 77 | color index red black "~v~(~F)!~N" # collapsed thread with flagged, no unread 78 | color index yellow black "~v~(~F~N)" # collapsed thread with some unread & flagged 79 | color index green black "~N~v~(~F~N)" # collapsed thread with unread parent & flagged 80 | color index green black "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged 81 | color index cyan black "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly 82 | color index yellow red "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) 83 | #color index yellow default "~(~N)" # messages in threads with some unread 84 | #color index green default "~S" # superseded messages 85 | #color index red default "~T" # tagged messages 86 | #color index brightred red "~=" # duplicated messages 87 | 88 | # message headers ------------------------------------------------------ 89 | 90 | #color header brightgreen default "^" 91 | color hdrdefault brightgreen default 92 | color header brightyellow default "^(From)" 93 | color header blue default "^(Subject)" 94 | 95 | # body ----------------------------------------------------------------- 96 | 97 | color quoted blue default 98 | color quoted1 cyan default 99 | color quoted2 yellow default 100 | color quoted3 red default 101 | color quoted4 brightred default 102 | 103 | color signature brightgreen default 104 | color bold black default 105 | color underline black default 106 | color normal default default 107 | # 108 | color body brightcyan default "[;:][-o][)/(|]" # emoticons 109 | color body brightcyan default "[;:][)(|]" # emoticons 110 | color body brightcyan default "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ 111 | |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ 112 | |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" 113 | color body brightcyan default "[ ][*][^*]*[*][ ]?" # more emoticon? 114 | color body brightcyan default "[ ]?[*][^*]*[*][ ]" # more emoticon? 115 | 116 | ## pgp 117 | 118 | color body red default "(BAD signature)" 119 | color body cyan default "(Good signature)" 120 | color body brightblack default "^gpg: Good signature .*" 121 | color body brightyellow default "^gpg: " 122 | color body brightyellow red "^gpg: BAD signature from.*" 123 | mono body bold "^gpg: Good signature" 124 | mono body bold "^gpg: BAD signature from.*" 125 | 126 | # yes, an insance URL regex 127 | color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" 128 | # and a heavy handed email regex 129 | #color body J_magent default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" 130 | 131 | # Various smilies and the like 132 | #color body brightwhite default "<[Gg]>" # 133 | #color body brightwhite default "<[Bb][Gg]>" # 134 | #color body yellow default " [;:]-*[})>{(<|]" # :-) etc... 135 | # *bold* 136 | #color body blue default "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" 137 | #mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" 138 | # _underline_ 139 | #color body blue default "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" 140 | #mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" 141 | # /italic/ (Sometimes gets directory names) 142 | #color body blue default "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" 143 | #mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" 144 | 145 | # Border lines. 146 | #color body blue default "( *[-+=#*~_]){6,}" 147 | 148 | #folder-hook . "color status J_black J_status " 149 | #folder-hook gmail/inbox "color status J_black yellow " 150 | #folder-hook gmail/important "color status J_black yellow " 151 | 152 | 153 | -------------------------------------------------------------------------------- /mutt/.mutt/mutt-colors-solarized-dark-256.muttrc: -------------------------------------------------------------------------------- 1 | # vim: filetype=muttrc 2 | 3 | # 4 | # 5 | # make sure that you are using mutt linked against slang, not ncurses, or 6 | # suffer the consequences of weird color issues. use "mutt -v" to check this. 7 | 8 | # custom body highlights ----------------------------------------------- 9 | # highlight my name and other personally relevant strings 10 | #color body color136 color234 "(ethan|schoonover)" 11 | # custom index highlights ---------------------------------------------- 12 | # messages which mention my name in the body 13 | #color index color136 color234 "~b \"phil(_g|\!| gregory| gold)|pgregory\" !~N !~T !~F !~p !~P" 14 | #color index J_cream color230 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~N !~T !~F !~p !~P" 15 | #color index color136 color37 "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~T !~F !~p !~P" 16 | #color index color136 J_magent "~b \"phil(_g|\!| gregory| gold)|pgregory\" ~F !~p !~P" 17 | ## messages which are in reference to my mails 18 | #color index J_magent color234 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" !~N !~T !~F !~p !~P" 19 | #color index J_magent color230 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~N !~T !~F !~p !~P" 20 | #color index J_magent color37 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~T !~F !~p !~P" 21 | #color index J_magent color160 "~x \"(mithrandir|aragorn)\\.aperiodic\\.net|thorin\\.hillmgt\\.com\" ~F !~p !~P" 22 | 23 | # for background in 16 color terminal, valid background colors include: 24 | # base03, bg, black, any of the non brights 25 | 26 | # basic colors --------------------------------------------------------- 27 | color normal color241 color234 28 | color error color160 color234 29 | color tilde color235 color234 30 | color message color37 color234 31 | color markers color160 color254 32 | color attachment color254 color234 33 | color search color61 color234 34 | #color status J_black J_status 35 | color status color241 color235 36 | color indicator color234 color136 37 | color tree color136 color234 # arrow in threads 38 | 39 | # basic monocolor screen 40 | mono bold bold 41 | mono underline underline 42 | mono indicator reverse 43 | mono error bold 44 | 45 | # index ---------------------------------------------------------------- 46 | 47 | #color index color160 color234 "~D(!~p|~p)" # deleted 48 | #color index color235 color234 ~F # flagged 49 | #color index color166 color234 ~= # duplicate messages 50 | #color index color240 color234 "~A!~N!~T!~p!~Q!~F!~D!~P" # the rest 51 | #color index J_base color234 "~A~N!~T!~p!~Q!~F!~D" # the rest, new 52 | color index color160 color234 "~A" # all messages 53 | color index color166 color234 "~E" # expired messages 54 | color index color33 color234 "~N" # new messages 55 | color index color33 color234 "~O" # old messages 56 | color index color61 color234 "~Q" # messages that have been replied to 57 | color index color240 color234 "~R" # read messages 58 | color index color33 color234 "~U" # unread messages 59 | color index color33 color234 "~U~$" # unread, unreferenced messages 60 | color index color241 color234 "~v" # messages part of a collapsed thread 61 | color index color241 color234 "~P" # messages from me 62 | color index color37 color234 "~p!~F" # messages to me 63 | color index color37 color234 "~N~p!~F" # new messages to me 64 | color index color37 color234 "~U~p!~F" # unread messages to me 65 | color index color240 color234 "~R~p!~F" # messages to me 66 | color index color160 color234 "~F" # flagged messages 67 | color index color160 color234 "~F~p" # flagged messages to me 68 | color index color160 color234 "~N~F" # new flagged messages 69 | color index color160 color234 "~N~F~p" # new flagged messages to me 70 | color index color160 color234 "~U~F~p" # new flagged messages to me 71 | color index color235 color160 "~D" # deleted messages 72 | color index color245 color234 "~v~(!~N)" # collapsed thread with no unread 73 | color index color136 color234 "~v~(~N)" # collapsed thread with some unread 74 | color index color64 color234 "~N~v~(~N)" # collapsed thread with unread parent 75 | # statusbg used to indicated flagged when foreground color shows other status 76 | # for collapsed thread 77 | color index color160 color235 "~v~(~F)!~N" # collapsed thread with flagged, no unread 78 | color index color136 color235 "~v~(~F~N)" # collapsed thread with some unread & flagged 79 | color index color64 color235 "~N~v~(~F~N)" # collapsed thread with unread parent & flagged 80 | color index color64 color235 "~N~v~(~F)" # collapsed thread with unread parent, no unread inside, but some flagged 81 | color index color37 color235 "~v~(~p)" # collapsed thread with unread parent, no unread inside, some to me directly 82 | color index color136 color160 "~v~(~D)" # thread with deleted (doesn't differentiate between all or partial) 83 | #color index color136 color234 "~(~N)" # messages in threads with some unread 84 | #color index color64 color234 "~S" # superseded messages 85 | #color index color160 color234 "~T" # tagged messages 86 | #color index color166 color160 "~=" # duplicated messages 87 | 88 | # message headers ------------------------------------------------------ 89 | 90 | #color header color240 color234 "^" 91 | color hdrdefault color240 color234 92 | color header color241 color234 "^(From)" 93 | color header color33 color234 "^(Subject)" 94 | 95 | # body ----------------------------------------------------------------- 96 | 97 | color quoted color33 color234 98 | color quoted1 color37 color234 99 | color quoted2 color136 color234 100 | color quoted3 color160 color234 101 | color quoted4 color166 color234 102 | 103 | color signature color240 color234 104 | color bold color235 color234 105 | color underline color235 color234 106 | color normal color244 color234 107 | # 108 | color body color245 color234 "[;:][-o][)/(|]" # emoticons 109 | color body color245 color234 "[;:][)(|]" # emoticons 110 | color body color245 color234 "[*]?((N)?ACK|CU|LOL|SCNR|BRB|BTW|CWYL|\ 111 | |FWIW|vbg|GD&R|HTH|HTHBE|IMHO|IMNSHO|\ 112 | |IRL|RTFM|ROTFL|ROFL|YMMV)[*]?" 113 | color body color245 color234 "[ ][*][^*]*[*][ ]?" # more emoticon? 114 | color body color245 color234 "[ ]?[*][^*]*[*][ ]" # more emoticon? 115 | 116 | ## pgp 117 | 118 | color body color160 color234 "(BAD signature)" 119 | color body color37 color234 "(Good signature)" 120 | color body color234 color234 "^gpg: Good signature .*" 121 | color body color241 color234 "^gpg: " 122 | color body color241 color160 "^gpg: BAD signature from.*" 123 | mono body bold "^gpg: Good signature" 124 | mono body bold "^gpg: BAD signature from.*" 125 | 126 | # yes, an insance URL regex 127 | color body color160 color234 "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-f][0-9a-f])*@)?((([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?|[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)(:[0-9]+)?)|([a-z0-9_.!~*'()$,;:@&=+-]|%[0-9a-f][0-9a-f])+)(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*(/([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*(;([a-z0-9_.!~*'():@&=+$,-]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?(#([a-z0-9_.!~*'();/?:@&=+$,-]|%[0-9a-f][0-9a-f])*)?|(www|ftp)\\.(([a-z0-9]([a-z0-9-]*[a-z0-9])?)\\.)*([a-z]([a-z0-9-]*[a-z0-9])?)\\.?(:[0-9]+)?(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*(/([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*(;([-a-z0-9_.!~*'():@&=+$,]|%[0-9a-f][0-9a-f])*)*)*)?(\\?([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?(#([-a-z0-9_.!~*'();/?:@&=+$,]|%[0-9a-f][0-9a-f])*)?)[^].,:;!)? \t\r\n<>\"]" 128 | # and a heavy handed email regex 129 | #color body J_magent color234 "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])" 130 | 131 | # Various smilies and the like 132 | #color body color230 color234 "<[Gg]>" # 133 | #color body color230 color234 "<[Bb][Gg]>" # 134 | #color body color136 color234 " [;:]-*[})>{(<|]" # :-) etc... 135 | # *bold* 136 | #color body color33 color234 "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" 137 | #mono body bold "(^|[[:space:][:punct:]])\\*[^*]+\\*([[:space:][:punct:]]|$)" 138 | # _underline_ 139 | #color body color33 color234 "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" 140 | #mono body underline "(^|[[:space:][:punct:]])_[^_]+_([[:space:][:punct:]]|$)" 141 | # /italic/ (Sometimes gets directory names) 142 | #color body color33 color234 "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" 143 | #mono body underline "(^|[[:space:][:punct:]])/[^/]+/([[:space:][:punct:]]|$)" 144 | 145 | # Border lines. 146 | #color body color33 color234 "( *[-+=#*~_]){6,}" 147 | 148 | #folder-hook . "color status J_black J_status " 149 | #folder-hook gmail/inbox "color status J_black color136 " 150 | #folder-hook gmail/important "color status J_black color136 " 151 | 152 | 153 | -------------------------------------------------------------------------------- /dunst/.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | ### Display ### 3 | 4 | # Which monitor should the notifications be displayed on. 5 | monitor = 0 6 | 7 | # Display notification on focused monitor. Possible modes are: 8 | # mouse: follow mouse pointer 9 | # keyboard: follow window with keyboard focus 10 | # none: don't follow anything 11 | # 12 | # "keyboard" needs a window manager that exports the 13 | # _NET_ACTIVE_WINDOW property. 14 | # This should be the case for almost all modern window managers. 15 | # 16 | # If this option is set to mouse or keyboard, the monitor option 17 | # will be ignored. 18 | follow = none 19 | 20 | ### Geometry ### 21 | 22 | # The width of the window, excluding the frame. 23 | # dynamic width from 0 to 300 24 | # width = (0, 300) 25 | # constant width of 300 26 | width = 300 27 | 28 | # The height of a single notification, excluding the frame. 29 | # dynamic height from 0 to 300 30 | #height = (0, 300) 31 | # constant height of 300 32 | height = 300 33 | # NOTE: Dunst from version 1.11 and older don't support dynamic height 34 | # and the given value is treated as the maximum height 35 | 36 | # Position the notification in the top right corner 37 | origin = top-right 38 | 39 | # Offset from the origin 40 | # NOTE: Dunst from version 1.11 and older use this alternative notation 41 | offset = 10x50 42 | #offset = (10, 50) 43 | 44 | # Scale factor. It is auto-detected if value is 0. 45 | scale = 0 46 | 47 | # Maximum number of notification (0 means no limit) 48 | notification_limit = 20 49 | 50 | ### Progress bar ### 51 | 52 | # Turn on the progress bar. It appears when a progress hint is passed with 53 | # for example dunstify -h int:value:12 54 | progress_bar = true 55 | 56 | # Set the progress bar height. This includes the frame, so make sure 57 | # it's at least twice as big as the frame width. 58 | progress_bar_height = 10 59 | 60 | # Set the frame width of the progress bar 61 | progress_bar_frame_width = 1 62 | 63 | # Set the minimum width for the progress bar 64 | progress_bar_min_width = 150 65 | 66 | # Set the maximum width for the progress bar 67 | progress_bar_max_width = 300 68 | 69 | # Corner radius for the progress bar. 0 disables rounded corners. 70 | progress_bar_corner_radius = 0 71 | 72 | # Define which corners to round when drawing the progress bar. If progress_bar_corner_radius 73 | # is set to 0 this option will be ignored. 74 | #progress_bar_corners = all 75 | 76 | # Corner radius for the icon image. 77 | icon_corner_radius = 0 78 | 79 | # Define which corners to round when drawing the icon image. If icon_corner_radius 80 | # is set to 0 this option will be ignored. 81 | #icon_corners = all 82 | 83 | # Show how many messages are currently hidden (because of 84 | # notification_limit). 85 | indicate_hidden = yes 86 | 87 | # The transparency of the window. Range: [0; 100]. 88 | # This option will only work if a compositing window manager is 89 | # present (e.g. xcompmgr, compiz, etc.). (X11 only) 90 | transparency = 0 91 | 92 | # Draw a line of "separator_height" pixel height between two 93 | # notifications. 94 | # Set to 0 to disable. 95 | # If gap_size is greater than 0, this setting will be ignored. 96 | separator_height = 2 97 | 98 | # Padding between text and separator. 99 | padding = 8 100 | 101 | # Horizontal padding. 102 | horizontal_padding = 8 103 | 104 | # Padding between text and icon. 105 | text_icon_padding = 0 106 | 107 | # Defines width in pixels of frame around the notification window. 108 | # Set to 0 to disable. 109 | frame_width = 3 110 | 111 | # Defines color of the frame around the notification window. 112 | frame_color = "#aaaaaa" 113 | 114 | # Size of gap to display between notifications - requires a compositor. 115 | # If value is greater than 0, separator_height will be ignored and a border 116 | # of size frame_width will be drawn around each notification instead. 117 | # Click events on gaps do not currently propagate to applications below. 118 | gap_size = 0 119 | 120 | # Define a color for the separator. 121 | # possible values are: 122 | # * auto: dunst tries to find a color fitting to the background; 123 | # * foreground: use the same color as the foreground; 124 | # * frame: use the same color as the frame; 125 | # * anything else will be interpreted as a X color. 126 | separator_color = frame 127 | 128 | # Sort type. 129 | # possible values are: 130 | # * id: sort by id 131 | # * urgency_ascending: sort by urgency (low then normal then critical) 132 | # * urgency_descending: sort by urgency (critical then normal then low) 133 | # * update: sort by update (most recent always at the top) 134 | sort = yes 135 | 136 | # Don't remove messages, if the user is idle (no mouse or keyboard input) 137 | # for longer than idle_threshold seconds. 138 | # Set to 0 to disable. 139 | # A client can set the 'transient' hint to bypass this. See the rules 140 | # section for how to disable this if necessary 141 | # idle_threshold = 120 142 | 143 | ### Text ### 144 | 145 | font = Monospace 8 146 | 147 | # The spacing between lines. If the height is smaller than the 148 | # font height, it will get raised to the font height. 149 | line_height = 0 150 | 151 | # Possible values are: 152 | # full: Allow a small subset of html markup in notifications: 153 | # bold 154 | # italic 155 | # strikethrough 156 | # underline 157 | # 158 | # For a complete reference see 159 | # . 160 | # 161 | # strip: This setting is provided for compatibility with some broken 162 | # clients that send markup even though it's not enabled on the 163 | # server. Dunst will try to strip the markup but the parsing is 164 | # simplistic so using this option outside of matching rules for 165 | # specific applications *IS GREATLY DISCOURAGED*. 166 | # 167 | # no: Disable markup parsing, incoming notifications will be treated as 168 | # plain text. Dunst will not advertise that it has the body-markup 169 | # capability if this is set as a global setting. 170 | # 171 | # It's important to note that markup inside the format option will be parsed 172 | # regardless of what this is set to. 173 | markup = full 174 | 175 | # The format of the message. Possible variables are: 176 | # %a appname 177 | # %s summary 178 | # %b body 179 | # %c category 180 | # %S stack_tag 181 | # %i iconname (including its path) 182 | # %I iconname (without its path) 183 | # %p progress value if set ([ 0%] to [100%]) or nothing 184 | # %n progress value if set without any extra characters 185 | # %% literal % 186 | # Markup is allowed 187 | format = "%s\n%b" 188 | 189 | # Alignment of message text. 190 | # Possible values are "left", "center" and "right". 191 | alignment = left 192 | 193 | # Vertical alignment of message text and icon. 194 | # Possible values are "top", "center" and "bottom". 195 | vertical_alignment = center 196 | 197 | # Show age of message if message is older than show_age_threshold 198 | # seconds. 199 | # Set to -1 to disable. 200 | show_age_threshold = 60 201 | 202 | # Specify where to make an ellipsis in long lines. 203 | # Possible values are "start", "middle" and "end". 204 | ellipsize = middle 205 | 206 | # Ignore newlines '\n' in notifications. 207 | ignore_newline = no 208 | 209 | # Stack together notifications with the same content 210 | stack_duplicates = true 211 | 212 | # Hide the count of stacked notifications with the same content 213 | hide_duplicate_count = false 214 | 215 | # Display indicators for URLs (U) and actions (A). 216 | show_indicators = yes 217 | 218 | ### Icons ### 219 | 220 | # Recursive icon lookup. You can set a single theme, instead of having to 221 | # define all lookup paths. 222 | enable_recursive_icon_lookup = true 223 | 224 | # Set icon theme (only used for recursive icon lookup) 225 | icon_theme = Adwaita 226 | # You can also set multiple icon themes, with the leftmost one being used first. 227 | # icon_theme = "Adwaita, breeze" 228 | 229 | # Align icons left/right/top/off 230 | icon_position = left 231 | 232 | # Scale small icons up to this size, set to 0 to disable. Helpful 233 | # for e.g. small files or high-dpi screens. In case of conflict, 234 | # max_icon_size takes precedence over this. 235 | min_icon_size = 32 236 | 237 | # Scale larger icons down to this size, set to 0 to disable 238 | max_icon_size = 128 239 | 240 | # Paths to default icons (only necessary when not using recursive icon lookup) 241 | icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ 242 | 243 | ### History ### 244 | 245 | # Should a notification popped up from history be sticky or timeout 246 | # as if it would normally do. 247 | sticky_history = yes 248 | 249 | # Maximum amount of notifications kept in history 250 | history_length = 20 251 | 252 | ### Misc/Advanced ### 253 | 254 | # dmenu path. 255 | dmenu = /usr/bin/dmenu -p dunst: 256 | 257 | # Browser for opening urls in context menu. 258 | browser = /usr/bin/xdg-open 259 | 260 | # Always run rule-defined scripts, even if the notification is suppressed 261 | always_run_script = true 262 | 263 | # Define the title of the windows spawned by dunst (X11 only) 264 | title = Dunst 265 | 266 | # Define the class of the windows spawned by dunst (X11 only) 267 | class = Dunst 268 | 269 | # Define the corner radius of the notification window 270 | # in pixel size. If the radius is 0, you have no rounded 271 | # corners. 272 | # The radius will be automatically lowered if it exceeds half of the 273 | # notification height to avoid clipping text and/or icons. 274 | corner_radius = 0 275 | 276 | # Define which corners to round when drawing the window. If the corner radius 277 | # is set to 0 this option will be ignored. 278 | # 279 | # Comma-separated list of the corners. The accepted corner values are bottom-right, 280 | # bottom-left, top-right, top-left, top, bottom, left, right or all. 281 | #corners = all 282 | 283 | # Ignore the dbus closeNotification message. 284 | # Useful to enforce the timeout set by dunst configuration. Without this 285 | # parameter, an application may close the notification sent before the 286 | # user defined timeout. 287 | ignore_dbusclose = false 288 | 289 | ### Wayland ### 290 | # These settings are Wayland-specific. They have no effect when using X11 291 | 292 | # Uncomment this if you want to let notifications appear under fullscreen 293 | # applications (default: overlay) 294 | # layer = top 295 | 296 | # Set this to true to use X11 output on Wayland. 297 | force_xwayland = false 298 | 299 | ### Legacy 300 | 301 | # Use the Xinerama extension instead of RandR for multi-monitor support. 302 | # This setting is provided for compatibility with older nVidia drivers that 303 | # do not support RandR and using it on systems that support RandR is highly 304 | # discouraged. 305 | # 306 | # By enabling this setting dunst will not be able to detect when a monitor 307 | # is connected or disconnected which might break follow mode if the screen 308 | # layout changes. 309 | force_xinerama = false 310 | 311 | ### mouse 312 | 313 | # Defines list of actions for each mouse event 314 | # Possible values are: 315 | # * none: Don't do anything. 316 | # * do_action: Invoke the action determined by the action_name rule. If there is no 317 | # such action, open the context menu. 318 | # * open_url: If the notification has exactly one url, open it. If there are multiple 319 | # ones, open the context menu. 320 | # * close_current: Close current notification. 321 | # * remove_current: Remove current notification from history. 322 | # * close_all: Close all notifications. 323 | # * context: Open context menu for the notification. 324 | # * context_all: Open context menu for all notifications. 325 | # These values can be strung together for each mouse event, and 326 | # will be executed in sequence. 327 | mouse_left_click = close_current 328 | mouse_middle_click = do_action, close_current 329 | mouse_right_click = close_all 330 | 331 | # Experimental features that may or may not work correctly. Do not expect them 332 | # to have a consistent behaviour across releases. 333 | [experimental] 334 | # Calculate the dpi to use on a per-monitor basis. 335 | # If this setting is enabled the Xft.dpi value will be ignored and instead 336 | # dunst will attempt to calculate an appropriate dpi value for each monitor 337 | # using the resolution and physical size. This might be useful in setups 338 | # where there are multiple screens with very different dpi values. 339 | per_monitor_dpi = false 340 | 341 | 342 | [urgency_low] 343 | # IMPORTANT: colors have to be defined in quotation marks. 344 | # Otherwise the "#" and following would be interpreted as a comment. 345 | background = "#222222" 346 | foreground = "#888888" 347 | timeout = 10 348 | # Icon for notifications with low urgency 349 | default_icon = dialog-information 350 | 351 | [urgency_normal] 352 | background = "#285577" 353 | foreground = "#ffffff" 354 | timeout = 10 355 | #override_pause_level = 30 356 | # Icon for notifications with normal urgency 357 | default_icon = dialog-information 358 | 359 | [urgency_critical] 360 | background = "#900000" 361 | foreground = "#ffffff" 362 | frame_color = "#ff0000" 363 | timeout = 0 364 | #override_pause_level = 60 365 | # Icon for notifications with critical urgency 366 | default_icon = dialog-warning 367 | -------------------------------------------------------------------------------- /ranger/.config/ranger/rifle.conf: -------------------------------------------------------------------------------- 1 | # vim: ft=cfg 2 | # 3 | # This is the configuration file of "rifle", ranger's file executor/opener. 4 | # Each line consists of conditions and a command. For each line the conditions 5 | # are checked and if they are met, the respective command is run. 6 | # 7 | # Syntax: 8 | # , , ... = command 9 | # 10 | # The command can contain these environment variables: 11 | # $1-$9 | The n-th selected file 12 | # $@ | All selected files 13 | # 14 | # If you use the special command "ask", rifle will ask you what program to run. 15 | # 16 | # Prefixing a condition with "!" will negate its result. 17 | # These conditions are currently supported: 18 | # match | The regexp matches $1 19 | # ext | The regexp matches the extension of $1 20 | # mime | The regexp matches the mime type of $1 21 | # name | The regexp matches the basename of $1 22 | # path | The regexp matches the absolute path of $1 23 | # has | The program is installed (i.e. located in $PATH) 24 | # env | The environment variable "variable" is non-empty 25 | # file | $1 is a file 26 | # directory | $1 is a directory 27 | # number | change the number of this command to n 28 | # terminal | stdin, stderr and stdout are connected to a terminal 29 | # X | A graphical environment is available (darwin, Xorg, or Wayland) 30 | # 31 | # There are also pseudo-conditions which have a "side effect": 32 | # flag | Change how the program is run. See below. 33 | # label