From ace32ae7c8633360d2c7fb70954fdfeba95a5fe0 Mon Sep 17 00:00:00 2001 From: Nemo Date: Thu, 7 May 2020 16:06:04 +0530 Subject: [PATCH] Lots of updates: - Ignore nitrogen, just causes conflicts - dunst improvements - i3: switch from dmenu to rofi - i3: switch to flameshot - bundle: fix some cache issues - xinitrc: no more caps (I think) - font changes for emojificiation --- files/bash/.bashrc | 53 ++++++++------ files/dev/.docker/.gitignore | 1 + files/display/.config/nitrogen/nitrogen.cfg | 12 ---- .../.config/fontconfig/conf.d/01-emoji.conf | 29 ++++++++ .../fontconfig/conf.d/70-unuglify-fonts.conf | 29 ++++++++ .../fontconfig/conf.d/99-input-mono.conf | 10 +++ files/gtk/.config/gtk-2.0/gtkfilechooser.ini | 8 +-- files/gtk/.config/gtk-3.0/settings.ini | 1 + files/i3/.config/dunst/dunstrc | 71 +++++++------------ files/i3/.i3/config | 24 +++---- files/ruby/.bundle/config | 2 + files/x11/.xinitrc | 5 +- 12 files changed, 147 insertions(+), 98 deletions(-) create mode 100644 files/dev/.docker/.gitignore delete mode 100644 files/display/.config/nitrogen/nitrogen.cfg create mode 100644 files/fonts/.config/fontconfig/conf.d/01-emoji.conf create mode 100644 files/fonts/.config/fontconfig/conf.d/70-unuglify-fonts.conf create mode 100644 files/fonts/.config/fontconfig/conf.d/99-input-mono.conf diff --git a/files/bash/.bashrc b/files/bash/.bashrc index bd19983..f42cb63 100644 --- a/files/bash/.bashrc +++ b/files/bash/.bashrc @@ -33,12 +33,15 @@ alias signal_update='docker run captn3m0/signal-arch-builder' alias kc='kapitan compile' # https://tizardsbriefcase.com/1059/linux/remove-query-string-filename-wget alias clean.filenames='for file in *; do mv "$file" "${file%%\?*}"; done' + +alias dunst.pause='notify-send "DUNST_COMMAND_PAUSE"' +alias dunst.resume='notify-send "DUNST_COMMAND_RESUME"' # ... or force ignoredups and ignorespace pathadd '/sbin' pathadd '/home/nemo/projects/scripts/' pathadd "$HOME/.phpenv/bin" pathadd "$HOME/apps/ec2/bin" -pathadd "$HOME/.gem/ruby/2.6.0/bin" +pathadd "$HOME/.gem/ruby/2.7.0/bin" # needs a kubectl upgrade pathadd "$HOME/.krew/bin" pathadd "$HOME/.local/bin" @@ -139,9 +142,9 @@ alias kno='kubectl get nodes' function kpssh() { kubectl exec -it $1 -n $2 sh ; } function kcssh() { kubectl exec -it $1 -n $2 -c $3 sh ; } function klog() { kubetail $1 -n $1 ; } -function kne() { +function kne() { kubectl get events -n $1 --sort-by='.metadata.creationTimestamp' \ - -o 'go-template={{range .items}}{{.involvedObject.name}}{{"\t"}}{{.involvedObject.kind}}{{"\t"}}{{.message}}{{"\t"}}{{.reason}}{{"\t"}}{{.type}}{{"\t"}}{{.firstTimestamp}}{{"\n"}}{{end}}' + -o 'go-template={{range .items}}{{.involvedObject.name}}{{"\t"}}{{.involvedObject.kind}}{{"\t"}}{{.message}}{{"\t"}}{{.reason}}{{"\t"}}{{.type}}{{"\t"}}{{.firstTimestamp}}{{"\n"}}{{end}}' } function gettoken() { @@ -161,6 +164,11 @@ if [[ -f /usr/share/bash-completion/completions/pass ]] && ! shopt -oq posix; th . /usr/share/bash-completion/completions/pass fi + +if [[ -f /usr/share/bash-completion/completions/poetry ]] && ! shopt -oq posix; then + . /usr/share/bash-completion/completions/poetry +fi + function smallmkv() { ffmpeg -i "$1" -b 1000k -acodec libmp3lame -vcodec libx264 -ar 44100 -ab 56k -ac 2 -vpre fast -crf 24 \ "$1.mkv" ;} export LC_ALL=en_US.utf8 export LC_ALL=en_US.utf8 @@ -201,7 +209,7 @@ export EDITOR='nvim' # export GPG_TTY='tty' # gpg-agent says it needs this # export GREP_OPTIONS='-D skip --binary-files=without-match --ignore-case' # most commonly used grep options # put list of remote hosts in ~/.hosts ... -export HOSTFILE=$HOME/.hosts +export HOSTFILE=$HOME/.hosts # export IGNOREEOF=1 # prevent CTRL-D from immediately logging out # export INPUTRC=/etc/inputrc # it's possible that this will make bash find my delete key (and everything else)((but i don't think it did)) # export INPUTRC=$HOME/.inputrc # type in ‘whatever’ and press ‘Page Up’ key and bash automatically fetches last command that starts with whatever and completes the command for you (requires '$HOME/.inputrc' with these lines: #Page up/page down && "\e[5~": history-search-backward && "\e[6~": history-search-forward) @@ -379,6 +387,8 @@ alias dri='docker run --volume /home/nemo/tmp:/data --tty --rm --interactive --e # docker run image, but with current directory mounted as /current # Do not run this on untrusted images alias dri_cwd='docker run --volume `pwd`:/current --volume /home/nemo/tmp:/data --tty --rm --interactive --entrypoint /bin/sh ' +alias ctop='docker run --name ctop -it --rm -v /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop ' + alias dockerlint='LC_ALL=C hadolint' ##### Terraform @@ -391,8 +401,6 @@ alias tfa='terraform apply --auto-approve' alias tfat='terraform apply --auto-approve --target ' alias tfit='terraform init' -alias ctop='docker run --name ctop -it --rm -v /var/run/docker.sock:/var/run/docker.sock:ro quay.io/vektorlab/ctop ' - ##### History Shenanigans export HISTCONTROL=ignorespace:ignoredups:erasedups # for 'ignoreboth': ignore duplicates and /^\s/ export HISTFILE='/home/nemo/.bash_history' @@ -417,14 +425,10 @@ HISTSIZE=1000000 HISTFILESIZE=1000000 shopt -s histappend -### Added by the Heroku Toolbelt -pathadd '/usr/local/heroku/bin' -#Importing phpenv -# eval "$(phpenv init -)" - # Don't use this for sensitive files -transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi - tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } +transfer() { if [ $# -eq 0 ]; then echo -e "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; return 1; fi + tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; } + export JAVA_HOME=/usr/lib/jvm/default-runtime export EC2_HOME=/home/nemo/apps/ec2 export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache" @@ -462,7 +466,6 @@ xset -b # } -## # http://boredzo.org/blog/archives/2016-08-15/colorized-man-pages-understood-and-customized # colorized man pages man() { @@ -599,19 +602,20 @@ elif type compctl &>/dev/null; then compctl -K _npm_completion npm fi ###-end-npm-completion-### -# -# + +eval "$(pipenv --completion)" + # Stolen from @ThatHarmanSingh function sprint() { # Set time format to unix so we can subtract - HISTTIMEFORMAT='%s ' history | + HISTTIMEFORMAT='%s ' history | # History returns way more than needed - tail -n 4000 | + tail -n 4000 | # Grep for git commits (after timestamps) - grep -E '^\d+\s+\d+\s+gc' | + grep -E '^\d+\s+\d+\s+gc' | # Max 15 days ago - awk -v now=$(date +%s) '(now - $2) < 15*24*60*60' | + awk -v now=$(date +%s) '(now - $2) < 15*24*60*60' | # Cut out the timestamps for uniq check cut -d ' ' -f 4- | # To handle multiple commit-pull-reset-commit cycles @@ -619,7 +623,7 @@ function sprint() { } # https://github.com/uber/makisu -# +# function makisu_build() { makisu_version=${MAKISU_VERSION:-v0.1.10} cd ${@: -1} @@ -636,4 +640,11 @@ function makisu_build() { cd - } +# https://starship.rs/advanced-config/#change-window-title +function starship_set_win_title(){ + echo -ne "\033]0; $PWD \007" +} + +starship_precmd_user_func="starship_set_win_title" + eval "$(starship init bash)" diff --git a/files/dev/.docker/.gitignore b/files/dev/.docker/.gitignore new file mode 100644 index 0000000..27a180c --- /dev/null +++ b/files/dev/.docker/.gitignore @@ -0,0 +1 @@ +.buildNodeID diff --git a/files/display/.config/nitrogen/nitrogen.cfg b/files/display/.config/nitrogen/nitrogen.cfg deleted file mode 100644 index 6f63e9d..0000000 --- a/files/display/.config/nitrogen/nitrogen.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[geometry] -posx=0 -posy=0 -sizex=1920 -sizey=1179 - -[nitrogen] -view=icon -recurse=true -sort=alpha -icon_caps=false -dirs=/home/nemo/projects/personal/avatars/wallpaper;/home/nemo/Pictures/Wallpapers; diff --git a/files/fonts/.config/fontconfig/conf.d/01-emoji.conf b/files/fonts/.config/fontconfig/conf.d/01-emoji.conf new file mode 100644 index 0000000..d26eed7 --- /dev/null +++ b/files/fonts/.config/fontconfig/conf.d/01-emoji.conf @@ -0,0 +1,29 @@ + + + + + + Segoe UI Emoji + Noto Color Emoji + + + + sans-serif + + emoji + + + + + serif + + emoji + + + + monospace + + emoji + + + diff --git a/files/fonts/.config/fontconfig/conf.d/70-unuglify-fonts.conf b/files/fonts/.config/fontconfig/conf.d/70-unuglify-fonts.conf new file mode 100644 index 0000000..aac3f09 --- /dev/null +++ b/files/fonts/.config/fontconfig/conf.d/70-unuglify-fonts.conf @@ -0,0 +1,29 @@ + + + + + + rgb + + + + + true + + + + + hintslight + + + + + true + + + + + lcddefault + + + diff --git a/files/fonts/.config/fontconfig/conf.d/99-input-mono.conf b/files/fonts/.config/fontconfig/conf.d/99-input-mono.conf new file mode 100644 index 0000000..8b5e484 --- /dev/null +++ b/files/fonts/.config/fontconfig/conf.d/99-input-mono.conf @@ -0,0 +1,10 @@ + + + + + + + monospace + Input Mono + + diff --git a/files/gtk/.config/gtk-2.0/gtkfilechooser.ini b/files/gtk/.config/gtk-2.0/gtkfilechooser.ini index adbfc53..a974a77 100644 --- a/files/gtk/.config/gtk-2.0/gtkfilechooser.ini +++ b/files/gtk/.config/gtk-2.0/gtkfilechooser.ini @@ -2,10 +2,10 @@ LocationMode=path-bar ShowHidden=false ShowSizeColumn=true -GeometryX=540 -GeometryY=218 +GeometryX=2780 +GeometryY=227 GeometryWidth=840 GeometryHeight=644 -SortColumn=modified -SortOrder=descending +SortColumn=name +SortOrder=ascending StartupMode=recent diff --git a/files/gtk/.config/gtk-3.0/settings.ini b/files/gtk/.config/gtk-3.0/settings.ini index ff9e2a1..5c7b44e 100644 --- a/files/gtk/.config/gtk-3.0/settings.ini +++ b/files/gtk/.config/gtk-3.0/settings.ini @@ -15,3 +15,4 @@ gtk-xft-hinting=1 gtk-xft-hintstyle=hintslight gtk-xft-rgba=rgb gtk-decoration-layout=menu:close +gtk-can-change-accels = 1 diff --git a/files/i3/.config/dunst/dunstrc b/files/i3/.config/dunst/dunstrc index da85c05..bfe05c6 100644 --- a/files/i3/.config/dunst/dunstrc +++ b/files/i3/.config/dunst/dunstrc @@ -1,5 +1,5 @@ [global] -font = Source Sans Pro 12 +font = Input Sans Narrow 12 markup = yes plain_text = no @@ -10,22 +10,7 @@ indicate_hidden = yes alignment = right bounce_freq = 1 show_age_threshold = 60; - word_wrap = yes - -# The geometry of the window: -# [{width}]x{height}[+/-{x}+/-{y}] -# The geometry of the message window. -# The height is measured in number of notifications everything else -# in pixels. If the width is omitted but the height is given -# ("-geometry x2"), the message window expands over the whole screen -# (dmenu-like). If width is 0, the window expands to the longest -# message displayed. A positive x is measured from the left, a -# negative from the right side of the screen. Y is measured from -# the top and down respectevly. -# The width can be negative. In this case the actual width is the -# screen width minus the width defined in within the geometry option. -#geometry = "250x50-40+40" geometry = "500x50-15+49" # Shrink window if it's smaller than the width. Will be ignored if @@ -43,18 +28,7 @@ transparency = 5 idle_threshold = 20 # Which monitor should the notifications be displayed on. - -# Display notification on focused monitor. Possible modes are: -# mouse: follow mouse pointer -# keyboard: follow window with keyboard focus -# none: don't follow anything -# -# "keyboard" needs a windowmanager that exports the -# _NET_ACTIVE_WINDOW property. -# This should be the case for almost all modern windowmanagers. -# -# If this option is set to mouse or keyboard, the monitor option -# will be ignored. +# This picks the one with keyboard focus follow = keyboard # Should a notification popped up from history be sticky or timeout @@ -72,10 +46,12 @@ show_indicators = yes # This adds empty space above and under the text. line_height = 3 +notification_height = 80 + # Draw a line of "separatpr_height" pixel height between two # notifications. # Set to 0 to disable. -separator_height = 2; +separator_height = 5; # Define a color for the separator. # possible values are: @@ -86,11 +62,13 @@ separator_height = 2; separator_color = auto # Padding between text and separator. -padding = 6 +padding = 10 # Horizontal padding. horizontal_padding = 6 +frame_width = 2 + # Hide duplicate's count and stack them stack_duplicates = yes hide_duplicates_count = yes @@ -100,7 +78,7 @@ icon_position = off max_icon_size = 80 # Paths to default icons. -icon_folders = /usr/share/icons/Paper/16x16/mimetypes/:/usr/share/icons/Paper/48x48/status/:/usr/share/icons/Paper/16x16/devices/:/usr/share/icons/Paper/48x48/notifications/:/usr/share/icons/Paper/48x48/emblems/ +icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/ # Context menu. @@ -111,24 +89,25 @@ history = mod4+backslash context = ctrl+shift+period [urgency_low] -# IMPORTANT: colors have to be defined in quotation marks. -# Otherwise the "#" and following would be interpreted as a comment. -frame_color = "#FFFFFF" -foreground = "#3B7C87" -background = "#191311" -#background = "#2B313C" +frame_color = "#2c3e50" +foreground = "#ecf0f1" +background = "#95a5a6" timeout = 4 [urgency_normal] -frame_color = "#FFFFFF" -foreground = "#5B8234" -background = "#191311" -#background = "#2B313C" +frame_color = "#95a5a6" +foreground = "#34495e" +background = "#ecf0f1" timeout = 6 [urgency_critical] -frame_color = "#FFFFFF" -foreground = "#B7472A" -background = "#191311" -#background = "#2B313C" -timeout = 8 +frame_color = "#e74c3c" +foreground = "#ecf0f1" +background = "#e74c3c" +timeout = 20 + +[fullscreen_delay_everything] + fullscreen = delay +[fullscreen_show_critical] + msg_urgency = critical + fullscreen = show diff --git a/files/i3/.i3/config b/files/i3/.i3/config index 3a0f1f7..1f3ad0a 100644 --- a/files/i3/.i3/config +++ b/files/i3/.i3/config @@ -73,6 +73,9 @@ bindsym $mod+Escape exec snippy.sh bindsym $mod+z exec fsearch +bindsym $mod+Hyper_L exec rofi -show drun +bindsym --release Hyper_L exec rofi -show window + # kill focused window bindsym $mod+Shift+q kill @@ -80,7 +83,7 @@ bindsym $mod+Shift+q kill # increase/decrease keyboard brightness bindsym XF86KbdBrightnessUp exec /home/nemo/projects/scripts/backlight up -bindsym XF86KbdBrightnessDown exec /home/nemo/projects/scripts/backlight down +bindsym XF86KbdBrightnessDown exec /home/nemo/projects/scripts/backlight down # Autolock screen after 2 minutes exec xautolock -detectsleep -time 1 -locker "/home/nemo/projects/scripts/lock.sh" @@ -91,22 +94,15 @@ exec "dunst" # Win+L bindsym $mod+l exec xautolock -locknow -# start dmenu (I actually have dmenu2 installed) -bindsym $mod+d exec dmenu_run -i -o 0.1 - # For starting applications with a .desktop entry -bindsym $mod+shift+d exec --no-startup-id i3-dmenu-desktop +bindsym $mod+shift+d exec notify-send -u low "Use Mod+Caps_Lock instead" # Print screen -set $screenshot_file '/home/nemo/Desktop/Screenshots/%Y-%m-%d_%H-%M-%S-$wx$h.png' -bindsym Print exec escrotum --select --selection-delay 100 $screenshot_file && notify-send "done" -bindsym Shift+Print exec escrotum --clipboard --select --selection-delay 100 $screenshot_file && notify-send "copied" -bindsym Ctrl+Print exec scrot --focused --count --delay 0.5 --quality 80 --silent $screenshot_file && notify-send "done" -bindsym Ctrl+$mod+I exec scrot --focused --count --delay 1 --quality 80 --silent $screenshot_file && notify-send "done" -bindsym Ctrl+Shift+Print exec scrot --count --delay 0.5 --quality 80 --silent $screenshot_file && notify-send "done" +bindsym Print exec flameshot gui +bindsym $mod+I exec flameshot gui -bindsym $mod+I exec escrotum --select --selection-delay 300 $screenshot_file && notify-send "done" -bindsym $mod+Shift+I exec escrotum --clipboard --select --selection-delay 50 $screenshot_file && notify-send "copied" +bindsym Ctrl+Print exec flameshot screen +bindsym Ctrl+$mod+I exec flameshot screen bindsym $mod+P exec passmenu --type @@ -177,7 +173,7 @@ bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+0 move container to workspace 10 # rename a workspace -# bindsym $mod+ctrl+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: ' +# bindsym $mod+ctrl+r exec i3-input -F 'rename workspace to "%s"' -P 'New name: ' # reload the configuration file bindsym $mod+Shift+c reload diff --git a/files/ruby/.bundle/config b/files/ruby/.bundle/config index 28af076..45a2e7c 100644 --- a/files/ruby/.bundle/config +++ b/files/ruby/.bundle/config @@ -7,3 +7,5 @@ BUNDLE_GLOBAL_GEM_CACHE: "true" BUNDLE_GEM__TEST: "false" BUNDLE_GEM__MIT: "false" BUNDLE_BUILD__NOKOGIRI: "--use-system-libraries" +#BUNDLE_DISABLE_SHARED_GEMS: "true" +BUNDLE_GEM__COC: "false" diff --git a/files/x11/.xinitrc b/files/x11/.xinitrc index 42c0a4f..76b27e5 100755 --- a/files/x11/.xinitrc +++ b/files/x11/.xinitrc @@ -1,6 +1,9 @@ #!/bin/sh xrdb ~/.Xresources xset -b +setxkbmap -option ctrl:nocaps +xmodmap -e 'clear lock' +xmodmap -e 'keycode 66 = Hyper_L' export PATH="${PATH}:/home/nemo/projects/scripts" dbus-update-activation-environment --systemd DISPLAY -exec i3 \ No newline at end of file +exec i3