forked from jkubrynski/settings-keeper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgnome.fish
33 lines (31 loc) · 834 Bytes
/
gnome.fish
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
function store
echo "storing...";
if not test -d gnome
mkdir gnome
end
dconf dump /org/gnome/desktop/wm/keybindings/ > gnome/keybindings.dconf
git add -A gnome/
set -l now (date +"%Y-%m-%d %H:%M")
git commit -m "Changes from $now"
git push origin master
end
function load
echo "loading...";
if test -e gnome/keybindings.dconf
dconf load /org/gnome/desktop/wm/keybindings/ < gnome/keybindings.dconf
end
if test -e gnome/preferences.dconf
dconf load /org/gnome/desktop/wm/preferences/ < gnome/preferences.dconf
end
if test -e gnome/shell.dconf
dconf load /org/gnome/shell/ < gnome/shell.dconf
end
end
switch (echo $argv)
case store
store
case load
load
case '*'
echo "Usage: fish gnome.fish store or fish gnome.fish load"
end