-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqute.lib
More file actions
executable file
·59 lines (51 loc) · 1.55 KB
/
qute.lib
File metadata and controls
executable file
·59 lines (51 loc) · 1.55 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
#
# ############################################################################
# Project: scripts (none)
# File...: qute.lib
# Created: Saturday, 2023/04/22 - 22:17:30
# Author.: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Last Modified: Tuesday, 2023/07/25 - 20:05:17
# Modified By..: @fbnmtz, (fabiano.matoz@gmail.com)
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Version: 0.0.5.56
# ~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~·~·~·~·~·~·~·~~·~·~·~·~·~~·~·~·~·~·~·~·~
# Description:
# >
# ############################################################################
# HISTORY:
#
_xLIB_QUTE_=true
qROOT="$XDG_CONFIG_HOME/qutebrowser"
qProfiles="$qROOT/profiles"
qNew(){
if [ ! -d "$qProfiles/$1" ]; then
mkdir -p "$qProfiles/$1/config"
ln -s "$qROOT"/config.py "$qProfiles/$1"
ln -s "$qROOT"/autoconfig.yml "$qProfiles/$1/config"
else
echo "This profile ($1) already exists!"
exit 1
fi
}
qList(){
ls "$qProfiles"
}
qChoose(){
run_profile=$(qList | dmenu -p "Select a profile")
[ -n "$run_profile" ] && \
qutebrowser --config-py "$qROOT/config.py" -B "$qProfiles/$run_profile" &
}
qOpen(){
if [ -d "$qProfiles/$1" ]; then
qutebrowser --config-py "$qROOT/config.py" -B "$qProfiles/$1"
else
echo "profile '$1' not found."
exit
fi
}
qQuit(){
pkill qutebrowser
}
xrequirements mkdir ln ls pkill