diff options
66 files changed, 2016 insertions, 458 deletions
diff --git a/beets/.config/beets/config.yaml b/beets/.config/beets/config.yaml index 0b7bfc8..9e1fa8a 100644 --- a/beets/.config/beets/config.yaml +++ b/beets/.config/beets/config.yaml @@ -1,15 +1,15 @@ -directory: ~/music -library: ~/music/beets.db +directory: ~/audio/music +library: ~/.local/share/beet/beets.db import: move: yes copy: no write: yes - log: ~/music/beets.log + log: ~/.cache/beet/beets.log resume: ask -plugins: fetchart lastgenre vgmdb +plugins: fetchart lastgenre paths: default: $albumartist/$album-$format/$disc-$track-$title diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc deleted file mode 100644 index 9d13ee7..0000000 --- a/dunst/.config/dunst/dunstrc +++ /dev/null @@ -1,333 +0,0 @@ -[global] - ### Display ### - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a window manager that exports the - # _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern window managers. - # - # If this option is set to mouse or keyboard, the monitor option - # will be ignored. - follow = keyboard - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "300x5-30+20" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 20 - - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 - - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. - frame_width = 3 - - # Defines color of the frame around the notification window. - frame_color = "#00b1ff" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # Transient notifications ignore this setting. - idle_threshold = 120 - - ### Text ### - - font = Liberation Sans 8 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # <b>bold</b> - # <i>italic</i> - # <s>strikethrough</s> - # <u>underline</u> - # - # For a complete reference see - # <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>. - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - #format = "<b>%s</b>\n%b" - format = "<b>%a</b>\n%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to ellipsize long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Merge multiple notifications with the same content - stack_duplicates = true - - # Hide the count of merged notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - ### Icons ### - - # Align icons left/right/off - icon_position = left - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 32 - - # Paths to default icons. - #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ - icon_path = /usr/share/icons/oxygen/16x16/status/:/usr/share/icons/oxygen/16x16/devices/ - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - ### Misc/Advanced ### - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = $HOME/soft/firefox/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Dunst - - # Define the class of the windows spawned by dunst - class = Dunst - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Rounded corners - corner_radius = 20 - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - per_monitor_dpi = false - -[shortcuts] - - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#020e1d" - foreground = "#00b1ff" - #frame_color = "#084698" - timeout = 2 - # Icon for notifications with low urgency, uncomment to enable - icon = $HOME/.local/share/icons/bell.png - -[urgency_normal] - background = "#020e1d" - foreground = "#00b1ff" - #frame_color = "#ffffff" - timeout = 5 - # Icon for notifications with normal urgency, uncomment to enable - icon = $HOME/.local/share/icons/bell.png - -[urgency_critical] - background = "#884444" - foreground = "#00b1ff" - frame_color = "#ff0000" - timeout = 0 - # Icon for notifications with critical urgency, uncomment to enable - icon = $HOME/.local/share/icons/bell.png - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# Messages can be matched by "appname", "summary", "body", "icon", "category", -# "msg_urgency" and you can override the "timeout", "urgency", "foreground", -# "background", "new_icon" and "format". -# Shell-like globbing will get expanded. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -# vim: ft=cfg diff --git a/gtk-2.0/.config/gtk-2.0/gtkrc-2.0 b/gtk-2.0/.config/gtk-2.0/gtkrc-2.0 index 58d7750..5489b52 100644 --- a/gtk-2.0/.config/gtk-2.0/gtkrc-2.0 +++ b/gtk-2.0/.config/gtk-2.0/gtkrc-2.0 @@ -2,10 +2,10 @@ # Any customization should be done in ~/.gtkrc-2.0.mine instead. include "/home/ivan/.gtkrc-2.0.mine" -gtk-theme-name="Matcha-dark-sea" +gtk-theme-name="Matcha-dark-azul" gtk-icon-theme-name="oxygen" gtk-font-name="Liberation Sans 9" -gtk-cursor-theme-name="Adwaita" +gtk-cursor-theme-name="oxy-neon-large" gtk-cursor-theme-size=0 gtk-toolbar-style=GTK_TOOLBAR_BOTH gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR diff --git a/mpd/.config/mpd/mpd.conf b/mpd/.config/mpd/mpd.conf index 4144582..e273f01 100644 --- a/mpd/.config/mpd/mpd.conf +++ b/mpd/.config/mpd/mpd.conf @@ -11,14 +11,14 @@ # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # -music_directory "/home/ivan/music" +music_directory "~/audio/music" # # This setting sets the MPD internal playlist directory. The purpose of this # directory is storage for playlists created by MPD. The server will use # playlist files not created by the server but only if they are in the MPD # format. This setting defaults to playlist saving being disabled. # -playlist_directory "/home/ivan/music/playlists" +playlist_directory "~/audio/music/playlists" # # This setting sets the location of the MPD database. This file is used to # load the database at server start up and store the database while the @@ -26,7 +26,7 @@ playlist_directory "/home/ivan/music/playlists" # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # -db_file "/home/ivan/music/mpd.db" +db_file "~/.local/share/mpd/mpd.db" # # These settings are the locations for the daemon log files for the daemon. # These logs are great for troubleshooting, depending on your log_level @@ -36,13 +36,12 @@ db_file "/home/ivan/music/mpd.db" # setting defaults to logging to syslog, or to journal if mpd was started as # a systemd service. # -#log_file "/home/ivan/music/mpd.log" +#log_file "~/.cache/mpd/mpd.log" # # This setting sets the location of the file which stores the process ID # for use of mpd --kill and some init scripts. This setting is disabled by # default and the pid file will not be stored. # -#pid_file "/home/ivan" pid_file "/tmp/mpd.pid" # # This setting sets the location of the file which contains information about diff --git a/mpv/.config/mpv/input.conf b/mpv/.config/mpv/input.conf new file mode 100644 index 0000000..d614b15 --- /dev/null +++ b/mpv/.config/mpv/input.conf @@ -0,0 +1,5 @@ +l seek 5 +h seek -5 +j seek -60 +k seek 60 +S cycle sub diff --git a/ncmpcpp/.config/ncmpcpp/bindings b/ncmpcpp/.config/ncmpcpp/bindings new file mode 100644 index 0000000..645e41f --- /dev/null +++ b/ncmpcpp/.config/ncmpcpp/bindings @@ -0,0 +1,479 @@ +############################################################## +## This is the example bindings file. Copy it to ## +## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ## +## and set up your preferences ## +############################################################## +# +#def_key "mouse" +# mouse_event +# +#def_key "up" +# scroll_up +# +#def_key "shift-up" +# select_item +# scroll_up +# +#def_key "down" +# scroll_down +# +#def_key "shift-down" +# select_item +# scroll_down +# +#def_key "[" +# scroll_up_album +# +#def_key "]" +# scroll_down_album +# +#def_key "{" +# scroll_up_artist +# +#def_key "}" +# scroll_down_artist +# +#def_key "page_up" +# page_up +# +#def_key "page_down" +# page_down +# +#def_key "home" +# move_home +# +#def_key "end" +# move_end +# +#def_key "insert" +# select_item +# +#def_key "enter" +# enter_directory +# +#def_key "enter" +# toggle_output +# +#def_key "enter" +# run_action +# +#def_key "enter" +# play_item +# +#def_key "space" +# add_item_to_playlist +# +#def_key "space" +# toggle_lyrics_update_on_song_change +# +#def_key "space" +# toggle_visualization_type +# +#def_key "delete" +# delete_playlist_items +# +#def_key "delete" +# delete_browser_items +# +#def_key "delete" +# delete_stored_playlist +# +#def_key "right" +# next_column +# +#def_key "right" +# slave_screen +# +#def_key "right" +# volume_up +# +#def_key "+" +# volume_up +# +#def_key "left" +# previous_column +# +#def_key "left" +# master_screen +# +#def_key "left" +# volume_down +# +#def_key "-" +# volume_down +# +#def_key ":" +# execute_command +# +#def_key "tab" +# next_screen +# +#def_key "shift-tab" +# previous_screen +# +#def_key "f1" +# show_help +# +#def_key "1" +# show_playlist +# +#def_key "2" +# show_browser +# +#def_key "2" +# change_browse_mode +# +#def_key "3" +# show_search_engine +# +#def_key "3" +# reset_search_engine +# +#def_key "4" +# show_media_library +# +#def_key "4" +# toggle_media_library_columns_mode +# +#def_key "5" +# show_playlist_editor +# +#def_key "6" +# show_tag_editor +# +#def_key "7" +# show_outputs +# +#def_key "8" +# show_visualizer +# +#def_key "=" +# show_clock +# +#def_key "@" +# show_server_info +# +#def_key "s" +# stop +# +#def_key "p" +# pause +# +#def_key ">" +# next +# +#def_key "<" +# previous +# +#def_key "ctrl-h" +# jump_to_parent_directory +# +#def_key "ctrl-h" +# replay_song +# +#def_key "backspace" +# jump_to_parent_directory +# +#def_key "backspace" +# replay_song +# +#def_key "f" +# seek_forward +# +#def_key "b" +# seek_backward +# +#def_key "r" +# toggle_repeat +# +#def_key "z" +# toggle_random +# +#def_key "y" +# save_tag_changes +# +#def_key "y" +# start_searching +# +#def_key "y" +# toggle_single +# +#def_key "R" +# toggle_consume +# +#def_key "Y" +# toggle_replay_gain_mode +# +#def_key "T" +# toggle_add_mode +# +#def_key "|" +# toggle_mouse +# +#def_key "#" +# toggle_bitrate_visibility +# +#def_key "Z" +# shuffle +# +#def_key "x" +# toggle_crossfade +# +#def_key "X" +# set_crossfade +# +#def_key "u" +# update_database +# +#def_key "ctrl-s" +# sort_playlist +# +#def_key "ctrl-s" +# toggle_browser_sort_mode +# +#def_key "ctrl-s" +# toggle_media_library_sort_mode +# +#def_key "ctrl-r" +# reverse_playlist +# +#def_key "ctrl-f" +# apply_filter +# +#def_key "ctrl-_" +# select_found_items +# +#def_key "/" +# find +# +#def_key "/" +# find_item_forward +# +#def_key "?" +# find +# +#def_key "?" +# find_item_backward +# +#def_key "." +# next_found_item +# +#def_key "," +# previous_found_item +# +#def_key "w" +# toggle_find_mode +# +#def_key "e" +# edit_song +# +#def_key "e" +# edit_library_tag +# +#def_key "e" +# edit_library_album +# +#def_key "e" +# edit_directory_name +# +#def_key "e" +# edit_playlist_name +# +#def_key "e" +# edit_lyrics +# +#def_key "i" +# show_song_info +# +#def_key "I" +# show_artist_info +# +#def_key "g" +# jump_to_position_in_song +# +#def_key "l" +# show_lyrics +# +#def_key "ctrl-v" +# select_range +# +#def_key "v" +# reverse_selection +# +#def_key "V" +# remove_selection +# +#def_key "B" +# select_album +# +#def_key "a" +# add_selected_items +# +#def_key "c" +# clear_playlist +# +#def_key "c" +# clear_main_playlist +# +#def_key "C" +# crop_playlist +# +#def_key "C" +# crop_main_playlist +# +#def_key "m" +# move_sort_order_up +# +#def_key "m" +# move_selected_items_up +# +#def_key "n" +# move_sort_order_down +# +#def_key "n" +# move_selected_items_down +# +#def_key "M" +# move_selected_items_to +# +#def_key "A" +# add +# +#def_key "S" +# save_playlist +# +#def_key "o" +# jump_to_playing_song +# +#def_key "G" +# jump_to_browser +# +#def_key "G" +# jump_to_playlist_editor +# +#def_key "~" +# jump_to_media_library +# +#def_key "E" +# jump_to_tag_editor +# +#def_key "U" +# toggle_playing_song_centering +# +#def_key "P" +# toggle_display_mode +# +#def_key "\\" +# toggle_interface +# +#def_key "!" +# toggle_separators_between_albums +# +#def_key "L" +# toggle_lyrics_fetcher +# +#def_key "F" +# fetch_lyrics_in_background +# +#def_key "alt-l" +# toggle_fetching_lyrics_in_background +# +#def_key "ctrl-l" +# toggle_screen_lock +# +#def_key "`" +# toggle_library_tag_type +# +#def_key "`" +# refetch_lyrics +# +#def_key "`" +# add_random_items +# +#def_key "ctrl-p" +# set_selected_items_priority +# +#def_key "q" +# quit +# +# +#def_key "f" +# find +#def_key "f" +# find_item_forward + +def_key "+" + show_clock +def_key "=" + volume_up + +def_key "j" + scroll_down +def_key "k" + scroll_up + +def_key "ctrl-u" + page_up +#push_characters "kkkkkkkkkkkkkkk" +def_key "ctrl-d" + page_down +#push_characters "jjjjjjjjjjjjjjj" +def_key "u" + page_up +#push_characters "kkkkkkkkkkkkkkk" +def_key "d" + page_down +#push_characters "jjjjjjjjjjjjjjj" +def_key "h" + previous_column +def_key "l" + next_column + +def_key "." + show_lyrics + +def_key "n" + next_found_item +def_key "N" + previous_found_item + +# not used but bound +def_key "J" + move_sort_order_down +def_key "K" + move_sort_order_up +def_key "h" + jump_to_parent_directory +def_key "l" + enter_directory +def_key "l" + run_action +def_key "l" + play_item +def_key "m" + show_media_library +def_key "m" + toggle_media_library_columns_mode +def_key "t" + show_tag_editor +def_key "v" + show_visualizer +def_key "G" + move_end +def_key "g" + move_home +#jump_to_position_in_song +def_key "U" + update_database +def_key "s" + reset_search_engine +def_key "s" + show_search_engine +def_key "f" + show_browser +def_key "f" + change_browse_mode +def_key "x" + delete_playlist_items +def_key "P" + show_playlist diff --git a/ncmpcpp/.config/ncmpcpp/config b/ncmpcpp/.config/ncmpcpp/config index e37a2a0..1a6a2cb 100644 --- a/ncmpcpp/.config/ncmpcpp/config +++ b/ncmpcpp/.config/ncmpcpp/config @@ -2,7 +2,7 @@ ncmpcpp_directory = "~/.config/ncmpcpp" lyrics_directory = "~/.local/share/lyrics" -mpd_music_dir = "~/music" +mpd_music_dir = "~/music/lib" message_delay_time = "1" visualizer_type = "spectrum" song_list_format = {$4%a - }{%t}|{$8%f$9}$R{$3(%l)$9} diff --git a/nnn/.config/nnn/plugins/preview-tabbed b/nnn/.config/nnn/plugins/preview-tabbed index 01050bd..374f487 100755 --- a/nnn/.config/nnn/plugins/preview-tabbed +++ b/nnn/.config/nnn/plugins/preview-tabbed @@ -49,7 +49,7 @@ # Author: LΓ©o Villeveygoux -XDOTOOL_TIMEOUT=2 +XDOTOOL_TIMEOUT=5 PAGER=${PAGER:-"vim -R"} NUKE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/plugins/nuke" diff --git a/nvidia/.config/nvidia/settings b/nvidia/.config/nvidia/settings new file mode 100644 index 0000000..55eb9af --- /dev/null +++ b/nvidia/.config/nvidia/settings @@ -0,0 +1,90 @@ +# +# /home/ivan/.config/nvidia/settings +# +# Configuration file for nvidia-settings - the NVIDIA X Server Settings utility +# Generated on Tue Dec 14 15:21:10 2021 +# + +# ConfigProperties: + +RcFileLocale = C +DisplayStatusBar = Yes +SliderTextEntries = Yes +IncludeDisplayNameInConfigFile = No +ShowQuitDialog = Yes +UpdateRulesOnProfileNameChange = Yes +Timer = PowerMizer_Monitor_(GPU_0),Yes,1000 +Timer = Thermal_Monitor_(GPU_0),Yes,1000 +Timer = Memory_Used_(GPU_0),Yes,3000 + +# Attributes: + +0/SyncToVBlank=0 +0/LogAniso=0 +0/FSAA=0 +0/TextureClamping=1 +0/FXAA=0 +0/AllowFlipping=1 +0/FSAAAppControlled=1 +0/LogAnisoAppControlled=1 +0/OpenGLImageSettings=1 +0/FSAAAppEnhanced=0 +0/ShowGraphicsVisualIndicator=0 +[DPY:DVI-D-0]/Dithering=0 +[DPY:DVI-D-0]/DitheringMode=0 +[DPY:DVI-D-0]/DitheringDepth=0 +[DPY:DVI-D-0]/ColorSpace=0 +[DPY:DVI-D-0]/ColorRange=0 +[DPY:DVI-D-0]/SynchronousPaletteUpdates=0 +[DPY:HDMI-0]/RedBrightness=0.000000 +[DPY:HDMI-0]/GreenBrightness=0.000000 +[DPY:HDMI-0]/BlueBrightness=0.000000 +[DPY:HDMI-0]/RedContrast=0.000000 +[DPY:HDMI-0]/GreenContrast=0.000000 +[DPY:HDMI-0]/BlueContrast=0.000000 +[DPY:HDMI-0]/RedGamma=1.000000 +[DPY:HDMI-0]/GreenGamma=1.000000 +[DPY:HDMI-0]/BlueGamma=1.000000 +[DPY:HDMI-0]/Dithering=0 +[DPY:HDMI-0]/DitheringMode=0 +[DPY:HDMI-0]/DitheringDepth=0 +[DPY:HDMI-0]/DigitalVibrance=0 +[DPY:HDMI-0]/ColorSpace=0 +[DPY:HDMI-0]/ColorRange=0 +[DPY:HDMI-0]/SynchronousPaletteUpdates=0 +[DPY:DP-0]/Dithering=0 +[DPY:DP-0]/DitheringMode=0 +[DPY:DP-0]/DitheringDepth=0 +[DPY:DP-0]/ColorSpace=0 +[DPY:DP-0]/ColorRange=0 +[DPY:DP-0]/SynchronousPaletteUpdates=0 +[DPY:DP-1]/Dithering=0 +[DPY:DP-1]/DitheringMode=0 +[DPY:DP-1]/DitheringDepth=0 +[DPY:DP-1]/ColorSpace=0 +[DPY:DP-1]/ColorRange=0 +[DPY:DP-1]/SynchronousPaletteUpdates=0 +[DPY:DP-2]/Dithering=0 +[DPY:DP-2]/DitheringMode=0 +[DPY:DP-2]/DitheringDepth=0 +[DPY:DP-2]/ColorSpace=0 +[DPY:DP-2]/ColorRange=0 +[DPY:DP-2]/SynchronousPaletteUpdates=0 +[DPY:DP-3]/Dithering=0 +[DPY:DP-3]/DitheringMode=0 +[DPY:DP-3]/DitheringDepth=0 +[DPY:DP-3]/ColorSpace=0 +[DPY:DP-3]/ColorRange=0 +[DPY:DP-3]/SynchronousPaletteUpdates=0 +[DPY:DP-4]/Dithering=0 +[DPY:DP-4]/DitheringMode=0 +[DPY:DP-4]/DitheringDepth=0 +[DPY:DP-4]/ColorSpace=0 +[DPY:DP-4]/ColorRange=0 +[DPY:DP-4]/SynchronousPaletteUpdates=0 +[DPY:DP-5]/Dithering=0 +[DPY:DP-5]/DitheringMode=0 +[DPY:DP-5]/DitheringDepth=0 +[DPY:DP-5]/ColorSpace=0 +[DPY:DP-5]/ColorRange=0 +[DPY:DP-5]/SynchronousPaletteUpdates=0 diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index 806a1ca..08963fe 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -9,6 +9,7 @@ endif call plug#begin('~/.config/nvim/plugged') "Plug 'ervandew/supertab' +Plug 'nekonako/xresources-nvim' Plug 'scrooloose/nerdtree' Plug 'lervag/vimtex' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } @@ -19,8 +20,10 @@ Plug 'jpalardy/vim-slime' Plug 'JuliaEditorSupport/julia-vim' Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' } Plug 'christoomey/vim-tmux-navigator' +Plug 'vimwiki/vimwiki' call plug#end() +colorscheme xresources " experimental set title @@ -28,15 +31,15 @@ set bg=light set go=a set mouse=a set nohlsearch +" allow copy-paste to X11 clipboard set clipboard+=unnamedplus set noshowmode set noruler set laststatus=0 set noshowcmd - set nocompatible -filetype plugin on +filetype plugin indent on syntax on set encoding=utf-8 set number relativenumber @@ -47,7 +50,7 @@ set shiftwidth=4 set autoindent set smartindent " don't use acual <Tab> character -set expandtab +set expandtab " autocompletion set wildmode=longest:list,full @@ -93,7 +96,7 @@ map <leader>r :vsp<space>$REFER<CR> nnoremap S :%s//g<Left><Left> " compile document, be it groff/LaTeX/markdown/etc. -map <leader>c :w! \| !compiler "<c-r>%"<CR> +map <leader>c :w! \| !compile "<c-r>%"<CR> " open corresponding .pdf/.html or preview map <leader>p :!opout <c-r>%<CR><CR> @@ -113,9 +116,22 @@ autocmd BufRead,BufNewFile *.tex set filetype=tex cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit! " automatically delete all trailing whitespace and newlines at end of file on save -autocmd BufWritePre * %s/\s\+$//e -autocmd BufWritePre * %s/\n\+\%$//e -autocmd BufWritePre *.[ch] %s/\%$/\r/e +"autocmd BufWritePre * %s/\s\+$//e +"autocmd BufWritePre * %s/\n\+\%$//e +"autocmd BufWritePre *.[ch] %s/\%$/\r/e +fun! TrimWhitespace() + let l:save = winsaveview() + keeppatterns %s/\s\+$//e + call winrestview(l:save) +endfun +fun! TrimTrailingLines() + let l:save = winsaveview() + keeppatterns :v/\_s*\S/d + call winrestview(l:save) +endfun +autocmd BufWritePre * call TrimWhitespace() +autocmd BufWritePre * call TrimTrailingLines() + " turn off highlighting on the bits of code that are changed, so the line that is changed is highlighted but the actual text that has changed stands out on the line and is readable if &diff @@ -200,3 +216,33 @@ let g:livepreview_use_biber = 1 let g:livepreview_cursorhold_recompile = 1 set updatetime=1000 + + +" copy-paste remapping for newbies like me +" CTRL-X and SHIFT-Del are Cut +vnoremap <C-X> "+x +vnoremap <S-Del> "+x +" CTRL-C and CTRL-Insert are Copy +vnoremap <C-C> "+y +vnoremap <C-Insert> "+y + + + +" Enable saving of undo history data from the buffer to a file. Next +" time Vim starts, the undo file is loaded. +set undofile + +" Directory for the undo files. This can be multiple entries separated +" by comma, in which the first found one will be used. "." means +" current directory of the file. +if !isdirectory($HOME."/.cache/nvim/") + call mkdir($HOME."/.cache/nvim", "", 0770) +endif +if !isdirectory($HOME."/.cache/nvim/undodir") + call mkdir($HOME."/.cache/nvim/undodir", "", 0700) +endif +set undodir=~/.cache/nvim/undodir + + +" autocompile dwmblocks +autocmd BufWritePost ~/.local/src/dwmblocks/config.h !cd ~/.local/src/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid dwmblocks & } diff --git a/compton/.config/compton/compton.conf b/picom/.config/picom/picom.conf index 91c2270..c0f75ce 100644 --- a/compton/.config/compton/compton.conf +++ b/picom/.config/picom/picom.conf @@ -1,7 +1,5 @@ shadow = true; -no-dnd-shadow = true; -no-dock-shadow = true; -clear-shadow = true; +#clear-shadow = true; shadow-radius = 7; shadow-offset-x = -7; shadow-offset-y = -7; @@ -12,12 +10,11 @@ shadow-blue = 0.0; shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'" ]; shadow-ignore-shaped = false; xinerama-shadow-crop = false; -menu-opacity = 0.8; inactive-opacity = 0.8; active-opacity = 1.0; frame-opacity = 0.7; inactive-opacity-override = false; -alpha-step = 0.06; +#alpha-step = 0.06; inactive-dim = 0.0; blur-kern = "3x3box"; blur-background-exclude = [ "window_type = 'dock'", "window_type = 'desktop'" ]; @@ -32,22 +29,42 @@ mark-ovredir-focused = true; detect-rounded-corners = true; detect-client-opacity = true; refresh-rate = 0; -vsync = "none"; +vsync = false; dbe = false; -paint-on-overlay = true; +#paint-on-overlay = true; focus-exclude = [ "class_g = 'Cairo-clock'" ]; detect-transient = true; detect-client-leader = true; invert-color-include = [ ]; glx-copy-from-front = false; -glx-swap-method = "undefined"; -wintypes : +#glx-swap-method = "undefined"; +use-damage=true; +wintypes : { - tooltip : - { - fade = true; - shadow = false; - opacity = 0.75; - focus = true; - }; +tooltip : + { + fade = true; + shadow = false; + opacity = 0.75; + focus = true; + }; +#no-dnd-shadow = true; +dnd : + { + shadow=false; + }; +#no-dock-shadow = true; +dock : + { + shadow=false; + }; +#menu-opacity = 0.8; +popup_menu : + { + opacity=0.8; + }; +dropdown_menu : + { + opacity=0.8; + }; }; diff --git a/pix/.local/share/wallpapers/bg b/pix/.local/share/wallpapers/bg index f1647bf..b3096b1 120000 --- a/pix/.local/share/wallpapers/bg +++ b/pix/.local/share/wallpapers/bg @@ -1 +1 @@ -debian.png
\ No newline at end of file +mountains.jpg
\ No newline at end of file diff --git a/pix/.local/share/wallpapers/darker-than-black-night-sky.jpg b/pix/.local/share/wallpapers/darker-than-black-night-sky.jpg Binary files differdeleted file mode 100644 index a5411fe..0000000 --- a/pix/.local/share/wallpapers/darker-than-black-night-sky.jpg +++ /dev/null diff --git a/pix/.local/share/wallpapers/mountains.jpg b/pix/.local/share/wallpapers/mountains.jpg Binary files differnew file mode 100644 index 0000000..2ca01d0 --- /dev/null +++ b/pix/.local/share/wallpapers/mountains.jpg diff --git a/scripts/.local/bin/borg-backup b/scripts/.local/bin/borg-backup deleted file mode 100755 index 2ba7774..0000000 --- a/scripts/.local/bin/borg-backup +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# Setting this, so the repo does not need to be given on the commandline: -#export BORG_REPO=ssh://pi@192.168.3.1/media/nas/borgbackup -export BORG_REPO=/media/wdblue-old/borgbackup -# See the section "Passphrase notes" for more infos. -#export BORG_PASSPHRASE='XYZl0ngandsecurepa_55_phrasea&&123' -#export BORG_PASSCOMMAND="cat $HOME/.config/borg/keys/media_wdblue_old_borgbackup" -# some helpers and error handling: -info() { printf "\n%s %s\n\n" "$( date )" "$*" >&2; } -trap 'echo $( date ) Backup interrupted >&2; exit 2' INT TERM -info "Starting backup" - -# Backup the most important directories into an archive named after -# the machine this script is currently running on: - -borg create \ - --progress \ - --filter AME \ - --list \ - --stats \ - --show-rc \ - --compression zlib,9 \ - --exclude-caches \ - --exclude='*build*' \ - --exclude='*svn*' \ - --exclude='*temp*' \ - --exclude='*tmp*' \ - --exclude='*git*' \ - --exclude='*log*' \ - --exclude='*old*' \ - --exclude='*bak*' \ - \ - ::'{hostname}-{now}' \ - /media/wdblue/dox \ - /media/wdblue/dox-arch \ - /media/wdblue/vid/gachi \ - /media/wdblue/pix \ - /media/wdblue/tracks \ - /media/wdblue/sync \ - -backup_exit=$? - -info "Pruning repository" - -# Use the `prune` subcommand to maintain 7 daily, 4 weekly and 6 monthly -# archives of THIS machine. The '{hostname}-' prefix is very important to -# limit prune's operation to this machine's archives and not apply to -# other machines' archives also: - -borg prune \ - --list \ - --prefix '{hostname}-' \ - --show-rc \ - --keep-daily 7 \ - --keep-weekly 4 \ - --keep-monthly 6 \ - -prune_exit=$? - -# use highest exit code as global exit code - -global_exit=$(( backup_exit > prune_exit ? backup_exit : prune_exit )) - -if [ ${global_exit} -eq 0 ]; then - info "Backup and Prune finished successfully" -elif [ ${global_exit} -eq 1 ]; then - info "Backup and/or Prune finished with warnings" -else - info "Backup and/or Prune finished with errors" -fi - -exit ${global_exit} diff --git a/scripts/.local/bin/cdmenu b/scripts/.local/bin/cdmenu index 67d9b7a..e1a4fdf 100755 --- a/scripts/.local/bin/cdmenu +++ b/scripts/.local/bin/cdmenu @@ -1,3 +1,8 @@ #! /bin/bash # colored dmenu for use in scripts -dmenu -nb '#020e1d' -nf '#00b1ff' -sb '#00b1ff' -sf '#020e1d' "$@" + +getcolor() { + xrdb -query | awk '/*.color'"$1":'/ { print substr($2,2) }' +} +# sync that with dwm's config.h! +dmenu -nb "#$(getcolor 0)" -nf "#$(getcolor 4)" -sb "#$(getcolor 4)" -sf "#$(getcolor 0)" "$@" diff --git a/scripts/.local/bin/compile b/scripts/.local/bin/compile new file mode 100755 index 0000000..faf37c9 --- /dev/null +++ b/scripts/.local/bin/compile @@ -0,0 +1,57 @@ +#!/bin/sh + +# This script will compile or run another finishing operation on a document. I +# have this script run via vim. +# +# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent +# presentations. Runs scripts based on extention or shebang. +# +# Note that .tex files which you wish to compile with XeLaTeX should have the +# string "xelatex" somewhere in a comment/command in the first 5 lines. + +file=$(readlink -f "$1") +dir=${file%/*} +base="${file%.*}" +ext="${file##*.}" + +cd "$dir" || exit 1 + +textype() { \ + command="pdflatex" + ( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" + $command --output-directory="$dir" "$base" && + grep -qi addbibresource "$file" && + biber --input-directory "$dir" "$base" && + $command --output-directory="$dir" "$base" && + $command --output-directory="$dir" "$base" +} + +case "$ext" in + # Try to keep these cases in alphabetical order. + [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; + c) cc "$file" -o "$base" && "$base" ;; + cpp) g++ "$file" -o "$base" && "$base" ;; + cs) mcs "$file" && mono "$base".exe ;; + go) go run "$file" ;; + h) sudo make install ;; + java) javac -d classes "$file" && java -cp classes "${1%.*}" ;; + m) octave "$file" ;; + md) if [ -x "$(command -v lowdown)" ]; then + lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf + elif [ -x "$(command -v groffdown)" ]; then + groffdown -i "$file" | groff > "$base.pdf" + else + pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file" + fi ; ;; + mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; + ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; + org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;; + py) python "$file" ;; + [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; + rs) cargo build ;; + sass) sassc -a "$file" "$base.css" ;; + scad) openscad -o "$base".stl "$file" ;; + sent) setsid -f sent "$file" 2>/dev/null ;; + tex) textype "$file" ;; + *) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;; +esac diff --git a/scripts/.local/bin/drecord b/scripts/.local/bin/drecord new file mode 100755 index 0000000..ee70830 --- /dev/null +++ b/scripts/.local/bin/drecord @@ -0,0 +1,123 @@ +#!/bin/sh + +# Usage: +# `$0`: Ask for recording type via dmenu +# `$0 screencast`: Record both audio and screen +# `$0 video`: Record only screen +# `$0 audio`: Record only audio +# `$0 kill`: Kill existing recording +# +# If there is already a running instance, user will be prompted to end it. + +updateicon() { \ + echo "$1" > /tmp/recordingicon + pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" + } + +killrecording() { + recpid="$(cat /tmp/recordingpid)" + # kill with SIGTERM, allowing finishing touches. + kill -15 "$recpid" + rm -f /tmp/recordingpid + updateicon "" + pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + kill -9 "$recpid" + exit + } + +screencast() { \ + ffmpeg -y \ + -f x11grab \ + -framerate 60 \ + -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \ + -i "$DISPLAY" \ + -f alsa -i default \ + -r 30 \ + -c:v h264 -crf 0 -preset ultrafast -c:a aac \ + "$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" & + echo $! > /tmp/recordingpid + updateicon "βΊοΈποΈ" + } + +video() { ffmpeg \ + -f x11grab \ + -s "$(xdpyinfo | awk '/dimensions/ {print $2;}')" \ + -i "$DISPLAY" \ + -c:v libx264 -qp 0 -r 30 \ + "$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "βΊοΈ" + } + +webcamhidef() { ffmpeg \ + -f v4l2 \ + -i /dev/video0 \ + -video_size 1920x1080 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "π₯" + } + +webcam() { ffmpeg \ + -f v4l2 \ + -i /dev/video0 \ + -video_size 640x480 \ + "$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "π₯" + } + + +audio() { \ + ffmpeg \ + -f alsa -i default \ + -c:a flac \ + "$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" & + echo $! > /tmp/recordingpid + updateicon "ποΈ" + } + +askrecording() { \ + choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | cdmenu -i -p "Select recording style:") + case "$choice" in + screencast) screencast;; + audio) audio;; + video) video;; + *selected) videoselected;; + webcam) webcam;; + "webcam (hi-def)") webcamhidef;; + esac + } + +asktoend() { \ + response=$(printf "No\\nYes" | cdmenu -i -p "Recording still active. End recording?") && + [ "$response" = "Yes" ] && killrecording + } + +videoselected() +{ + slop -f "%x %y %w %h" > /tmp/slop + read -r X Y W H < /tmp/slop + rm /tmp/slop + + ffmpeg \ + -f x11grab \ + -framerate 60 \ + -video_size "$W"x"$H" \ + -i :0.0+"$X,$Y" \ + -c:v libx264 -qp 0 -r 30 \ + "$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" & + echo $! > /tmp/recordingpid + updateicon "βΊοΈ" +} + +case "$1" in + screencast) screencast;; + audio) audio;; + video) video;; + *selected) videoselected;; + kill) killrecording;; + *) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;; +esac diff --git a/scripts/.local/bin/ff-clean b/scripts/.local/bin/ff-clean new file mode 100755 index 0000000..b20805f --- /dev/null +++ b/scripts/.local/bin/ff-clean @@ -0,0 +1,3 @@ +#!/bin/sh +# remove firefox extensions +sudo rm /usr/lib/firefox/browser/features/*.xpi -v diff --git a/scripts/.local/bin/ifinstalled b/scripts/.local/bin/ifinstalled new file mode 100755 index 0000000..b81081b --- /dev/null +++ b/scripts/.local/bin/ifinstalled @@ -0,0 +1,13 @@ +#!/bin/sh + +# Some optional functions in LARBS require programs not installed by default. I +# use this little script to check to see if a command exists and if it doesn't +# it informs the user that they need that command to continue. This is used in +# various other scripts for clarity's sake. + +for x in "$@"; do + #if ! which "$x" >/dev/null 2>&1 && ! pacman -Qq "$x" >/dev/null 2>&1; then + if ! which "$x" >/dev/null 2>&1 && ! apt -qq list "$x" >/dev/null 2>&1; then + notify-send "π¦ $x" "must be installed for this function." && exit 1 ; + fi +done diff --git a/scripts/.local/bin/pauseallmpv b/scripts/.local/bin/pauseallmpv new file mode 100755 index 0000000..d69a414 --- /dev/null +++ b/scripts/.local/bin/pauseallmpv @@ -0,0 +1,10 @@ +#!/bin/sh + +# You might notice all mpv commands are aliased to have this input-ipc-server +# thing. That's just for this particular command, which allows us to pause +# every single one of them with one command! This is bound to super + shift + p +# (with other things) by default and is used in some other places. + +for i in $(ls /tmp/mpvSockets/*); do + echo '{ "command": ["set_property", "pause", true] }' | socat - "$i"; +done diff --git a/scripts/.local/bin/remaps b/scripts/.local/bin/remaps index 0b780ab..262b70e 100755 --- a/scripts/.local/bin/remaps +++ b/scripts/.local/bin/remaps @@ -6,9 +6,29 @@ xset r rate 200 75 # Map the menu button to right super as well. -xmodmap -e 'keycode 135 = Super_R' +#xmodmap -e 'keycode 135 = Super_R' # external keyboard Alt_R may be mapped to Multi_Key instead of ISO_Level3_Shift, which breaks French QWERTY layout -xmodmap -e "keycode 64 = Alt_L" -#xmodmap -e "keycode 64 = ISO_Level3_Shift" -xmodmap -e "keycode 108 = ISO_Level3_Shift" +#xmodmap -e "keycode 64 = Alt_L" +#xmodmap -e "keycode 108 = ISO_Level3_Shift" + + +# reset all options +/usr/bin/setxkbmap -option + +# 105-key generic keyboard +# utilize french and russian layouts +# use qwerty instead of aqerty for french layout +# toggle layout with shift+caps +# french accents on right alt +# compose on right ctrl +# non-breaking spaces on right alt + space +# kill X on left ctrl + left alt + backspace +/usr/bin/setxkbmap -model pc105 \ + -layout fr,ru \ + -variant us, \ + -option grp:shift_caps_toggle \ + -option lv3:ralt_switch \ + -option compose:rctrl \ + -option nbsp:level3n \ + -option terminate:ctrl_alt_bkspc diff --git a/scripts/.local/bin/setbg b/scripts/.local/bin/setbg index 397646d..795b28f 100755 --- a/scripts/.local/bin/setbg +++ b/scripts/.local/bin/setbg @@ -7,10 +7,13 @@ # If wal is installed, also generates a colorscheme. # Location of link to wallpaper link. -bgloc="${XDG_DATA_HOME:-$HOME/.local/share/wallpapers}/bg" +bgloc="${XDG_DATA_HOME:-$HOME/.local/share/}/wallpapers/bg" -trueloc="$(readlink -f "$1")" && +# Configuration files of applications that have their themes changed by pywal. +dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" +zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" +trueloc="$(readlink -f "$1")" && case "$(file --mime-type -b "$trueloc")" in image/* ) ln -sf "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing wallpaper..." ;; inode/directory ) ln -sf "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random Wallpaper chosen." ;; @@ -18,8 +21,13 @@ case "$(file --mime-type -b "$trueloc")" in esac # If pywal is installed, use it. -command -v wal >/dev/null 2>&1 && - wal -i "$trueloc" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 && +if command -v wal >/dev/null 2>&1 ; then + wal -i "$(readlink -f $bgloc)" -o "${XDG_CONFIG_HOME:-$HOME/.config}/wal/postrun" >/dev/null 2>&1 && pidof dwm >/dev/null && xdotool key super+F12 +# If pywal is removed, return config files to normal. +else + [ -f "$dunstconf.bak" ] && unlink "$dunstconf" && mv "$dunstconf.bak" "$dunstconf" + [ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf" +fi xwallpaper --zoom "$bgloc" diff --git a/scripts/.local/bin/statusbar/sb-battery b/scripts/.local/bin/statusbar/sb-battery new file mode 100755 index 0000000..93cbe08 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-battery @@ -0,0 +1,37 @@ +#!/bin/sh + +# Prints all batteries, their percentage remaining and an emoji corresponding +# to charge status (π for plugged up, π for discharging on battery, etc.). + +case $BLOCK_BUTTON in + 3) notify-send "π Battery module" "π: discharging +π: not charging +β»: stagnant charge +π: charging +β‘: charged +β: battery very low! +- Scroll to change adjust xbacklight." ;; + 4) xbacklight -inc 10 ;; + 5) xbacklight -dec 10 ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +# Loop through all attached batteries and format the info +for battery in /sys/class/power_supply/BAT?*; do + # If non-first battery, print a space separator. + [ -n "${capacity+x}" ] && printf " " + # Sets up the status and capacity + case "$(cat "$battery/status" 2>&1)" in + "Full") status="β‘" ;; + "Discharging") status="π" ;; + "Charging") status="π" ;; + "Not charging") status="π" ;; + "Unknown") status="β»οΈ" ;; + *) exit 1 ;; + esac + capacity="$(cat "$battery/capacity" 2>&1)" + # Will make a warn variable if discharging and low + [ "$status" = "π" ] && [ "$capacity" -le 25 ] && warn="β" + # Prints the info + printf "%s%s%d%%" "$status" "$warn" "$capacity"; unset warn +done && printf "\\n" diff --git a/scripts/.local/bin/statusbar/sb-clock b/scripts/.local/bin/statusbar/sb-clock new file mode 100755 index 0000000..33f5b25 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-clock @@ -0,0 +1,31 @@ +#!/bin/sh + +clock=$(date '+%I') + +#case "$clock" in +# "00") icon="π" ;; +# "01") icon="π" ;; +# "02") icon="π" ;; +# "03") icon="π" ;; +# "04") icon="π" ;; +# "05") icon="π" ;; +# "06") icon="π" ;; +# "07") icon="π" ;; +# "08") icon="π" ;; +# "09") icon="π" ;; +# "10") icon="π" ;; +# "11") icon="π" ;; +# "12") icon="π" ;; +#esac +# +#case $BLOCK_BUTTON in +# 1) notify-send "This Month" "$(cal --color=always | sed "s/..7m/<b><span color=\"red\">/;s/..27m/<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; +# 2) setsid -f "$TERMINAL" -e calcurse ;; +# 3) notify-send "π
Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` +#- Middle click opens calcurse if installed" ;; +# 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +#esac + +#date "+%Y %b %d (%a) $icon%I:%M%p" + +date "+%d/%m/%Y (%a) %H:%M:%S" diff --git a/scripts/.local/bin/statusbar/sb-cpu b/scripts/.local/bin/statusbar/sb-cpu new file mode 100755 index 0000000..1572b52 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-cpu @@ -0,0 +1,12 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) notify-send "π₯ CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;; + 2) setsid -f "$TERMINAL" -e htop ;; + 3) notify-send "π₯ CPU module " "\- Shows CPU temperature. +- Click to show intensive processes. +- Middle click to open htop." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +sensors | awk '/Core 0/ {print "π‘" $3}' diff --git a/scripts/.local/bin/statusbar/sb-cpubars b/scripts/.local/bin/statusbar/sb-cpubars new file mode 100755 index 0000000..cfa54e4 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-cpubars @@ -0,0 +1,44 @@ +#!/bin/sh + +# Module showing CPU load as a changing bars. +# Just like in polybar. +# Each bar represents amount of load on one core since +# last run. + +# Cache in tmpfs to improve speed and reduce SSD load +cache=/tmp/cpubarscache + +case $BLOCK_BUTTON in + 2) setsid -f "$TERMINAL" -e htop ;; + 3) notify-send "CPU load module" "Each bar represents +one CPU core";; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +# id total idle +stats=$(awk '/cpu[0-9]+/ {printf "%d %d %d\n", substr($1,4), ($2 + $3 + $4 + $5), $5 }' /proc/stat) +[ ! -f $cache ] && echo "$stats" > "$cache" +old=$(cat "$cache") +printf "" +echo "$stats" | while read -r row; do + id=${row%% *} + rest=${row#* } + total=${rest%% *} + idle=${rest##* } + + case "$(echo "$old" | awk '{if ($1 == id) + printf "%d\n", (1 - (idle - $3) / (total - $2))*100 /12.5}' \ + id="$id" total="$total" idle="$idle")" in + + "0") printf "β";; + "1") printf "β";; + "2") printf "β";; + "3") printf "β";; + "4") printf "β
";; + "5") printf "β";; + "6") printf "β";; + "7") printf "β";; + "8") printf "β";; + esac +done; printf "\\n" +echo "$stats" > "$cache" diff --git a/scripts/.local/bin/statusbar/sb-disk b/scripts/.local/bin/statusbar/sb-disk new file mode 100755 index 0000000..e947509 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-disk @@ -0,0 +1,23 @@ +#!/bin/sh + +# Status bar module for disk space +# $1 should be drive mountpoint, otherwise assumed /. + +location=${1:-/} + +[ -d "$location" ] || exit + +case $BLOCK_BUTTON in + 1) notify-send "π½ Disk space" "$(df -h --output=target,used,size)" ;; + 3) notify-send "π½ Disk module" "\- Shows used hard drive space. +- Click to show all disk info." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +case "$location" in + "/home"* ) icon="π " ;; + "/mnt"* ) icon="πΎ" ;; + *) icon="π₯";; +esac + +printf "%s: %s\n" "$icon" "$(df -h "$location" | awk ' /[0-9]/ {print $3 "/" $2}')" diff --git a/scripts/.local/bin/statusbar/sb-doppler b/scripts/.local/bin/statusbar/sb-doppler new file mode 100755 index 0000000..dc93db0 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-doppler @@ -0,0 +1,206 @@ +#!/bin/sh + +# Show a Doppler RADAR of an American user's preferred location. + +secs=600 # Download a new doppler radar if one hasn't been downloaded in $secs seconds. +radarloc="${XDG_CACHE_HOME:-$HOME/.cache}/radar" +doppler="${XDG_CACHE_HOME:-$HOME/.cache}/doppler.gif" + +pickloc() { chosen="$(echo "Northeast +Southeast +PacNorthWest +PacSouthWest +UpperMissVly +SouthMissVly +SouthPlains +NorthRockies +SouthRockies +Alaska +Carib +Hawaii +CentGrLakes +Conus-Large +KABR: Aberdeen, SD +KBIS: Bismarck, ND +KFTG: Denver/Boulder, CO +KDMX: Des Moines, IA +KDTX: Detroit, MI +KDDC: Dodge City, KS +KDLH: Duluth, MN +KCYS: Cheyenne, WY +KLOT: Chicago, IL +KGLD: Goodland, KS +KUEX: Hastings, NE +KGJX: Grand Junction, CO +KGRR: Grand Rapids, MI +KMVX: Fargo/Grand Forks, ND +KGRB: Green Bay, WI +KIND: Indianapolis, IN +KJKL: Jackson, KY +KARX: La Crosse, WI +KILX: Lincoln/Central Illinois, IL +KLVX: Louisville, KY +KMQT: Marquette +KMKX: Milwaukee, WI +KMPX: Minneapolis, MN +KAPX: Gaylord/Alpena, MI +KLNX: North Platte, NE +KIWX: N. Webster/Northern, IN +KOAX: Omaha, NE +KPAH: Paducah, KY +KEAX: Pleasant Hill, MO +KPUX: Pueblo, CO +KDVN: Quad Cities, IA +KUDX: Rapid City, SD +KRIW: Riverton, WY +KSGF: Springfield, MO +KLSX: St. LOUIS, MO +KFSD: Sioux Falls, IA +KTWX: Topeka, KS +KICT: Wichita, KS +KVWX: Paducah, KY +ICAO: Responsible Wfo +KLTX: WILMINGTON, NC +KCCX: State College/Central, PA +KLWX: Sterling, VA +KFCX: Blacksburg/Roanoke, VA +KRAX: Raleigh/Durham, NC +KGYX: Portland, ME +KDIX: Mt Holly/Philadelphia, PA +KPBZ: Pittsburgh, PA +KAKQ: Wakefield, VA +KMHX: Morehead City, NC +KGSP: Greer/Greenville/Sprtbg, SC +KILN: Wilmington/Cincinnati, OH +KCLE: Cleveland, OH +KCAE: Columbia, SC +KBGM: Binghamton, NY +KENX: Albany, NY +KBUF: Buffalo, NY +KCXX: Burlington, VT +KCBW: Caribou, ME +KBOX: Boston /Taunton, MA +KOKX: New York City, NY +KCLX: Charleston, SC +KRLX: Charleston, WV +ICAO: Responsible WFO +KBRO: Brownsville, TX +KABX: Albuquerque, NM +KAMA: Amarillo, TX +KFFC: Peachtree City/Atlanta, GA +KEWX: Austin/Sanantonio, TX +KBMX: Birmingham, AL +KCRP: Corpus Christi, TX +KFWS: Dallas / Ft. Worth, TX +KEPZ: El Paso, TX +KHGX: Houston/ Galveston, TX +KJAX: Jacksonville, FL +KBYX: Key West, FL +KMRX: Morristown/knoxville, TN +KLBB: Lubbock, TX +KLZK: Little Rock, AR +KLCH: Lake Charles, LA +KOHX: Nashville, TN +KMLB: Melbourne, FL +KNQA: Memphis, TN +KAMX: Miami, FL +KMAF: Midland/odessa, TX +KTLX: Norman, OK +KHTX: Huntsville, AL +KMOB: Mobile, AL +KTLH: Tallahassee, FL +KTBW: Tampa Bay Area, FL +KSJT: San Angelo, TX +KINX: Tulsa, OK +KSRX: Tulsa, OK +KLIX: New Orleans/slidell, LA +KDGX: Jackson, MS +KSHV: Shreveport, LA +ICAO: Responsible WFO +KLGX: Seattle / Tacoma, WA +KOTX: Spokane, WA +KEMX: Tucson, AZ +KYUX: Phoenix, AZ +KNKX: San Diego, CA +KMUX: Monterey/san Francisco, CA +KHNX: San Joaquin/hanford, CA +KSOX: San Diego, CA +KATX: Seattle / Tacoma, WA +KIWA: Phoenix, AZ +KRTX: Portland, OR +KSFX: Pocatello, ID +KRGX: Reno, NV +KDAX: Sacramento, CA +KMTX: Salt Lake City, UT +KPDT: Pendleton, OR +KMSX: Missoula, MT +KESX: Las Vegas, NV +KVTX: Los Angeles, CA +KMAX: Medford, OR +KFSX: Flagstaff, AZ +KGGW: Glasgow, MT +KLRX: Elko, NV +KBHX: Eureka, CA +KTFX: Great Falls, MT +KCBX: Boise, ID +KBLX: Billings, MT +KICX: Salt Lake City, UT +ICAO: Responsible Wfo W/ MSCF +PABC: Anchorage, AK +PAPD: Fairbanks, AK +PHKM: Honolulu, HI +PAHG: Anchorage, AK +PAKC: Anchorage, AK +PAIH: Anchorage, AK +PHMO: Honolulu, HI +PAEC: Fairbanks, AK +TJUA: San Juan, PR +PACG: Juneau, AK +PHKI: Honolulu, HI +PHWA: Honolulu, HI +ICAO: Responsible Wfo W/ MSCF +KFDR: Norman, OK +PGUA: Guam +KBBX: Sacramento, CA +KFDX: Albuquerque, NM +KGWX: Jackson, MS +KDOX: Wakefield, VA +KDYX: San Angelo, TX +KEYX: Las Vegas, NV +KEVX: Mobile, AL +KHPX: Paducah, KY +KTYX: Burlington, VT +KGRK: Dallas / Ft. Worth, TX +KPOE: Lake Charles, LA +KEOX: Tallahassee, FL +KHDX: El Paso, TX +KDFX: San Antonio, TX +KMXX: Birmingham, AL +KMBX: Bismarck, ND +KVAX: Jacksonville, FL +KJGX: Peachtree City/atlanta, GA +KVNX: Norman, OK +KVBX: Vandenberg Afb: Orcutt, CA" | dmenu -r -i -l 50 -p "Select a National Weather Service radar to use as default:" | sed "s/:.*//" | tr "[:lower:]" "[:upper:]")" + +# Sanity check of selection and ensure user did not escape. +echo "$chosen" | grep -q "^[A-Z]\+$" && echo "$chosen" > "$radarloc" ;} + +getdoppler() { + loc="$(cat "$radarloc")" + notify-send "π¦οΈ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc." + curl -sL "https://radar.weather.gov/ridge/lite/${loc}_loop.gif" > "$doppler" ;} + +showdoppler() { setsid -f mpv --no-osc --loop=inf --no-terminal "$doppler" ;} + +case $BLOCK_BUTTON in + 1) [ ! -f "$radarloc" ] && pickloc && getdoppler + [ $(($(date '+%s') - $(stat -c %Y "$doppler"))) -gt "$secs" ] && getdoppler + showdoppler ;; + 2) pickloc && getdoppler && showdoppler ;; + 3) notify-send "πΊοΈ Doppler RADAR module" "\- Left click for local Doppler RADAR. +- Middle click to update change RADAR location. +After $secs seconds, new clicks will also automatically update the doppler RADAR." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +echo πΊοΈ diff --git a/scripts/.local/bin/statusbar/sb-forecast b/scripts/.local/bin/statusbar/sb-forecast new file mode 100755 index 0000000..1a625bd --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-forecast @@ -0,0 +1,35 @@ +#!/bin/sh + +# Displays todays precipication chance (β) and daily low (π₯Ά) and high (π). +# Usually intended for the statusbar. + +# If we have internet, get a weather report from wttr.in and store it locally. +# You could set up a shell alias to view the full file in a pager in the +# terminal if desired. This function will only be run once a day when needed. +weatherreport="${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" +getforecast() { curl -sf "wttr.in/$LOCATION" > "$weatherreport" || exit 1 ;} + +# Some very particular and terse stream manipulation. We get the maximum +# precipitation chance and the daily high and low from the downloaded file and +# display them with coresponding emojis. +showweather() { printf "%s" "$(sed '16q;d' "$weatherreport" | + grep -wo "[0-9]*%" | sort -rn | sed "s/^/β/g;1q" | tr -d '\n')" +sed '13q;d' "$weatherreport" | grep -o "m\\([-+]\\)*[0-9]\\+" | sed 's/+//g' | sort -n -t 'm' -k 2n | sed -e 1b -e '$!d' | tr '\n|m' ' ' | awk '{print " " $1 ".." $2 "Β°"}' ;} + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e less -Srf "$weatherreport" ;; + 2) getforecast && showweather ;; + 3) notify-send "π Weather module" "\- Left click for full forecast. +- Middle click to update forecast. +β: Chance of rain/snow +π₯Ά: Daily low +π: Daily high" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +# The test if our forcecast is updated to the day. If it isn't download a new +# weather report from wttr.in with the above function. +[ "$(stat -c %y "$weatherreport" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || + getforecast + +showweather diff --git a/scripts/.local/bin/statusbar/sb-help-icon b/scripts/.local/bin/statusbar/sb-help-icon new file mode 100755 index 0000000..8fa4a52 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-help-icon @@ -0,0 +1,17 @@ +#!/bin/sh + +# The clickable help menu. Middle click to restart wm. + +# If dwm is running, use dwm's readme and restart. +pidof dwm >/dev/null && + READMEFILE=/usr/local/share/dwm/larbs.mom + restartwm() { pkill -HUP dwm ;} || + restartwm() { i3 restart ;} + +case $BLOCK_BUTTON in + 1) groff -mom "${READMEFILE:-${XDG_DATA_HOME:-$HOME/.local/share}/larbs/readme.mom}" -Tpdf | zathura - ;; + 2) restartwm ;; + 3) notify-send "β Help module" "\- Left click to open LARBS guide. +- Middle click to refresh window manager." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac; echo "β" diff --git a/scripts/.local/bin/statusbar/sb-internet b/scripts/.local/bin/statusbar/sb-internet new file mode 100755 index 0000000..94b7da2 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-internet @@ -0,0 +1,26 @@ +#!/bin/sh + +# Show wifi πΆ and percent strength or π‘ if none. +# Show π if connected to ethernet or β if none. +# Show π if a vpn connection is active + +case $BLOCK_BUTTON in + 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 dwmblocks ;; + 3) notify-send "π Internet module" "\- Click to connect +β: wifi disabled +π‘: no wifi connection +πΆ: wifi connection with quality +β: no ethernet +π: ethernet working +π: vpn is active +" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +if grep -xq 'up' /sys/class/net/w*/operstate 2>/dev/null ; then + wifiicon="$(awk '/^\s*w/ { print "πΆ", int($3 * 100 / 70) "% " }' /proc/net/wireless)" +elif grep -xq 'down' /sys/class/net/w*/operstate 2>/dev/null ; then + grep -xq '0x1003' /sys/class/net/w*/flags && wifiicon="π‘ " || wifiicon="β " +fi + +printf "%s%s%s\n" "$wifiicon" "$(sed "s/down/β/;s/up/π/" /sys/class/net/e*/operstate 2>/dev/null)" "$(sed "s/.*/π/" /sys/class/net/tun*/operstate 2>/dev/null)" diff --git a/scripts/.local/bin/statusbar/sb-iplocate b/scripts/.local/bin/statusbar/sb-iplocate new file mode 100755 index 0000000..2c70b08 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-iplocate @@ -0,0 +1,17 @@ +#!/bin/sh + +# Gets your public ip address checks which country you are in and +# displays that information in the statusbar +# +# https://www.maketecheasier.com/ip-address-geolocation-lookups-linux/ + +#ifinstalled "geoip" || exit +#addr="$(curl ifconfig.me 2>/dev/null)" || exit +#grep "flag: " "${XDG_DATA_HOME:-$HOME/.local/share}/larbs/emoji" | grep "$(geoiplookup "$addr" | sed 's/.*, //')" | sed "s/flag: //;s/;.*//" + +locaddr=$(hostname -I | awk '{print $1}') +echo $locaddr + +case $BLOCK_BUTTON in + 1) notify-send "$(curl ifconfig.me 2>/dev/null)" +esac diff --git a/scripts/.local/bin/statusbar/sb-kbselect b/scripts/.local/bin/statusbar/sb-kbselect new file mode 100755 index 0000000..f0c923f --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-kbselect @@ -0,0 +1,16 @@ +#!/bin/sh +# works on any init system +# requirements: dmenu, xorg-setxkbmap +kb="$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')" || exit 1 + +case $BLOCK_BUTTON in + 1) kb_choice="$(awk '/! layout/{flag=1; next} /! variant/{flag=0} flag {print $2, "- " $1}' /usr/share/X11/xkb/rules/base.lst | dmenu -l 15)" + kb="$(echo "$kb_choice" | awk '{print $3}')" + setxkbmap "$kb" + pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";; + 3) notify-send "β¨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')") +- Left click to change keyboard.";; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +echo "$kb" diff --git a/scripts/.local/bin/statusbar/sb-mailbox b/scripts/.local/bin/statusbar/sb-mailbox new file mode 100755 index 0000000..2132184 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-mailbox @@ -0,0 +1,20 @@ +#!/bin/sh + +# Displays number of unread mail and an loading icon if updating. +# When clicked, brings up `neomutt`. + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e neomutt ;; + 2) setsid -f mw -Y >/dev/null ;; + 3) notify-send "π¬ Mail module" "\- Shows unread mail +- Shows π if syncing mail +- Left click opens neomutt +- Middle click syncs mail" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" + +pidof mbsync >/dev/null 2>&1 && icon="π" + +[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "π¬$unread$icon" diff --git a/scripts/.local/bin/statusbar/sb-memory b/scripts/.local/bin/statusbar/sb-memory new file mode 100755 index 0000000..b238c74 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-memory @@ -0,0 +1,16 @@ +#!/bin/sh + +case $BLOCK_BUTTON in + 1) notify-send "Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; + 2) setsid -f "$TERMINAL" -e htop ;; + 3) notify-send "Memory module" "\- Shows Memory Used/Total. +- Click to show memory hogs. +- Middle click to open htop." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +RAM=$(free --mebi | sed -n '2{p;q}' | awk '{printf ("%2.1f/%2.1f\n", ( $3 / 1024), ($2 / 1024))}') + +swap=$(free --mebi | sed -n '3{p;q}' | awk '{printf ("%2.1f/%2.1f\n", ( $3 / 1024), ($2 / 1024))}') + +echo "$RAM $swap GiB" diff --git a/scripts/.local/bin/statusbar/sb-moonphase b/scripts/.local/bin/statusbar/sb-moonphase new file mode 100755 index 0000000..fab8b4d --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-moonphase @@ -0,0 +1,37 @@ +#!/bin/sh + +# Shows the current moon phase. + +moonfile="${XDG_DATA_HOME:-$HOME/.local/share}/moonphase" + +[ "$(stat -c %y "$moonfile" 2>/dev/null | cut -d' ' -f1)" = "$(date '+%Y-%m-%d')" ] || + { curl -sf "wttr.in/?format=%m" > "$moonfile" || exit 1 ;} + +icon="$(cat "$moonfile")" + +case "$icon" in + π) name="New" ;; + π) name="Waxing Crescent" ;; + π) name="First Quarter" ;; + π) name="Waxing Gibbous" ;; + π) name="Full" ;; + π) name="Waning Gibbous" ;; + π) name="Last Quarter" ;; + π) name="Waning Crescent" ;; + *) exit 1 ;; +esac + +echo "${icon-?}" + +case $BLOCK_BUTTON in + 3) notify-send "π Moon phase module" "Displays current moon phase. +- π: New +- π: Waxing Crescent +- π: First Quarter +- π: Waxing Gibbous +- π: Full +- π: Waning Gibbous +- π: Last Quarter +- π: Waning Crescent" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac diff --git a/scripts/.local/bin/statusbar/sb-mpdup b/scripts/.local/bin/statusbar/sb-mpdup new file mode 100755 index 0000000..af81a7d --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-mpdup @@ -0,0 +1,8 @@ +#!/bin/sh + +# This loop will update the mpd statusbar module whenever a command changes the +# music player's status. mpd must be running on X's start for this to work. + +while : ; do + mpc idle >/dev/null && kill -45 "$(pidof "${STATUSBAR:-dwmblocks}")" || break +done diff --git a/scripts/.local/bin/statusbar/sb-music b/scripts/.local/bin/statusbar/sb-music new file mode 100755 index 0000000..7ea7032 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-music @@ -0,0 +1,19 @@ +#!/bin/sh + +filter() { mpc | sed "/^volume:/d;s/\\&/&/g;s/\\[paused\\].*/βΈ/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;} + +pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & + +case $BLOCK_BUTTON in + 1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause + 2) mpc toggle | filter ;; # right click, pause/unpause + 3) mpc status | filter ; notify-send "π΅ Music module" "\- Shows mpd song playing. +- βΈ when paused. +- Left click opens ncmpcpp. +- Middle click pauses. +- Scroll changes track.";; # right click, pause/unpause + 4) mpc prev | filter ;; # scroll up, previous + 5) mpc next | filter ;; # scroll down, next + 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;; + *) mpc status | filter ;; +esac diff --git a/scripts/.local/bin/statusbar/sb-nettraf b/scripts/.local/bin/statusbar/sb-nettraf new file mode 100755 index 0000000..eb7a73b --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-nettraf @@ -0,0 +1,29 @@ +#!/bin/sh + +# Module showing network traffic. Shows how much data has been received (RX) or +# transmitted (TX) since the previous time this script ran. So if run every +# second, gives network traffic per second. + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e bmon ;; + 3) notify-send "π Network traffic module" "π»: Traffic received +πΊ: Traffic transmitted" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +update() { + sum=0 + for arg; do + read -r i < "$arg" + sum=$(( sum + i )) + done + cache=${XDG_CACHE_HOME:-$HOME/.cache}/${1##*/} + [ -f "$cache" ] && read -r old < "$cache" || old=0 + printf %d\\n "$sum" > "$cache" + printf %d\\n $(( sum - old )) +} + +rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes) +tx=$(update /sys/class/net/[ew]*/statistics/tx_bytes) + +printf "π»%4sB πΊ%4sB\\n" $(numfmt --to=iec $rx) $(numfmt --to=iec $tx) diff --git a/scripts/.local/bin/statusbar/sb-news b/scripts/.local/bin/statusbar/sb-news new file mode 100755 index 0000000..fe701db --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-news @@ -0,0 +1,17 @@ +#!/bin/sh + +# Displays number of unread news items and an loading icon if updating. +# When clicked, brings up `newsboat`. + +case $BLOCK_BUTTON in + 1) setsid "$TERMINAL" -e newsboat ;; + 2) setsid -f newsup >/dev/null exit ;; + 3) notify-send "π° News module" "\- Shows unread news items +- Shows π if updating with \`newsup\` +- Left click opens newsboat +- Middle click syncs RSS feeds +<b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + + cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "π°" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" diff --git a/scripts/.local/bin/statusbar/sb-pacpackages b/scripts/.local/bin/statusbar/sb-pacpackages new file mode 100755 index 0000000..37ebed3 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-pacpackages @@ -0,0 +1,29 @@ +#!/bin/sh + +# Displays number of upgradeable packages. +# For this to work, have a `pacman -Sy` command run in the background as a +# cronjob every so often as root. This script will then read those packages. +# When clicked, it will run an upgrade via pacman. +# +# Add the following text as a file in /usr/share/libalpm/hooks/statusbar.hook: +# +# [Trigger] +# Operation = Upgrade +# Type = Package +# Target = * +# +# [Action] +# Description = Updating statusbar... +# When = PostTransaction +# Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3. + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e sb-popupgrade ;; + 2) notify-send "$(/usr/bin/pacman -Qu)" ;; + 3) notify-send "π Upgrade module" "π¦: number of upgradable packages +- Left click to upgrade packages +- Middle click to show upgradable packages" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/π¦/;s/^π¦0$//g" diff --git a/scripts/.local/bin/statusbar/sb-popupgrade b/scripts/.local/bin/statusbar/sb-popupgrade new file mode 100755 index 0000000..29d6230 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-popupgrade @@ -0,0 +1,9 @@ +#!/bin/sh + +printf "Beginning upgrade.\\n" + +yay -Syu +pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}" + +printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n" +read -r _ diff --git a/scripts/.local/bin/statusbar/sb-price b/scripts/.local/bin/statusbar/sb-price new file mode 100755 index 0000000..42c84c1 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-price @@ -0,0 +1,50 @@ +#!/bin/sh + +# Usage: +# price <url> <Name of currency> <icon> <Price to show in> +# price bat "Basic Attention Token" π¦ +# When the name of the currency is multi-word, put it in quotes. + +[ -z "$3" ] && exit 1 + +# use $4 as currency, if not passed in use "usd" as default +currency="${4:-usd}" +interval="@14d" # History contained in chart preceded by '@' (7d = 7 days) +dir="${XDG_DATA_HOME:-$HOME/.local/share}/crypto-prices" +pricefile="$dir/$1-$currency" +chartfile="$dir/$1-$currency-chart" + +updateprice() { temp="$(mktemp)" + curl -s "$currency.rate.sx/1$1" > "$temp" && + mv -f "$temp" "$pricefile" && + curl -s "$currency.rate.sx/$1$interval" > "$temp" && + mv -f "$temp" "$chartfile" ;} + +[ -d "$dir" ] || mkdir -p "$dir" + +[ "$(stat -c %x "$pricefile" 2>/dev/null | cut -d' ' -f1)" != "$(date '+%Y-%m-%d')" ] && + updateprice "$1" + +case $BLOCK_BUTTON in + 1) setsid "$TERMINAL" -e less -Srf "$chartfile" ;; + 2) notify-send -u low "$3 Updating..." "Updating $2 price..." + updateprice "$1" && notify-send "$3 Update complete." "$2 price is now +\$$(cat "$pricefile")" ;; + 3) uptime="$(date -d "$(stat -c %x "$pricefile")" '+%D at %T' | sed "s|$(date '+%D')|Today|")" + notify-send "$3 $2 module" "\- <b>Exact price: \$$(cat "$pricefile")</b> +- Left click for chart of changes. +- Middle click to update. +- Shows π if updating prices. +- <b>Last updated: + $uptime</b>" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +case "$currency" in + usd) symb="$" ;; + gbp) symb="Β£" ;; + eur) symb="β¬" ;; + btc) symb="βΏ" ;; +esac + +printf "$3$symb%0.2f$after" "$(cat "$pricefile")" diff --git a/scripts/.local/bin/statusbar/sb-tasks b/scripts/.local/bin/statusbar/sb-tasks new file mode 100755 index 0000000..586300e --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-tasks @@ -0,0 +1,20 @@ +#!/bin/sh + +# Originally by Andr3as07 <https://github.com/Andr3as07> +# Some changes by Luke +# Rebuild by Tenyun + +# This block displays the number running background tasks. Requires tsp. + +num=$(tsp -l | awk -v numr=0 -v numq=0 '{if (/running/)numr++; if (/queued/)numq++} END{print numr+numq"("numq")"}') + +# Handle mouse clicks +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e tsp -l ;; + 3) notify-send "Tasks module" "π€: number of running/queued background tasks +- Left click opens tsp" ;; # Right click + 2) $EDITOR "$0" ;; # Middle click +esac + +[ "$num" != "0(0)" ] && + echo "π€$num" diff --git a/scripts/.local/bin/statusbar/sb-torrent b/scripts/.local/bin/statusbar/sb-torrent new file mode 100755 index 0000000..6527005 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-torrent @@ -0,0 +1,27 @@ +#!/bin/sh + +transmission-remote -l | grep % | + sed " # The letters are for sorting and will not appear. + s/.*Stopped.*/A π/; + s/.*Seeding.*/Z π±/; + s/.*100%.*/N β
/; + s/.*Idle.*/B π°οΈ/; + s/.*Uploading.*/L β¬οΈ/; + s/.*%.*/M β¬οΈ/" | + sort -h | uniq -c | awk '{print $3 $1}' | paste -sd ' ' - + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e tremc ;; + 2) td-toggle ;; + 3) notify-send "π± Torrent module" "\- Left click to open tremc. +- Middle click to toggle transmission. +- Shift click to edit script. +Module shows number of torrents: +π: paused +π°: idle (seeds needed) +πΌ: uploading (unfinished) +π½: downloading +β
: done +π±: done and seeding" ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac diff --git a/scripts/.local/bin/statusbar/sb-volume b/scripts/.local/bin/statusbar/sb-volume new file mode 100755 index 0000000..3cfdc45 --- /dev/null +++ b/scripts/.local/bin/statusbar/sb-volume @@ -0,0 +1,30 @@ +#!/bin/sh + +# Prints the current volume or π if muted. + +case $BLOCK_BUTTON in + 1) setsid -f "$TERMINAL" -e pulsemixer ;; + 2) pamixer -t ;; + 4) pamixer --allow-boost -i 1 ;; + 5) pamixer --allow-boost -d 1 ;; + 3) notify-send "π’ Volume module" "\- Shows volume π, π if muted. +- Middle click to mute. +- Scroll to change." ;; + 6) "$TERMINAL" -e "$EDITOR" "$0" ;; +esac + +[ $(pamixer --get-mute) = true ] && echo π && exit + +vol="$(pamixer --get-volume)" + +if [ "$vol" -gt "70" ]; then + icon="π" +elif [ "$vol" -gt "30" ]; then + icon="π" +elif [ "$vol" -gt "0" ]; then + icon="π" +else + echo π && exit +fi + +echo "$icon$vol%" diff --git a/scripts/.local/bin/sysact b/scripts/.local/bin/sysact new file mode 100755 index 0000000..f12bfa1 --- /dev/null +++ b/scripts/.local/bin/sysact @@ -0,0 +1,19 @@ +#!/bin/sh + +# A dmenu wrapper script for system functions. +case "$(readlink -f /sbin/init)" in + *systemd*) ctl='systemctl' ;; + *) ctl='loginctl' ;; +esac + +case "$(printf "π lock\nπͺ leave dwm\nβ»οΈ renew dwm\nπ» hibernate\nπ€ sleep\nπ reboot\nπ₯οΈshutdown\nπΊ display off" | cdmenu -i -p 'Action: ')" in + 'π lock') slock ;; + 'πͺ leave dwm') kill -TERM "$(pgrep -u "$USER" "\bdwm$")" ;; + 'β»οΈ renew dwm') kill -HUP "$(pgrep -u "$USER" "\bdwm$")" ;; + 'π» hibernate') slock $ctl hibernate ;; + 'π€ sleep') slock $ctl suspend ;; + 'π reboot') $ctl reboot ;; + 'π₯οΈshutdown') $ctl poweroff ;; + 'πΊ display off') xset dpms force off ;; + *) exit 1 ;; +esac diff --git a/scripts/.local/bin/termcolors b/scripts/.local/bin/termcolors new file mode 100755 index 0000000..f72e18d --- /dev/null +++ b/scripts/.local/bin/termcolors @@ -0,0 +1,9 @@ +for x in {0..8}; do + for i in {30..37}; do + for a in {40..47}; do + echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m " + done + echo + done +done +echo "" diff --git a/shell/.config/shell/aliasrc b/shell/.config/shell/aliasrc index 7cc01b2..050a28a 100644 --- a/shell/.config/shell/aliasrc +++ b/shell/.config/shell/aliasrc @@ -61,3 +61,7 @@ alias nsel='nsel_internal | xargs ' alias sxiv="devour sxiv -a" alias mpv="devour mpv" alias zathura="devour zathura" + +# required for $HOME cleanup +alias nvidia-settings="nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings" +alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' diff --git a/shell/.config/shell/profile b/shell/.config/shell/profile index aca151e..d1d41c4 100644 --- a/shell/.config/shell/profile +++ b/shell/.config/shell/profile @@ -18,8 +18,8 @@ if [ -n "$BASH_VERSION" ]; then fi fi -#export PATH="$PATH:$(du -a "$HOME/.local/bin" | cut -f2 | paste -sd ':')" -export PATH="$PATH:$HOME/.local/bin" +export PATH="$PATH:$(du -L "$HOME/.local/bin" | cut -f2 | paste -sd ':')" +#export PATH="$PATH:$HOME/.local/bin" export PAGER="less" export EDITOR="nvim" @@ -31,14 +31,35 @@ export XDG_CACHE_HOME="$HOME/.cache" export XDG_CONFIG_HOME="$HOME/.config" export XDG_DATA_HOME="$HOME/.local/share" +# cleaning up export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0" export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh" export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg" export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default" export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history" - +export TEXMFHOME=$XDG_DATA_HOME/texmf +export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var +export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java +export KLAYOUT_HOME=$XDG_DATA_HOME/klayout +export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority +export SSB_HOME="$XDG_DATA_HOME"/zoom +export WGETRC="$XDG_CONFIG_HOME/wgetrc" export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store" export SUDO_ASKPASS="$HOME/.local/bin/pass-askpass" +export JULIA_DEPOT_PATH="$XDG_DATA_HOME/julia:$JULIA_DEPOT_PATH" +# xinit +#export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" +export XSERVERRC="$XDG_CONFIG_HOME/x11/xserverrc" +# X server +export USERXSESSION="$XDG_CONFIG_HOME/x11/xsession" +export USERXSESSIONRC="$XDG_CONFIG_HOME/x11/xsessionrc" +export ALTUSERXSESSION="$XDG_CONFIG_HOME/x11/Xsession" +export ERRFILE="$XDG_CACHE_HOME/x11/xsession-errors" +# libx11 +export XCOMPOSEFILE="$XDG_CONFIG_HOME/x11/xcompose" +export XCOMPOSECACHE="$XDG_CACHE_HOME/x11/xcompose" + # I don't need history from less export LESSHISTFILE="-" @@ -59,7 +80,7 @@ export COLOR_XOSD_OUTLINE="#00b1ff" # nnn things export NNN_BMS='v:~/vid;p:~/pix;d:~/dox;M:/mnt;m:/media' -export NNN_PLUG="t:!st;m:mediainf;d:dragdrop;l:mimelist;p:preview-tabbed;o:organize;r:renamer;c:rsynccp;x:toggleex;u:umounttree;g:getplugs;s:x2sel;f:finder;2:dups" +export NNN_PLUG="t:!st;m:mediainf;d:dragdrop;l:mimelist;p:preview-tabbed;o:organize;r:renamer;c:rsynccp;x:toggleex;u:umounttree;g:getplugs;s:x2sel;f:finder;2:dups;P:preview-tui;n:fixname" export NNN_TRASH=1 export NNN_SSHFS="sshfs -o follow_symlinks" export NNN_FIFO=/tmp/nnn.fifo diff --git a/shell/.xsessionrc b/shell/.xsessionrc deleted file mode 120000 index 8486fca..0000000 --- a/shell/.xsessionrc +++ /dev/null @@ -1 +0,0 @@ -.config/shell/profile
\ No newline at end of file diff --git a/sxiv/.config/sxiv/exec/key-handler b/sxiv/.config/sxiv/exec/key-handler new file mode 100644 index 0000000..3d9565f --- /dev/null +++ b/sxiv/.config/sxiv/exec/key-handler @@ -0,0 +1,33 @@ +#!/bin/sh +while read file +do + case "$1" in + "w") setbg "$file" & ;; + "c") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." & + ;; + "m") + [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")" + [ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit + mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." & + ;; + "r") + convert -rotate 90 "$file" "$file" ;; + "R") + convert -rotate -90 "$file" "$file" ;; + "f") + convert -flop "$file" "$file" ;; + "y") + echo -n "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$file copied to clipboard" & ;; + "Y") + readlink -f "$file" | tr -d '\n' | xclip -selection clipboard && + notify-send "$(readlink -f "$file") copied to clipboard" & ;; + "d") + [ "$(printf "No\\nYes" | dmenu -i -p "Really delete $file?")" = "Yes" ] && rm "$file" && notify-send "$file deleted." ;; + "g") ifinstalled gimp && setsid -f gimp "$file" ;; + "i") notify-send "File information" "$(mediainfo "$file")" ;; + esac +done diff --git a/taskwarrior/.taskrc b/taskwarrior/.config/task/.taskrc index bed06f6..bed06f6 100644 --- a/taskwarrior/.taskrc +++ b/taskwarrior/.config/task/.taskrc diff --git a/tmux/.tmux.conf b/tmux/.config/tmux/tmux.conf index 9d1d067..9d1d067 100644 --- a/tmux/.tmux.conf +++ b/tmux/.config/tmux/tmux.conf diff --git a/wal/.config/wal/postrun b/wal/.config/wal/postrun new file mode 100755 index 0000000..2b1d6cb --- /dev/null +++ b/wal/.config/wal/postrun @@ -0,0 +1,34 @@ +#!/bin/bash + +echo "pywal started" + +dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc" +zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc" + +source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh" + +mkdir -p "${dunstconf%/*}" "${zathuraconf%/*}" + +mv -n "$dunstconf" "$dunstconf.bak" +mv -n "$zathuraconf" "$zathuraconf.bak" + +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/dunstrc" "$dunstconf" +ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/zathurarc" "$zathuraconf" + +fix_sequences() { + e=$'\e' + sequences=$(cat) + foreground_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]10[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")" + + for term in /dev/pts/{0..9}*; do + echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null + echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null + done +} + +fix_sequences <"${XDG_CACHE_HOME:-$HOME/.cache}/wal/sequences" + +pkill dunst; setsid -f dunst diff --git a/wal/.config/wal/templates/dunstrc b/wal/.config/wal/templates/dunstrc new file mode 100644 index 0000000..9178c3e --- /dev/null +++ b/wal/.config/wal/templates/dunstrc @@ -0,0 +1,32 @@ +[global] + monitor = 0 + follow = keyboard + width=370 + height=350 + geometry="500x70-0+18" + offset = 0x19 + padding = 5 + horizontal_padding = 5 + transparency = 15 + font = Liberation Mono 12 + format = "<b>%s</b>\n%b" + frame_width=5 + corner_radius=0 + +[urgency_low] + background = "{color0}" # color0 + foreground = "{color7}" # color4 + frame_color = "{color7}" # color0 + timeout = 3 + +[urgency_normal] + background = "{color0}" # color0 + foreground = "{color4}" # color4 + frame_color = "{color4}" # color4 + timeout = 5 + +[urgency_critical] + background = "{color4}" # color4 + foreground = "{color0}" # color0 + frame_color = "{color4}" # color4 + timeout = 10 diff --git a/wal/.config/wal/templates/zathurarc b/wal/.config/wal/templates/zathurarc new file mode 100644 index 0000000..a12bbd3 --- /dev/null +++ b/wal/.config/wal/templates/zathurarc @@ -0,0 +1,35 @@ +set sandbox none +set statusbar-h-padding 0 +set statusbar-v-padding 0 +set page-padding 1 +set selection-clipboard clipboard +map u scroll half-up +map d scroll half-down +map D toggle_page_mode +map r reload +map R rotate +map K zoom in +map J zoom out +map i recolor +map p print + +set default-bg "{background}" +set default-fg "{foreground}" +set statusbar-bg "{background}" +set statusbar-fg "{foreground}" +set inputbar-bg "{background}" +set inputbar-fg "{foreground}" +set notification-bg "{background}" +set notification-fg "{foreground}" +set notification-error-bg "{background}" +set notification-error-fg "{foreground}" +set notification-warning-bg "{background}" +set notification-warning-fg "{foreground}" +set highlight-color "{color3}" +set highlight-active-color "{color4}" +set completion-bg "{color3}" +set completion-fg "{color4}" +set completion-highlight-bg "{color3}" +set completion-highlight-fg "{color4}" +set recolor-lightcolor "{background}" +set recolor-darkcolor "{foreground}" diff --git a/wget/.config/wgetrc b/wget/.config/wgetrc new file mode 100644 index 0000000..4fd7999 --- /dev/null +++ b/wget/.config/wgetrc @@ -0,0 +1 @@ +hsts-file=~/.cache/wget-hsts diff --git a/x11/.config/x11/.xsessionrc b/x11/.config/x11/.xsessionrc new file mode 120000 index 0000000..8d8c6b0 --- /dev/null +++ b/x11/.config/x11/.xsessionrc @@ -0,0 +1 @@ +../../../shell/.config/shell/profile
\ No newline at end of file diff --git a/x11/.config/x11/xcompose b/x11/.config/x11/xcompose new file mode 100644 index 0000000..9e04b68 --- /dev/null +++ b/x11/.config/x11/xcompose @@ -0,0 +1,58 @@ +include "%L" + +# GREEK CAPITAL LETTERS +<Multi_key> <G> <A> : "Ξ" U0391 # GREEK CAPITAL LETTER ALPHA +<Multi_key> <G> <B> : "Ξ" U0392 # GREEK CAPITAL LETTER BETA +<Multi_key> <G> <G> : "Ξ" U0393 # GREEK CAPITAL LETTER GAMMA +<Multi_key> <G> <D> : "Ξ" U0394 # GREEK CAPITAL LETTER DELTA +<Multi_key> <G> <E> : "Ξ" U0395 # GREEK CAPITAL LETTER EPSILON +<Multi_key> <G> <Z> : "Ξ" U0396 # GREEK CAPITAL LETTER ZETA +<Multi_key> <G> <H> : "Ξ" U0397 # GREEK CAPITAL LETTER ETA +<Multi_key> <G> <I> : "Ξ" U0399 # GREEK CAPITAL LETTER IOTA +<Multi_key> <G> <K> : "Ξ" U039A # GREEK CAPITAL LETTER KAPPA +<Multi_key> <G> <L> : "Ξ" U039B # GREEK CAPITAL LETTER LAMDA +<Multi_key> <G> <M> : "Ξ" U039C # GREEK CAPITAL LETTER MU +<Multi_key> <G> <N> : "Ξ" U039D # GREEK CAPITAL LETTER NU +<Multi_key> <G> <P> : "Ξ " U03A0 # GREEK CAPITAL LETTER PI +<Multi_key> <G> <R> : "Ξ‘" U03A1 # GREEK CAPITAL LETTER RHO +<Multi_key> <G> <S> : "Ξ£" U03A3 # GREEK CAPITAL LETTER SIGMA +<Multi_key> <G> <T> : "Ξ€" U03A4 # GREEK CAPITAL LETTER TAU +<Multi_key> <G> <U> : "Ξ₯" U03A5 # GREEK CAPITAL LETTER UPSILON +<Multi_key> <G> <F> : "Ξ¦" U03A6 # GREEK CAPITAL LETTER PHI +<Multi_key> <G> <X> : "Ξ§" U03A7 # GREEK CAPITAL LETTER CHI +<Multi_key> <G> <O> : "Ξ©" U03A9 # GREEK CAPITAL LETTER OMEGA + +# DOUBLES (additional stroke <Q>) +<Multi_key> <G> <Q> <T> : "Ξ" U0398 # GREEK CAPITAL LETTER THETA +<Multi_key> <G> <Q> <O> : "Ξ" U039F # GREEK CAPITAL LETTER OMICRON +<Multi_key> <G> <Q> <X> : "Ξ" U039E # GREEK CAPITAL LETTER XI +<Multi_key> <G> <Q> <P> : "Ξ¨" U03A8 # GREEK CAPITAL LETTER PSI + +# greek small letters +<Multi_key> <g> <a> : "Ξ±" U03B1 # GREEK SMALL LETTER ALPHA +<Multi_key> <g> <b> : "Ξ²" U03B2 # GREEK SMALL LETTER BETA +<Multi_key> <g> <g> : "Ξ³" U03B3 # GREEK SMALL LETTER GAMMA +<Multi_key> <g> <d> : "Ξ΄" U03B4 # GREEK SMALL LETTER DELTA +<Multi_key> <g> <e> : "Ξ΅" U03B5 # GREEK SMALL LETTER EPSILON +<Multi_key> <g> <z> : "ΞΆ" U03B6 # GREEK SMALL LETTER ZETA +<Multi_key> <g> <h> : "Ξ·" U03B7 # GREEK SMALL LETTER ETA +<Multi_key> <g> <i> : "ΞΉ" U03B9 # GREEK SMALL LETTER IOTA +<Multi_key> <g> <k> : "ΞΊ" U03BA # GREEK SMALL LETTER KAPPA +<Multi_key> <g> <l> : "Ξ»" U03BB # GREEK SMALL LETTER LAMDA +<Multi_key> <g> <m> : "ΞΌ" U03BC # GREEK SMALL LETTER MU +<Multi_key> <g> <n> : "Ξ½" U03BD # GREEK SMALL LETTER NU +<Multi_key> <g> <p> : "Ο" U03C0 # GREEK SMALL LETTER PI +<Multi_key> <g> <r> : "Ο" U03C1 # GREEK SMALL LETTER RHO +<Multi_key> <g> <s> : "Ο" U03C3 # GREEK SMALL LETTER SIGMA +<Multi_key> <g> <t> : "Ο" U03C4 # GREEK SMALL LETTER TAU +<Multi_key> <g> <u> : "Ο
" U03C5 # GREEK SMALL LETTER UPSILON +<Multi_key> <g> <f> : "Ο" U03C6 # GREEK SMALL LETTER PHI +<Multi_key> <g> <x> : "Ο" U03C7 # GREEK SMALL LETTER CHI +<Multi_key> <g> <o> : "Ο" U03C9 # GREEK SMALL LETTER OMEGA + +# doubles (additional stroke <q>) +<Multi_key> <g> <q> <t> : "ΞΈ" U03B8 # GREEK SMALL LETTER THETA +<Multi_key> <g> <q> <o> : "ΞΏ" U03BF # GREEK SMALL LETTER OMICRON +<Multi_key> <g> <q> <p> : "Ο" U03C8 # GREEK SMALL LETTER PSI +<Multi_key> <g> <q> <s> : "Ο" U03C2 # GREEK SMALL LETTER FINAL SIGMA +<Multi_key> <g> <q> <x> : "ΞΎ" U03BE # GREEK SMALL LETTER XI diff --git a/x11/.config/x11/xinitrc b/x11/.config/x11/xinitrc new file mode 100755 index 0000000..5fa14ab --- /dev/null +++ b/x11/.config/x11/xinitrc @@ -0,0 +1,28 @@ +#!/bin/sh + +# xinitrc runs automatically when you run startx. + +# There are some small but important commands that need to be run when we start +# the graphical environment. There is a link to this file in ~/.xprofile +# because that file is run automatically if someone uses a display manager +# (login screen) and so they are needed there. To prevent doubling up commands, +# I source them here with the line below. + +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then + . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" +else + . "$HOME/.xprofile" +fi + +picom & +firefox & +# delay thunderbird to allow protonmail initialize and avoid thunderbirds' "no connection to 127.0.0.1" +protonmail-bridge --no-window & ( sleep 5 && thunderbird & ) +signal-desktop & +telegram-desktop & +redshift -l40:2 & +syncthing & +xfce4-power-manager & + + +/usr/bin/dwm diff --git a/x11/.config/x11/xprofile b/x11/.config/x11/xprofile new file mode 100644 index 0000000..a2752ab --- /dev/null +++ b/x11/.config/x11/xprofile @@ -0,0 +1,10 @@ +#!/bin/sh + +# This file runs when a DM logs you into a graphical session. +# If you use startx/xinit like a Chad, this file will also be sourced. + +setbg & # set the background with the `setbg` script +#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup +mpd & # music player daemon-you might prefer it as a service though +remaps & # setting keyboard layout and more; check it for more info +dunst & # dunst for notifications diff --git a/x11/.xinitrc b/x11/.xinitrc index 518bb5d..17c5c88 120000..100755 --- a/x11/.xinitrc +++ b/x11/.xinitrc @@ -1 +1,30 @@ -.config/x11/xinitrc
\ No newline at end of file +#!/bin/sh + +# xinitrc runs automatically when you run startx. + +# There are some small but important commands that need to be run when we start +# the graphical environment. There is a link to this file in ~/.xprofile +# because that file is run automatically if someone uses a display manager +# (login screen) and so they are needed there. To prevent doubling up commands, +# I source them here with the line below. + +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then + . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" +else + . "$HOME/.xprofile" +fi + +setbg & + +picom & +firefox & +# delay thunderbird to allow protonmail initialize and avoid thunderbirds' "no connection to 127.0.0.1" +protonmail-bridge --no-window & ( sleep 5 && thunderbird & ) +signal-desktop & +telegram-desktop & +redshift -l40:2 & +syncthing & +xfce4-power-manager & + + +/usr/bin/dwm diff --git a/x11/.xprofile b/x11/.xprofile new file mode 120000 index 0000000..61f87a7 --- /dev/null +++ b/x11/.xprofile @@ -0,0 +1 @@ +.config/x11/xprofile
\ No newline at end of file diff --git a/zsh/.zshrc b/zsh/.zshrc deleted file mode 120000 index 4d9150c..0000000 --- a/zsh/.zshrc +++ /dev/null @@ -1 +0,0 @@ -.config/zsh/.zshrc
\ No newline at end of file |
