From cc53811c5169166a53dc92616df73dd5967b1fab Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Fri, 24 Jun 2022 17:37:12 +0200 Subject: [PATCH] update sway --- files/sway/.config/sway/bar.sh | 5 +++-- files/sway/.config/sway/config | 10 ++++++---- files/tmux/.tmux.conf | 3 ++- files/vim/.vimrc | 12 +++++++----- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/files/sway/.config/sway/bar.sh b/files/sway/.config/sway/bar.sh index 707cc91..7832f0c 100755 --- a/files/sway/.config/sway/bar.sh +++ b/files/sway/.config/sway/bar.sh @@ -1,6 +1,7 @@ #!/bin/bash -date=$(date +'%A, %d. %b %I:%M %p') +date=$(date +'%A, %d. %b') +time=$(date +'%I:%M %p') battery=$(cat /sys/class/power_supply/BAT1/capacity) @@ -38,5 +39,5 @@ fi light=$(light -G | awk '{print int($1+0.5)'})"%" sep=" " -echo "${sep}  ${light} ${sep} ${audio} ${sep}  ${wifi} ${sep}  ${powermode}: ${cpu_util} ${sep}  ${conservation} ${sep}  ${battery}% ${bat_rem} ${sep}  ${date}" +echo "${sep}  ${light} ${sep} ${audio} ${sep}  ${wifi} ${sep}  ${powermode}: ${cpu_util} ${sep}  ${conservation} ${sep}  ${battery}% ${bat_rem} ${sep}  ${date} ${sep}  ${time}" diff --git a/files/sway/.config/sway/config b/files/sway/.config/sway/config index 860bb6b..36d9e84 100644 --- a/files/sway/.config/sway/config +++ b/files/sway/.config/sway/config @@ -2,7 +2,7 @@ # Read `man 5 sway` for a complete reference. # Font in sway -font pango: SFMono Nerd Font 8 +font pango: SFMono Nerd Font 9 # Variables set $mod Mod4 @@ -50,7 +50,7 @@ bindswitch --reload --locked lid:off output $laptop enable # Idle configuration # Lock after 20 minutes # Suspend after 30 minutes -set $lock 'swaylock -f --image ~/images/wallpaper/wallpaper.png' +set $lock 'swaylock -f --image /tmp/lock.png --indicator-idle-visible' exec swayidle -w \ timeout 1200 $lock \ @@ -161,7 +161,7 @@ input type:keyboard { bindsym $mod+Control+$right move workspace to output right # Layout stuff: - workspace_layout tabbed + workspace_layout stacking # Make the current focus fullscreen bindsym $mod+f fullscreen @@ -179,7 +179,6 @@ input type:keyboard { title_align center default_border none titlebar_border_thickness 0 - titlebar_padding 0 gaps inner 0 @@ -220,5 +219,8 @@ exec swaync exec fcitx5 exec sworkstyle &> /tmp/sworkstyle.log +# generate a lock screen +exec convert ~/images/wallpaper/wallpaper.png -blur 0x8 /tmp/lock.png + # Include some defaults include /etc/sway/config.d/* diff --git a/files/tmux/.tmux.conf b/files/tmux/.tmux.conf index 1d3dfc4..612b07b 100644 --- a/files/tmux/.tmux.conf +++ b/files/tmux/.tmux.conf @@ -18,6 +18,7 @@ bind-key -n M-l select-pane -R # pane / window modifications bind-key -n M-z resize-pane -Z +# use `set automatic-rename on` to reset bind-key -n M-, command-prompt "rename-window '%%'" # new windows @@ -55,4 +56,4 @@ set -g window-status-current-style "underscore, bold" set -g window-status-current-format "#I:#W" set -g window-status-format "#I:#W" set -g status-left " " -set -g status-right "#S @ #h - %H:%M " +set -g status-right "#S @ #h - %I:%M %p " diff --git a/files/vim/.vimrc b/files/vim/.vimrc index fe0fa7e..cf43243 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -13,13 +13,14 @@ endif call plug#begin() -Plug 'altercation/vim-colors-solarized' " color scheme Plug 'tpope/vim-sleuth' " heuristic file indendation Plug 'jiangmiao/auto-pairs' " pair completion Plug 'ctrlpvim/ctrlp.vim' " file finder +Plug 'djoshea/vim-autoread' " auto reload file, when changed on disk + +Plug 'altercation/vim-colors-solarized' " color scheme Plug 'vim-airline/vim-airline' " a nicer status line Plug 'vim-airline/vim-airline-themes' " auto settings theme for airline -Plug 'djoshea/vim-autoread' " auto reload file, when changed on disk call plug#end() " ============================== Colors @@ -35,6 +36,7 @@ set relativenumber " show relative line number set cursorline " highlight current line set ruler " show line and row at bottom right set colorcolumn=80 +set nowrap " don't wrap lines set showmatch " highlights paranthesis set hidden " allow moving to a new buffer without saving @@ -45,10 +47,12 @@ set noshowcmd " don't show command in status set encoding=utf-8 set mouse=a " a=on, c=off set undolevels=1337 -set backspace=indent,eol,start " always delete with backspace" +set backspace=indent,eol,start " always delete with backspace set wildmenu " autocomplete :e set scrolloff=5 " minimum lines above or below the cursor +let g:ctrlp_show_hidden = 1 + " ============================== Statusline set laststatus=1 " 1: only if there are at least two windows set showtabline=1 " 1: only if there are at least two tab pages @@ -81,6 +85,4 @@ let g:netrw_liststyle = 3 " Tree-like structure let g:netrw_banner = 0 " Remove useless banner at the top of netrw " ============================== Macros and Mappings -" hello map e :CtrlP -