Compare commits
4 Commits
67ffb18e03
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 5691bd9fdc | |||
| 27c2569984 | |||
| c828dfc2e6 | |||
| feb789c989 |
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
HASH="%C(yellow)%h%C(reset)"
|
HASH="%C(yellow)%h%C(reset)"
|
||||||
RELATIVE_TIME="%C(green)%ar%C(reset)"
|
RELATIVE_TIME="%C(green)%ar%C(reset)"
|
||||||
|
|||||||
28
capslock.ahk
Executable file
28
capslock.ahk
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#Requires AutoHotkey v2.0
|
||||||
|
|
||||||
|
SetCapsLockState "AlwaysOff"
|
||||||
|
|
||||||
|
Capslock::
|
||||||
|
{
|
||||||
|
Send "{LControl Down}"
|
||||||
|
KeyWait("CapsLock")
|
||||||
|
Send "{LControl Up}"
|
||||||
|
if ( A_PriorKey = "CapsLock" )
|
||||||
|
{
|
||||||
|
Send "{Esc}"
|
||||||
|
}
|
||||||
|
SetCapsLockState("Off")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::..date::
|
||||||
|
{
|
||||||
|
Send A_YYYY "-" A_MM "-" A_DD
|
||||||
|
Send A_EndChar
|
||||||
|
}
|
||||||
|
|
||||||
|
::..time::
|
||||||
|
{
|
||||||
|
Send A_Hour ":" A_Min
|
||||||
|
Send A_EndChar
|
||||||
|
}
|
||||||
63
install.sh
63
install.sh
@@ -1,38 +1,65 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function install_pkg() {
|
||||||
|
if hash apt-get 2>/dev/null; then
|
||||||
|
sudo -n apt-get update
|
||||||
|
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ${@}
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
if hash nix 2>/dev/null; then
|
||||||
|
echo "INSTALL ${@} yourself with nix"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function setup_ssh() {
|
function setup_ssh() {
|
||||||
|
configfile=~/.ssh/config
|
||||||
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
touch ~/.ssh/config
|
touch ${configfile}
|
||||||
chmod 644 ~/.ssh/config
|
chmod 644 ${configfile}
|
||||||
cat << EOF >> ~/.ssh/config
|
cat << EOF >> ${configfile}
|
||||||
Include ${HOME}/dotfiles/ssh.config
|
Include ${HOME}/dotfiles/ssh.config
|
||||||
|
# dotfiles installed
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_git() {
|
function setup_git() {
|
||||||
cat << EOF > ~/.gitconfig
|
configfile=~/.gitconfig
|
||||||
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat << EOF > ${configfile}
|
||||||
[include]
|
[include]
|
||||||
path = ${HOME}/dotfiles/git/gitconfig
|
path = ${HOME}/dotfiles/git/gitconfig
|
||||||
[core]
|
[core]
|
||||||
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
excludesfile = ${HOME}/dotfiles/git/gitignore_global
|
||||||
|
# dotfiles installed
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
setup_ssh
|
setup_ssh
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_tmux() {
|
function setup_tmux() {
|
||||||
sudo -n apt-get update
|
configfile=~/.tmux.conf
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
if grep -Fxq "# dotfiles installed" ${configfile}; then
|
||||||
tmux
|
return
|
||||||
cat << EOF > ~/.tmux.conf
|
fi
|
||||||
|
|
||||||
|
install_pkg tmux
|
||||||
|
cat << EOF > ${configfile}
|
||||||
source ${HOME}/dotfiles/tmux/tmux.conf
|
source ${HOME}/dotfiles/tmux/tmux.conf
|
||||||
|
# dotfiles.installed
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup_fish() {
|
function setup_fish() {
|
||||||
sudo -n apt-get update
|
install_pkg fish
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
||||||
fish
|
|
||||||
|
|
||||||
USER=`whoami`
|
USER=`whoami`
|
||||||
sudo -n chsh $USER -s $(which fish)
|
sudo -n chsh $USER -s $(which fish)
|
||||||
@@ -45,9 +72,7 @@ function setup_fish() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setup_nvim() {
|
function setup_nvim() {
|
||||||
sudo -n apt-get update
|
install_pkg neovim
|
||||||
sudo -n DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
||||||
neovim
|
|
||||||
mkdir -p ~/.config/nvim/
|
mkdir -p ~/.config/nvim/
|
||||||
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
ln -s ~/dotfiles/init.vim ~/.config/nvim/init.vim
|
||||||
|
|
||||||
@@ -60,10 +85,12 @@ function setup_nvim() {
|
|||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
|
|
||||||
sudo apt-get install locales less
|
install_pkg locales less
|
||||||
|
|
||||||
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
if [[ ${REMOTE_CONTAINERS} || ${DEVCONTAINER} ]]; then
|
||||||
sudo locale-gen
|
echo "sv_SE.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen
|
||||||
|
sudo locale-gen
|
||||||
|
fi
|
||||||
|
|
||||||
setup_fish
|
setup_fish
|
||||||
setup_ssh
|
setup_ssh
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
cd "$(dirname "$0")/.."
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
|||||||
13
vscode_settings.json
Normal file
13
vscode_settings.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"dev.containers.defaultExtensions": [
|
||||||
|
"spmeesseman.vscode-taskexplorer",
|
||||||
|
"github.vscode-pull-request-github"
|
||||||
|
],
|
||||||
|
"dotfiles.repository": "https://git.thomasloven.com/thomas/vsc-dotfiles.git",
|
||||||
|
"projectManager.tags": ["Personal", "Work", "cade", "hass"],
|
||||||
|
"diffEditor.ignoreTrimWhitespace": false,
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"chat.agent.enabled": false,
|
||||||
|
"telemetry.feedback.enabled": false,
|
||||||
|
"telemetry.editStats.enabled": false
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user