Skip to content

Commit

Permalink
Move scripts into the bin folder
Browse files Browse the repository at this point in the history
  • Loading branch information
stayradiated committed Dec 17, 2013
1 parent 23f12cf commit 282b9f4
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 18 deletions.
11 changes: 6 additions & 5 deletions README.md
Expand Up @@ -44,17 +44,18 @@ Negatives:

### 2. Using pipes

Unix sockets can be useful, but you probably want to use a named pipe instead.
If you have used lemonboys bar, then you're probably used using pipes to write
text to it.

4. Edit the configuration file at `app/js/config.js`. Edit the script path to match where you cloned the repo to.
4. Edit the configuration file at `app/js/config.js`. Uncomment line 24 and edit the script path to match where you cloned the repo to.

script: '~/Projects/Bar/init_bar_script'
script: '~/Projects/Bar/bin/init_bar_script.sh'

You can also edit the height of the bar, and it's position on the screen in this file.

5. Then edit the file `init_bar_script` in the root of folder. You will need to change the path on line 9:
5. Then edit the file `bin/init_bar_script.sh`. You will need to change the path on line 9:

cat $PANEL_FIFO | node ~/Projects/Bar/printer.js &
cat $PANEL_FIFO | node ~/Projects/Bar/bin/printer.js &

8. Start the bar again using the same command from 1.4. This is where using a simple terminal alias `alias nw="/Applications/node-webkit.app/Contents/MacOS/node-webkit"` comes in handy, as you can just run `nw .` whenever you want to start the app.

Expand Down
2 changes: 1 addition & 1 deletion app/js/config.js
Expand Up @@ -21,7 +21,7 @@

// Optional: script file to run on startup
// Will be killed when the Bar is closed
// script: '~/Projects/Bar/init_bar_script'
// script: '~/Projects/Bar/bin/init_bar_script.sh'

};

Expand Down
12 changes: 12 additions & 0 deletions bin/init_bar_script.sh
@@ -0,0 +1,12 @@
#!/bin/sh

PANEL_FIFO=/tmp/bar.fifo

[ -e $PANEL_FIFO ] && rm $PANEL_FIFO
mkfifo $PANEL_FIFO

# Run bar
cat $PANEL_FIFO | node ~/Projects/Bar/bin/printer.js &

# Display time
# ~/Github/baskerville/sutils/clock -s -i 10 -f 'S%d %b - %I:%M %p' > $PANEL_FIFO &
File renamed without changes.
12 changes: 0 additions & 12 deletions init_bar_script

This file was deleted.

0 comments on commit 282b9f4

Please sign in to comment.