Skip to content

Commit

Permalink
Use XDG Base Directory specification path for prompt widget's history…
Browse files Browse the repository at this point in the history
… file
  • Loading branch information
kynikos authored and flacjacket committed Mar 4, 2016
1 parent 66d704b commit 51cff01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG
Expand Up @@ -3,6 +3,8 @@ qtile x.x.x, released xxxx-xx-xx:
- the default log file path changed from ~/.qtile.log to
~/.local/share/qtile/qtile.log
- the cache directory changed from ~/.cache to ~/.cache/qtile
- the prompt widget's history file changed from ~/.qtile_history to
~/.cache/qtile/prompt_history
* features
- wlan widget shows when you are disconnected and uses a configurable
format
Expand Down
3 changes: 2 additions & 1 deletion libqtile/widget/prompt.py
Expand Up @@ -362,7 +362,8 @@ def __init__(self, name="prompt", **config):
self.original_background = self.background
# If history record is on, get saved history or create history record
if self.record_history:
self.history_path = os.path.expanduser('~/.qtile_history')
self.history_path = os.path.join(utils.get_cache_dir(),
'prompt_history')
if os.path.exists(self.history_path):
with open(self.history_path, 'rb') as f:
try:
Expand Down

0 comments on commit 51cff01

Please sign in to comment.