diff --git a/alacritty/alacritty.yml b/alacritty/alacritty.yml index 713e54b..563e36c 100644 --- a/alacritty/alacritty.yml +++ b/alacritty/alacritty.yml @@ -20,7 +20,7 @@ window: #dimensions: # columns: 0 # lines: 0 - opacity: 0.75 + opacity: 0.85 dynamic_title: true # Window position (changes require restart) diff --git a/awesome/init.fnl b/awesome/init.fnl index e39f622..107bd37 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -1,15 +1,15 @@ ;; Standard awesome library|# -(local gears (require "gears")) -(local awful (require "awful")) +(global gears (require "gears")) +(global awful (require "awful")) (require "awful.autofocus") ;; Widget and layout library -(local wibox (require "wibox")) +(global wibox (require "wibox")) ;; Theme handling library -(local beautiful (require "beautiful")) +(global beautiful (require "beautiful")) (local xresources (require "beautiful.xresources")) ;; Notification library -(local naughty (require "naughty")) -(local menubar (require "menubar")) +(global naughty (require "naughty")) +(global menubar (require "menubar")) ;; Enable hotkeys help widget for VIM and other apps ;; when client with a matching name is opened: (local hotkeys_popup (require "awful.hotkeys_popup")) @@ -17,6 +17,10 @@ (local dpi xresources.apply_dpi) (local ruled (require "ruled")) +(global togglebar (fn [] + (let [s (awful.screen.focused {:client true})] + (s.togglebar)))) + ;; my splits (local clientrules (require :rules)) (local keybindings (require :keybindings)) @@ -52,7 +56,7 @@ ;; Import the bling modules and layouts -(local bling (require :bling)) +(global bling (require :bling)) ;; (local awestore (require "awestore")) (ruled.notification.connect_signal @@ -104,8 +108,8 @@ ;; Table of layouts to cover with awful.layout.inc, order matters. (set awful.layout.layouts [ - bling.layout.mstab awful.layout.suit.tile + bling.layout.mstab bling.layout.centered awful.layout.suit.floating ;; awful.layout.suit.tile.left @@ -183,6 +187,10 @@ ;; Each screen has its own tag table. (awful.tag [ "  " "  " "  " "  " ] s (. awful.layout.layouts 1)) + (if (= s.index 1) + (naughty.notification {:title "this is screen 1"}) + + ) ;; Make buffers on all sides so that tiled clients aren't pushed to edges (set s.padding (dpi 0)) @@ -578,11 +586,11 @@ :shape gears.shape.rounded_bar :bg beautiful.bg_normal :fg beautiful.fg_normal - :opacity 0.8 + :opacity 0.9 :visible true :screen s })) - (: s.mywibox :struts { :bottom (dpi 50) }) + (: s.mywibox :struts { :bottom (dpi 45) }) ;; Add widgets to the wibox (: s.mywibox :setup { @@ -617,8 +625,13 @@ :widget wibox.container.margin } }) - )) + ;; (: s.mywibox :visible false) + (set s.togglebar (fn [] + (let [v (not s.mywibox.visible)] + (tset s.mywibox :visible v)))) + ;; (s.togglebar) + )) ;; Mouse bindings (root.buttons (gears.table.join @@ -742,7 +755,7 @@ (awful.spawn.once "picom --experimental-backend") (awful.spawn.once "/usr/lib/polkit-kde-authentication-agent-1") -(awful.spawn.once "feh --bg-fill /home/chris/Pictures/wallpapers/tech.jpg") +(awful.spawn.once "feh --bg-fill /home/chris/Pictures/wallpapers/darkb-minimal-cross.png") (awful.spawn.once "bluetoothctl power on") ;; (awful.spawn.once "nextcloud --background") (awful.spawn.once "rbw-agent") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index a4f6c64..92244b8 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -156,10 +156,6 @@ (awful.key [] "XF86MonBrightnessDown" (fn [] (awful.spawn.with_shell "light -U 5 && lightget")) {:description "Decrease monitor brightness by 5%" :group "utilities"}) - (awful.key [ modkey ctrl ] "o" (fn [] (awful.spawn - "lightget")) - {:description "get brightness" :group "utilities"}) - ;; Menubar ;; (awful.key [ modkey ] "p" (fn [] (menubar.show)) ;; {:description "show the menubar" :group "launcher"}) @@ -210,11 +206,9 @@ ;; audio (awful.key [modkey] "a" (fn [] (awful.spawn "alacritty --class pulsemixer -e pulsemixer")) {:description "launch pulsemixer" :group "audio"}) - (awful.key [] "XF86AudioRaiseVolume" (fn [] (awful.spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%") - (awful.spawn "paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga")) + (awful.key [] "XF86AudioRaiseVolume" (fn [] (awful.spawn "volup")) {:description "Increase volume by 5%" :group "audio"}) - (awful.key [] "XF86AudioLowerVolume" (fn [] (awful.spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%") - (awful.spawn "paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga")) + (awful.key [] "XF86AudioLowerVolume" (fn [] (awful.spawn "voldown")) {:description "Decrease volume by 5%" :group "audio"}) (awful.key [] "XF86AudioMute" (fn [] (awful.spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle") (awful.spawn "paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga")) @@ -250,6 +244,17 @@ (awful.key [modkey shift] "9" (fn [] (awful.spawn "mpvc -t -20")) {:description "MPV seek backward 20 sec" :group "audio"}) + ;; Extras + (awful.key [ modkey alt ] "b" (fn [] (togglebar)) + {:description "show/hide bar" :group "utilities"}) + (awful.key [ modkey ctrl ] "o" (fn [] (awful.spawn "lightget")) + {:description "get brightness" :group "utilities"}) + (awful.key [ modkey ctrl ] "b" (fn [] (awful.spawn "batget")) + {:description "get battery" :group "utilities"}) + (awful.key [ modkey ctrl ] "t" (fn [] (awful.spawn "timeget")) + {:description "get time" :group "utilities"}) + + ;; Because I don't know much fennel yet I'm doing each one individually ;; View tags only. (awful.key [ modkey ] "1" diff --git a/awesome/rules.fnl b/awesome/rules.fnl index f794f49..5295b02 100644 --- a/awesome/rules.fnl +++ b/awesome/rules.fnl @@ -211,7 +211,8 @@ :raise true :screen awful.screen.preferred :height (dpi 850) - :width (dpi 1550) + :width (dpi 1450) + :placement awful.placement.centered } } { diff --git a/fish/config.fish b/fish/config.fish index c7fc909..ae65072 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -222,6 +222,7 @@ if status is-login end end +macchina ### Start plasma wayland # if status is-login # if test -z "$DISPLAY" -a "$XDG_VTNR" = 1 diff --git a/macchina/README.md b/macchina/README.md new file mode 100644 index 0000000..ca4306b --- /dev/null +++ b/macchina/README.md @@ -0,0 +1,10 @@ +# `contrib` directory + +This directory contains cool things our community has contributed, or some +niceties we've added that they might find useful. + +| Directory | Description | +| -----------------: | :------------------------------------------------------------------------------------- | +| [scripts](scripts) | A collection of scripts that supercharge _macchina_. | +| [ascii](ascii) | A collection of ASCII art files that you can display alongside your system statistics. | +| [themes](themes) | A collection of themes that you should definitely steal! | diff --git a/macchina/ascii/archlinux.ascii b/macchina/ascii/archlinux.ascii new file mode 100644 index 0000000..3032e57 --- /dev/null +++ b/macchina/ascii/archlinux.ascii @@ -0,0 +1,15 @@ +              ..              +              cl              +             :ooc             +            ;oooo:            +           .looooo:           +          ;c;:looooc          +         :ooooooooooc         +        :ooooooooooool        +       coooool;;loooool.      +     .looooo'    .oooooo.     +    .ooooooc      ;oooocl'    +   'ooooooo:      'ooooo:,    +  ,oool:,..        ..,:looo;  + :c,.                    .,c: +..                          .' diff --git a/macchina/ascii/fedoralinux.ascii b/macchina/ascii/fedoralinux.ascii new file mode 100644 index 0000000..de63c74 --- /dev/null +++ b/macchina/ascii/fedoralinux.ascii @@ -0,0 +1,16 @@ + .:-======-:. + :=++++++++++++=-. + -++++++++++++++++++- + .+++++++++++=:::-=+++++. + .+++++++++++. .. :+++++. + =++++++++++- +++= =+++++ +:+++++++++++: .++++:.=+++++: +-++++++++==+- .===+++++++++= +=+++++- -- .+++++++++= +=++++. -==+- .==++++++++++- +=+++- +++++- .++++++++++++ +=+++= -++++. :+++++++++++. +=++++- .. .+++++++++++: +=++++++-:..:=++++++++++= +-++++++++++++++++++++-. + :=+++++++++++++=-:. diff --git a/macchina/ascii/rust.ascii b/macchina/ascii/rust.ascii new file mode 100644 index 0000000..6bdff8f --- /dev/null +++ b/macchina/ascii/rust.ascii @@ -0,0 +1,17 @@ +                                                   +                                                   +                     .. .,  .                      +                  c,'cc;cc::cc.;c                  +               c::ccccccccccccccc:cc         .     + .  ,,      :::ccccccccccccccccccccc:c.    ,c:  ;  + c: .cc   ''cccccccccccccccccccccccccc;'. .cc:.;;  +  cc:cc   :ccccccccccccccccccccccccccccc,  .ccc    +    .c,  ccccccccccccOc.:cccdx.;ccccccccc;.',      +       ';ccccccccccc'o' .cc,'l  ccccccccccc'       +      'c;.:ccccccccc:...;ccc'..;ccccccc:.;'c,      +       'c  .     ::cccccc'.'cccc::.     . ;,       +         ..                              '         +           .                            .          +                                                   +                                                   +                                                   diff --git a/macchina/macchina.toml b/macchina/macchina.toml new file mode 100644 index 0000000..9edd241 --- /dev/null +++ b/macchina/macchina.toml @@ -0,0 +1,48 @@ +# Specifies the network interface to use for the LocalIP readout +interface = "wlp170s0" + +# Lengthen uptime output +long_uptime = true + +# Lengthen shell output +long_shell = false + +# Lengthen kernel output +long_kernel = false + +# Toggle between displaying the current shell or your user's default one. +current_shell = true + +# Toggle between displaying the number of physical or logical cores of your +# processor. +physical_cores = true + +# Themes need to be placed in "$XDG_CONFIG_DIR/macchina/themes" beforehand. +# e.g.: +# if theme path is /home/foo/.config/macchina/themes/Sodium.toml +# theme should be uncommented and set to "Sodium" +# +theme = "Lithium" + +# Displays only the specified readouts. +# Accepted values (case-sensitive): +# - Host +# - Machine +# - Kernel +# - Distribution +# - OperatingSystem +# - DesktopEnvironment +# - WindowManager +# - Resolution +# - Backlight +# - Packages +# - LocalIP +# - Terminal +# - Shell +# - Uptime +# - Processor +# - ProcessorLoad +# - Memory +# - Battery +# Example: + show = ["Host", "Machine", "Kernel", "Distribution", "DesktopEnvironment", "Packages", "ProcessorLoad", "Memory", "Battery"] \ No newline at end of file diff --git a/macchina/scripts/macchina-video.sh b/macchina/scripts/macchina-video.sh new file mode 100755 index 0000000..c9cc245 --- /dev/null +++ b/macchina/scripts/macchina-video.sh @@ -0,0 +1,92 @@ +#!/usr/bin/env sh + +# Will only work on macchina v0.7.3 or higher +# This script will download and run a video from youtube / any site supported by youtube-dl +# and display the video in macchina. +# The flow is +# youtube-dl -> ffmpeg -> jp2a -> macchina +# First argument is video url. +# Second argument is frame wait time. + +PID=$$ +DIR="/tmp/ffmpeg_$PID" + +if [ -n "$1" ]; then + URL="$1" +else + URL=$(echo "aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g/dj1kUXc0dzlXZ1hjUQo=" | base64 -d) +fi + +if [ -n "$2" ]; then + FRAME_WAIT_TIME=$2 +else + FRAME_WAIT_TIME=5 +fi + +required="youtube-dl ffmpeg base64 awk jp2a macchina" + +for r in "$required"; do + if ! [ -n "$(which "$r" 2>/dev/null)" ]; then # need the quotes + printf '\x1b[31m%s not found\x1b[0m\n' "$r" + exit 1 + fi +done + +# polling rate is .05 i.e. once every 50ms +WAIT=$(echo - | awk -v seconds="$FRAME_WAIT_TIME" '{print seconds/.05}') + +trap_ctrlc() { + + printf '\x1b[?25h' # shows cursor + if [ -n "$FFMPEG_PID" -a -d "/proc/$FFMPEG_PID" ]; then + kill -0 "$FFMPEG_PID" + wait "$FFMPEG_PID" + fi + + if [ -n "$DIR" -a -d "$DIR" ]; then + rm -rf "$DIR" 2>/dev/null + fi + + exit +} + +mkdir "$DIR" + +# youtube-dl -f best $URL -o - | ffmpeg -i pipe: -r 10 -update 1 "$DIR/out_%d.png" > /dev/null 2>&1 & +youtube-dl -f best "$URL" -o - 2>/dev/null | ffmpeg -i pipe: -r 10 "$DIR/out_%d.png" >/dev/null 2>&1 & +FFMPEG_PID=$! + +trap trap_ctrlc INT + +printf '\x1b[?25l' # hides the cursor +for img in "$(# increasing this too much will break it + seq 1 999999 +)"; do + count=0 + while ! [ -f "$DIR/out_$img.png" ]; do + sleep .05 + count=$((count + 1)) + if [ "$count" -ge "$WAIT" ]; then break; fi + done + printf '\x1b[s' # saves cursor position + target/debug/macchina --custom-ascii <(jp2a --color --width=50 "$DIR/out_$img".png) + # jp2a --color --width=50 $DIR/out_$img.png # just display the video wihout macchina + printf '\x1b[u' + if [ -f "$DIR/out_$img.png" ]; then + rm -f "$DIR/out_$img".png + fi + sleep .02 +done + +printf '\x1b[?25h' # shows cursor + +if [ -n "$FFMPEG_PID" -a -d "/proc/$FFMPEG_PID" ]; then + kill -0 "$FFMPEG_PID" + wait "$FFMPEG_PID" +fi + +if [ -n "$DIR" -a -d "$DIR" ]; then + rm -rf "$DIR" 2>/dev/null +fi + +wait "$FFMPEG_PID" diff --git a/macchina/themes/Beryllium.toml b/macchina/themes/Beryllium.toml new file mode 100644 index 0000000..df0ba58 --- /dev/null +++ b/macchina/themes/Beryllium.toml @@ -0,0 +1,26 @@ +# Beryllium + +spacing = 3 +hide_ascii = true +key_color = "#7067CF" +separator = "" + +[box] +border = "plain" +visible = true + +[palette] +glyph = "○ " +visible = true + +[bar] +glyph = "○" +hide_delimiters = true +visible = true + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "#FF7001" diff --git a/macchina/themes/Helium.toml b/macchina/themes/Helium.toml new file mode 100644 index 0000000..d239475 --- /dev/null +++ b/macchina/themes/Helium.toml @@ -0,0 +1,51 @@ +# Helium + +hide_ascii = false +spacing = 2 +padding = 0 +separator = "->" +key_color = "Blue" +separator_color = "Yellow" + +[bar] +glyph = "o" +symbol_open = "(" +symbol_close = ")" +hide_delimiters = false +visible = false + +[box] +title = " Helium " +border = "rounded" +visible = false + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "Yellow" + +[randomize] +key_color = false +separator_color = false + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" diff --git a/macchina/themes/Hydrogen.toml b/macchina/themes/Hydrogen.toml new file mode 100644 index 0000000..5280ec2 --- /dev/null +++ b/macchina/themes/Hydrogen.toml @@ -0,0 +1,51 @@ +# Hydrogen + +spacing = 2 +padding = 0 +hide_ascii = true +separator = ">" +key_color = "Cyan" +separator_color = "White" + +[palette] +type = "Full" +visible = false + +[bar] +glyph = "ߋ" +symbol_open = '[' +symbol_close = ']' +hide_delimiters = true +visible = true + +[box] +border = "plain" +visible = true + +[box.inner_margin] +x = 1 +y = 0 + +[randomize] +key_color = false +separator_color = false + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "Local IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" diff --git a/macchina/themes/Lithium.toml b/macchina/themes/Lithium.toml new file mode 100644 index 0000000..eb46117 --- /dev/null +++ b/macchina/themes/Lithium.toml @@ -0,0 +1,57 @@ +# Lithium + +spacing = 1 +padding = 0 +hide_ascii = true +separator = " " +key_color = "Yellow" +separator_color = "Yellow" + +[palette] +type = "Light" +glyph = " ● " +visible = true + +[bar] +glyph = "●" +symbol_open = '(' +symbol_close = ')' +visible = false +hide_delimiters = true + +[box] +title = " Syl " +border = "plain" +visible = true + +[box.inner_margin] +x = 2 +y = 1 + +[custom_ascii] +color = "Yellow" + +[randomize] +key_color = true +separator_color = false +pool = "base" + +[keys] +host = "Host" +kernel = "Kernel" +battery = "Battery" +os = "OS" +de = "DE" +wm = "WM" +distro = "Distro" +terminal = "Terminal" +shell = "Shell" +packages = "Packages" +uptime = "Uptime" +memory = "Memory" +machine = "Machine" +local_ip = "IP" +backlight = "Brightness" +resolution = "Resolution" +cpu_load = "CPU Load" +cpu = "CPU" diff --git a/picom.conf b/picom.conf index 50f0331..070d2ec 100644 --- a/picom.conf +++ b/picom.conf @@ -1,11 +1,20 @@ +# Animations +transition-length = 200 +transition-pow-x = 1 +transition-pow-y = 1 +transition-pow-w = 1 +transition-pow-h = 1 +size-transition = true +spawn-center = true + # Corners -corner-radius = 0.0; +corner-radius = 20.0; rounded-corners-exclude = [ #"window_type = 'normal'", "class_g = 'awesome'", "class_g = 'XTerm'", "class_g = 'kitty'", - # "class_g = 'emacs'", + "class_g = 'emacs'", "class_g = 'Thunderbird'", # "_NET_WM_STATE@[0]:32a *= '_NET_WM_STATE_FULLSCREEN'", ]; @@ -87,7 +96,6 @@ shadow-exclude = [ # be painted in, such as a dock window region. Use # shadow-exclude-reg = "x10+0+0" # for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. -shadow-exclude-reg = "x40+20+1436" # shadow-exclude-reg = "x0+0+0" # Crop shadow of a window fully on a particular Xinerama screen to the screen. @@ -96,7 +104,7 @@ shadow-exclude-reg = "x40+20+1436" # Fading # Fade windows in/out when opening/closing and when opacity changes, # unless no-fading-openclose is used. -fading = true; +fading = false; # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) # fade-in-step = 0.028 @@ -132,7 +140,7 @@ fade-exclude = [ # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) # inactive-opacity = 1 -inactive-opacity = 0.55; +inactive-opacity = 0.90; # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) # frame-opacity = 1.0 @@ -146,7 +154,7 @@ frame-opacity = 0.75; inactive-opacity-override = false; # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) -active-opacity = 0.75; +active-opacity = 0.90; # Dim inactive windows. (0.0 - 1.0, defaults to 0.0) inactive-dim = 0.4 @@ -177,7 +185,7 @@ focus-exclude = [ opacity-rule = [ "80:class_g = 'Bar'", # lemonbar "80:class_g = 'Polybar'", - "90:class_g = 'awesome'", + "100:class_g = 'awesome'", "100:class_g = 'slop'", # maim "100:class_g = 'XTerm'", "100:class_g = 'Alacritty'", @@ -245,8 +253,8 @@ blur: { # requires: https://github.com/ibhagwan/picom method = "dual_kawase"; #method = "kernel"; - strength = 14; - deviation = 4.0; + strength = 12; + deviation = 9.0; # kernel = "11x11gaussian"; background = false; background-frame = false; @@ -384,7 +392,7 @@ glx-no-stencil = true # but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). # Recommended if it works. # -# glx-no-rebind-pixmap = false +glx-no-rebind-pixmap = true # Disable the use of damage information. # This cause the whole screen to be redrawn everytime, instead of the part of the screen diff --git a/qutebrowser/autoconfig.yml b/qutebrowser/autoconfig.yml index 28ab6b0..44c6bb3 100644 --- a/qutebrowser/autoconfig.yml +++ b/qutebrowser/autoconfig.yml @@ -44,7 +44,11 @@ settings: https://outlook.live.com?mailtouri=%25s: false https://outlook.office.com?mailtouri=%25s: false https://staff.tfcconnection.org: true + scrolling.bar: + global: overlay + statusbar.show: + global: in-mode tabs.show: - global: always + global: switching zoom.default: global: 100% diff --git a/qutebrowser/config.py b/qutebrowser/config.py index 2557219..7a8efeb 100644 --- a/qutebrowser/config.py +++ b/qutebrowser/config.py @@ -2129,7 +2129,10 @@ c.tabs.title.alignment = "center" ## qutebrowser`. ## Type: Dict c.url.searchengines = { - "DEFAULT": "https://search.tfcconnection.org/?q={}", + "DEFAULT": "https://search.brave.com/search?q={}", + "vid": "https://search.brave.com/videos?q={}", + "img": "https://search.brave.com/images?q={}", + "tfc": "https://search.tfcconnection.org/?q={}", "yt": "https://yewtu.be/search?q={}", "mel": "https://melpa.org/#/?q={}", "y": "https://www.youtube.com/results?search_query={}", @@ -2496,9 +2499,12 @@ config.bind( config.bind("gt", 'hint links spawn --detach transadd "{hint-url}"') +config.bind("gD", 'hint links spawn alacritty -e aria2c -o ~/Downloads/') + config.bind('d', 'tab-close') config.bind('b', 'set-cmd-text -s :tab-select ') config.bind('pt', 'tab-pin') config.bind('tm', 'tab-move') config.bind('st', 'config-cycle tabs.show always switching') +config.bind('ss', 'config-cycle statusbar.show always in-mode') diff --git a/rofi/config.rasi b/rofi/config.rasi index 9fa5202..1e74ae3 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -11,7 +11,7 @@ configuration { display-drun: " "; display-run: " "; display-combi: " "; - drun-display-format: "{name} [({generic})] - {exec}"; + drun-display-format: "{name} [({generic})]";/* - {exec}*/ threads: 0; scroll-method: 0; disable-history: false; @@ -23,6 +23,10 @@ configuration { kb-row-up: "Control-k"; kb-row-left: "Control-h"; kb-row-right: "Control-l"; + timeout { + delay: 15; + action: "kb-cancel"; + } } * { @@ -56,8 +60,8 @@ configuration { window { background-color: @base00t; text-color: @base05; - transparency: "real"; - border-radius: 16px; + /* transparency: "real"; */ + border-radius: 20px; border: 0px; width: 60%; location: center; @@ -70,36 +74,40 @@ window { mainbox { border-radius: 16; - background-color: @transparent; + /* background-color: @transparent; */ + background-color: @base00t; text-color: @base05; transparency: "real"; } inputbar { - background-color: @transparent; + /* background-color: @transparent; */ + background-color: @base00t; text-color: @base05; expand: false; border-radius: 36px; margin: 0px 0px 0px 0px; - padding: 6px 6px 6px 6px; + padding: 30px 6px 30px 6px; position: north; } prompt { enabled: true; padding: 0px 6px 0px 5px; - background-color: @transparent; + /* background-color: @transparent; */ + background-color: @base00t; text-color: @base05; border: 0px; } entry { - background-color: @transparent; + /* background-color: @transparent; */ + background-color: @base00t; placeholder-color: @base05; text-color: @base05; expand: true; horizontal-align: 0; - placeholder: "Search"; + placeholder: ""; blink: true; border: 0px; padding: 0px 0px 0px 6px; @@ -117,6 +125,7 @@ sidebar { } mainbox { + /* background-color: @base00t; */ background-color: @base00t; text-color: @transparent; children: [ inputbar, listview, message ]; diff --git a/rofi/launchers-git/emoji.sh b/rofi/launchers-git/emoji.sh index e29ef14..5effb6a 100755 --- a/rofi/launchers-git/emoji.sh +++ b/rofi/launchers-git/emoji.sh @@ -8,11 +8,15 @@ else #echo "this is not hidpi" fi -rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi $@ & -c=0 -while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - sleep .1 - c=$((c+1)) - [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds -done +rofi -no-lazy-grab -show emoji -modi emoji -theme launchers-git/"$style".rasi + + + +# $@ & +# c=0 +# while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do +# sleep .1 +# c=$((c+1)) +# [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +# done diff --git a/rofi/launchers-git/launcher.sh b/rofi/launchers-git/launcher.sh index 2cb3526..839f4be 100755 --- a/rofi/launchers-git/launcher.sh +++ b/rofi/launchers-git/launcher.sh @@ -12,10 +12,13 @@ else #echo "this is not hidpi" fi -rofi -no-lazy-grab -show combi -combi-modi "drun,run" -theme launchers-git/"$style".rasi $@ & -c=0 -while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - sleep .1 - c=$((c+1)) - [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds -done +rofi -no-lazy-grab -show combi -combi-modi "drun,run" -theme launchers-git/"$style".rasi + + +# $@ & +# c=0 +# while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do +# sleep .1 +# c=$((c+1)) +# [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +# done diff --git a/scripts/batget b/scripts/batget new file mode 100755 index 0000000..5f54c1b --- /dev/null +++ b/scripts/batget @@ -0,0 +1,4 @@ +#!/bin/sh + +awesome-client "naughty.destroy_all_notifications()" +notify-send "$(batinfo)" --icon=battery diff --git a/scripts/batinfo b/scripts/batinfo index b531dde..c5f277b 100755 --- a/scripts/batinfo +++ b/scripts/batinfo @@ -1,10 +1,13 @@ #!/bin/sh + +awesome-client "naughty.destroy_all_notifications()" capacity=$(cat /sys/class/power_supply/BAT1/capacity) status=$(cat /sys/class/power_supply/BAT1/status) if [ $status = 'Charging' ]; then - icon='' +else + icon='' fi - echo $icon $capacity +echo $icon $capacity diff --git a/scripts/dlaudio b/scripts/dlaudio new file mode 100755 index 0000000..751777a --- /dev/null +++ b/scripts/dlaudio @@ -0,0 +1,3 @@ +#!/bin/sh + +alacritty -e yt-dlp -x -o '/home/chris/Music/%(title)s.%(ext)s ' $1 diff --git a/scripts/dlvideo b/scripts/dlvideo new file mode 100755 index 0000000..103f485 --- /dev/null +++ b/scripts/dlvideo @@ -0,0 +1,3 @@ +#!/bin/sh + +alacritty -e yt-dlp -o '/home/chris/Videos/%(title)s.%(ext)s ' $1 \ No newline at end of file diff --git a/scripts/emacslof b/scripts/emacslof index 4a64495..1a3656f 100755 --- a/scripts/emacslof +++ b/scripts/emacslof @@ -15,7 +15,6 @@ if [ $(pgrep -c emacsclient) -gt 0 ]; then wmctrl -ia $emacsrg exit fi - else if [ $KDE_FULL_SESSION = "true" ]; then ww -f emacs -c emacsclient diff --git a/scripts/filesearch b/scripts/filesearch index abd1b0d..8227b0c 100755 --- a/scripts/filesearch +++ b/scripts/filesearch @@ -11,10 +11,13 @@ else #echo "this is not hidpi" fi -lolcate | rofi -dmenu -p "File Search:" -i -matching regex -theme ~/.config/rofi/launchers-git/$style.rasi | xargs -r0 xdg-open $@ & -c=0 -while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - sleep .1 - c=$((c+1)) - [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds -done +lolcate | rofi -dmenu -p " " -i -matching regex -theme ~/.config/rofi/launchers-git/$style.rasi | xargs -r0 xdg-open + + +# $@ & +# c=0 +# while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do +# sleep .1 +# c=$((c+1)) +# [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds +# done diff --git a/scripts/kderofi-rbw b/scripts/kderofi-rbw index b4f77e7..bb4b1b6 100755 --- a/scripts/kderofi-rbw +++ b/scripts/kderofi-rbw @@ -27,18 +27,19 @@ list_passwords() { passwords=$(rbw list) -prompt='search for passwords...' +prompt='BW' if [ $XDG_SESSION_TYPE = "x11" ]; then - SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi $@ & - c=0 - while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - sleep .1 - c=$((c+1)) - [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds - done + SECRET=$(list_passwords | rofi -i -p "${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi + # $@ & + # c=0 + # while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + # sleep .1 + # c=$((c+1)) + # [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds + # done ) else - SECRET=$(list_passwords | rofi -i -p="${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi) + SECRET=$(list_passwords | rofi -i -p "${prompt}" -dmenu -theme ~/.config/rofi/launchers-git/$style.rasi) fi # Ask whether pass, user or both are required @@ -49,16 +50,17 @@ options=("Password" \ "OTP") if [ $XDG_SESSION_TYPE = "x11" ]; then - option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p="..." -theme ~/.config/rofi/launchers-git/$style.rasi $@ & - c=0 - while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do - sleep .1 - c=$((c+1)) - [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds - done + option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p "" -theme ~/.config/rofi/launchers-git/$style.rasi + # $@ & + # c=0 + # while ! xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $(xdotool search -class 'rofi') ; do + # sleep .1 + # c=$((c+1)) + # [[ c = 50 ]] && exit; # stop script window didn't appear after 5 seconds + # done ) else - option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p="..." -theme ~/.config/rofi/launchers-git/$style.rasi) + option=$(printf '%s\n' "${options[@]%}" | rofi -i -dmenu -p "" -theme ~/.config/rofi/launchers-git/$style.rasi) fi # echo $option diff --git a/scripts/lightget b/scripts/lightget index e4d3e00..0ecbdef 100755 --- a/scripts/lightget +++ b/scripts/lightget @@ -1,3 +1,5 @@ #!/bin/sh -notify-send " $(light -G) ﯧ " +awesome-client "naughty.destroy_all_notifications()" + +notify-send "$(light -G)" --icon=display-brightness diff --git a/scripts/org-agenda-lof b/scripts/org-agenda-lof index aa59992..8f3b422 100755 --- a/scripts/org-agenda-lof +++ b/scripts/org-agenda-lof @@ -1,9 +1,42 @@ #!/bin/sh -window=$(wmctrl -l | awk '{print $4}' | rg org-agenda) +active=$(xdotool getwindowfocus getwindowname) + +# Check to see if an emacsclient is running +if [ $(pgrep -c emacsclient) -gt 0 ]; then + + if [ $XDG_SESSION_TYPE = "x11" ]; then + #X11 + window=$(wmctrl -lx | rg org-agenda | awk '{print $1}') + # echo $emacsrg + + if [ -z $window ]; then + emacsclient -e '(chris/org-agenda)' & + exit + else + if [ $window = $active ]; then + wmctrl -ir $window -b toggle,hidden + else + wmctrl -ia $window + exit + fi + fi + else + if [ $KDE_FULL_SESSION = "true" ]; then + ww -f emacs -c emacsclient + exit + else + # WAYLAND + emacsrg=$(wlrctl window list | rg 'emacs:\sorg-agenda' | rg 'emacs:') + + emacswin=$(echo $emacsrg | sed 's/.*\: //') + # echo $emacswin + + wlrctl toplevel focus title:"$emacswin" + exit + fi + fi -if [ -z $window ]; then - wmctrl -a $window else - emacsclient -e '(chris/org-agenda)' + emacsclient -e '(chris/org-agenda)' & fi diff --git a/scripts/screenshot b/scripts/screenshot index e508b90..76c77ce 100755 --- a/scripts/screenshot +++ b/scripts/screenshot @@ -1,5 +1,16 @@ #!/bin/bash +if [ $(hostname) = "syl" ]; then + if [ $XDG_SESSION_TYPE = "x11" ]; then + style="laptop-search" + else + style="laptop-search-wayland" + fi +else + style="desktop-search" + #echo "this is not hidpi" +fi + timestamp=$(date +%F-%T) picture=$(maim --hidecursor --select /tmp/$timestamp.png) @@ -10,7 +21,7 @@ declare -a options=( "cancel" ) -choice=$(printf '%s\n' "${options[@]}" | rofi -dmenu -p 'Clip or Save') +choice=$(printf '%s\n' "${options[@]}" | rofi -theme /home/chris/dotfiles/rofi/launchers-git/$style.rasi -dmenu -p 'Clip or Save') if [[ "$choice" == "cancel" ]]; then rm /tmp/$timestamp.png diff --git a/scripts/timeget b/scripts/timeget new file mode 100755 index 0000000..9f18fc8 --- /dev/null +++ b/scripts/timeget @@ -0,0 +1,5 @@ +#!/bin/sh + +awesome-client "naughty.destroy_all_notifications()" + +notify-send "$(date +"%h %d, %H:%M:%S %p")" --icon=time diff --git a/scripts/voldown b/scripts/voldown new file mode 100755 index 0000000..7e93518 --- /dev/null +++ b/scripts/voldown @@ -0,0 +1,7 @@ +#!/bin/sh + +awesome-client "naughty.destroy_all_notifications()" +pactl set-sink-volume @DEFAULT_SINK@ -5% +paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga +volume=$(pulsemixer --get-volume | awk '{print $1}') +notify-send $volume \ No newline at end of file diff --git a/scripts/volup b/scripts/volup new file mode 100755 index 0000000..e8f2d11 --- /dev/null +++ b/scripts/volup @@ -0,0 +1,7 @@ +#!/bin/sh + +awesome-client "naughty.destroy_all_notifications()" +pactl set-sink-volume @DEFAULT_SINK@ +5% +paplay /usr/share/sounds/freedesktop/stereo/audio-volume-change.oga +volume=$(pulsemixer --get-volume | awk '{print $1}') +notify-send $volume diff --git a/surfingkeys/conf.js b/surfingkeys/conf.js index 14f6ea3..e523254 100644 --- a/surfingkeys/conf.js +++ b/surfingkeys/conf.js @@ -1,8 +1,8 @@ // an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. -map('gt', 'T'); +api.map('gt', 'T'); // an example to remove mapkey `Ctrl-i` -unmap(''); +api.unmap(''); settings.smoothScroll = false; settings.scrollStepSize = 220; @@ -45,4 +45,3 @@ settings.theme = ` #sk_status, #sk_find { font-size: 20pt; }`; -// click `Save` button to make above settings to take effect. diff --git a/tridactyl/tridactylrc b/tridactyl/tridactylrc index be59e7c..334d290 100644 --- a/tridactyl/tridactylrc +++ b/tridactyl/tridactylrc @@ -57,13 +57,17 @@ unbind v command torrent js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('transadd ' + url)) " YTDL -command ytdl js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('alacritty -e yt-dlp -o ~/Videos/%(title)s.%(ext)s ' + url)) +command ytdl js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('dlvideo ' + url)) + +command aud js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_quiet('dlaudio ' + url)) + "" Adding my own bindings bind v hint -W mpv bind gt hint -W torrent bind gv current_url mpv +bind ga hint -W aud bind gV hint -W ytdl bind F hint -t bind gy hint -y diff --git a/wayfire/wayfire.ini b/wayfire/wayfire.ini index 87c32bf..cdabbfc 100644 --- a/wayfire/wayfire.ini +++ b/wayfire/wayfire.ini @@ -87,7 +87,7 @@ binding_screenshot_interactive = KEY_PRINT binding_terminal = KEY_ENTER binding_pass = KEY_P command_agenda = emacsclient -e '(chris/org-agenda)' -command_browser = fflof +command_browser = qblof command_dolphin = dolphin command_emacs = emacslof command_kanshi = kanshi @@ -446,7 +446,7 @@ rule_3 = on created if app_id is "emacs" then tile clip_shadow_inside = true enabled_views = all include_undecorated_views = true -shadow_color = \#000000E6 +shadow_color = \#000000FF shadow_radius = 30 [winzoom]