Compare commits
2
Commits
main
..
db1d2bd992
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db1d2bd992 | ||
|
|
c0449d2b3e |
@@ -6,12 +6,8 @@
|
|||||||
# important for window manager and menu app (fuzzel, rofi, ..)
|
# important for window manager and menu app (fuzzel, rofi, ..)
|
||||||
# to find scripts and utilities
|
# to find scripts and utilities
|
||||||
|
|
||||||
unset export_paths
|
export_paths=("${HOME}/dotfiles/scripts")
|
||||||
export_paths+=("${HOME}/dotfiles/scripts")
|
|
||||||
export_paths+=("${HOME}/dotfiles/desktop-files")
|
|
||||||
export_paths+=("/opt/jlink")
|
export_paths+=("/opt/jlink")
|
||||||
export_paths+=("${HOME}/.cargo/bin")
|
|
||||||
export_paths+=("/opt/arm-gnu-toolchain-15.2.rel1-x86_64-arm-none-eabi/bin")
|
|
||||||
|
|
||||||
for entry in ${export_paths[@]}; do
|
for entry in ${export_paths[@]}; do
|
||||||
if ! [[ -d "${entry}" ]]; then
|
if ! [[ -d "${entry}" ]]; then
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
# to find scripts and utilities
|
# to find scripts and utilities
|
||||||
|
|
||||||
export_paths=("${HOME}/dotfiles/scripts")
|
export_paths=("${HOME}/dotfiles/scripts")
|
||||||
export_paths+=("${HOME}/dotfiles/desktop-files")
|
|
||||||
export_paths+=("${HOME}/tools/jlink")
|
export_paths+=("${HOME}/tools/jlink")
|
||||||
|
|
||||||
for entry in ${export_paths[@]}; do
|
for entry in ${export_paths[@]}; do
|
||||||
|
|||||||
@@ -63,8 +63,6 @@ fi
|
|||||||
# because `libreWolf` is ambiguous for tab completion
|
# because `libreWolf` is ambiguous for tab completion
|
||||||
if $(which librewolf &>/dev/null); then
|
if $(which librewolf &>/dev/null); then
|
||||||
alias firefox='librewolf'
|
alias firefox='librewolf'
|
||||||
elif $(which librewolf.appimage &>/dev/null); then
|
|
||||||
alias firefox='librewolf.appimage'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# short forms for tmux commands
|
# short forms for tmux commands
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
[Desktop Entry]
|
|
||||||
Name=firefox
|
|
||||||
Comment=launch zegonix browser of choice
|
|
||||||
Exec=bash start-browser.sh
|
|
||||||
Type=Application
|
|
||||||
Categories=Network;WebBrowser;
|
|
||||||
@@ -16,19 +16,10 @@ background-opacity = 1.0
|
|||||||
selection-invert-fg-bg = true
|
selection-invert-fg-bg = true
|
||||||
|
|
||||||
window-decoration = server
|
window-decoration = server
|
||||||
mouse-scroll-multiplier = precision:1.0,discrete:1
|
mouse-scroll-multiplier = 1.0
|
||||||
|
|
||||||
app-notifications = no-clipboard-copy
|
app-notifications = no-clipboard-copy
|
||||||
copy-on-select = false
|
copy-on-select = false
|
||||||
clipboard-paste-protection = false
|
clipboard-paste-protection = false
|
||||||
clipboard-read = allow
|
|
||||||
clipboard-write = allow
|
|
||||||
|
|
||||||
# unbind keybindings
|
|
||||||
keybind = alt+one=unbind
|
|
||||||
keybind = alt+two=unbind
|
|
||||||
keybind = alt+three=unbind
|
|
||||||
keybind = alt+four=unbind
|
|
||||||
|
|
||||||
# custom theme!
|
|
||||||
theme = zegonix
|
theme = zegonix
|
||||||
|
|||||||
@@ -22,4 +22,4 @@
|
|||||||
|
|
||||||
oneline = log \
|
oneline = log \
|
||||||
-n 20 \
|
-n 20 \
|
||||||
--pretty='tformat:%C(yellow)%h %C(brightblue)%<(8,trunc)%an %C(blue)%as%C(auto)%d %C(reset)%s'
|
--pretty='tformat:%C(yellow)%h %C(blue)%as%C(auto)%d %C(reset)%s'
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-icon-theme-name=Adwaita
|
gtk-icon-theme-name = Adwaita
|
||||||
gtk-theme-name=Adwaita-dark
|
gtk-theme-name = Adwaita-dark
|
||||||
gtk-cursor-theme-name=Adwaita
|
gtk-font-name = JetBrainsMonoNerdFont
|
||||||
gtk-font-name=JetBrainsMonoNerdFont
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
[Settings]
|
[Settings]
|
||||||
gtk-icon-theme-name=Adwaita
|
gtk-icon-theme-name = Adwaita
|
||||||
gtk-theme-name=Adwaita-dark
|
gtk-theme-name = Adwaita-dark
|
||||||
gtk-cursor-theme-name=Adwaita
|
gtk-font-name = JetBrainsMonoNerdFont
|
||||||
gtk-font-name=JetBrainsMonoNerdFont
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ exec --no-startup-id dunst
|
|||||||
exec --no-startup-id picom -b
|
exec --no-startup-id picom -b
|
||||||
|
|
||||||
# clean up and start polybar
|
# clean up and start polybar
|
||||||
exec_always --no-startup-id pkill polybar
|
exec_always --no-startup-id killall polybar
|
||||||
exec_always --no-startup-id bash ~/.config/polybar/launch_polybar.sh
|
exec_always --no-startup-id bash ~/.config/polybar/launch_polybar.sh
|
||||||
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||||
@@ -168,9 +168,8 @@ bindsym $mod+o move workspace to output up
|
|||||||
bindsym $mod+p move workspace to output right
|
bindsym $mod+p move workspace to output right
|
||||||
|
|
||||||
# take screenshots
|
# take screenshots
|
||||||
bindsym $mod+s exec --no-startup-id bash x11-screenshot.sh "clipboard"
|
bindsym $mod+s exec --no-startup-id maim -suo | xclip -selection clipboard -t image/png
|
||||||
bindsym $mod+Shift+s exec --no-startup-id bash x11-screenshot.sh
|
bindsym $mod+Shift+s exec --no-startup-id maim -suo "${HOME}/Pictures/screenshots/$(date '+%Y%m%d_%H%M%S').png"
|
||||||
bindsym $mod+c exec --no-startup-id bash x11-screenshot.sh "colour"
|
|
||||||
|
|
||||||
# use pactl for media keys
|
# use pactl for media keys
|
||||||
set $refresh_i3status killall -SIGUSR1 i3status
|
set $refresh_i3status killall -SIGUSR1 i3status
|
||||||
@@ -198,7 +197,7 @@ mouse_warping none
|
|||||||
############################
|
############################
|
||||||
|
|
||||||
# load background image
|
# load background image
|
||||||
exec --no-startup-id feh --bg-fill ~/dotfiles/images/pixel-windows.png
|
exec --no-startup-id feh --bg-fill ~/dotfiles/images/dungeon_forest.jpg
|
||||||
|
|
||||||
# window border style
|
# window border style
|
||||||
default_border pixel 2
|
default_border pixel 2
|
||||||
@@ -206,8 +205,8 @@ default_floating_border pixel 0
|
|||||||
for_window [class=".*"] border pixel 1
|
for_window [class=".*"] border pixel 1
|
||||||
|
|
||||||
# gaps between windows and screen border
|
# gaps between windows and screen border
|
||||||
gaps inner 6 px
|
gaps inner 4 px
|
||||||
gaps outer 0 px
|
gaps outer 2 px
|
||||||
|
|
||||||
# Font for window titles. Will also be used by the bar unless a different font
|
# Font for window titles. Will also be used by the bar unless a different font
|
||||||
# is used in the bar {} block below.
|
# is used in the bar {} block below.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 108 KiB |
@@ -0,0 +1,69 @@
|
|||||||
|
|
||||||
|
# use interactive shell instead of login shell
|
||||||
|
set-option -g default-command "/bin/bash"
|
||||||
|
|
||||||
|
# enable rgb colors
|
||||||
|
set -ag terminal-overrides ",*:RGB"
|
||||||
|
|
||||||
|
# reasonable resizing
|
||||||
|
setw -g aggressive-resize on
|
||||||
|
|
||||||
|
# start window and pane index at 1
|
||||||
|
set -g base-index 1
|
||||||
|
set -g pane-base-index 1
|
||||||
|
set-window-option -g pane-base-index 1
|
||||||
|
set-option -g renumber-windows on
|
||||||
|
|
||||||
|
# status bar
|
||||||
|
set -g status-interval 5
|
||||||
|
|
||||||
|
# buffer size
|
||||||
|
set-option -g history-limit 3000
|
||||||
|
|
||||||
|
|
||||||
|
### input options & keybindings
|
||||||
|
set-window-option -g mode-keys vi
|
||||||
|
bind-key -n M-c copy-mode
|
||||||
|
|
||||||
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||||
|
|
||||||
|
# change prefix key to <space>
|
||||||
|
unbind C-b
|
||||||
|
set-option -g prefix C-Space
|
||||||
|
|
||||||
|
# window navigation
|
||||||
|
bind-key -n M-Left previous-window
|
||||||
|
bind-key -n M-Right next-window
|
||||||
|
bind-key -n M-S-Left swap-window -t -1 -d
|
||||||
|
bind-key -n M-S-Right swap-window -t +1 -d
|
||||||
|
|
||||||
|
# pane navigation
|
||||||
|
bind -n M-Left select-pane -L
|
||||||
|
bind -n M-Down select-pane -D
|
||||||
|
bind -n M-Up select-pane -U
|
||||||
|
bind -n M-Right select-pane -R
|
||||||
|
|
||||||
|
bind -n M-j swap-pane -D
|
||||||
|
bind -n M-k swap-pane -U
|
||||||
|
|
||||||
|
bind-key -n M-F1 select-layout even-horizontal
|
||||||
|
bind-key -n M-F2 select-layout main-vertical
|
||||||
|
bind-key -n M-F3 select-layout tiled
|
||||||
|
|
||||||
|
unbind x
|
||||||
|
bind-key x kill-pane -t +0
|
||||||
|
|
||||||
|
# detach current session and close terminal
|
||||||
|
bind-key k run "tmux detach -P"
|
||||||
|
|
||||||
|
# enable mouse support
|
||||||
|
set -g mouse on
|
||||||
|
# bind -n WheelUpPane {
|
||||||
|
# if -F '#{==:#{window_name},nvim}' {
|
||||||
|
# send-keys -M
|
||||||
|
# } {
|
||||||
|
# copy-mode -e
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
event = "VimEnter",
|
event = "VimEnter",
|
||||||
|
branch = "0.1.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
{ -- If encountering errors, see telescope-fzf-native README for installation instructions
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ separator-foreground = ${colors.background}
|
|||||||
font-0 = "Jet Brains Mono Nerd Font:size=14:weight=Bold;2"
|
font-0 = "Jet Brains Mono Nerd Font:size=14:weight=Bold;2"
|
||||||
|
|
||||||
modules-left = xworkspaces xwindow
|
modules-left = xworkspaces xwindow
|
||||||
modules-right = xkeyboard pulseaudio eth date
|
modules-right = xkeyboard pulseaudio cpu eth date
|
||||||
|
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
@@ -162,6 +162,13 @@ format-prefix = "RAM "
|
|||||||
format-prefix-foreground = ${colors.primary}
|
format-prefix-foreground = ${colors.primary}
|
||||||
label = %percentage_used:2%%
|
label = %percentage_used:2%%
|
||||||
|
|
||||||
|
[module/cpu]
|
||||||
|
type = internal/cpu
|
||||||
|
interval = 2
|
||||||
|
format-prefix = " "
|
||||||
|
format-prefix-foreground = ${colors.primary}
|
||||||
|
label = %percentage:2%%
|
||||||
|
|
||||||
[network-base]
|
[network-base]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
interval = 5
|
interval = 5
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if type "xrandr"; then
|
if type "xrandr"; then
|
||||||
for m in $(xrandr --query | grep " connected " | cut -d" " -f1); do
|
for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do
|
||||||
MONITOR=$m polybar --reload toph &
|
MONITOR=$m polybar --reload toph &
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,36 +1,25 @@
|
|||||||
@theme "~/.config/rofi/themes/zegonix-blue.rasi"
|
@theme "~/.config/rofi/themes/zegonix-blue.rasi"
|
||||||
// @theme "~/.config/rofi/themes/zegonix-black.rasi"
|
//@theme "~/.config/rofi/themes/zegonix-black.rasi"
|
||||||
|
|
||||||
configuration {
|
configuration {
|
||||||
// mode
|
modes: "combi,window,run";
|
||||||
modes: "combi,run";
|
|
||||||
combi-modes: "drun,run";
|
combi-modes: "drun,run";
|
||||||
drun-match-fields: "name,generic,keywords";
|
drun-match-fields: "name,generic,keywords";
|
||||||
|
matching: "fuzzy";
|
||||||
// blargh?
|
|
||||||
monitor: -1;
|
monitor: -1;
|
||||||
terminal: "ghostty";
|
terminal: "ghostty";
|
||||||
no-plugins: true;
|
|
||||||
|
|
||||||
// matching
|
|
||||||
matching: "fuzzy";
|
|
||||||
case-sensitive: false;
|
case-sensitive: false;
|
||||||
|
|
||||||
// keybindings
|
|
||||||
kb-row-up: "Up,Control+k";
|
kb-row-up: "Up,Control+k";
|
||||||
kb-row-down: "Down,Control+j";
|
kb-row-down: "Down,Control+j";
|
||||||
kb-accept-entry: "Return";
|
kb-accept-entry: "Return,Control+m";
|
||||||
kb-remove-to-eol: "";
|
kb-remove-to-eol: "";
|
||||||
kb-clear-line: "";
|
kb-clear-line: "";
|
||||||
kb-remove-word-back: "Control+BackSpace,Control+w";
|
kb-remove-word-back: "Control+BackSpace,Control+w";
|
||||||
|
|
||||||
// do not cancel me!
|
|
||||||
timeout {
|
timeout {
|
||||||
action: "kb-cancel";
|
action: "kb-cancel";
|
||||||
delay: 0;
|
delay: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ??
|
|
||||||
filebrowser {
|
filebrowser {
|
||||||
directories-first: true;
|
directories-first: true;
|
||||||
sorting-method: "name";
|
sorting-method: "name";
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
* {
|
* {
|
||||||
font: "JetBrains Mono Nerd Font 14";
|
font: "Victor Mono Nerd Font 13";
|
||||||
|
|
||||||
zx-transparent: transparent;
|
zx-transparent: transparent;
|
||||||
zx-white: #C8C8C8FF;
|
zx-white: #C8C8C8FF;
|
||||||
zx-dark-blue: #000010EA;
|
zx-dark-blue: #080C1CEA;
|
||||||
zx-blue: #203050C8;
|
zx-blue: #203050C8;
|
||||||
zx-light-blue: #5BB8FFFF;
|
zx-light-blue: #6bceffff;
|
||||||
zx-cyan: #15D7E5FF;
|
zx-cyan: #15D7E5FF;
|
||||||
zx-light-grey: #A0A0ADFF;
|
zx-light-grey: #A0A0ADFF;
|
||||||
zx-dark-grey: #202028C8;
|
zx-dark-grey: #202028C8;
|
||||||
zx-black: #000000EA;
|
zx-black: #000000EA;
|
||||||
zx-background: @zx-black;
|
zx-background: @zx-black;
|
||||||
zx-secondary: @zx-dark-grey;
|
zx-secondary: @zx-dark-grey;
|
||||||
zx-accent: @zx-light-grey;
|
zx-accent: @zx-white;
|
||||||
zx-text: @zx-white;
|
zx-text: @zx-white;
|
||||||
|
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
@@ -20,14 +20,16 @@
|
|||||||
|
|
||||||
window {
|
window {
|
||||||
location: center;
|
location: center;
|
||||||
width: 30%;
|
width: 35%;
|
||||||
|
|
||||||
background-color: @zx-background;
|
background-color: @zx-background;
|
||||||
|
|
||||||
border: 0;
|
border: 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
children: [ mainbox ];
|
padding: 2 12 8 12;
|
||||||
|
|
||||||
|
children: [mainbox];
|
||||||
}
|
}
|
||||||
|
|
||||||
mainbox {
|
mainbox {
|
||||||
@@ -35,7 +37,7 @@ mainbox {
|
|||||||
border: 0px;
|
border: 0px;
|
||||||
spacing: 8px;
|
spacing: 8px;
|
||||||
|
|
||||||
children: [ inputbar, listview, mode-switcher ];
|
children: [inputbar, listview];
|
||||||
}
|
}
|
||||||
|
|
||||||
inputbar {
|
inputbar {
|
||||||
@@ -48,7 +50,7 @@ inputbar {
|
|||||||
border: 0 0 1px 0;
|
border: 0 0 1px 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
children: [ entry ];
|
children: [prompt, entry];
|
||||||
}
|
}
|
||||||
|
|
||||||
prompt {
|
prompt {
|
||||||
@@ -70,17 +72,17 @@ listview {
|
|||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
|
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: @zx-transparent;
|
background-color: @transparent; //@zx-background;
|
||||||
|
|
||||||
children: [ element ];
|
children: [element];
|
||||||
}
|
}
|
||||||
|
|
||||||
element {
|
element {
|
||||||
background-color: @zx-transparent;
|
background-color: transparent;
|
||||||
text-color: inherit;
|
text-color: inherit;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
|
||||||
children: [ element-text ];
|
children: [element-text];
|
||||||
}
|
}
|
||||||
|
|
||||||
element-text {
|
element-text {
|
||||||
@@ -105,18 +107,3 @@ element-text.selected {
|
|||||||
prompt, entry, element-text {
|
prompt, entry, element-text {
|
||||||
vertical-align: 0.5;
|
vertical-align: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode-switcher {
|
|
||||||
children: [ button ];
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
padding: 4 0 4 0;
|
|
||||||
text-color: @zx-text;
|
|
||||||
text-transform: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.selected {
|
|
||||||
text-color: @zx-background;
|
|
||||||
background-color: @zx-accent;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -20,13 +20,15 @@
|
|||||||
|
|
||||||
window {
|
window {
|
||||||
location: center;
|
location: center;
|
||||||
width: 30%;
|
width: 25%;
|
||||||
|
|
||||||
background-color: @zx-background;
|
background-color: @zx-background;
|
||||||
|
|
||||||
border: 0;
|
border: 0;
|
||||||
border-color: @zx-accent;
|
border-color: @zx-accent;
|
||||||
|
|
||||||
|
//padding: 2 12 8 12;
|
||||||
|
|
||||||
children: [mainbox];
|
children: [mainbox];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +44,7 @@ inputbar {
|
|||||||
spacing: 40px;
|
spacing: 40px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
|
||||||
|
//background-color: @zx-secondary;
|
||||||
text-color: @zx-text;
|
text-color: @zx-text;
|
||||||
|
|
||||||
border: 0 0 1px 0;
|
border: 0 0 1px 0;
|
||||||
@@ -69,7 +72,7 @@ listview {
|
|||||||
spacing: 5px;
|
spacing: 5px;
|
||||||
|
|
||||||
border: 0px;
|
border: 0px;
|
||||||
background-color: @zx-transparent;
|
background-color: @zx-transparent; //@zx-background;
|
||||||
|
|
||||||
children: [element];
|
children: [element];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ function __search-history {
|
|||||||
READLINE_POINT=$((0 + ${#command}))
|
READLINE_POINT=$((0 + ${#command}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "$-" == *i* ]] && $(which fzf &>/dev/null); then
|
if [[ "$-" == *i* ]] && which fzf &>/dev/null; then
|
||||||
bind -r "\C-r"
|
bind -r "\C-r"
|
||||||
bind -x '"\C-r": __search-history'
|
bind -x '"\C-r": __search-history'
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
if $(which librewolf &>/dev/null); then
|
|
||||||
librewolf
|
|
||||||
elif $(which librewolf.appimage); then
|
|
||||||
librewolf.appimage
|
|
||||||
else
|
|
||||||
notify-send "[ERROR]" "Failed to start browser"
|
|
||||||
fi
|
|
||||||
Regular → Executable
+6
-4
@@ -6,7 +6,7 @@ function remove-whitespace {
|
|||||||
exclude_paths=(
|
exclude_paths=(
|
||||||
".git"
|
".git"
|
||||||
)
|
)
|
||||||
exclude_extensions=(
|
exclude_files=(
|
||||||
"*.lst"
|
"*.lst"
|
||||||
"*.map"
|
"*.map"
|
||||||
"*.svd"
|
"*.svd"
|
||||||
@@ -97,16 +97,18 @@ function remove-whitespace {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
excludes+=(")" "-type" "d" "-prune" "-o")
|
excludes+=(")" "-type d" "-prune")
|
||||||
|
|
||||||
for arg in "${exclude_extensions[@]}"; do
|
for arg in "${exclude_files[@]}"; do
|
||||||
excludes+=("-not" "-name" "${arg}")
|
excludes+=("-not" "-name" "${arg}")
|
||||||
done
|
done
|
||||||
|
|
||||||
|
excludes+=("-o")
|
||||||
|
|
||||||
for arg in "${path_args[@]}"; do
|
for arg in "${path_args[@]}"; do
|
||||||
files=("$(
|
files=("$(
|
||||||
find "${arg}" \
|
find "${arg}" \
|
||||||
"${excludes[@]}" \
|
${excludes[@]} \
|
||||||
-type f \
|
-type f \
|
||||||
-exec grep -EIq "${grep_regex}" {} \; \
|
-exec grep -EIq "${grep_regex}" {} \; \
|
||||||
-print
|
-print
|
||||||
|
|||||||
@@ -1,52 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
unset use_clipboard
|
|
||||||
if [[ "$1" == "--clipboard" ]]; then
|
|
||||||
use_clipboard="true"
|
|
||||||
elif [[ "$1" == "--colour" ]]; then
|
|
||||||
pick_colour="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! $(which slop &>/dev/null); then
|
|
||||||
notify-send "[screenshot]" "missing \`slop\`"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ -n "${use_clipboard}" ]] && ! $(which xclip &>/dev/null); then
|
|
||||||
notify-send "[screenshot]" "missing \`xclip\`"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
screenshots_path="${HOME}/screenshots"
|
|
||||||
if [[ ! -d "${screenshots_path}" ]]; then
|
|
||||||
mkdir "${screenshots_path}"
|
|
||||||
fi
|
|
||||||
temp_file="${screenshots_path}/temporary.png"
|
|
||||||
|
|
||||||
maim -suo -f png -t 0 "${temp_file}"
|
|
||||||
|
|
||||||
# meh!
|
|
||||||
function colour_picker {
|
|
||||||
colour_value="$(magick "${temp_file}" -scale 1x1\! -format "#%[hex:p{0,0}]" info:)"
|
|
||||||
notify-send "[colour picker]" "${colour_value}"
|
|
||||||
echo "${colour_value}" | xclip -selection clipboard
|
|
||||||
remove_temporary_file
|
|
||||||
}
|
|
||||||
|
|
||||||
function clipboard {
|
|
||||||
xclip -selection clipboard -t image/png <"${temp_file}"
|
|
||||||
remove_temporary_file
|
|
||||||
}
|
|
||||||
|
|
||||||
function save_screenshot {
|
|
||||||
mv "${temp_file}" "${screenshots_path}/$(date '+%Y%m%d_%H%M%S').png"
|
|
||||||
}
|
|
||||||
|
|
||||||
function remove_temporary_file {
|
|
||||||
rm "${temp_file}"
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
"clipboard") clipboard ;;
|
|
||||||
"colour") colour_picker ;;
|
|
||||||
*) save_screenshot ;;
|
|
||||||
esac
|
|
||||||
@@ -2,8 +2,7 @@
|
|||||||
# use interactive shell instead of login shell
|
# use interactive shell instead of login shell
|
||||||
set-option -g default-command "/bin/bash"
|
set-option -g default-command "/bin/bash"
|
||||||
|
|
||||||
# configure terminal
|
# enable rgb colors
|
||||||
set -g default-terminal "tmux-256color"
|
|
||||||
set -ag terminal-overrides ",*:RGB"
|
set -ag terminal-overrides ",*:RGB"
|
||||||
|
|
||||||
# enable mouse support
|
# enable mouse support
|
||||||
|
|||||||
Reference in New Issue
Block a user