From b240de7723e67bdf59d8730871717ac5e5e3ccce Mon Sep 17 00:00:00 2001 From: foo-dogsquared Date: Sun, 18 Aug 2019 08:30:14 +0800 Subject: [PATCH] Update config for i3, ranger, and Xorg --- i3/config | 10 ++++++---- ranger/rc.conf | 10 ++++++++-- xorg/.Xresources | 11 +++++++++++ xorg/.xinitrc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ zsh/.zshrc | 7 ++++++- 5 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 xorg/.xinitrc diff --git a/i3/config b/i3/config index eaeaf6b..dcdfff9 100644 --- a/i3/config +++ b/i3/config @@ -13,8 +13,8 @@ set_from_resource $color_4 color4 #b5659a set_from_resource $color_6 color6 #aea0c7 set_from_resource $color_16 color16 #ffffff -set $pictures_directory '~/pictures' set $screenshot_filename '%F-%H-%M-%S-$wx$h.png' +set $scrot_move_directory_command 'mv $f ~/screenshots' exec_always feh --bg-scale ~/wallpapers/sand.jpg @@ -36,6 +36,7 @@ font pango:monospace 10 # text rendering and scalability on retina/hidpi displays (thanks to pango). #font pango:DejaVu Sans Mono 8 font pango:Fira Code 10 +font pango:Iosevka 11 # Setting up borders for windows of different states default_border pixel 6 @@ -143,8 +144,8 @@ bindsym Shift+$mod+slash move window to workspace back_and_forth # Application bound shortcuts bindsym XF86HomePage exec alacritty --class "ranger" --command ranger bindsym XF86Mail exec thunderbird -bindsym Print exec scrot $screenshot_filename -e 'mv $f ~/Pictures' -bindsym Shift+Print exec scrot $screenshot_filename -d 3 -e 'mv $f ~/Pictures' +bindsym Print exec ~/.scripts/maim-screenshot.sh +bindsym Control+Print exec ~/.scripts/maim-selection-screenshot.sh # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. @@ -257,7 +258,8 @@ bindsym $mod+a mode "applications"; exec sleep 1 && i3-msg mode "default" # i3 bar bar { height 35 - font pango:Noto Sans 11 + font pango:Fira Code 10 + font pango:Iosevka 11 position top separator_symbol " " status_command i3status diff --git a/ranger/rc.conf b/ranger/rc.conf index d3002d9..7adf6ba 100644 --- a/ranger/rc.conf +++ b/ranger/rc.conf @@ -725,9 +725,15 @@ tmap taskview_close copytmap q Q w # Here's my custom changes -# opening VS Code easily +# It's a keymap group "O" (for opening files with certain programs) map OC shell code %s map Oc shell code %d map OV shell vim %s map Ov shell vim %d -map Os shell $SHELL +map Oi open_with inkscape %d +map OI open_with inkscape %s +map Of open_with firefox %d +map OF open_with firefox %s +map Os shell $SHELL %d +map OS shell $SHELL %s + diff --git a/xorg/.Xresources b/xorg/.Xresources index 4759084..3030150 100644 --- a/xorg/.Xresources +++ b/xorg/.Xresources @@ -4,17 +4,28 @@ *color0: #0c080b *color8: #383437 + *color1: #A83D63 *color9: #bf718d + *color2: #D09177 *color10: #dcaf9c + *color3: #506699 *color11: #6f81ab + *color4: #B5659A *color12: #c98fb5 + *color5: #4DA6CE *color13: #7dbedb + *color6: #aea0c7 *color14: #bcb1d1 + *color7: #d1cfcf *color15: #eceaea + +URxvt.font: xft:Iosevka:size=12 +URxvt.secondaryWheel: 1 + diff --git a/xorg/.xinitrc b/xorg/.xinitrc new file mode 100644 index 0000000..fdf7daa --- /dev/null +++ b/xorg/.xinitrc @@ -0,0 +1,46 @@ +#!/bin/sh + +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +# merge in defaults and keymaps + +if [ -f $sysresources ]; then + + + + + + + + xrdb -merge $sysresources + +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f "$userresources" ]; then + + + + + + + + xrdb -merge "$userresources" + +fi + +if [ -f "$usermodmap" ]; then + xmodmap "$usermodmap" +fi + +/usr/bin/lxsession & +dunst & +udiskie & +flameshot & +exec i3 diff --git a/zsh/.zshrc b/zsh/.zshrc index d4d8ee4..33199db 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -1,5 +1,10 @@ +# My custom variables (only applicable at user level) +PICTURES_DIRECTORY=$HOME/Pictures +DOCUMENTS_DIRECTORY=$HOME/Documents +BIN_DIRECTORY=$HOME/bin + # If you come from bash you might have to change your $PATH. -# export PATH=$HOME/bin:/usr/local/bin:$PATH +export PATH=$BIN_DIRECTORY:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. export ZSH="/home/foo-dogsquared/.oh-my-zsh"