From 7f29a1e519d51934ecf86ddd6fc7d080b2eaaf91 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Sun, 30 May 2021 14:59:12 +0700 Subject: Set up mbsync --- awesome/.config/awesome/rc.lua | 4 ++-- .../systemd/user/default.target.wants/mbsync-legacy.timer | 1 + .../systemd/user/default.target.wants/mbsync-primary.timer | 1 + debian/.config/systemd/user/ipfs.service | 2 +- debian/.config/systemd/user/mbsync-legacy.service | 12 ++++++++++++ debian/.config/systemd/user/mbsync-legacy.timer | 11 +++++++++++ debian/.config/systemd/user/mbsync-primary.service | 12 ++++++++++++ debian/.config/systemd/user/mbsync-primary.timer | 11 +++++++++++ dev/.config/htop/htoprc | 6 +++--- dev/.gitconfig | 7 +++---- dev/.ssh/config | 11 ++--------- vim/.vim/vimrc | 4 +++- 12 files changed, 62 insertions(+), 20 deletions(-) create mode 120000 debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer create mode 120000 debian/.config/systemd/user/default.target.wants/mbsync-primary.timer create mode 100644 debian/.config/systemd/user/mbsync-legacy.service create mode 100644 debian/.config/systemd/user/mbsync-legacy.timer create mode 100644 debian/.config/systemd/user/mbsync-primary.service create mode 100644 debian/.config/systemd/user/mbsync-primary.timer diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index 043ead4..fd12b07 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -499,8 +499,8 @@ local globalkeys = awful.util.table.join( {description = "lock screen", group = "launcher"}), awful.key({modkey, "Shift"}, "s", spawner(slock_suspend), {description = "lock screen then suspend", group = "launcher"}), - awful.key({modkey}, "m", spawner("matrix-mirage"), - {description = "open Mirage", group = "launcher"}), + awful.key({modkey}, "m", spawner("nheko"), + {description = "open Nheko", group = "launcher"}), awful.key({modkey, "Shift"}, "m", spawner("tootle"), {description = "open Tootle", group = "launcher"}), awful.key({modkey, "Shift"}, "-", spawner(audacious_jump_box), diff --git a/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer b/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer new file mode 120000 index 0000000..f24d52e --- /dev/null +++ b/debian/.config/systemd/user/default.target.wants/mbsync-legacy.timer @@ -0,0 +1 @@ +/home/cnx/.config/systemd/user/mbsync-legacy.timer \ No newline at end of file diff --git a/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer b/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer new file mode 120000 index 0000000..2772b5b --- /dev/null +++ b/debian/.config/systemd/user/default.target.wants/mbsync-primary.timer @@ -0,0 +1 @@ +/home/cnx/.config/systemd/user/mbsync-primary.timer \ No newline at end of file diff --git a/debian/.config/systemd/user/ipfs.service b/debian/.config/systemd/user/ipfs.service index 5d67f7e..68b2027 100644 --- a/debian/.config/systemd/user/ipfs.service +++ b/debian/.config/systemd/user/ipfs.service @@ -3,7 +3,7 @@ Description=IPFS daemon After=network.target [Service] -ExecStart=/home/cnx/.local/share/go/bin/ipfs daemon --mount +ExecStart=%h/.local/share/go/bin/ipfs daemon Restart=on-failure [Install] diff --git a/debian/.config/systemd/user/mbsync-legacy.service b/debian/.config/systemd/user/mbsync-legacy.service new file mode 100644 index 0000000..e0954de --- /dev/null +++ b/debian/.config/systemd/user/mbsync-legacy.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for legacy account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync legacy +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-legacy.timer b/debian/.config/systemd/user/mbsync-legacy.timer new file mode 100644 index 0000000..3ea535a --- /dev/null +++ b/debian/.config/systemd/user/mbsync-legacy.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for legacy accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-primary.service b/debian/.config/systemd/user/mbsync-primary.service new file mode 100644 index 0000000..8ce0e6f --- /dev/null +++ b/debian/.config/systemd/user/mbsync-primary.service @@ -0,0 +1,12 @@ +[Unit] +Description=Synchronize IMAP and MailDir for primary account +Documentation=man:mbsync(1) +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Service] +ExecStart=/usr/bin/mbsync primary +Type=oneshot + +[Install] +WantedBy=default.target diff --git a/debian/.config/systemd/user/mbsync-primary.timer b/debian/.config/systemd/user/mbsync-primary.timer new file mode 100644 index 0000000..a0f4151 --- /dev/null +++ b/debian/.config/systemd/user/mbsync-primary.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Timer for primary accound mbsync +ConditionPathExists=%h/.mbsyncrc +After=network.target + +[Timer] +OnBootSec=1m +OnUnitInactiveSec=1m + +[Install] +WantedBy=default.target diff --git a/dev/.config/htop/htoprc b/dev/.config/htop/htoprc index 6511397..e3e5dd8 100644 --- a/dev/.config/htop/htoprc +++ b/dev/.config/htop/htoprc @@ -9,7 +9,7 @@ hide_kernel_threads=1 hide_userland_threads=0 shadow_other_users=0 show_thread_names=0 -show_program_path=0 +show_program_path=1 highlight_base_name=0 highlight_megabytes=1 highlight_threads=1 @@ -17,8 +17,8 @@ highlight_changes=0 highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 -show_merged_command=0 -tree_view=0 +show_merged_command=1 +tree_view=1 tree_view_always_by_pid=0 header_margin=1 detailed_cpu_time=0 diff --git a/dev/.gitconfig b/dev/.gitconfig index aa332fe..7f277dd 100644 --- a/dev/.gitconfig +++ b/dev/.gitconfig @@ -1,10 +1,7 @@ [user] email = mcsinyx@disroot.org name = Nguyễn Gia Phong - signingkey = 27148B2C06A2224B -[diff] - tool = vimdiff - guitool = gvimdiff + signingkey = A49C7D6CBDADCF44 [sendemail] smtpserver = disroot.org smtpuser = mcsinyx@disroot.org @@ -23,3 +20,5 @@ defaultBranch = main [trailer "sign"] key = Signed-off-by +[push] + followTags = true diff --git a/dev/.ssh/config b/dev/.ssh/config index fa85006..681714a 100644 --- a/dev/.ssh/config +++ b/dev/.ssh/config @@ -1,15 +1,8 @@ AddKeysToAgent yes -Host acanban - HostName acanban.ga - User weboms - Port 22222 - RequestTTY yes - RemoteCommand ssh acanban - -Host ict9 +Host comlake HostName ictlab.usth.edu.vn User phongng Port 22222 RequestTTY yes - RemoteCommand ssh ict9 -L 5901:localhost:5901 + RemoteCommand ssh comlake diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc index 6d42ed5..acef708 100755 --- a/vim/.vim/vimrc +++ b/vim/.vim/vimrc @@ -22,7 +22,8 @@ augroup vimrc autocmd BufNewFile,BufRead *.PAS setlocal filetype=pascal autocmd BufNewFile,BufRead *.ms setlocal filetype=groff autocmd BufNewFile,BufRead *.m setlocal filetype=octave - autocmd FileType asm,c,h,go,glsl,sshconfig,php + autocmd BufNewFile,BufRead *.h setlocal filetype=c + autocmd FileType asm,c,h,gitconfig,gitsendemail,go,glsl,sshconfig,php \ setlocal cindent cinoptions=(0 noexpandtab shiftwidth=8 tabstop=8 autocmd FileType vim,sh,scheme,lua,tex,cmake,cpp,plantuml,html,octave,pascal \ setlocal shiftwidth=2 @@ -49,6 +50,7 @@ Plug 'https://github.com/vim/killersheep' Plug 'https://github.com/sheerun/vim-polyglot' Plug 'https://github.com/francoiscabrol/ranger.vim' Plug 'https://github.com/srcery-colors/srcery-vim' +Plug 'https://github.com/tpope/vim-unimpaired' Plug 'https://github.com/davidhalter/jedi-vim', {'for': 'python'} Plug 'https://github.com/lervag/vimtex', {'for': 'tex'} Plug 'https://github.com/kovisoft/slimv', {'for': 'lisp'} -- cgit 1.4.1