summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-05-04 16:47:22 +0200
committerJoe <bousset.rudy@gmail.com>2022-05-04 16:47:22 +0200
commitf9bc9be726f3dbb829d5b6c20e0746b9048eaece (patch)
tree4428188c612451971bd17049db0d67cfb9ccac42
parentupdate (diff)
downloaddotfiles-bsd-f9bc9be726f3dbb829d5b6c20e0746b9048eaece.tar.gz
dotfiles-bsd-f9bc9be726f3dbb829d5b6c20e0746b9048eaece.tar.bz2
dotfiles-bsd-f9bc9be726f3dbb829d5b6c20e0746b9048eaece.tar.xz
dotfiles-bsd-f9bc9be726f3dbb829d5b6c20e0746b9048eaece.tar.zst
dotfiles-bsd-f9bc9be726f3dbb829d5b6c20e0746b9048eaece.zip
scrot script update
-rw-r--r--.config/nvim/init.vim30
-rwxr-xr-x.local/bin/dmscrot35
-rwxr-xr-x.local/bin/vps1
3 files changed, 45 insertions, 21 deletions
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index f31923c..63c4387 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -19,18 +19,18 @@ if ! filereadable(system('echo -n "$XDG_DATA_HOME/nvim/autoload/plug.vim"'))
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > $XDG_DATA_HOME/nvim/autoload/plug.vim
autocmd VimEnter * PlugInstall
endif
-source /home/jozan/.config/nvim/plug.vim
-source /home/jozan/.config/nvim/settings.vim
-source /home/jozan/.config/nvim/bindings.vim
-source /home/jozan/.config/nvim/sidebars.vim
-source /home/jozan/.config/nvim/langs.vim
-source /home/jozan/.config/nvim/plug-config/airline.vim
-source /home/jozan/.config/nvim/plug-config/asyncomplete.vim
-source /home/jozan/.config/nvim/plug-config/floaterm.vim
-source /home/jozan/.config/nvim/plug-config/nerd-commenter.vim
-source /home/jozan/.config/nvim/plug-config/org.vim
-source /home/jozan/.config/nvim/plug-config/quickscope.vim
-source /home/jozan/.config/nvim/plug-config/rainbow.vim
-source /home/jozan/.config/nvim/plug-config/startify.vim
-source /home/jozan/.config/nvim/plug-config/signify.vim
-source /home/jozan/.config/nvim/plug-config/vim-lsp.vim
+source $XDG_CONFIG_HOME/nvim/plug.vim
+source $XDG_CONFIG_HOME/nvim/settings.vim
+source $XDG_CONFIG_HOME/nvim/bindings.vim
+source $XDG_CONFIG_HOME/nvim/sidebars.vim
+source $XDG_CONFIG_HOME/nvim/langs.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/airline.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/asyncomplete.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/floaterm.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/nerd-commenter.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/org.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/quickscope.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/rainbow.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/startify.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/signify.vim
+source $XDG_CONFIG_HOME/nvim/plug-config/vim-lsp.vim
diff --git a/.local/bin/dmscrot b/.local/bin/dmscrot
index 5a13835..0503abe 100755
--- a/.local/bin/dmscrot
+++ b/.local/bin/dmscrot
@@ -7,7 +7,8 @@ use constant {
SAVE_PATH => 'pics/scrot/',
SCREENSHOT_PATH => '/usr/local/bin/scrot',
IMGVIEW_PATH => '/usr/local/bin/nsxiv',
- XCLIP_PATH => '/usr/local/bin/xclip'
+ XCLIP_PATH => '/usr/local/bin/xclip',
+ NOTIFY_PATH => '/usr/local/bin/notify-send'
};
use constant LIST => [
'Select region',
@@ -29,6 +30,30 @@ sub show_img
return;
}
+sub notify_img
+{
+ my ($file) = @_;
+
+ system(
+ NOTIFY_PATH,
+ '-u', 'low',
+ '-t', '2000',
+ 'scrot',
+ 'a Screenshot captured to ' . "\n" .
+ '<b>' . $file . '</b>'
+ );
+ return;
+}
+
+sub clip_img
+{
+ my ($file) = @_;
+
+ chomp $file;
+ system('echo -n ' . $file . ' | ' . XCLIP_PATH);
+ return;
+}
+
sub file_name
{
my $file_name;
@@ -56,7 +81,6 @@ sub action
'-s',
'-l', 'mode=classic,style=dash,width=2,color=#990000'
);
- show_img($file_name);
}
elsif ($var eq ${+LIST}[1]) {
$file_name = file_name();
@@ -66,7 +90,6 @@ sub action
'-q', '100',
'-u'
);
- show_img($file_name);
}
elsif ($var eq ${+LIST}[2]) {
$file_name = file_name();
@@ -75,7 +98,6 @@ sub action
$file_name,
'-q', '100'
);
- show_img($file_name);
}
elsif ($var eq ${+LIST}[3]) {
$file_name = file_name();
@@ -85,7 +107,6 @@ sub action
'-q', '100',
'-a', '0,0,1920,1080'
);
- show_img($file_name);
}
elsif ($var eq ${+LIST}[4]) {
$file_name = file_name();
@@ -95,8 +116,10 @@ sub action
'-q', '100',
'-a', '1920,180,1440,900'
);
- show_img($file_name);
}
+ show_img($file_name);
+ notify_img($file_name);
+ clip_img($file_name);
return;
}
diff --git a/.local/bin/vps b/.local/bin/vps
index 27016e9..2828ed1 100755
--- a/.local/bin/vps
+++ b/.local/bin/vps
@@ -7,6 +7,7 @@ rsync -urvhP --delete-after \
--exclude '.*' \
--exclude 'README.org' \
--exclude 'LICENSE' \
+ --exclude 'asm-example.cgi' \
"$HOME"/dev/web/jozanofastora-www/ \
$serv_addr:/usr/local/www/jozan
# gitjoe-cgit