Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ Thumbs.db
# Node installed packages #
###########################
node_modules/*

# Package lock #
###########################
package-lock.json
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Settings:
- Tabs can all be hidden, or all except the active tab
- Optional soft wrap
- Keep the [word count](https://atom.io/packages/wordcount) visible
- Cursor style. Can be configured to be a light/opaque non-blinking cursor, or hidden entirely.

Note that settings are not available until the package has been activated, due to [a shortcoming in core](https://github.com/atom/settings-view/issues/356). Also, if you change themes, you might need to reload Atom for the colors to be applied correctly to all packages including Zen.

Expand Down
16 changes: 16 additions & 0 deletions lib/zen.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ module.exports =
'Right'
]
order: 8
cursorStyle:
description: 'Change the cursor behavior.'
type: 'string'
default: 'Default'
enum: [
'Default',
'Still',
'Hidden'
]
order: 9

activate: (state) ->
atom.commands.add 'atom-workspace', 'zen:toggle', => @toggle()
Expand Down Expand Up @@ -87,6 +97,12 @@ module.exports =
when 'Hidden'
body.setAttribute 'data-zen-word-count', 'hidden'

switch atom.config.get 'Zen.cursorStyle'
when 'Still'
body.setAttribute 'data-zen-cursor', 'still'
when 'Hidden'
body.setAttribute 'data-zen-cursor', 'hidden'

body.setAttribute 'data-zen-gutter', atom.config.get 'Zen.gutter'

# Enter Mode
Expand Down
24 changes: 19 additions & 5 deletions styles/zen.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@
.editor--private {
.vertical-scrollbar {
opacity: 0;
transition: opacity .2s .1s;
transition: opacity 0.2s 0.1s;
}
&:hover .vertical-scrollbar {
opacity: 1;
}
}


.highlights {
display: none;
}

&[data-zen-word-count="visible"] {
.status-bar .word-count {
Expand All @@ -59,9 +62,9 @@
}

&[data-zen-gutter="false"] {
.gutter {
display: none;
}
.gutter {
display: none;
}
}

&[data-zen-tabs="multiple"],
Expand All @@ -81,4 +84,15 @@
}
}
}

&[data-zen-cursor="still"] {
atom-text-editor .cursor {
opacity: 0.3 !important;
}
}
&[data-zen-cursor="hidden"] {
atom-text-editor .cursor {
opacity: 0 !important;
}
}
}