Compare commits

...

10 Commits

Author SHA1 Message Date
2f8ebb7b59 Add rofi config 2022-10-11 09:34:40 +02:00
4826e0de11 Update title 2022-10-11 08:40:30 +02:00
d3c5dde917 Fix link 2022-10-11 08:33:22 +02:00
9424c91dc0 Update image path 2022-10-11 08:32:29 +02:00
ce0180d283 Update mutt config 2022-10-11 08:30:13 +02:00
b07e3c902f Update syntax 2022-10-11 08:17:29 +02:00
330a9186bc Remove urxvt and add rofi 2022-10-11 08:16:14 +02:00
e1775316bd Update window manager config 2022-10-11 08:14:13 +02:00
c3257f8760 Remove old files 2022-10-11 07:39:15 +02:00
ef6a8377c1 Remove gpg-connect update 2022-10-11 07:38:47 +02:00
12 changed files with 135 additions and 223 deletions

View File

@@ -1,8 +1,8 @@
My configs and scripts
======================
My desktop config
=================
This repository is a collection of configurations files and scripts that I use on my Arch Linux system to make my life easier. This is how my desktop currently looks like, if you see something that you like please feel free to use anything that might be of use to you.
![Image of my Desktop](https://github.com/deonspengler/dotfiles/raw/master/screenshot.png)
![Image of my Desktop](https://git.spengler.co.za/deon/dotfiles/raw/branch/master/screenshot.png)
Below is a brief description of some of the tools that I use in the hope that someone else might find this useful.

View File

@@ -1,8 +1,8 @@
#!/usr/bin/bash
# bspwm config
# config window apperance
bspc config border_width 2
bspc config window_gap 4
bspc config window_gap 18
bspc config split_ratio 0.50
bspc config borderless_monocle true
@@ -25,6 +25,9 @@ else
bspc monitor -d term web games misc
fi
# key used with mouse for moving and resizing windows
bspc config pointer_modifier mod4
# application rules
bspc rule -a Chromium desktop=web
bspc rule -a Steam follow=off state=floating desktop=games
@@ -32,12 +35,17 @@ bspc rule -a Galculator state=floating
bspc rule -a Nvidia-settings state=floating
bspc rule -a obs state=floating
bspc rule -a Pavucontrol state=floating
bspc rule -a "TeamSpeak 3" state=floating
bspc rule -a V4l2ucp state=floating
bspc rule -a Nitrogen state=floating
bspc rule -a Vividhue state=floating
#################################
# start the following application
#################################
# compositor
compton -b
picom --experimental-backends -b
# set cursor to expected left-pointer
xsetroot -cursor_name left_ptr
@@ -55,8 +63,13 @@ sxhkd &
dunst &
# clipboard manager
autocutsel -fork -selection CLIPBOARD
autocutsel -fork -selection PRIMARY
clipmenud &
# detect and mount external storage devices
udiskie &
# hide mouse when idle
unclutter &

View File

@@ -11,17 +11,17 @@ conky.config = {
conky.text = [[
S\
%{c}\
%{F\#a7a5a5}%{B\#000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${upspeedf enp2s0}K \
%{F\#a7a5a5}%{B\#90000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${upspeedf enp2s0}K \
%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${downspeedf enp2s0}K \
%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${exec cat /sys/class/hwmon/hwmon1/temp1_input | cut -c-2 }°\
%{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#504e4e}%{F\#d6d3d2}%{B\#504e4e}  ${cpu cpu0}%\
%{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#504e4e}%{F\#d6d3d2}%{B\#504e4e}  ${mem}\
%{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#000000}\
%{F\#504e4e}%{B\#a7a5a5}%{F\#a7a5a5}%{B\#90000000}\
%{r}\
%{F\#a7a5a5}%{B\#000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} \
${texeci 24 ~/.config/bspwm/localtemp} \
%{F\#a7a5a5}%{B\#90000000}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} \
${texeci 60 ~/.config/bspwm/localtemp2} \
%{F\#a7a5a5}%{B\#504e4e}%{F\#504e4e}%{B\#a7a5a5}%{F\#d6d3d2}%{B\#504e4e} ${time %a %b %d, %T} \
%{F\#a7a5a5}%{B\#504e4e}%{B\#000000}\
%{F\#a7a5a5}%{B\#504e4e}%{B\#90000000}\
]]
-- vim: ts=4 sw=4 noet ai cindent syntax=lua

View File

@@ -4,10 +4,10 @@ PANEL_HEIGHT=16
PANEL_FONT="-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1"
PANEL_WM_NAME=bspwm_panel
COLOR_BLACK="#000000"
COLOR_GREY1="#d6d3d2"
COLOR_GREY2="#a7a5a5"
COLOR_GREY3="#504e4e"
COLOR_BLACK="#85000000"
COLOR_GREY1="#ffd6d3d2"
COLOR_GREY2="#ffa7a5a5"
COLOR_GREY3="#ff504e4e"
if xdo id -a "$PANEL_WM_NAME" > /dev/null ; then
printf "%s\n" "The panel is already running." >&2
@@ -21,8 +21,8 @@ mkfifo "$PANEL_FIFO"
num_mon=$(bspc query -M | wc -l)
conky -c ~/.config/bspwm/conky.conf > "$PANEL_FIFO" &
bspc config top_padding $PANEL_HEIGHT
conky -c ~/.config/bspwm/conky.conf > "$PANEL_FIFO" &
bspc subscribe report > "$PANEL_FIFO" &
while read -r line ; do

View File

@@ -1,35 +0,0 @@
# Backend
backend = "xrender";
unredir-if-possible = true;
# V-Sync
vsync = false;
# Fading
fading = true;
fade-delta = 10;
fade-in-step = 0.05;
fade-out-step = 0.05;
# Shadow
shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
shadow-offset-y = -7;
shadow-exclude = [ "n:e:Notification" ];
# Opacity
detect-client-opacity = true;
opacity-rule = [ "65:class_g = 'Bspwm' && class_i = 'presel_feedback'" ];
# Window type settings
wintypes:
{
dock = { shadow = true; };
dnd = { shadow = false; };
tooltip = { fade = true; shadow = false; };
menu = { shadow = false; };
dropdown_menu = { shadow = false; opacity = 1.00; };
popup_menu = { shadow = false; opacity = 1.00; };
utility = { shadow = false; };
};

33
mutt/filter.py Executable file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env python3
import re
import sys
# Read data from stdin
data = sys.stdin.read()
# Remove unwanted text
data = re.sub(r'\[-- Autoview.*--\]', '', data)
data = re.sub(r'\[-- Attachment #[0-9] --\]', '', data)
data = re.sub(r'\[cid\]', '', data)
data = re.sub(r'\[-- application.*unsupported.*--\]', '', data)
data = re.sub(r'\[-- image.*unsupported.*--\]', '', data)
data = re.sub(r'\[-- Type.*--\]', '', data)
# replace text for signed and encrypted email
data = re.sub(r'\[-- OpenSSL.*\nVerification successful\n.*',
'[-- Signed Email: Verification successful --]', data)
data = re.sub(r'\[-- The following data is S/MIME encrypted --\]',
'[-- Encrypted Email: S/MIME --]', data)
data = re.sub(r'\[-- The following data is signed --\]', '', data)
data = re.sub(r'\[-- End of signed data --\]', '', data)
data = re.sub(r'\[-- End of S/MIME encrypted data. --\]', '', data)
# Add line for quoted email
data = re.sub(r'(?<=\n)(From:.*)', '_'*80 + r'\n\1', data)
# clean up multiple blanks lines
data = re.sub(r'.*\n', '', data)
data = re.sub(r'\n\s*\n', r'\n\n', data)
# Output filtered text to stdout
sys.stdout.write(data)

View File

@@ -1,21 +1,29 @@
# connection options
set ssl_force_tls = yes
# encoding
set charset = "utf-8"
# ssl
set ssl_starttls = yes
# username and password
source "gpg -q -d ~/.mutt/passwords.asc |"
set imap_user = username@gmail.com
set smtp_url = smtp://username@smtp.gmail.com:587
# configure s/mime support
source /usr/share/doc/mutt/samples/smime.rc
set smime_ca_location = /etc/ca-certificates/extracted/tls-ca-bundle.pem
set smime_default_key = "05408192.0"
set crypt_autosign = no
set crypt_replysign = no
# setup from details
set from = username@gmail.com
set realname = "Real Name"
# setup cahce directories
# setup directories
set certificate_file = ~/.mutt/certificates
set tmpdir = ~/.mutt/tmp
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set tmpdir = ~/.mutt/tmp
# setup from details
set realname = "<User Name>"
set from = "<user@example.com>"
# authentication
set imap_user = "<user@example.com>"
source "gpg -dq ~/.mutt/<my-encrypted-password>.asc |"
# keep IMAP settings
set imap_keepalive = 300
@@ -23,60 +31,69 @@ set imap_passive = no
set imap_check_subscribed = yes
# how often to check for new mail (time in seconds)
set mail_check = 60
set mail_check = 300
# remote gmail folders
set folder = imaps://imap.gmail.com:993
set spoolfile = +INBOX
set postponed = +[Gmail]/Drafts
# default mailbox
set use_from = yes
set folder = imap://<mail.example.com>
set smtp_url = smtp://<mail.example.com>
set spoolfile = "=Inbox"
set record = "=Sent"
set postponed = "=Drafts"
# set sort options
set sort = threads
set sort_aux = reverse-last-date-received
# setup helpers
# set mailcap
set mailcap_path = ~/.mutt/mailcap
# google address book support
set query_command = "goobook query '%s'"
bind editor "\t" complete-query
# prefer plain text
alternative_order text/plain text/enriched text/html
# view html emails
auto_view text/html
# index_format
set index_format="%3C %Z %[%b %d %H:%M] - %-22.22L %s"
# Header Options -------------------------------------
ignore * # ignore all headers
unignore from: to: cc: date: subject: # show only these
unhdr_order * # some distros order things by default
hdr_order from: to: cc: date: subject: # and in this order
# set editor
set editor='vim'
# Refresh/Sync
bind index U imap-fetch-mail
# set display filter
set display_filter="~/.mutt/filter.py"
# ldap address book
set query_command = "~/.mutt/ldapbook.py '%s'"
bind editor "\t" complete-query
# pager key binding
bind pager j next-line
bind pager k previous-line
# index_format
set index_format="%3C %Z %[%b %d %H:%M] - %-22.22L %s"
# header Options
ignore *
unignore from: to: cc: date: subject:
unhdr_order *
hdr_order from: to: cc: date: subject:
# Set colors to use
color hdrdefault blue black
color header green black "^From"
color header color111 black "^Subject"
color header brightmagenta black "^Date"
color quoted blue black
color signature blue black
color attachment green black
color message brightred black
color error brightred black
color indicator black white
color status brightgreen blue
color indicator white color237
color status black blue
color tree white black
color normal white black
color markers red black
color search white black
color tilde brightmagenta black
color index color33 black ~F
color index color33 black "~F"
color index color111 black "~N|~O"
# message headers
color hdrdefault white black
color header white black "^(From)"
color header color111 black "^(Subject)"
color index magenta black "~D"

13
rofi/config.rasi Normal file
View File

@@ -0,0 +1,13 @@
configuration {
modi: "combi,drun,ssh";
disable-history: false;
max-history-size: 10;
sort: true;
sorting-method: "fzf";
matching: "normal";
display-combi: "run: ";
display-drun: "";
display-ssh: "ssh";
show-icons: true;
}
@theme "sidebar"

View File

@@ -1,121 +0,0 @@
###############
# bspwm hotkeys
###############
# restart bspwm
super + alt + Escape
bspc quit
# close window
alt + w
bspc node -c
# switch window state to floating or fullscreen
super + {s,f}
bspc node -t {'~floating','~fullscreen'}
# switch window state to tiling or monocle
super + m
bspc desktop -l next
# send active window to preselect
alt + y
bspc node -n last.!automatic
# move active window
alt + {_,shift + }{h,j,k,l}
bspc node -{f,s} {west,south,north,east}
# rotate window position
super + {comma,period}
bspc node @/ --rotate {90,-90}
# Mirror and flip leaves of tree
alt + {comma,period}
bspc node @/ -F {horizontal,vertical}
# switch workspace on desktop
alt + bracket{left,right}
bspc desktop -f {prev,next}
# preselection
alt + ctrl + {h,j,k,l}
bspc node -p {'~west','~south','~north','~east'}
# expand a window by moving one of its side outward
super + {h,j,k,l}
bspc node {@west -r -10,@south -r +10,@north -r -10,@east -r +10}
# contract a window by moving one of its side inward
super + shift + {h,j,k,l}
bspc node {@east -r -10,@north -r +10,@south -r -10,@west -r +10}
# send active window to desktop
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} ^{1-9,10}
########################
# wm independent hotkeys
########################
# urxvt terminal
alt + Return
urxvtc
# application launcher
super + space
dmenu_run -fn "-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1" -nb "#000000" -sb "#517ba2"
# clipboard manager
super + c
clipmenu -fn "-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1" -nb "#000000" -sb "#517ba2"
super + shift + c
clearclip
# password manager
super + p
passmenu -fn "-misc-tamlin-medium-r-normal--16-116-100-100-c-80-iso10646-1" -nb "#000000" -sb "#517ba2"
# media controls
alt + {n,p,s}
mpc --host=slainsmpdserver@shadowblade.lan --port 6600 {next,prev,toggle}
XF86Audio{Next,Prev,Play}
mpc --host=slainsmpdserver@shadowblade.lan --port 6600 {next,prev,toggle}
# file manager
alt + BackSpace
urxvtc -e ranger
# web browser
alt + shift + b
chromium
# steam
alt + shift + x
steam
# notification for current song from mpd
alt + i
mpdnotify
# lock screen
ctrl + super + l
dm-tool switch-to-greeter
# blank monitors
ctrl + super + m
blankmonitor
# volume control
XF86Audio{Raise,Lower}Volume
pamixer {-i5,-d5}
# mute toggle
alt + m
pamixer -t
# make sxhkd reload its configuration files:
super + Escape
pkill -USR1 -x sxhkd

View File

@@ -1,6 +1,6 @@
set -g status-bg black
set -g status-fg white
set-window-option -g window-status-current-fg colour067
set-window-option -g window-status-style fg=colour67
set -g status-left '#[default]'
set -g status-right '%H:%M %d/%m/%Y'

View File

@@ -11,9 +11,6 @@ xrdb -merge ~/.Xresources
# Disable monitor blanking
xset s off -dpms
# Run urxvt daemon
urxvtd -q -o -f
# Jack audio
jack_control start
@@ -21,3 +18,4 @@ jack_control start
export EDITOR=/usr/bin/vim
export BROWSER=/usr/bin/chromium
export BSPWM_SOCKET=/run/user/$(id -u)/bspwm
export CM_LAUNCHER=rofi

View File

@@ -12,12 +12,6 @@ export HISTSIZE=1000
export SAVEHIST=1000
setopt SHARE_HISTORY
# set correct gpg tty for ssh
if [ -n "$SSH_TTY" ]; then
export GPG_TTY=$SSH_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null
fi
# add path to $fpath
fpath=("$HOME/.zsh/functions/prompts" $fpath)