1
0
Fork 0

Compare commits

...

13 Commits

Author SHA1 Message Date
Gregory Eremin 8ddde96cd7 Update htop 2023-02-14 11:05:36 +01:00
Gregory Eremin 90c9394369 Sway idle systemd service 2023-02-14 11:04:57 +01:00
Gregory Eremin 83bdf6a9f3 Small update to bash configs 2023-02-14 11:04:37 +01:00
Gregory Eremin 5cbe2847b9 Updates to Sublime Text configs 2023-02-14 11:02:58 +01:00
Gregory Eremin a1ef8a0a74 Fix vpn status icon in waybare 2023-02-14 11:02:19 +01:00
Gregory Eremin bd7e29f964 Update screen control script 2023-02-14 11:01:51 +01:00
Gregory Eremin 0be7c4f69e Waybar config updates 2023-02-14 11:01:12 +01:00
Gregory Eremin 0f1619019d Add shortcut to start Firefox using a throwaway profile 2023-02-14 11:00:36 +01:00
Gregory Eremin ba1030783b Laptop screen brightness control script 2023-02-14 10:59:45 +01:00
Gregory Eremin e54a1e7869 Update sway configs 2023-02-14 10:58:22 +01:00
Gregory Eremin a7ce5182d1 Bash prompt and alias updates 2021-04-24 00:26:56 +02:00
Gregory Eremin 508b6c5fb7 Add myclirc 2021-02-22 12:45:39 +01:00
Gregory Eremin 46f0b6d080 Add termite config 2021-01-10 20:38:24 +01:00
27 changed files with 399 additions and 55 deletions

View File

@ -1,4 +1,4 @@
Copyright 2020 Gregory Eremin
Copyright 2023 Gregory Eremin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
@ -16,4 +16,3 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -25,3 +25,7 @@ alias br="bundle exec rails"
# Go
alias goi="go install ./..."
alias gg='rg -g "*.go"'
alias ytdl="youtube-dl -f 'bestvideo+bestaudio'"
alias cr="cargo run --quiet --"

View File

@ -1,8 +1,6 @@
# Enable debug
# set -xv
source /etc/profile
export TERM=xterm-256color
export EDITOR=vim
@ -10,7 +8,6 @@ export EDITOR=vim
export CLICOLOR=1
export LSCOLORS=Exfxcxdxbxegedabagacad
export EDITOR=vim
export PROJECTS=$HOME/Code

View File

@ -5,12 +5,13 @@ function __bash_prompt {
__window_title $baseDir
# Define building blocks
local basedir="$_BOLD$_BLUE\W$_RESET_COLOR$_RESET"
local userhost="$_BOLD$_BLUE\u$_CYAN@\h$_RESET_COLOR$_RESET"
local basedir="$_BOLD$_GREEN\W$_RESET_COLOR$_RESET"
local git_y_u_no_commit="$_MAGENTA$(__bash_git_y_u_no_commit_warn)$_RESET_COLOR"
local git_branch="$(__bash_prompt_git)"
local cursor="\[${_DIM}\]\[$_RESET\]"
PS1="\n$basedir$git_branch$git_y_u_no_commit\n$cursor\[$_RESET\] "
PS1="\n$userhost $basedir$git_branch$git_y_u_no_commit\n$cursor\[$_RESET\] "
}
PROMPT_COMMAND=__bash_prompt # <--- ta-da!

6
bin/ff Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
PROFILEDIR=$(mktemp -d -p /tmp firefox-profile.XXXXX)
firefox --profile $PROFILEDIR --no-remote --new-instance
rm -rf $PROFILEDIR

40
bin/laptop-screen-brightness Executable file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Keys: XF86MonBrightnessUp, XF86MonBrightnessDown
class=intel_backlight
dir=/sys/class/backlight/$class
cur=$(cat $dir/brightness)
max=$(cat $dir/max_brightness)
step=$(("$2" + 0))
cur_pct=$((100 * $cur / $max))
case "$1" in
"up")
echo "up $2%"
target_pct=$(($cur_pct + $2))
;;
"down")
echo "down $2%"
target_pct=$(($cur_pct - $2))
;;
*)
echo "Backlight at $cur/$max ($cur_pct%)"
exit 0
esac
if [ "$target_pct" -lt "0" ]; then
target_pct=0
fi
if [ "$target_pct" -gt "100" ]; then
target_pct=100
fi
target_val=$(($max * $target_pct / 100))
echo "Backlight at $cur/$max ($cur_pct%)"
echo "Target $target_val ($target_pct%)"
echo "Dest $dir/brightness"
echo $target_val > $dir/brightness

View File

@ -1,3 +1,9 @@
#!/bin/bash
swaymsg "output * dpms off"
# Turn off secondary display
# My laptop screen doesn't come back after turning it off,
# turning off only the secondary screen for now.
swaymsg "output DP-1 dpms off"
# Turn off all screens
# swaymsg "output * dpms off"

View File

@ -2,7 +2,7 @@
# export VPN_NAME=MyVPN from dotfiles/secrets/vpn
if [ "$(nmcli -g GENERAL.STATE con show $VPN_NAME)" == "activated" ]; then
echo ""
echo ""
else
echo ""
fi

View File

@ -1,30 +1,61 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
htop_version=3.2.1
config_reader_min_version=3
fields=0 48 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=1
show_program_path=1
highlight_base_name=0
highlight_base_name=1
highlight_deleted_exe=1
highlight_megabytes=1
highlight_threads=1
tree_view=0
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
header_margin=1
screen_tabs=0
detailed_cpu_time=0
cpu_count_from_zero=0
cpu_count_from_one=1
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=6
enable_mouse=1
delay=15
left_meters=LeftCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=RightCPUs Tasks LoadAverage Uptime
right_meter_modes=1 2 2 2
vim_mode=0
hide_function_bar=0
header_layout=two_50_50
column_meters_0=LeftCPUs Memory Swap Blank Uptime Systemd
column_meter_modes_0=1 1 1 2 2 2
column_meters_1=RightCPUs Tasks LoadAverage Blank DiskIO NetworkIO
column_meter_modes_1=1 2 2 2 2 2
tree_view=0
sort_key=46
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0
screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1
.all_branches_collapsed=0

121
myclirc Normal file
View File

@ -0,0 +1,121 @@
# vi: ft=dosini
[main]
# Enables context sensitive auto-completion. If this is disabled the all
# possible completions will be listed.
smart_completion = True
# Multi-line mode allows breaking up the sql statements into multiple lines. If
# this is set to True, then the end of the statements must have a semi-colon.
# If this is set to False then sql statements can't be split into multiple
# lines. End of line (return) is considered as the end of the statement.
multi_line = False
# Destructive warning mode will alert you before executing a sql statement
# that may cause harm to the database such as "drop table", "drop database"
# or "shutdown".
destructive_warning = False
# log_file location.
log_file = ~/.config/mycli/mycli.log
# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
# and "DEBUG". "NONE" disables logging.
log_level = INFO
# Log every query and its results to a file. Enable this by uncommenting the
# line below.
# audit_log = ~/.mycli-audit.log
# Timing of sql statments and table rendering.
timing = True
# Table format. Possible values: ascii, double, github,
# psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html,
# latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, csv.
# Recommended: ascii
table_format = ascii
# Syntax coloring style. Possible values (many support the "-dark" suffix):
# manni, igor, xcode, vim, autumn, vs, rrt, native, perldoc, borland, tango, emacs,
# friendly, monokai, paraiso, colorful, murphy, bw, pastie, paraiso, trac, default,
# fruity.
# Screenshots at http://mycli.net/syntax
syntax_style = monokai
# Keybindings: Possible values: emacs, vi.
# Emacs mode: Ctrl-A is home, Ctrl-E is end. All emacs keybindings are available in the REPL.
# When Vi mode is enabled you can use modal editing features offered by Vi in the REPL.
key_bindings = emacs
# Enabling this option will show the suggestions in a wider menu. Thus more items are suggested.
wider_completion_menu = False
# MySQL prompt
# \D - The full current date
# \d - Database name
# \h - Hostname of the server
# \m - Minutes of the current time
# \n - Newline
# \P - AM/PM
# \p - Port
# \R - The current time, in 24-hour military time (023)
# \r - The current time, standard 12-hour time (112)
# \s - Seconds of the current time
# \t - Product type (Percona, MySQL, MariaDB)
# \A - DSN alias name (from the [alias_dsn] section)
# \u - Username
prompt = '\t \u@\h:\d> '
prompt_continuation = '->'
# Skip intro info on startup and outro info on exit
less_chatty = True
# Use alias from --login-path instead of host name in prompt
login_path_as_host = False
# Cause result sets to be displayed vertically if they are too wide for the current window,
# and using normal tabular format otherwise. (This applies to statements terminated by ; or \G.)
auto_vertical_output = False
# keyword casing preference. Possible values "lower", "upper", "auto"
keyword_casing = auto
# disabled pager on startup
enable_pager = True
# Custom colors for the completion menu, toolbar, etc.
[colors]
completion-menu.completion.current = 'bg:#ffffff #000000'
completion-menu.completion = 'bg:#008888 #ffffff'
completion-menu.meta.completion.current = 'bg:#44aaaa #000000'
completion-menu.meta.completion = 'bg:#448888 #ffffff'
completion-menu.multi-column-meta = 'bg:#aaffff #000000'
scrollbar.arrow = 'bg:#003333'
scrollbar = 'bg:#00aaaa'
selected = '#ffffff bg:#6666aa'
search = '#ffffff bg:#4444aa'
search.current = '#ffffff bg:#44aa44'
bottom-toolbar = 'bg:#222222 #aaaaaa'
bottom-toolbar.off = 'bg:#222222 #888888'
bottom-toolbar.on = 'bg:#222222 #ffffff'
search-toolbar = 'noinherit bold'
search-toolbar.text = 'nobold'
system-toolbar = 'noinherit bold'
arg-toolbar = 'noinherit bold'
arg-toolbar.text = 'nobold'
bottom-toolbar.transaction.valid = 'bg:#222222 #00ff5f bold'
bottom-toolbar.transaction.failed = 'bg:#222222 #ff005f bold'
# style classes for colored table output
output.header = "#00ff5f bold"
output.odd-row = ""
output.even-row = ""
# Favorite queries.
[favorite_queries]
# Use the -d option to reference a DSN.
# Special characters in passwords and other strings can be escaped with URL encoding.
[alias_dsn]
# example_dsn = mysql://[user[:password]@][host][:port][/dbname]

View File

@ -1,9 +1,12 @@
{
"clients":
{
"gopls":
{
"enabled": true
}
}
"show_diagnostics_severity_level": 1,
"show_diagnostics_panel_on_save": 0,
"diagnostics_panel_include_severity_level": 1,
"clients":
{
"gopls":
{
"enabled": true
}
}
}

View File

@ -2,7 +2,7 @@
"animation_enabled": false,
"caret_style": "phase",
"close_windows_when_empty": false,
"color_scheme": "Packages/Colorsublime - Themes/Dracula.tmTheme",
"color_scheme": "ayu-dark.sublime-color-scheme",
"default_line_ending": "unix",
"drag_text": false,
"draw_minimap_border": false,
@ -29,10 +29,14 @@
"no_bold",
"no_italic"
],
"font_size": 12.0,
"font_size": 14,
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage",
],
"indent_guide_options":
[
"draw_normal",
@ -53,7 +57,7 @@
"sidebar_large": true,
"soda_folder_icons": false,
"tab_size": 4,
"theme": "Adaptive.sublime-theme",
"theme": "ayu-dark.sublime-theme",
"translate_tabs_to_spaces": true,
"tree_animation_enabled": false,
"trim_trailing_white_space_on_save": true,
@ -62,5 +66,8 @@
"ui_sidebar_highlight_row": true,
"wide_caret": true,
"word_wrap": false,
"wrap_width": 120
"wrap_width": 80,
"show_panel_on_build": false,
"update_check": false,
"falback_encoding": "Cyrillic (Windows 1251)",
}

View File

@ -21,5 +21,9 @@ include @sysconfdir@/sway/config.d/*
include $HOME/.config/sway/config.d/*
# Color Scheme
include $HOME/.config/sway/themes/dracula
include $HOME/.config/sway/themes/dracula2
# include $HOME/.config/sway/themes/default
exec wl-clipsync
exec mako
exec env QT_QPA_PLATFORM=wayland kwalletd5

View File

@ -5,7 +5,6 @@
# Read `man 5 sway-bar` for more information about this section.
bar {
font $uifont
position top
swaybar_command waybar
}

View File

@ -2,5 +2,23 @@
# Display configurations
#
# Set UI scale to 1.5 on home display (AOC U2790)
# Laptop screen
# output eDP-1 position 1920 0 scale 2
output eDP-1 position 2560 0 scale 2
# Home display (AOC U2790)
output "Unknown U2790B 0x000007CE" scale 1.5
# Office Dell 24"
# output "Dell Inc. DELL U2412M YPPY07AV1AHB" position 0 0
output "Dell Inc. DELL U2421HE CD8LV83" position 0 0
# Office Dell 27" 1080p
output "Dell Inc. DELL P2719HC 6T1Y223" position 0 0
# Maison n9 TV
output "Samsung Electric Company SAMSUNG 0x00000701" res 3840x2160 scale 2 position 0 0
# Current office 4K LG screen
output "LG Electronics LG HDR 4K 0x0000E7EC" position 0 0 scale 1.5 res 3840x2160

View File

@ -18,7 +18,7 @@ bindsym --locked Alt+F10 exec screens-off
bindsym --locked Alt+F1 exec screens-on
# Start a terminal
bindsym $mod+Return exec termite
bindsym $mod+Return exec alacritty
# Start your launcher
# set $menu dmenu_path | dmenu | xargs swaymsg exec --
@ -39,6 +39,11 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #d
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Media player controls
seat * keyboard_grouping none
bindsym XF86AudioPlay exec playerctl -p spotify,plasma-browser-integration play-pause
bindsym XF86AudioNext exec playerctl -p spotify,plasma-browser-integration next
bindsym XF86AudioPrev exec playerctl -p spotify,plasma-browser-integration previous
# Laptop screen brightness
bindsym XF86MonBrightnessUp exec --no-startup-id laptop-screen-brightness up 10
bindsym XF86MonBrightnessDown exec --no-startup-id laptop-screen-brightness down 10

View File

@ -2,9 +2,11 @@
# Scratchpad
#
# All keybindings are disabled to avoid confusion
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
# bindsym $mod+minus scratchpad show

View File

@ -0,0 +1,2 @@
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway

View File

@ -2,6 +2,20 @@
# Window rules
#
for_window [window_type="dialog"] floating enable
for_window [window_type="splash"] floating enable
for_window [window_type="menu"] floating enable
for_window [window_type="dropdown_menu"] floating enable
for_window [window_type="popup_menu"] floating enable
for_window [window_type="tooltip"] floating enable
for_window [app_id="nm-connection-editor"] floating enable
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="spotify-qt"] floating enable
# Annoying and pointless sharing indicator
# First make it float so that window layout doesn't change before it gets killed
# for_window [app_id="firefox" title="Firefox - Sharing Indicator"] floating enable
for_window [app_id="firefox" title="^Firefox .* Sharing Indicator$"] floating enable
for_window [app_id="firefox" title="^Firefox .* Sharing Indicator$"] kill

14
sway/config.d/zoom.conf Normal file
View File

@ -0,0 +1,14 @@
# ~/.config/sway/config.d/zoom.us.conf
#
# Zoom Meeting App
#
# Default for all windows is non-floating.
#
# For pop up notification windows that don't use notifications api
for_window [app_id="zoom" title="^zoom$"] border none, floating enable
# For specific Zoom windows
for_window [app_id="zoom" title="^(Zoom|About)$"] border pixel, floating enable
for_window [app_id="zoom" title="Settings"] floating enable, floating_minimum_size 960 x 700
# Open Zoom Meeting windows on a new workspace (a bit hacky)
for_window [app_id="zoom" title="Zoom Meeting(.*)?"] workspace next_on_output --create, move container to workspace current, floating disable, inhibit_idle open

View File

@ -1,8 +1,8 @@
# Default theme that came with sway
# Changed focused background color a bit
# class border backgr. text wtf . child_border # wtf = indicator?
client.focused #14568c #0e3f66 #ffffff #14568c #14568c
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
# class border bg text indic child_border
client.focused #14568c #0e3f66 #ffffff #14568c #14568c
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000

View File

@ -2,10 +2,11 @@
# https://github.com/dracula/i3/blob/master/.config/i3/config
# Slightly modified
client.focused #ffb86c #ffb86c #282a36 #ffb86c #ffb86c
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #44475A #282A36 #F8F8F2 #44475A #44475A
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
# class border bg text indic child_border
client.focused #ffb86c #ffb86c #282a36 #ffb86c #ffb86c
client.focused_inactive #44475A #44475A #F8F8F2 #44475A #44475A
client.unfocused #44475A #282A36 #F8F8F2 #44475A #44475A
client.urgent #44475A #FF5555 #F8F8F2 #FF5555 #FF5555
client.placeholder #282A36 #282A36 #F8F8F2 #282A36 #282A36
client.background #F8F8F2
client.background #F8F8F2

17
sway/themes/dracula2 Normal file
View File

@ -0,0 +1,17 @@
set $color1 "#14568c"
set $color2 "#0e3f66"
set $color3 "#ffffff"
set $color4 "#333333"
set $color5 "#5f676a"
set $color6 "#484e50"
set $color7 "#222222"
set $color8 "#2f343a"
set $color9 "#888888"
set $color0 "#900000"
set $colorx "#292d2e"
# class border bg text indic child_border
client.focused $color1 $color2 $color3 $color1 $color1
client.focused_inactive $color4 $color5 $color3 $color6 $color5
client.unfocused $color4 $color7 $color9 $colorx $color7
client.urgent $color8 $color0 $color3 $color0 $color0

View File

@ -4,9 +4,8 @@ Description=swayidle: Manages lockscreen and display
[Service]
ExecStart=/sbin/swayidle \
timeout 300 /home/gregory/dotfiles/bin/screens-lock \
timeout 60 /home/gregory/dotfiles/bin/screens-off \
resume /home/gregory/dotfiles/bin/screens-on \
before-sleep /home/gregory/dotfiles/bin/screens-lock
timeout 10 /home/gregory/dotfiles/bin/screens-off \
resume /home/gregory/dotfiles/bin/screens-on
[Install]
WantedBy=default.target

51
termite/config Normal file
View File

@ -0,0 +1,51 @@
[options]
scrollback_lines = 1000000
scrollbar = off
font = Inconsolata 12
allow_bold = false
# Dracula theme for termite
# https://github.com/dracula/termite
# Copyright 2013-present, All rights reserved
# Code licensed under the MIT license
[colors]
# special
foreground = #f8f8f2
foreground_bold = #f8f8f2
cursor = #f8f8f2
background = rgba(40, 42, 54, 1)
# black
color0 = #000000
color8 = #4d4d4d
# red
color1 = #ff5555
color9 = #ff6e67
# green
color2 = #50fa7b
color10 = #5af78e
# yellow
color3 = #f1fa8c
color11 = #f4f99d
# blue
color4 = #bd93f9
color12 = #caa9fa
# magenta
color5 = #ff79c6
color13 = #ff92d0
# cyan
color6 = #8be9fd
color14 = #9aedfe
# white
color7 = #bfbfbf
color15 = #e6e6e6

View File

@ -1,5 +1,5 @@
{
"height": 30,
"height": 36,
"modules-left": [
"sway/workspaces",
"sway/mode",
@ -19,6 +19,7 @@
"custom/vpn": {
"format": " {} ",
"exec": "vpn-status",
"on-click": "vpn-toggle",
"interval": 1
},
"custom/pacman": {
@ -85,7 +86,7 @@
"format-source": "",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
@ -97,6 +98,7 @@
""
]
},
"on-click-right": "pavucontrol"
"on-click-right": "pavucontrol",
"on-click-middle": "audio-out -t"
}
}

View File

@ -2,8 +2,9 @@
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: Roboto, Helvetica, Arial, sans-serif;
font-family: Lato, "Font Awesome 6 Free", Helvetica, Arial, sans-serif;
font-size: 13px;
color: #ffffff;
min-height: 0;
}