-
Notifications
You must be signed in to change notification settings - Fork 2
/
move-colors-kde.sh
127 lines (115 loc) · 3.89 KB
/
move-colors-kde.sh
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/bash
#move pywal generated colors to a kde colorscheme, names the color scheme after the first given argument
#to be run after pywal
background=$(grep -A 1 Background] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
foreground=$(grep -A 1 Foreground] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color0=$(grep -A 1 Color0Intense] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color1=$(grep -A 1 Color1] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color2=$(grep -A 1 Color2] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color3=$(grep -A 1 Color3] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color4=$(grep -A 1 Color4] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color5=$(grep -A 1 Color5] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color6=$(grep -A 1 Color6] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
color7=$(grep -A 1 Color7] ~/.cache/wal/colors-konsole.colorscheme | sed -r 's#.*=##' | tail -n 1)
name=$1 #take input for a name to be used for the colorscheme
echo "
[ColorEffects:Disabled]
Color=$background
ColorAmount=0
ColorEffect=3
ContrastAmount=0.55
ContrastEffect=1
IntensityAmount=-1
IntensityEffect=0
[ColorEffects:Inactive]
ChangeSelectionColor=true
Color=$background
ColorAmount=0
ColorEffect=0
ContrastAmount=0
ContrastEffect=0
Enable=false
IntensityAmount=-1
IntensityEffect=0
[Colors:Button]
BackgroundAlternate=$color0
BackgroundNormal=$background
DecorationFocus=$color3
DecorationHover=$color3
ForegroundActive=$color3
ForegroundInactive=$color0
ForegroundLink=$color3
ForegroundNegative=$color2
ForegroundNeutral=$color6
ForegroundNormal=$foreground
ForegroundPositive=$color5
ForegroundVisited=$color0
[Colors:Selection]
BackgroundAlternate=$color3
BackgroundNormal=$color3
DecorationFocus=$color3
DecorationHover=$color3
ForegroundActive=$background
ForegroundInactive=$color0
ForegroundLink=$color3
ForegroundNegative=$color2
ForegroundNeutral=$color6
ForegroundNormal=$foreground
ForegroundPositive=$color5
ForegroundVisited=$color0
[Colors:Tooltip]
BackgroundAlternate=$color0
BackgroundNormal=$background
DecorationFocus=$color3
DecorationHover=$color3
ForegroundActive=$color3
ForegroundInactive=$color0
ForegroundLink=$color3
ForegroundNegative=$color2
ForegroundNeutral=$color6
ForegroundNormal=$foreground
ForegroundPositive=$color5
ForegroundVisited=$color0
[Colors:View]
BackgroundAlternate=$color0
BackgroundNormal=$background
DecorationFocus=$color3
DecorationHover=$color3
ForegroundActive=$color3
ForegroundInactive=$color0
ForegroundLink=$color3
ForegroundNegative=$color2
ForegroundNeutral=$color6
ForegroundNormal=$foreground
ForegroundPositive=$color5
ForegroundVisited=$color0
[Colors:Window]
BackgroundAlternate=$color0
BackgroundNormal=$background
DecorationFocus=$color3
DecorationHover=$color3
ForegroundActive=$color3
ForegroundInactive=$color0
ForegroundLink=$color3
ForegroundNegative=$color2
ForegroundNeutral=$color6
ForegroundNormal=$foreground
ForegroundPositive=$color5
ForegroundVisited=$color0
[General]
ColorScheme=$1
Name=$1
shadeSortColumn=true
[KDE]
contrast=5
[WM]
activeBackground=$color3
activeBlend=$color3
activeForeground=$foreground
inactiveBackground=$color0
inactiveBlend=$color0
inactiveForeground=$color7" > ~/.kde4/share/apps/color-schemes/$1.colors
kwriteconfig5 --file ~/.config/kdeglobals --group WM --key frame $color3 #these lines come from https://github.com/gikari/bismuth/blob/master/TWEAKS.md
kwriteconfig5 --file ~/.config/kdeglobals --group WM --key inactiveFrame $color0 #they are used to change the color of the border around windows, useful if you use borders
echo "Made a plasma color scheme at ~/.kde4/share/apps/color-schemes/$1.colors"
echo "Don't forget to add it! System Settings -> Appearance -> Colors -> Install from File"