Commit 91f90df

bryfry <bryon@fryer.io>
2016-05-31 00:13:46
add slock
1 parent 4555645
files/slock-config.h
@@ -0,0 +1,8 @@
+static const char *colorname[NUMCOLS] = {
+	"black",     /* after initialization */
+	"#005577",   /* during input */
+	"#CC3333",   /* wrong password */
+};
+
+/* treat a cleared input like a wrong password */
+static const int failonclear = 1;
tasks/slock.yml
@@ -0,0 +1,39 @@
+---
+# slock.yml tasks
+- name: slock - apt dependenices
+  apt:
+    name: "{{ item }}"
+    state: latest
+  become: yes
+  tags: [slock, apt]
+  with_items:
+   - build-essential
+   - libxrandr-dev
+
+- name: slock - git clone
+  git:
+    repo: http://git.suckless.org/slock
+    dest: "{{ slock_dir }}"
+  tags: slock
+
+- name: slock - configure
+  copy: 
+    src: files/slock-config.h
+    dest: "{{ slock_dir }}/config.h"
+  tags: [slock, config]
+
+- name: slock - compile
+  command: "{{ item }}"
+  args: 
+    chdir: "{{ slock_dir }}"
+  tags: slock
+  with_items:
+  - make clean
+  - make 
+  
+- name: slock - install
+  command: make install
+  args: 
+    chdir: "{{ slock_dir }}"
+  tags: slock
+  become: true
main.yml
@@ -4,6 +4,7 @@
   vars: 
     st_dir: "{{ ansible_env.HOME }}/git/st"
     dwm_dir: "{{ ansible_env.HOME }}/git/dwm"
+    slock_dir: "{{ ansible_env.HOME }}/git/slock"
     home_dir: "{{ ansible_env.HOME }}/git/home"
     lastpass_dir: "{{ ansible_env.HOME }}/git/lastpass-cli"
     fonts_dir: "{{ ansible_env.HOME}}/.fonts"
@@ -38,6 +39,7 @@
 
   - include: tasks/st.yml
   - include: tasks/dwm.yml
+  - include: tasks/slock.yml
   - include: tasks/lastpass.yml
   - include: tasks/sourcecodepro.yml
   - include: tasks/home.yml
README.md
@@ -19,9 +19,10 @@ An ansible playbook for setting up Ubuntu 16.04 (server + dwm) on a Dell Chromeb
   - [x] home directory dotfiles
   - [ ] powertop systemd service
   - [ ] battery charge logs
-  - [ ] power button sensitivity
+  - [x] power button sensitivity
   - [ ] dwm statusbar
   - [ ] screen recording
+  - [ ] dwm lock screen
 
 ## TODO maybe