]> src.twobees.de Git - dotfiles.git/commitdiff
Merge branch 'main' of ssh://src.twobees.de/git/dotfiles
authorTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sat, 17 Feb 2024 11:23:06 +0000 (12:23 +0100)
committerTobias Sachs <git-pngdhxpf-ts@twobees.de>
Sat, 17 Feb 2024 11:23:06 +0000 (12:23 +0100)
install/ui
stow/bin/.bin/lockscreen.sh [new file with mode: 0755]
stow/nvim/.config/nvim/init.lua
stow/sway/.config/sway/config

index 385aaf581b9b328c557c1fb55542f39d7a7e383f..d29d958133a0237175d64511e5384a4d34f8573e 100644 (file)
@@ -2,6 +2,7 @@ dmenu
 ulauncher
 dunst
 sway
+grim
 alacritty
 waybar
 network-manager-gnome
diff --git a/stow/bin/.bin/lockscreen.sh b/stow/bin/.bin/lockscreen.sh
new file mode 100755 (executable)
index 0000000..536e95a
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+outfile=$1
+
+if [ -z "$outfile" ];then
+    echo output path missing >&2
+    outfile=/tmp/lock.png
+fi
+
+grim - | convert -filter Gaussian -resize 20% -blur 0x2.5 -resize 500% png:- "$outfile"
+swaylock -f -c 00FF00 -i "$outfile"
index c02802832b5f829ddc8c68d0395079fb313b65ef..7f5536d8917e375bfc6d36a1d01bbbdf90f11fd3 100644 (file)
@@ -107,6 +107,9 @@ require('lazy').setup({
     opts = { },
   },
 
+  -- {  dir = '~/github/mynvimplugins/btoggle.nvim/' },
+  {  'tobser/btoggle.nvim' },
+
   -- "gc" to comment visual regions/lines
   { 'numToStr/Comment.nvim',         opts = {} },
 
@@ -272,7 +275,7 @@ augroup END
 require('nvim-treesitter.configs').setup {
   -- Add languages to be installed here that you want installed for treesitter
   ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim', 'html',
-    'c_sharp', 'perl', 'python' },
+    'c_sharp', 'perl', 'python' ,'markdown' },
 
   -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
   auto_install = false,
@@ -519,5 +522,17 @@ vim.opt.diffopt = vim.opt.diffopt + "vertical"
 vim.opt.cursorline = true
 vim.opt.hlsearch = true
 
+local bt =  require("btoggle");
+bt.setup({
+  ["true"] = "false",
+  ["True"] = "False",
+  ["False"] = "True",
+  ["false"] = "true",
+  ["foo"] = "bar",
+  ["bar"] = "bor",
+  ["bor"] = "foo"
+})
+vim.keymap.set('n', '<leader>b', bt.toggle)
+
 -- The line beneath this is called `modeline`. See `:help modeline`
 -- vim: ts=2 sts=2 sw=2 et
index da8fae43850678284434238e884b91970faba9a9..c55d09f3dee2ba5c21fdbb2fdf2847f07a5be9aa 100644 (file)
@@ -33,15 +33,25 @@ include /etc/sway/config-vars.d/*
 #
 # You can get the names of your outputs by running: swaymsg -t get_outputs
 
+
+output HDMI-A-1 resolution 2560x1440 position 0 0 scale 1
+output DP-1 resolution 1680x1050 position 2560 0 scale 1
+
+bindsym $mod+F9 exec "sway output DP-1 disable; sway output HDMI-A-1 enable"
+bindsym $mod+F10 exec "sway output DP-1 enable; sway output HDMI-A-1 enable"
+bindsym $mod+F11 exec "sway output DP-1 enable; sway output HDMI-A-1 disable"
 ### Idle configuration
 #
 # Example configuration:
 #
- exec swayidle -w \
-          timeout 1200 'swaylock -f -c 000000' \
-          timeout 1201 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
-          before-sleep 'swaylock -f -c 000000'
-#
+set $lock_cmd ~/.bin/lockscreen.sh
+exec swayidle -w \
+          timeout 1200 $lock_cmd \
+          timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
+          before-sleep $lock_cmd
+
+bindsym $mod+Shift+x exec $lock_cmd
+
 # This will lock your screen after 300 seconds of inactivity, then turn off
 # your displays after another 300 seconds, and turn your screens back on when
 # resumed. It will also lock your screen before your computer goes to sleep.
@@ -87,6 +97,7 @@ include /etc/sway/config-vars.d/*
     # Exit sway (logs you out of your Wayland session)
     bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
 #
+
 # Moving around:
 #
     # Move your focus around
@@ -238,6 +249,8 @@ bindsym $mod+Shift+d exec dolphin
 bindsym $mod+Shift+f exec firefox
 bindsym $mod+Shift+Control+e exec "shutdown -h now"
 
+bindsym Shift+Control+p exec grim -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | wl-copy
+
 for_window [window_role="About"] floating enable
 for_window [class="vlc"] floating enable