summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-x.bin/ag-audio10
-rwxr-xr-x.bin/clear-efi-suspend10
-rwxr-xr-x.bin/dwm-start16
-rwxr-xr-x.bin/switch-gpg-key3
-rwxr-xr-x.bin/synchronize-pub-dots10
-rwxr-xr-x.config/nvim/after/ftplugin/elixir.lua4
-rwxr-xr-x.config/nvim/after/ftplugin/tsplayground.lua3
-rwxr-xr-x.config/nvim/lua/plugins.lua107
-rwxr-xr-x.config/qutebrowser/config.py1
-rwxr-xr-x.config/qutebrowser/greasemonkey/boursorama.js (renamed from .config/qutebrowser/greasemonkey/boursorama-css.js)0
-rwxr-xr-x.config/qutebrowser/greasemonkey/github-css.js14
-rwxr-xr-x.config/qutebrowser/greasemonkey/glassdoor.js (renamed from .config/qutebrowser/greasemonkey/glassdoor-css.js)13
-rwxr-xr-x.config/qutebrowser/greasemonkey/no-sticky-headers.js15
-rwxr-xr-x.config/qutebrowser/greasemonkey/scaleway.js (renamed from .config/qutebrowser/greasemonkey/scaleway-css.js)0
-rwxr-xr-x.config/qutebrowser/greasemonkey/scribe.js (renamed from .config/qutebrowser/greasemonkey/scribe-css.js)0
-rwxr-xr-x.config/qutebrowser/greasemonkey/stackoverflow.js (renamed from .config/qutebrowser/greasemonkey/stackoverflow-css.js)0
-rwxr-xr-x.config/virt-lightning/config.ini8
-rwxr-xr-x.config/xsuspender.conf123
-rwxr-xr-x.mbsyncrc21
-rwxr-xr-x.npmrc1
20 files changed, 273 insertions, 86 deletions
diff --git a/.bin/ag-audio b/.bin/ag-audio
index c39fd61..31b0fc3 100755
--- a/.bin/ag-audio
+++ b/.bin/ag-audio
@@ -10,14 +10,10 @@ __decrease() {
__mic_toggle() {
pactl set-source-mute @DEFAULT_SOURCE@ toggle
- pactl get-source-mute @DEFAULT_SOURCE@ | grep no >/dev/null 2>&1
- echo "${?}" > /sys/class/leds/platform::micmute/brightness
}
__toggle() {
pactl set-sink-mute @DEFAULT_SINK@ toggle
- pactl get-sink-mute @DEFAULT_SINK@ | grep no >/dev/null 2>&1
- echo "${?}" > /sys/class/leds/platform::mute/brightness
}
__next() {
@@ -56,4 +52,10 @@ case "${1}" in
;;
esac
+pactl get-source-mute @DEFAULT_SOURCE@ | grep no >/dev/null 2>&1
+echo "${?}" > /sys/class/leds/platform::micmute/brightness
+
+pactl get-sink-mute @DEFAULT_SINK@ | grep no >/dev/null 2>&1
+echo "${?}" > /sys/class/leds/platform::mute/brightness
+
ag-status &>/dev/null
diff --git a/.bin/clear-efi-suspend b/.bin/clear-efi-suspend
new file mode 100755
index 0000000..9086ef3
--- /dev/null
+++ b/.bin/clear-efi-suspend
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -xe
+
+mkdir -p /dev/pstore
+mount -t pstore pstore /dev/pstore
+ls /dev/pstore
+rm -f /dev/pstore/*
+
+rm /sys/firmware/efi/efivars/dump-type0-*
diff --git a/.bin/dwm-start b/.bin/dwm-start
index e411db5..b42252a 100755
--- a/.bin/dwm-start
+++ b/.bin/dwm-start
@@ -1,13 +1,25 @@
#!/bin/sh
-kill -9 xidle
-xidle &
+__xidle() {
+ kill -9 xidle
+ xidle &
+}
+
+__xsuspender() {
+ pkill -9 xsuspender
+ nohup xsuspender >/dev/null & disown
+}
+
+command -v xidle && __xidle
while true; do
# status
pkill -9 -f "ag-status"
ag-status -l >/dev/null &
+ # xsuspender
+ command -v xsuspender && __xsuspender
+
# x11 configuration
x11-config
. ~/.bin/x11-screen
diff --git a/.bin/switch-gpg-key b/.bin/switch-gpg-key
new file mode 100755
index 0000000..896d155
--- /dev/null
+++ b/.bin/switch-gpg-key
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gpg-connect-agent "scd serialno" "learn --force" /bye
diff --git a/.bin/synchronize-pub-dots b/.bin/synchronize-pub-dots
index 5a6e795..ae018b2 100755
--- a/.bin/synchronize-pub-dots
+++ b/.bin/synchronize-pub-dots
@@ -12,21 +12,25 @@ allowed_patterns="-e ^.bin
-e ^.config/dot/term-color-*
-e ^.config/gopass/config.yml
-e ^.config/i3*/config
- -e ^.config/tmux/
-e ^.config/mimeapps.list
-e ^.config/neomutt/neomuttrc
-e ^.config/newsboat/config
-e ^.config/nvim/
+ -e ^.config/pipewire/
-e ^.config/qutebrowser/config.py
-e ^.config/qutebrowser/greasemonkey/
- -e ^.config/pipewire/
-e ^.config/sway/config
-e ^.config/systemd/*.service
+ -e ^.config/tmux/
-e ^.config/user-dirs.dir
-e ^.config/user-dirs.locale
+ -e ^.config/virt-lightning/
+ -e ^.config/xsuspender.conf
-e ^.gnupg/gpg-agent.conf
- -e ^.public-keys/
-e ^.kshrc
+ -e ^.mbsyncrc
+ -e ^.npmrc
+ -e ^.public-keys/
-e ^.weechat/buflist.conf
-e ^.weechat/fset.conf
-e ^.weechat/logger.conf
diff --git a/.config/nvim/after/ftplugin/elixir.lua b/.config/nvim/after/ftplugin/elixir.lua
new file mode 100755
index 0000000..db9c53f
--- /dev/null
+++ b/.config/nvim/after/ftplugin/elixir.lua
@@ -0,0 +1,4 @@
+bo.tabstop = 2
+bo.shiftwidth = 2
+bo.expandtab = true
+o.colorcolumn = '98'
diff --git a/.config/nvim/after/ftplugin/tsplayground.lua b/.config/nvim/after/ftplugin/tsplayground.lua
new file mode 100755
index 0000000..b300057
--- /dev/null
+++ b/.config/nvim/after/ftplugin/tsplayground.lua
@@ -0,0 +1,3 @@
+bo.tabstop = 2
+bo.shiftwidth = 2
+bo.expandtab = true
diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua
index 24736eb..bb7a7b4 100755
--- a/.config/nvim/lua/plugins.lua
+++ b/.config/nvim/lua/plugins.lua
@@ -1,8 +1,4 @@
---[[
--- Plugins
---]]
-
--- Bootstrap for Paq
+-- bootstrap paq
local install_path = vim.fn.stdpath('data')..'/site/pack/paqs/start/paq-nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({
@@ -13,34 +9,35 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd 'packadd paq-nvim'
end
--- Enable Paq
+-- enable paq
vim.cmd 'packadd paq-nvim'
--- Plugin list
+-- plugins
require('paq') {
{'savq/paq-nvim'};
- -- lsp
+ -- treesiter / lsp
+ {'nvim-treesitter/playground'};
+ {'nvim-treesitter/nvim-treesitter-textobjects'};
{
'nvim-treesitter/nvim-treesitter',
- run=':TSUpdate'
+ run=vim.api.nvim_command(':silent! TSUpdate')
};
{
'neovim/nvim-lspconfig',
run='python3 -m pipx install python-lsp-server[all]'
};
- {
- 'numirias/semshi',
- run=':UpdateRemotePlugins'
- };
-- utils
{'folke/trouble.nvim'};
{'hrsh7th/nvim-compe'};
- -- org
- {'TimUntersberger/neogit'};
- {'kyazdani42/nvim-tree.lua'};
+ {'hrsh7th/cmp-nvim-lsp'};
+ {'hrsh7th/cmp-cmdline'};
+ {'hrsh7th/cmp-buffer'};
+ {'hrsh7th/cmp-path'};
+ {'hrsh7th/cmp-calc'};
+ {'hrsh7th/nvim-cmp'};
-- indent
{'lewis6991/gitsigns.nvim'};
@@ -51,7 +48,7 @@ require('paq') {
{'nvim-lua/plenary.nvim'};
}
--- Treesitter
+-- treesitter
local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
@@ -61,29 +58,40 @@ require('nvim-treesitter.configs').setup {
'verilog',
'kotlin'
},
- highlight = {
- enable = true,
- }
+ highlight = { enable = true },
+ incremental_selection = { enable = true },
+ textobjects = { enable = true }
}
-- completion
-require('compe').setup {
- enabled = true,
- source = {
- path = true;
- buffer = true;
- calc = true;
- nvim_lsp = true;
- nvim_lua = true;
- vsnip = true;
- ultisnips = true;
- luasnip = true;
- neorg = true;
- };
-}
+local cmp = require('cmp')
+
+cmp.setup({
+ mapping = {
+ ['<C-l>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
+ ['<C-j>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
+ ['<C-k>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
+ ['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
+ },
+ sources = cmp.config.sources({
+ { name = 'nvim_lsp' },
+ { name = 'cmdline' },
+ { name = 'path' },
+ { name = 'calc' }
+ },
+ {
+ { name = 'buffer' }
+ })
+})
+
+cmp.setup.cmdline('/', {
+ sources = {
+ { name = 'buffer' }
+ }
+})
--- LSP configuration
+-- lsp configuration
local lsputil = require('lspconfig/util')
local python_venv = require('utils').get_python_venv()
@@ -96,22 +104,23 @@ require('lspconfig').pylsp.setup{
}
require('lspconfig').clangd.setup{}
+require('lspconfig').elixirls.setup{ cmd = {'elixir-ls'} }
require('lspconfig').eslint.setup{}
require('lspconfig').terraformls.setup{}
-- org
require('trouble').setup{}
-require('neogit').setup{}
-- syntactic sugar
require('indent_guides').setup{
indent_enable=true;
exclude_filetypes={
- 'help',
'calendar',
- 'NvimTree'
+ 'gitcommit',
+ 'help',
+ 'NvimTree',
};
}
@@ -119,7 +128,15 @@ require('indent-o-matic').setup {
max_lines = 0,
standard_widths = { 2, 4, 8 },
- filetype_typescript = {
+ filetype_ = {
+ standard_widths = { 2, 4 },
+ },
+
+ filetype_css = {
+ max_lines = 4096,
+ },
+
+ filetype_scss = {
max_lines = 4096,
},
@@ -127,16 +144,18 @@ require('indent-o-matic').setup {
max_lines = 4096,
},
- filetype_ = {
- standard_widths = { 2, 4 },
+ filetype_json = {
+ max_lines = 4096,
},
-}
-vim.g['semshi#update_delay_factor'] = 0.0001
+ filetype_typescript = {
+ max_lines = 4096,
+ },
+}
require('gitsigns').setup{
signs = {
- add = {hl = 'GitSignsAdd' , text = '▍', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
+ add = {hl = 'GitSignsAdd', text = '▍', numhl='GitSignsAddNr', linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▍', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
diff --git a/.config/qutebrowser/config.py b/.config/qutebrowser/config.py
index c86a473..cd3695d 100755
--- a/.config/qutebrowser/config.py
+++ b/.config/qutebrowser/config.py
@@ -42,6 +42,7 @@ config.set('scrolling.smooth', False)
config.set('qt.highdpi', False)
config.set('qt.force_software_rendering', 'none')
config.set('qt.args', select_qt_arguments())
+config.set('messages.timeout', 1000)
config.bind(',m', 'spawn mpv {url}')
diff --git a/.config/qutebrowser/greasemonkey/boursorama-css.js b/.config/qutebrowser/greasemonkey/boursorama.js
index 771bc38..771bc38 100755
--- a/.config/qutebrowser/greasemonkey/boursorama-css.js
+++ b/.config/qutebrowser/greasemonkey/boursorama.js
diff --git a/.config/qutebrowser/greasemonkey/github-css.js b/.config/qutebrowser/greasemonkey/github-css.js
deleted file mode 100755
index 3b954b2..0000000
--- a/.config/qutebrowser/greasemonkey/github-css.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// ==UserScript==
-// @name github css
-// @match *://github.com/*
-// @match *://gist.github.com/*
-// @grant none
-// ==/UserScript==
-
-/*
-GM_addStyle(`
- *, .BtnGroup-item {
- border-radius: 0px !important;
- }
-`)
-*/
diff --git a/.config/qutebrowser/greasemonkey/glassdoor-css.js b/.config/qutebrowser/greasemonkey/glassdoor.js
index ad82b26..e6e44fc 100755
--- a/.config/qutebrowser/greasemonkey/glassdoor-css.js
+++ b/.config/qutebrowser/greasemonkey/glassdoor.js
@@ -1,19 +1,24 @@
// ==UserScript==
// @name glassdoor
// @match https://*.glassdoor.com/*
+// @match https://*.glassdoor.fr/*
+// @run-at document-end
// @grant none
// ==/UserScript==
window.addEventListener('load', function () {
window.onscroll = null;
+ console.log('bbbbbbbbbbbbbb');
})
window.addEventListener('load', function() {
let functions = [
- () => document.getElementById("ContentWallHardsell").remove(),
- () => document.getElementsByTagName('body')[0].style.removeProperty("overflow"),
- () => document.addEventListener("scroll", event => event.stopPropagation(), true),
- () => document.addEventListener("mousemove", event => event.stopPropagation(), true),
+ () => document.getElementById('HardsellOverlay').remove(),
+ () => document.getElementsByTagName('body')[0].style.removeProperty('overflow'),
+ () => document.addEventListener('scroll', event => event.stopPropagation(), true),
+ () => document.addEventListener('mousemove', event => event.stopPropagation(), true),
];
functions.forEach(f => f());
});
+
+console.log('aaaaaaaaaaaaa');
diff --git a/.config/qutebrowser/greasemonkey/no-sticky-headers.js b/.config/qutebrowser/greasemonkey/no-sticky-headers.js
deleted file mode 100755
index e5eefa1..0000000
--- a/.config/qutebrowser/greasemonkey/no-sticky-headers.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// ==UserScript==
-// @name no sticky header
-// @match *://*.substack.com/*
-// @grant none
-// ==/UserScript==
-
-(function () {
- var i, elements = document.querySelectorAll('body *');
-
- for (i = 0; i < elements.length; i++) {
- if (getComputedStyle(elements[i]).position === 'fixed') {
- elements[i].parentNode.removeChild(elements[i]);
- }
- }
-})();
diff --git a/.config/qutebrowser/greasemonkey/scaleway-css.js b/.config/qutebrowser/greasemonkey/scaleway.js
index 99955ca..99955ca 100755
--- a/.config/qutebrowser/greasemonkey/scaleway-css.js
+++ b/.config/qutebrowser/greasemonkey/scaleway.js
diff --git a/.config/qutebrowser/greasemonkey/scribe-css.js b/.config/qutebrowser/greasemonkey/scribe.js
index 60fc0e2..60fc0e2 100755
--- a/.config/qutebrowser/greasemonkey/scribe-css.js
+++ b/.config/qutebrowser/greasemonkey/scribe.js
diff --git a/.config/qutebrowser/greasemonkey/stackoverflow-css.js b/.config/qutebrowser/greasemonkey/stackoverflow.js
index 6c98466..6c98466 100755
--- a/.config/qutebrowser/greasemonkey/stackoverflow-css.js
+++ b/.config/qutebrowser/greasemonkey/stackoverflow.js
diff --git a/.config/virt-lightning/config.ini b/.config/virt-lightning/config.ini
new file mode 100755
index 0000000..b6649cd
--- /dev/null
+++ b/.config/virt-lightning/config.ini
@@ -0,0 +1,8 @@
+[main]
+libvirt_uri = qemu:///system
+root_password = root
+storage_pool = virt-lightning
+network_name = virt-lightning
+network_cidr = 192.168.123.0/24
+network_auto_clean_up = True
+ssh_key_file = ~/.ssh/id_ed25519.pub
diff --git a/.config/xsuspender.conf b/.config/xsuspender.conf
new file mode 100755
index 0000000..c514998
--- /dev/null
+++ b/.config/xsuspender.conf
@@ -0,0 +1,123 @@
+# Configuration file for xsuspender.
+#
+# Sections represent rules windows are matched with.
+# Find full documentation in xsuspender(1) manual.
+#
+# [Example]
+# # Window matching rules. Some can be left blank.
+# # Intersection of non-blanks applies.
+# match_wm_class_contains = SomeApplication
+# match_wm_class_group_contains = ...
+# match_wm_name_contains = Part of Some Window Title
+#
+# # Seconds to wait before suspending after window loses focus.
+# suspend_delay = 10
+#
+# # Resume suspended process every this many seconds …
+# resume_every = 50
+#
+# # … for this many seconds.
+# resume_for = 5
+#
+# # Before suspending, execute this shell script. If it fails,
+# # abort suspension.
+# exec_suspend = echo "suspending window $XID of process $PID"
+#
+# # Before resuming, execute this shell script. Resume the
+# # process regardless script failure.
+# exec_resume = echo resuming ...
+#
+# # Whether to send SIGSTOP / SIGCONT signals or not. If false,
+# # just the exec_* scripts are run.
+# send_signals = true
+#
+# # Also suspend descendant processes that match this regex.
+# suspend_subtree_pattern = .
+#
+# # Whether to apply the rule only when on battery power.
+# only_on_battery = true
+#
+# # Whether to auto-apply rules when switching to battery
+# # power even if the window(s) didn't just lose focus.
+# auto_suspend_on_battery = true
+#
+# # Limit CPU consumption for this factor when on battery power.
+# # Value 1 means 50% decrease, 2 means 66%, 3 75% etc.
+# downclock_on_battery = 0
+#
+#
+# Values set in the Default section are inherited and overridden
+# by other sections below.
+
+[Default]
+suspend_delay = 5
+resume_every = 50
+resume_for = 5
+send_signals = true
+only_on_battery = true
+auto_suspend_on_battery = true
+downclock_on_battery = 0
+
+# Preset configuration for some common software.
+
+[Chromium]
+suspend_delay = 10
+match_wm_class_contains = chromium
+suspend_subtree_pattern = chromium
+
+[Firefox]
+suspend_delay = 10
+match_wm_class_contains = Navigator
+match_wm_class_group_contains = Firefox
+suspend_subtree_pattern = \/(firefox|plugin-container)
+
+[JetBrains IDEs]
+match_wm_class_group_contains = jetbrains-
+downclock_on_battery = 1
+
+[VirtualBox]
+match_wm_class_contains = VirtualBox
+match_wm_name_contains = - Oracle VM
+exec_suspend = VBoxManage controlvm "$(ps -o args= -q $PID | sed -E 's/.*--startvm ([^ ]+).*/\1/')" pause
+exec_resume = VBoxManage controlvm "$(ps -o args= -q $PID | sed -E 's/.*--startvm ([^ ]+).*/\1/')" resume
+send_signals = false
+resume_every = 0
+only_on_battery = false
+downclock_on_battery = 1
+
+[qBittorrent]
+match_wm_class_contains = qbittorrent
+resume_every = 5
+resume_for = 1
+suspend_delay = 60
+
+[Pidgin]
+match_wm_class_contains = Pidgin
+resume_every = 1
+resume_for = 1
+downclock_on_battery = 2
+
+[Clementine]
+match_wm_class_contains = clementine
+downclock_on_battery = 1
+send_signals = false
+
+[Rambox]
+resume_every = 30
+match_wm_class_contains = rambox
+suspend_subtree_pattern = .*
+
+#[MyApplication]
+#match_wm_name_contains =
+#match_wm_class_contains =
+#match_wm_class_group_contains =
+#suspend_delay = 10
+#resume_every = 50
+#resume_for = 5
+#exec_suspend =
+#exec_resume =
+#suspend_subtree_pattern =
+#send_signals = true
+#only_on_battery = true
+#auto_suspend_on_battery = true
+#downclock_on_battery = 0
diff --git a/.mbsyncrc b/.mbsyncrc
new file mode 100755
index 0000000..1023795
--- /dev/null
+++ b/.mbsyncrc
@@ -0,0 +1,21 @@
+IMAPAccount personal
+Host imap.mailbox.org
+UserCmd "echo ${MAIL_USERNAME}@${MAIL_SERVER}"
+PassCmd "echo ${MAIL_PASSWORD}"
+SSLType IMAPS
+
+IMAPStore personal-remote
+Account personal
+
+MaildirStore personal-local
+SubFolders Verbatim
+Path ~/.mail/
+Inbox ~/.mail/INBOX
+
+Channel personal
+Far :personal-remote:
+Near :personal-local:
+Patterns *
+Create Both
+Expunge Both
+SyncState *
diff --git a/.npmrc b/.npmrc
new file mode 100755
index 0000000..8f55e88
--- /dev/null
+++ b/.npmrc
@@ -0,0 +1 @@
+prefix=/home/qwd/.local/npm
remember that computers suck.