Icon for calc mode

This commit is contained in:
Thomas Avé 2022-11-19 15:08:26 +01:00
parent 79afd5af4a
commit 8a58a696d7
2 changed files with 5 additions and 4 deletions

View File

@ -6,8 +6,9 @@ M.project_files = function()
local opts = require('telescope.themes').get_ivy({}) -- define here if you want to define something local opts = require('telescope.themes').get_ivy({}) -- define here if you want to define something
opts["show_untracked"] = true opts["show_untracked"] = true
opts["layout_config"] = {height=0.2} opts["layout_config"] = {height=0.2}
local ok = pcall(require"telescope.builtin".git_files, opts) if not pcall(require"telescope.builtin".git_files, opts) then
if not ok then require"telescope.builtin".find_files(opts) end require"telescope.builtin".find_files(opts)
end
end end
M.buffers = function() M.buffers = function()

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
if [[ -z "$1" ]]; then if [[ -z "$1" ]]; then
echo "Calc Mode" echo -e "Calc Mode\0icon\x1fgnome-calculator"
else else
killall rofi killall rofi
# so rofi doesn't complain "can't launch rofi inside rofi" # so rofi doesn't complain "can't launch rofi inside rofi"
rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xsel -i" rofi -show calc -modi calc -no-show-match -no-sort -calc-command "echo -n '{result}' | xsel --clipboard"
fi fi