From d8f4999a581ebf15b51798e5d6a4b4812cf98b40 Mon Sep 17 00:00:00 2001 From: TheK4n Date: Sat, 11 Mar 2023 04:07:45 +0300 Subject: [PATCH] add systemd unit --- etc/systemd/system/wol.service | 11 +++++++++++ .../user/.config/nvim/after/plugin/luasnip.lua | 3 +-- home/user/.subbash/functions | 18 +++++++++--------- 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 etc/systemd/system/wol.service diff --git a/etc/systemd/system/wol.service b/etc/systemd/system/wol.service new file mode 100644 index 0000000..4d24e1d --- /dev/null +++ b/etc/systemd/system/wol.service @@ -0,0 +1,11 @@ +[Unit] +Description=Wake-on-LAN for enp3s0 +Requires=network.target +After=network.target + +[Service] +ExecStart=/usr/bin/ethtool -s enp3s0 wol g +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/home/user/.config/nvim/after/plugin/luasnip.lua b/home/user/.config/nvim/after/plugin/luasnip.lua index 69ff49b..3d9f331 100644 --- a/home/user/.config/nvim/after/plugin/luasnip.lua +++ b/home/user/.config/nvim/after/plugin/luasnip.lua @@ -8,8 +8,6 @@ vim.g.snips_email = 'thek4n@yandex.com' vim.g.snips_github = 'https://github.com/thek4n' -local map = vim.keymap.set - local function jump(val) return function() ls.jump(val) @@ -17,6 +15,7 @@ local function jump(val) end +local map = vim.keymap.set map({'i', 's'}, '', jump(1)) map({'i', 's'}, '', jump(-1)) diff --git a/home/user/.subbash/functions b/home/user/.subbash/functions index 19bea89..84287c8 100644 --- a/home/user/.subbash/functions +++ b/home/user/.subbash/functions @@ -59,6 +59,15 @@ cl() { } +py() { + if [[ -z "$@" && -x "$(command -v ipython 2>/dev/null)" ]]; then + ipython -i -c "q = exit" + else + python3 $@ + fi +} + + ve() { local venv_name @@ -164,15 +173,6 @@ docker_ips() { } -py() { - if [[ -z "$@" && -x "$(command -v ipython 2>/dev/null)" ]]; then - ipython -i -c "q = exit" - else - python3 $@ - fi -} - - # toggle wireguard vpn with interface /etc/wireguard/wg0.conf # to allow sudo user toggle vpn without password: ## sudo groupadd wireguard