From f8c577680b76c60a1168c1f793728f859fa1cd68 Mon Sep 17 00:00:00 2001 From: Rasmus Rosengren Date: Sun, 6 Feb 2022 02:41:13 +0100 Subject: [PATCH] stuffs:) --- .config/Code/User/settings.json | 2 +- .config/fish/conf.d/fish-ssh-agent.fish | 8 --- .config/fish/config.fish | 41 ++++++++---- .../functions/__ssh_agent_is_started.fish | 15 ----- .config/fish/functions/__ssh_agent_start.fish | 6 -- .config/i3/config | 66 ++++++++----------- .config/i3/scripts/lock.sh | 2 +- 7 files changed, 59 insertions(+), 81 deletions(-) delete mode 100644 .config/fish/conf.d/fish-ssh-agent.fish delete mode 100644 .config/fish/functions/__ssh_agent_is_started.fish delete mode 100644 .config/fish/functions/__ssh_agent_start.fish diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index 707730f..0c54b2a 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -28,7 +28,7 @@ // ESLint "eslint.packageManager": "yarn", // Theme - "workbench.colorTheme": "Community Material Theme High Contrast", + "workbench.colorTheme": "Material Theme Darker High Contrast", "workbench.iconTheme": "material-icon-theme", // Explorer "explorer.confirmDelete": false, diff --git a/.config/fish/conf.d/fish-ssh-agent.fish b/.config/fish/conf.d/fish-ssh-agent.fish deleted file mode 100644 index 8315237..0000000 --- a/.config/fish/conf.d/fish-ssh-agent.fish +++ /dev/null @@ -1,8 +0,0 @@ -# From https://github.com/danhper/fish-ssh-agent -if test -z "$SSH_ENV" - set -xg SSH_ENV $HOME/.ssh/environment -end - -if not __ssh_agent_is_started - __ssh_agent_start -end diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 284dedb..79b538b 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1,22 +1,39 @@ -set -x PATH $PATH $HOME/.cargo/bin +set -x PATH $PATH $HOME/.cargo/bin (yarn global bin) set -x GPG_TTY (tty) -alias yay paru +alias y paru alias j z -abbr --add gst git status -abbr --add gaa git add --all -abbr --add gds git diff --staged -abbr --add gdh git diff HEAD -abbr --add gl git log --oneline --graph -abbr --add gcm git commit -m +alias gst "git status" +alias gaa "git add --all" +alias ga. "git add ." +alias gds "git diff --staged" +alias gdh "git diff HEAD" +alias gl "git log --oneline --graph" +alias gcm "git commit -m" -abbr --add ls exa -abbr --add la exa -al -abbr --add l exa -l +alias ls exa +alias l "exa -al" +alias ll "exa -l" -abbr --add cat bat +alias cat bat + +alias sa "ssh-add -t 3600" +alias sat "ssh-add -t " +alias sad "ssh-add -d" + +function forbat --argument-names 'lang' + switch $lang + case json + prettier --parser json | bat --language json --pager "less -RF" + case js + prettier --parser babel | bat --language babel --pager "less -RF" + case '*' + echo I don\'t know $lang + end +end +funcsave forbat zoxide init fish | source starship init fish | source diff --git a/.config/fish/functions/__ssh_agent_is_started.fish b/.config/fish/functions/__ssh_agent_is_started.fish deleted file mode 100644 index 70c7aed..0000000 --- a/.config/fish/functions/__ssh_agent_is_started.fish +++ /dev/null @@ -1,15 +0,0 @@ -# From https://github.com/danhper/fish-ssh-agent -function __ssh_agent_is_started -d "check if ssh agent is already started" - if begin; test -f $SSH_ENV; and test -z "$SSH_AGENT_PID"; end - source $SSH_ENV > /dev/null - end - - if begin; test -z "$SSH_AGENT_PID"; and test -z "$SSH_CONNECTION"; end - return 1 - end - - ssh-add -l > /dev/null 2>&1 - if test $status -eq 2 - return 1 - end -end diff --git a/.config/fish/functions/__ssh_agent_start.fish b/.config/fish/functions/__ssh_agent_start.fish deleted file mode 100644 index 33c46d7..0000000 --- a/.config/fish/functions/__ssh_agent_start.fish +++ /dev/null @@ -1,6 +0,0 @@ -# From https://github.com/danhper/fish-ssh-agent -function __ssh_agent_start -d "start a new ssh agent" - ssh-agent -c | sed 's/^echo/#echo/' > $SSH_ENV - chmod 600 $SSH_ENV - source $SSH_ENV > /dev/null -end diff --git a/.config/i3/config b/.config/i3/config index f72386a..7ea5f9f 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -117,26 +117,25 @@ bindsym $mod+Tab exec --no-startup-id rofi -show window -sorting fzf -matching f # keyboard config exec_always "setxkbmap -model pc105 -layout us,se -variant , -option altwin:swap_lalt_lwin -option caps:swapescape -option grp:win_space_toggle" -# start composite manager -exec picom - focus_follows_mouse no - default_border pixel 3 default_floating_border none -hide_edge_borders none +mouse_warping none +title_align center # switch to workspace with urgent window automatically for_window [urgent=latest] focus -smart_borders on -# class border backgr. text indicator child_border -client.focused #000000 #285577 #ffffff #2e9ef4 #b3f3f3 -client.focused_inactive #000000 #5f676a #ffffff #484e50 #0c4443 -client.unfocused #000000 #222222 #888888 #292d2e #0c4443 -client.urgent #000000 #900000 #ffffff #900000 #ff0000 -client.placeholder #000000 #0c0c0c #ffffff #000000 #000000 -client.background #ffffff +set $active_color "#47a7a6" +set $inactive_color "#0c4443" + +# class border background text indicator child_border +client.focused #000000 #285577 #ffffff $active_color $active_color +client.focused_inactive #000000 #5f676a #ffffff $inactive_color $inactive_color +client.unfocused #000000 #222222 #888888 $inactive_color #0c4443 +client.urgent #000000 #900000 #ffffff $inactive_color #ff0000 +client.placeholder #000000 #0c0c0c #ffffff $inactive_color #000000 +client.background #ffffff bindsym $mod+Shift+s exec flameshot gui @@ -150,37 +149,27 @@ bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous # volume controls -bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 4 -bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 4 -bindsym XF86AudioMute exec --no-startup-id pamixer -t +bindsym XF86AudioRaiseVolume exec pamixer -i 4 +bindsym XF86AudioLowerVolume exec pamixer -d 4 +bindsym XF86AudioMute exec pamixer -t bar { id main font pango:Source Code Pro SemiBold, FontAwesome 10 position top - status_command .cargo/bin/i3status-simple + # status_command .cargo/bin/i3status-simple + status_command i3status tray_output none colors { - separator #666666 - background #222222 - statusline #dddddd - focused_workspace #0088CC #0088CC #ffffff - active_workspace #333333 #333333 #ffffff - inactive_workspace #333333 #333333 #888888 - urgent_workspace #2f343a #900000 #ffffff - } -} -bindsym $mod+t bar mode toggle tray -bar { - id tray - mode hide - modifier none - position bottom - tray_output primary - workspace_buttons no - colors { - background #222222 + # class border background text + focused_workspace $active_color $active_color #ffffff + active_workspace #333333 #333333 #ffffff + inactive_workspace #333333 #333333 #888888 + urgent_workspace #ef4444 #ef4444 #ffffff + separator #666666 + background #222222 + statusline #dddddd } } @@ -188,8 +177,9 @@ bar { exec --no-startup-id feh --bg-scale $HOME/.wallpapers/simplistic-mountain.jpg # Update lock screen bg cache -exec --no-startup-id betterlockscreen -u $HOME/wallpapers/blue-whale.png +exec --no-startup-id betterlockscreen -u $HOME/.wallpapers/blue-whale.png # Lock after 5 minutes exec --no-startup-id xset s 300 600 -exec --no-startup-id xss-lock --transfer-sleep-lock $HOME/.config/i3/scripts/lock.sh +exec --no-startup-id xss-lock $HOME/.config/i3/scripts/lock.sh +#exec --no-startup-id xss-lock --transfer-sleep-lock $HOME/.config/i3/scripts/lock.sh diff --git a/.config/i3/scripts/lock.sh b/.config/i3/scripts/lock.sh index eec6471..5f3ec1f 100755 --- a/.config/i3/scripts/lock.sh +++ b/.config/i3/scripts/lock.sh @@ -4,6 +4,6 @@ revert() { } trap revert HUP INT TERM -xset +dpms dpms 15 15 15 +xset +dpms dpms 600 600 600 betterlockscreen -l -- -n -e revert