From 7e8b21e8bf02f82dbf99c0c2ad2d7f04931a128e Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Fri, 22 Nov 2019 12:10:02 +0000 Subject: Change background color of floating window --- vim/.vimrc | 6 +++++- xinit/.xinitrc | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vim/.vimrc b/vim/.vimrc index b1af11e..b4e5cea 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -558,9 +558,10 @@ nnoremap ,e :e **/* let $FZF_DEFAULT_OPTS='--layout=reverse' let g:fzf_layout = { 'window': 'call FloatingFZF()' } +hi Pmenu ctermfg=3 ctermbg=239 function! FloatingFZF() let buf = nvim_create_buf(v:false, v:true) - call setbufvar(buf, '&signcolumn', 'no') + call setbufvar(buf, '&laststatus', '1') let height = &lines - 10 let width = float2nr(&columns - (&columns * 2 / 10)) @@ -577,6 +578,9 @@ function! FloatingFZF() call nvim_open_win(buf, v:true, opts) endfunction +" hi Pmenu ctermfg=3 ctermbg=239 +" let g:remembrall_window = 'call FloatingFZF()' + " if !exists('g:lsp_config_sourced') " call lsp#add_filetype_config({ " \ 'filetype': 'python', diff --git a/xinit/.xinitrc b/xinit/.xinitrc index 20b5aee..c779d25 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -17,6 +17,9 @@ feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.jpg xset -dpms xset s off +# Disable bell +xset -b + # SSH agent eval $(ssh-agent) -- cgit v1.2.3 From a0a27a3c403f880a3da52faf496e4bbc3fabe289 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:07:02 +0000 Subject: Add mutt directories --- mutt/.gitignore | 3 +++ mutt/.mail/Misc/.gitkeep | 0 mutt/.mail/Personal/.gitkeep | 0 mutt/.mail/Work/.gitkeep | 0 4 files changed, 3 insertions(+) create mode 100644 mutt/.gitignore create mode 100644 mutt/.mail/Misc/.gitkeep create mode 100644 mutt/.mail/Personal/.gitkeep create mode 100644 mutt/.mail/Work/.gitkeep diff --git a/mutt/.gitignore b/mutt/.gitignore new file mode 100644 index 0000000..f2abc1a --- /dev/null +++ b/mutt/.gitignore @@ -0,0 +1,3 @@ +.mail/Work/* +.mail/Personal/* +.mail/Misc/* diff --git a/mutt/.mail/Misc/.gitkeep b/mutt/.mail/Misc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mutt/.mail/Personal/.gitkeep b/mutt/.mail/Personal/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mutt/.mail/Work/.gitkeep b/mutt/.mail/Work/.gitkeep new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 20e67f471b69f90d48037efd2089cb9aa83a91dc Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:19:22 +0000 Subject: Fix duplicate with mutt --- mutt/.mutt/id_personal | 2 ++ mutt/.mutt/id_work | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mutt/.mutt/id_personal b/mutt/.mutt/id_personal index 8c57cd6..feb81bd 100644 --- a/mutt/.mutt/id_personal +++ b/mutt/.mutt/id_personal @@ -9,3 +9,5 @@ set trash = "+Personal/Personal.bin" macro index,pager gs " $record" macro index,pager gd " $postponed" macro index,pager gb " $trash" + +# vim: ft=muttrc diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work index 238cfcb..c6fea5b 100644 --- a/mutt/.mutt/id_work +++ b/mutt/.mutt/id_work @@ -2,10 +2,14 @@ set from = "u.vaes13@imperial.ac.uk" set sendmail="/usr/bin/msmtp -a imperial" set spoolfile = "+Work/Work" -set record = "+Work/Work.sent" set postponed = "+Work/Work.drafts" set trash = "+Work/Work.bin" +# Record not necessary because outlook saves messages +unset record + macro index,pager gs " $record" macro index,pager gd " $postponed" macro index,pager gb " $trash" + +# vim: ft=muttrc -- cgit v1.2.3 From 8a88e667c2cd1ac5ba333fbcaf355c044860b6df Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 14:50:53 +0000 Subject: Fix gs mapping --- mutt/.mutt/id_work | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mutt/.mutt/id_work b/mutt/.mutt/id_work index c6fea5b..ac75a03 100644 --- a/mutt/.mutt/id_work +++ b/mutt/.mutt/id_work @@ -8,7 +8,7 @@ set trash = "+Work/Work.bin" # Record not necessary because outlook saves messages unset record -macro index,pager gs " $record" +macro index,pager gs " +Work/Work.sent" macro index,pager gd " $postponed" macro index,pager gb " $trash" -- cgit v1.2.3 From c4e82f7325a6ef5b6d1127d16afe2f0b0e3e7c36 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 12 Feb 2020 20:05:57 +0000 Subject: Fix battery script for new laptop --- i3/.config/i3blocks/bin/battery | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/i3/.config/i3blocks/bin/battery b/i3/.config/i3blocks/bin/battery index 378ee3f..0286809 100755 --- a/i3/.config/i3blocks/bin/battery +++ b/i3/.config/i3blocks/bin/battery @@ -5,7 +5,6 @@ if [ ! -d /sys/class/power_supply/BAT0 ]; then exit fi -current_now=$(cat /sys/class/power_supply/BAT0/current_now) charge_now=$(cat /sys/class/power_supply/BAT0/charge_now) charge_full=$(cat /sys/class/power_supply/BAT0/charge_full) bat_status=$(cat /sys/class/power_supply/BAT0/status) @@ -16,7 +15,7 @@ if [ "$bat_status" = "Full" ]; then fi if [ "$bat_status" = "Discharging" ]; then - tot_minutes_remaining=$(( charge_now*60/current_now )) + # tot_minutes_remaining=$(( charge_now*60/current_now )) if [[ $charge_percent -lt 20 ]]; then icon="" @@ -36,14 +35,16 @@ if [ "$bat_status" = "Discharging" ]; then fi elif [ "$bat_status" = "Charging" ]; then - tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) + # current_now=$(cat /sys/class/power_supply/BAT0/current_now) + # tot_minutes_remaining=$(( (charge_full-charge_now)*60/current_now )) icon= color="lightblue" fi -time_remaining=$(printf "%02d:%02d" \ - $(( tot_minutes_remaining/60 )) \ - $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) +# time_remaining=$(printf "%02d:%02d" \ +# $(( tot_minutes_remaining/60 )) \ +# $(( tot_minutes_remaining - (tot_minutes_remaining/60)*60 ))) -echo "$icon $charge_percent% ($time_remaining)" +# echo "$icon $charge_percent% ($time_remaining)" +echo "$icon $charge_percent%" -- cgit v1.2.3 From 3c4b0332f59b016ad20f4dee4dea43369b0ab2f8 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Thu, 13 Feb 2020 10:32:16 +0000 Subject: Add keys for brightness --- i3/.config/i3/config | 4 +++- xinit/.xinitrc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 28fd656..e51e8ac 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -1,7 +1,7 @@ # Modifier set $mod Mod4 -font pango:DejaVu Sans Mono, Awesome 8 +font pango:DejaVu Sans Mono, Awesome 9 # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod @@ -190,6 +190,8 @@ bindsym XF86AudioMute exec amixer -D pulse sset Master 0% # Display bindsym XF86MonBrightnessUp exec light -A 10 bindsym XF86MonBrightnessDown exec light -U 10 +bindsym Prior exec light -A 10 +bindsym Next exec light -U 10 bindsym Shift+XF86AudioRaiseVolume exec light -A 10 bindsym Shift+XF86AudioLowerVolume exec light -U 10 diff --git a/xinit/.xinitrc b/xinit/.xinitrc index c779d25..4a3c018 100755 --- a/xinit/.xinitrc +++ b/xinit/.xinitrc @@ -11,7 +11,7 @@ source $HOME/.local/colors.zsh xrdb $HOME/.Xresources/$COLORSCHEME # Background -feh --bg-fill /home/urbain/Documents/wallpapers/pagoda.jpg +feh --bg-fill /usr/share/backgrounds/Grand_Canyon_North_Rim_by_Rihards_Vilks.jpg # Disable screen going to sleep xset -dpms -- cgit v1.2.3 From fcac7f830ce833ad74298a88a07c77aad9277fb6 Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 11:13:02 +0000 Subject: Minor changes --- Xresources/.Xresources/base | 2 +- vim/.vim/spell/en.utf-8.add | 1 + zsh/.zshrc | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Xresources/.Xresources/base b/Xresources/.Xresources/base index b9ff079..ea87784 100644 --- a/Xresources/.Xresources/base +++ b/Xresources/.Xresources/base @@ -28,7 +28,7 @@ URxvt.resize-font.bigger: C-plus ! Appearance /* URxvt*font: xft:DejaVu Sans Mono:size=12 */ -URxvt*font: xft:monaco:size=11.5 +URxvt*font: xft:monaco:size=12 URxvt*scrollBar: false URxvt*internalBorder: 0 URxvt.fading: 35 diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 999f578..ddbe70a 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -61,3 +61,4 @@ unitarily multimodal Kalman i.e. +Stratonovich diff --git a/zsh/.zshrc b/zsh/.zshrc index cc2e1ad..e54be1c 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -172,9 +172,9 @@ alias mca='make clean-all' # Misc alias a='vifm . .' -alias ff='FreeFem++' alias m='cd ~/.mutt/attachments && mutt && cd -' alias e='nvim' +alias f='fzm' alias mux='tmuxinator' alias email='mbsync -a' alias renet='systemctl restart NetworkManager.service' -- cgit v1.2.3 From ebe9521c37b97959df974f8adeb4c7bfed0a527a Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Sat, 29 Feb 2020 12:23:18 +0000 Subject: Fix i3 script --- bin/.local/bin/workspace | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/.local/bin/workspace b/bin/.local/bin/workspace index ad378ef..4f2ab67 100755 --- a/bin/.local/bin/workspace +++ b/bin/.local/bin/workspace @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# List of workspaces +# List of workspaces: (id, number, name) workspaces=$(i3-msg -t get_workspaces | awk 'BEGIN { RS="(},{)|(\\[{)|(}\\])"; - FPAT="([^,:]+)|([^,]+{[^}]+})|(\"[^\"]+\")" + FPAT="([^,:\"]+)|([^,\"]+:[^,\"]+)|([^,]+{[^}]+})" } $0 !~ "^\\s*$" { gsub(/"/, "", $4) - print $2, $4, $8, $11 + print $4, $6 + }' | sort) act_on_container() { -- cgit v1.2.3