-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsvlo
executable file
·38 lines (31 loc) · 988 Bytes
/
svlo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# 2018-01-13
# File opener for the slo queue, called by slo. Needs "v", and "silent_cpucsekk" from my cli_util repo (or you could just replace that line by "sleep 1").
mkdir -p "/tmp/svlo_$USER/"
chmod 700 "/tmp/svlo_$USER/"
cd $HOME/.slo/2p/
veg=${1##*.}
# echo "$veg"
mv "$1" "/tmp/svlo_$USER/"
cd "/tmp/svlo_$USER/"
# Vim needs a new terminal
if [[ "$veg" == "lev" ]] || [[ "$veg" == "txt" ]] || [[ "$veg" == "log" ]] || [[ "$1" != *.* ]]
then
#gnome-terminal -e "bash -c 'vim \"+noremap q :q<CR>\" \"+noremap <Space> <PageDown>\" -p -M -R $1'"
#urxvt -e bash -c 'vim \+noremap q :q<CR>\" \"+noremap <Space> <PageDown>\" -p -M -R $1; exec bash' &
ablakbanless "$1"
else
v "$1"
fi
## This is from my cli_util repo. Makes sure stuff is not deleted before used.
#silent_cpucsekk
#
## Don't erase until eog runs as multiple instances are handled by one process.
#while true
#do
# ps cax | grep eog > /dev/null
# if [ ! $? -eq 0 ]; then
# break
# fi
# sleep 1
#done