forked from colonelpanic/dotfiles
Merge branch 'master' of github.com:IvanMalison/dotfiles
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
bind "<ctrl>d" { "delete-from-cursor" (chars, 1) };
|
||||
bind "<alt>d" { "delete-from-cursor" (word-ends, 1) };
|
||||
bind "<alt>BackSpace" { "delete-from-cursor" (word-ends, -1) };
|
||||
bind "<alt>backspace" { "delete-from-cursor" (word-ends, -1) };
|
||||
bind "<ctrl>k" { "delete-from-cursor" (paragraph-ends, 1) };
|
||||
bind "<alt>backslash" { "delete-from-cursor" (whitespace, 1) };
|
||||
|
||||
bind "<alt>space" { "delete-from-cursor" (whitespace, 1)
|
||||
"insert-at-cursor" (" ") };
|
||||
|
12
dotfiles/config/systemd/user/git-sync@.service
Normal file
12
dotfiles/config/systemd/user/git-sync@.service
Normal file
@@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=git-sync %f %I %i
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/env git_sync_directory.sh %f
|
||||
ExecStop=/usr/bin/env pkill git_sync_directory.sh
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=wm.target
|
1
dotfiles/config/xmonad/.gitignore
vendored
1
dotfiles/config/xmonad/.gitignore
vendored
@@ -7,3 +7,4 @@
|
||||
/xmonad.o
|
||||
/xmonad.state
|
||||
/prompt-history
|
||||
/.cached-stack-install-path
|
||||
|
@@ -20,7 +20,6 @@ executable imalison-xmonad
|
||||
, directory>=1.2.6.2
|
||||
, filepath>=1.4.1.0
|
||||
, hostname>=1.0
|
||||
, mtl>=2.2.1
|
||||
, multimap>=1.2.1
|
||||
, process>=1.4.3.0
|
||||
, split
|
||||
|
@@ -6,7 +6,7 @@ module Main where
|
||||
import qualified Codec.Binary.UTF8.String as UTF8String (encode)
|
||||
import qualified Control.Arrow as A
|
||||
import Control.Monad
|
||||
import Control.Monad.Trans
|
||||
import Control.Monad.Trans.Class
|
||||
import Control.Monad.Trans.Maybe
|
||||
import Data.Aeson
|
||||
import qualified Data.ByteString.Lazy as B
|
||||
@@ -21,13 +21,12 @@ import Data.Tuple.Sequence (sequenceT)
|
||||
import Data.Typeable
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
import Network.HostName
|
||||
import PagerHints
|
||||
import System.Directory
|
||||
import System.FilePath.Posix
|
||||
import System.Process
|
||||
import PagerHints
|
||||
import Text.Printf
|
||||
import Unsafe.Coerce
|
||||
|
||||
import XMonad hiding ( (|||) )
|
||||
import XMonad.Actions.CycleWS hiding (nextScreen)
|
||||
import XMonad.Actions.CycleWorkspaceByScreen
|
||||
|
@@ -1442,7 +1442,7 @@ The file server file for this emacs instance no longer exists.")
|
||||
(let ((server-dir (if server-use-tcp server-auth-dir server-socket-dir)))
|
||||
(expand-file-name server-name server-dir)))
|
||||
(setq server-use-tcp t)
|
||||
(unless (equal nil (server-running-p)) (server-start))
|
||||
(when (equal nil (server-running-p)) (server-start))
|
||||
(run-with-timer 0 60 'imalison:make-main-emacs-server)))
|
||||
#+END_SRC
|
||||
** list-environment
|
||||
@@ -4380,7 +4380,7 @@ Not really sure what this is
|
||||
(setq deft-file-naming-rules '((noslash . "_")
|
||||
(nospace . "_")
|
||||
(case-fn . downcase)))
|
||||
(setq deft-directory "~/SparkleShare/org/notes")))
|
||||
(setq deft-directory (imalison:join-paths imalison:org-dir "notes"))))
|
||||
#+END_SRC
|
||||
** epg
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
|
@@ -1,4 +1,5 @@
|
||||
# emacs
|
||||
.#*
|
||||
.emacs.desktop
|
||||
.emacs*
|
||||
projectile.cache
|
||||
|
5
dotfiles/lib/bin/enable_git_sync.sh
Executable file
5
dotfiles/lib/bin/enable_git_sync.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
git config --bool branch.master.sync true
|
||||
git config --bool branch.master.syncNewFiles true
|
||||
git branch --set-upstream-to=origin/master
|
22
dotfiles/lib/bin/git_sync_directory.sh
Executable file
22
dotfiles/lib/bin/git_sync_directory.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
echo "Syncing $1"
|
||||
cd "$1"
|
||||
|
||||
counter=0
|
||||
while true; do
|
||||
changedFile=$(inotifywait ./ -r -e modify,move,create,delete --format "%w%f" --exclude '\.git' -t 20 2>/dev/null)
|
||||
if [ -z "$changedFile" ]
|
||||
then
|
||||
counter=$((counter+1))
|
||||
if [ $counter -gt 4 ]; then
|
||||
git-sync
|
||||
counter=0
|
||||
else
|
||||
git-sync > /dev/null
|
||||
fi
|
||||
else
|
||||
echo "Syncing for: $changedFile"
|
||||
{ git check-ignore "$changedFile" > /dev/null; } || git-sync
|
||||
fi
|
||||
done
|
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env zsh
|
||||
if environment_variable_exists INSIDE_EMACS; then
|
||||
emacs_pager "$@"
|
||||
emacs_pager -a less "$@"
|
||||
else
|
||||
less -FXr
|
||||
fi
|
||||
|
@@ -1,17 +1,23 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
export SYSTEMD_COLORS=0
|
||||
term=${ROFI_SYSTEMD_TERM-termite -e}
|
||||
term=${ROFI_SYSTEMD_TERM-urxvt -e}
|
||||
default_action=${ROFI_SYSTEMD_DEFAULT_ACTION-"list_actions"}
|
||||
|
||||
function user_units {
|
||||
SYSTEMD_COLORS=0 systemctl --user list-unit-files | tail -n +2 | head -n -2 |
|
||||
awk '{print $0 " user"}'
|
||||
function unit_files {
|
||||
systemctl "$1" list-unit-files --no-legend
|
||||
}
|
||||
|
||||
function system_units {
|
||||
systemctl list-unit-files | tail -n +2 | head -n -2 |
|
||||
awk '{print $0 " system"}'
|
||||
# This is needed to list services started from template units
|
||||
function running_units {
|
||||
systemctl "$1" list-units --all --type=service --no-legend |
|
||||
awk '{print $1 " " $3}'
|
||||
}
|
||||
|
||||
|
||||
function get_units {
|
||||
{ unit_files "--$1"; running_units "--$1"; } | sort -u -k1,1 |
|
||||
awk -v unit_type="$1" '{print $0 " " unit_type}'
|
||||
}
|
||||
|
||||
enable="Alt+e"
|
||||
@@ -68,7 +74,7 @@ function select_service_and_act {
|
||||
esac
|
||||
|
||||
selection="$(echo $result | sed -n 's/ \+/ /gp')"
|
||||
service_name="$(echo $selection | awk '{ print $1 }' | tr -d ' ')"
|
||||
service_name=$(echo "$selection" | awk '{ print $1 }' | tr -d ' ')
|
||||
is_user="$(echo $selection | awk '{ print $3 }' )"
|
||||
|
||||
case "$is_user" in
|
||||
@@ -86,22 +92,22 @@ function select_service_and_act {
|
||||
|
||||
to_run="$(get_command_with_args)"
|
||||
echo "Running $to_run"
|
||||
eval "$to_run"
|
||||
eval "$term $to_run"
|
||||
}
|
||||
|
||||
function get_command_with_args {
|
||||
case "$action" in
|
||||
"tail")
|
||||
echo "$term 'journalctl $user_arg -u $service_name -f'"
|
||||
echo "journalctl $user_arg -u '$service_name' -f"
|
||||
;;
|
||||
"list_actions")
|
||||
action=$(echo "$all_actions" | rofi -dmenu -i -p "Select action: ")
|
||||
get_command_with_args
|
||||
;;
|
||||
*)
|
||||
echo "$command $action $service_name"
|
||||
echo "$command $action '$service_name'"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
{ user_units; system_units; } | column -tc 1 | select_service_and_act
|
||||
{ get_units user; get_units system; } | column -tc 1 | select_service_and_act
|
||||
|
@@ -3,8 +3,8 @@
|
||||
# If there are issues with path, check /etc/profile for hard overrides of PATH.
|
||||
. "$HOME/.lib/login.sh"
|
||||
# XXX: prevents https://github.com/xmonad/xmonad/issues/86 from affecting startup
|
||||
rm -f ~/.xmonad
|
||||
|
||||
rm -f ~/.xmonad/xmonad.state
|
||||
load_xkb_map.sh
|
||||
|
||||
run_if_exists systemctl --user import-environment XDG_DATA_DIRS
|
||||
|
Reference in New Issue
Block a user