Browse Source

Merge branch 'master' into bg-ratio

master^2
Brent Yorgey 2 months ago
parent
commit
fcd296e87a
No account linked to committer's email address
3 changed files with 69 additions and 0 deletions
  1. 12
    0
      CHANGES.md
  2. 11
    0
      XMonad/Prompt/Pass.hs
  3. 46
    0
      XMonad/Util/Themes.hs

+ 12
- 0
CHANGES.md View File

@@ -50,6 +50,12 @@
50 50
     using tab to wrap around the completion rows would fail when maxComplRows is
51 51
     restricting the number of rows of output.
52 52
 
53
+  * `XMonad.Prompt.Pass`
54
+
55
+    Added 'passOTPPrompt' to support getting OTP type password. This require
56
+    pass-otp (https://github.com/tadfisher/pass-otp) has been setup in the running
57
+    machine.
58
+
53 59
   * `XMonad.Actions.DynamicProjects`
54 60
 
55 61
     Make the input directory read from the prompt in `DynamicProjects`
@@ -71,12 +77,18 @@
71 77
     Add a utility function `isOnAnyVisibleWS :: Query Bool` to allow easy
72 78
     cycling between all windows on all visible workspaces.
73 79
 
80
+
74 81
   * `XMonad.Hooks.WallpaperSetter`
75 82
 
76 83
     Preserve the aspect ratio of wallpapers that xmonad sets. When previous
77 84
     versions would distort images to fit the screen size, it will now find a
78 85
     best fit by cropping instead.
79 86
 
87
+  * `XMonad.Util.Themes`
88
+
89
+    Add adwaitaTheme and adwaitaDarkTheme to match their respective
90
+    GTK themes.
91
+
80 92
 
81 93
 ## 0.15
82 94
 

+ 11
- 0
XMonad/Prompt/Pass.hs View File

@@ -44,6 +44,7 @@ module XMonad.Prompt.Pass (
44 44
                             -- * Usage
45 45
                             -- $usage
46 46
                               passPrompt
47
+                            , passOTPPrompt
47 48
                             , passGeneratePrompt
48 49
                             , passRemovePrompt
49 50
                             , passEditPrompt
@@ -125,6 +126,11 @@ mkPassPrompt promptLabel passwordFunction xpconfig = do
125 126
 passPrompt :: XPConfig -> X ()
126 127
 passPrompt = mkPassPrompt "Select password" selectPassword
127 128
 
129
+-- | A prompt to retrieve a OTP from a given entry.
130
+--
131
+passOTPPrompt :: XPConfig -> X ()
132
+passOTPPrompt = mkPassPrompt "Select OTP" selectOTP
133
+
128 134
 -- | A prompt to generate a password for a given entry.
129 135
 -- This can be used to override an already stored entry.
130 136
 -- (Beware that no confirmation is asked)
@@ -155,6 +161,11 @@ passEditPrompt = mkPassPrompt "Edit password" editPassword
155 161
 selectPassword :: String -> X ()
156 162
 selectPassword passLabel = spawn $ "pass --clip \"" ++ escapeQuote passLabel ++ "\""
157 163
 
164
+-- | Select a OTP.
165
+--
166
+selectOTP :: String -> X ()
167
+selectOTP passLabel = spawn $ "pass otp --clip \"" ++ escapeQuote passLabel ++ "\""
168
+
158 169
 -- | Generate a 30 characters password for a given entry.
159 170
 -- If the entry already exists, it is updated with a new password.
160 171
 --

+ 46
- 0
XMonad/Util/Themes.hs View File

@@ -19,6 +19,8 @@ module XMonad.Util.Themes
19 19
     , ppThemeInfo
20 20
     , xmonadTheme
21 21
     , smallClean
22
+    , adwaitaTheme
23
+    , adwaitaDarkTheme
22 24
     , robertTheme
23 25
     , darkTheme
24 26
     , deiflTheme
@@ -91,6 +93,8 @@ ppThemeInfo t = themeName t <> themeDescription t <> "by" <> themeAuthor t
91 93
 listOfThemes :: [ThemeInfo]
92 94
 listOfThemes = [ xmonadTheme
93 95
                , smallClean
96
+               , adwaitaTheme
97
+               , adwaitaDarkTheme
94 98
                , darkTheme
95 99
                , deiflTheme
96 100
                , oxymor00nTheme
@@ -132,6 +136,48 @@ smallClean =
132 136
                                       }
133 137
              }
134 138
 
139
+-- | Matching decorations for Adwaita GTK theme
140
+adwaitaTheme :: ThemeInfo
141
+adwaitaTheme =
142
+    newTheme { themeName        = "adwaitaTheme"
143
+             , themeAuthor      = "Alex Griffin"
144
+             , themeDescription = "Matching decorations for Adwaita GTK theme"
145
+             , theme            = def { activeColor         = "#dfdcd8"
146
+                                      , inactiveColor       = "#f6f5f4"
147
+                                      , urgentColor         = "#3584e4"
148
+                                      , activeBorderColor   = "#bfb8b1"
149
+                                      , inactiveBorderColor = "#cdc7c2"
150
+                                      , urgentBorderColor   = "#1658a7"
151
+                                      , activeTextColor     = "#2e3436"
152
+                                      , inactiveTextColor   = "#929595"
153
+                                      , urgentTextColor     = "#ffffff"
154
+                                      , fontName            = "xft:Cantarell:bold:size=11"
155
+                                      , decoWidth           = 400
156
+                                      , decoHeight          = 35
157
+                                      }
158
+             }
159
+
160
+-- | Matching decorations for Adwaita-dark GTK theme
161
+adwaitaDarkTheme :: ThemeInfo
162
+adwaitaDarkTheme =
163
+    newTheme { themeName        = "adwaitaDarkTheme"
164
+             , themeAuthor      = "Alex Griffin"
165
+             , themeDescription = "Matching decorations for Adwaita-dark GTK theme"
166
+             , theme            = def { activeColor         = "#2d2d2d"
167
+                                      , inactiveColor       = "#353535"
168
+                                      , urgentColor         = "#15539e"
169
+                                      , activeBorderColor   = "#070707"
170
+                                      , inactiveBorderColor = "#1c1c1c"
171
+                                      , urgentBorderColor   = "#030c17"
172
+                                      , activeTextColor     = "#eeeeec"
173
+                                      , inactiveTextColor   = "#929291"
174
+                                      , urgentTextColor     = "#ffffff"
175
+                                      , fontName            = "xft:Cantarell:bold:size=11"
176
+                                      , decoWidth           = 400
177
+                                      , decoHeight          = 35
178
+                                      }
179
+             }
180
+
135 181
 -- | Don's preferred colors - from DynamicLog...;)
136 182
 donaldTheme  :: ThemeInfo
137 183
 donaldTheme =

Loading…
Cancel
Save