-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchrome_tabs_keep
More file actions
executable file
·25 lines (24 loc) · 1.02 KB
/
Copy pathchrome_tabs_keep
File metadata and controls
executable file
·25 lines (24 loc) · 1.02 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
#!/bin/sh
opt=$1
h="/home/koraynilay"
def="/C/Users/User/AppData/Local/Google/Chrome/User Data/Default"
scu="/C/Users/User/AppData/Local/Google/Chrome/User Data/Profile 5"
hdef="$h/.config/google-chrome/Default"
hscu="$h/.config/google-chrome/Profile 1"
bdir="$h/bck_chrome_tabs"
if [ "$opt" = "start_pc" ];then
cp -v "$hdef/Current Tabs" "$hdef/Current Session" "$bdir/"
cp -v "$hscu/Current Tabs" "$hscu/Current Session" "$bdir/scuola/"
touch "$bdir/bck_$(date +%Y-%m-%d_%H-%M-%S)"
cp -v "$def/Current Tabs" "$def/Current Session" "$hdef/"
cp -v "$scu/Current Tabs" "$scu/Current Session" "$hscu/"
elif [ "$opt" = "shut_pc" ];then
cp -v "$def/Current Tabs" "$def/Current Session" "$bdir/win/"
cp -v "$scu/Current Tabs" "$scu/Current Session" "$bdir/win/scuola/"
touch "$bdir/win/bck_$(date +%Y-%m-%d_%H-%M-%S)"
cp -v "$hdef/Current Tabs" "$hdef/Current Session" "$def/"
cp -v "$hscu/Current Tabs" "$hscu/Current Session" "$scu/"
else
printf "Usage: $0 [start_pc] [shut_pc]\n"
fi
dunstify -a chrome_tabs_keep "chrome_tabs_keep $1"